From 0e3263b44d2762894588ff3e682579ec0cb77fa0 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Thu, 10 Mar 2011 16:37:35 +0000 Subject: Updated version number in User Guide html. --- user_guide/general/controllers.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide/general/controllers.html') diff --git a/user_guide/general/controllers.html b/user_guide/general/controllers.html index 91e700aba..ccc5302f8 100644 --- a/user_guide/general/controllers.html +++ b/user_guide/general/controllers.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.0

CodeIgniter User Guide Version 2.0.1

-- cgit v1.2.3-24-g4f1b From b42466419f4b49cf5121f3103f7dd342075458db Mon Sep 17 00:00:00 2001 From: Eric Barnes Date: Thu, 10 Mar 2011 20:32:56 -0500 Subject: Fixed missing parentheses and added scope to examples. Fixes #103 --- user_guide/general/controllers.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'user_guide/general/controllers.html') diff --git a/user_guide/general/controllers.html b/user_guide/general/controllers.html index ccc5302f8..2da98b6c7 100644 --- a/user_guide/general/controllers.html +++ b/user_guide/general/controllers.html @@ -98,7 +98,7 @@ Controllers <?php class Blog extends CI_Controller { - function index() + public function index() { echo 'Hello World!'; } @@ -153,12 +153,12 @@ class blog extends CI_Controller {
<?php class Blog extends CI_Controller { - function index() + public function index() { echo 'Hello World!'; } - function comments() + public function comments() { echo 'Look at this!'; } @@ -187,7 +187,7 @@ class Blog extends CI_Controller { <?php
class Products extends CI_Controller {

-    function shoes($sandals, $id)
+    public function shoes($sandals, $id)
    {
        echo $sandals;
        echo $id;
@@ -220,7 +220,7 @@ specifying any URI segments you'll see your Hello World message by default.

As noted above, the second segment of the URI typically determines which function in the controller gets called. CodeIgniter permits you to override this behavior through the use of the _remap() function:

-function _remap()
+public function _remap()
{
    // Some code here...
}
@@ -231,7 +231,7 @@ allowing you to define your own function routing rules.

The overridden function call (typically the second segment of the URI) will be passed as a parameter to the _remap() function:

-function _remap($method)
+public function _remap($method)
{
    if ($method == 'some_method')
    {
@@ -245,10 +245,10 @@ allowing you to define your own function routing rules.

Any extra segments after the method name are passed into _remap() as an optional second parameter. This array can be used in combination with PHP's call_user_func_array to emulate CodeIgniter's default behavior.

-function _remap($method, $params = array())
+public function _remap($method, $params = array())
{
    $method = 'process_'.$method;
-    if (method_exists($this, $method)
+    if (method_exists($this, $method))
    {
        return call_user_func_array(array($this, $method), $params);
    }
@@ -270,7 +270,7 @@ be called by the output class instead of echoing the finalized data directly. Th

Here is an example:

-function _output($output)
+public function _output($output)
{
    echo $output;
}
@@ -298,7 +298,7 @@ the available methods in the Output Class underscore as the name prefix and it will not be served via a URL request. For example, if you were to have a function like this:

-function _utility()
+private function _utility()
{
  // some code
}
@@ -346,7 +346,7 @@ called if the URL contains only the sub-folder. Simply name your default contro <?php
class Blog extends CI_Controller {

-       function __construct()
+       public function __construct()
       {
            parent::__construct();
            // Your own constructor code
-- cgit v1.2.3-24-g4f1b From 1f622294b92c095fd91e8ca44912d405c1605ded Mon Sep 17 00:00:00 2001 From: Pascal Kriete Date: Thu, 7 Apr 2011 12:06:51 -0400 Subject: Wow, I screwed that up, Reactor is going to 2.0.2 not 2.0.1 --- user_guide/general/controllers.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide/general/controllers.html') diff --git a/user_guide/general/controllers.html b/user_guide/general/controllers.html index 2da98b6c7..c90916472 100644 --- a/user_guide/general/controllers.html +++ b/user_guide/general/controllers.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

-- cgit v1.2.3-24-g4f1b From 114ab0988e20ac6be39ad363ff897a1a3b85e565 Mon Sep 17 00:00:00 2001 From: Razican Date: Mon, 25 Apr 2011 17:26:45 +0200 Subject: Fixed double-space typo. --- user_guide/general/controllers.html | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'user_guide/general/controllers.html') diff --git a/user_guide/general/controllers.html b/user_guide/general/controllers.html index c90916472..01ef3d1ff 100644 --- a/user_guide/general/controllers.html +++ b/user_guide/general/controllers.html @@ -91,7 +91,7 @@ Controllers

Let's try it:  Hello World!

-

Let's create a simple controller so you can see it in action. Using your text editor, create a file called blog.php, and put the following code in it:

+

Let's create a simple controller so you can see it in action. Using your text editor, create a file called blog.php, and put the following code in it: