I'm fairly new to CodeIgniter and trying to do the following:
I've got a model App, Attribute and Sound.
In the create method of the App-Controller, I'm trying to save Attributes and Sounds. I'm using the following (basically working) approach:
$this->load->library('../controllers/attributes');
$this->attributes->create('value1', 'value2');
This works perfectly, the attributes controller is found in $this->attributes
.
Now I'm trying to do the same for the sounds:
$this->load->library('../controllers/sounds');
$this->sounds->create('value3', 'value4');
This doesn't work, because the sounds controller is saved in $this->attributes->sounds
instead of $this->sounds
.
Edit:
$this->load->library(array('../controllers/sounds', '../controllers/attributes'));
Results in the same problem, it'll turn into $this->sounds
and $this->sounds->attributes
.
Where is my mistake?