diff options
author | Greg Aker <greg.aker@ellislab.com> | 2010-11-09 20:46:13 +0100 |
---|---|---|
committer | Greg Aker <greg.aker@ellislab.com> | 2010-11-09 20:46:13 +0100 |
commit | 63277b81edde11b77ff94cbf1c3e5db16c97c4bf (patch) | |
tree | e03d08dcba5de6a97576bbdd6565891dc1d98256 /user_guide/general | |
parent | 6b6c274e00fe2357004c0a4e38e6bdb0b2e0ddb4 (diff) |
Fix #62 Adding CI_ prefix to Controller.
Diffstat (limited to 'user_guide/general')
-rw-r--r-- | user_guide/general/controllers.html | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/user_guide/general/controllers.html b/user_guide/general/controllers.html index 782fbfa7e..9da1da248 100644 --- a/user_guide/general/controllers.html +++ b/user_guide/general/controllers.html @@ -96,7 +96,7 @@ Controllers <textarea class="textarea" style="width:100%" cols="50" rows="10"> <?php -class Blog extends Controller { +class Blog extends CI_Controller { function index() { @@ -119,7 +119,7 @@ class Blog extends Controller { <p>Note: Class names must start with an uppercase letter. In other words, this is valid:</p> <code><?php<br /> -class <var>Blog</var> extends Controller {<br /> +class <var>Blog</var> extends CI_Controller {<br /> <br /> }<br /> ?></code> @@ -127,7 +127,7 @@ class <var>Blog</var> extends Controller {<br /> <p>This is <strong>not</strong> valid:</p> <code><?php<br /> -class <var>blog</var> extends Controller {<br /> +class <var>blog</var> extends CI_Controller {<br /> <br /> }<br /> ?></code> @@ -151,7 +151,7 @@ class <var>blog</var> extends Controller {<br /> <textarea class="textarea" style="width:100%" cols="50" rows="15"> <?php -class Blog extends Controller { +class Blog extends CI_Controller { function index() { @@ -185,7 +185,7 @@ class Blog extends Controller { <code> <?php<br /> -class Products extends Controller {<br /> +class Products extends CI_Controller {<br /> <br /> function shoes($sandals, $id)<br /> {<br /> @@ -329,7 +329,7 @@ called if the URL contains only the sub-folder. Simply name your default contro <p>If you intend to use a constructor in any of your Controllers, you <strong>MUST</strong> place the following line of code in it:</p> -<code>parent::Controller();</code> +<code>parent::CI_Controller();</code> <p>The reason this line is necessary is because your local constructor will be overriding the one in the parent controller class so we need to manually call it.</p> @@ -338,11 +338,11 @@ called if the URL contains only the sub-folder. Simply name your default contro <code> <?php<br /> -class <kbd>Blog</kbd> extends Controller {<br /> +class <kbd>Blog</kbd> extends CI_Controller {<br /> <br /> function <kbd>Blog()</kbd><br /> {<br /> - <var>parent::Controller();</var><br /> + <var>parent::CI_Controller();</var><br /> }<br /> }<br /> ?></code> @@ -351,11 +351,11 @@ class <kbd>Blog</kbd> extends Controller {<br /> <code> <?php<br /> -class <kbd>Blog</kbd> extends Controller {<br /> +class <kbd>Blog</kbd> extends CI_Controller {<br /> <br /> function <kbd>__construct()</kbd><br /> {<br /> - <var>parent::Controller();</var><br /> + <var>parent::CI_Controller();</var><br /> }<br /> }<br /> ?></code> |