Skip to content

CLE Controller Loader Extension

World Wide Web Server edited this page Jul 4, 2012 · 8 revisions

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(File:CLE.zip) 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();
  }

} [/code]

Clone this wiki locally