mirror of
https://github.com/bcit-ci/CodeIgniter.git
synced 2025-02-20 11:13:29 +08:00
...
parent
3696eaf2f1
commit
18677c600c
@ -1,18 +1,18 @@
|
||||
<h2>CLE - Controller Loader Extension</h2>
|
||||
<p><strong>Controller Loader Extension<strong> - allows to work with your controllers within other controllers just the same as you would work with libraries</p>
|
||||
|
||||
Controller Loader Extension - allows to work with your controllers within other controllers just the same as you would work with libraries
|
||||
|
||||
<h2>Controller Loader Extension requirements:</h2>
|
||||
<strong>PHP5</strong>
|
||||
|
||||
<h2>Controller Loader Extension installation:</h2>
|
||||
<ol>
|
||||
<li>Start with a clean CI install.</li>
|
||||
<li>Place File from CLE archive into your /application/libraries folder.</li>
|
||||
<li>Maker sure class preffix constant is 'MY' or change file names and class name according to your prefix</li>
|
||||
</ol>
|
||||
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
|
||||
|
||||
</h2>Controller Loader Extension Usage:</h2>
|
||||
<ol>
|
||||
<li>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
|
||||
|
||||
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()
|
||||
@ -21,8 +21,8 @@ class Welcome extends MY_PageController {
|
||||
}
|
||||
}
|
||||
[/code]
|
||||
</li>
|
||||
<li>Load and work with other controllers just the same you would do with your libraries:
|
||||
|
||||
Load and work with other controllers just the same you would do with your libraries:
|
||||
[code]
|
||||
class Demo extends MY_PageController {
|
||||
public function __construct()
|
||||
@ -36,5 +36,4 @@ class Demo extends MY_PageController {
|
||||
$this->welcome->index();
|
||||
}
|
||||
}
|
||||
[/code]
|
||||
</li></ol>
|
||||
[/code]
|
Loading…
x
Reference in New Issue
Block a user