[eluser]dstegelman[/eluser]
Hey guys,
I tried a Google search and looked around a bit in Pyrocms before I posted this, but I have had this problem all night and I thought it might be best to seek some help.
I am having an issue loading a custom library from the helper that I have created. I am using Wiredesignz modular seperation.
Inside /application/helpers/controls_helper.php
I have
Code:
function projectDropdownList(){
$CI =& get_instance();
$CI->load->library('controls');
}
and inside /application/libraries/Controls.php
I have
Code:
class Controls {
//put your code here
private $ci;
public function __construct() {
$this->ci =& get_instance();
$this->ci->load->database();
}
public function getProject($projectID){
if ($projectID == 0){
$projectData = $this->ci->db->get('projectTable');
} else {
$projectData = $this->ci->db->get_where('projectTable', array('projectID'=>$projectID));
}
return $projectData;
}
}
When I try to use the controls helper function I get this error back from MY_Loader.php
Code:
ErrorException [ Notice ]: Undefined property: CI::$controls
APPPATH/third_party/MX/Loader.php [ 144 ]
139 CI::$APP->$_alias = new $library($params);
140 $this->_ci_classes[$class] = $_alias;
141 }
142
143 $this->_ci_assign_to_models();
144 return CI::$APP->$_alias;
145
146 }
147
148 /** Load an array of libraries **/
149 public function libraries($libraries) {
I can't seem to reach the CI super object or something.