You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
World Wide Web Server edited this page Jul 4, 2012
·
8 revisions
CLE - Controller Loader Extension
Controller Loader Extension - allows to work with your controllers within other controllers just the same as you would work with libraries
Controller Loader Extension requirements:
PHP5
Controller Loader Extension installation:
Start with a clean CI install.
Place File from CLE archive into your /application/libraries folder.
Maker sure class preffix constant is 'MY' or change file names and class name according to your prefix
Controller Loader Extension Usage:
All you must to do is to extend your controllers from MY_PageController instead of Controller and set constructor method to parent::getInstance() as follows
[code]
class Welcome extends MY_PageController {
public function __construct()
{
parent::getInstance();
}
}
[/code]
Load and work with other controllers just the same you would do with your libraries:
[code]
class Demo extends MY_PageController {
public function __construct()
{
parent::getInstance();
}
public function index()
{
$this->load->controller('Welcome');
$this->welcome->index();
}