diff options
author | Andrey Andreev <narf@devilix.net> | 2017-11-20 08:58:03 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2017-11-20 08:58:03 +0100 |
commit | 4a567782a2ece1ceffebfc1efa580f654df8be1f (patch) | |
tree | 11ff6559088d0612692642bc7395a3866907f833 /user_guide_src/source | |
parent | ee8324368f2844aae0d558f1d194419a2181c281 (diff) |
[ci skip] More docs updates following #5330
Diffstat (limited to 'user_guide_src/source')
-rw-r--r-- | user_guide_src/source/general/controllers.rst | 2 | ||||
-rw-r--r-- | user_guide_src/source/general/core_classes.rst | 9 | ||||
-rw-r--r-- | user_guide_src/source/general/creating_libraries.rst | 3 | ||||
-rw-r--r-- | user_guide_src/source/general/models.rst | 14 | ||||
-rw-r--r-- | user_guide_src/source/libraries/sessions.rst | 4 |
5 files changed, 8 insertions, 24 deletions
diff --git a/user_guide_src/source/general/controllers.rst b/user_guide_src/source/general/controllers.rst index 5a111d8dc..14e583636 100644 --- a/user_guide_src/source/general/controllers.rst +++ b/user_guide_src/source/general/controllers.rst @@ -337,4 +337,4 @@ list. That's it! ========== -That, in a nutshell, is all there is to know about controllers.
\ No newline at end of file +That, in a nutshell, is all there is to know about controllers. diff --git a/user_guide_src/source/general/core_classes.rst b/user_guide_src/source/general/core_classes.rst index 79f73ef06..9ccded75c 100644 --- a/user_guide_src/source/general/core_classes.rst +++ b/user_guide_src/source/general/core_classes.rst @@ -83,6 +83,7 @@ application/core/MY_Input.php, and declare your class with:: public function __construct() { parent::__construct(); + // Your own constructor code } } @@ -98,12 +99,6 @@ your new class in your application controller's constructors. class Welcome extends MY_Controller { - public function __construct() - { - parent::__construct(); - // Your own constructor code - } - public function index() { $this->load->view('welcome_message'); @@ -119,4 +114,4 @@ To set your own sub-class prefix, open your $config['subclass_prefix'] = 'MY_'; Please note that all native CodeIgniter libraries are prefixed -with CI\_ so DO NOT use that as your prefix.
\ No newline at end of file +with CI\_ so DO NOT use that as your prefix. diff --git a/user_guide_src/source/general/creating_libraries.rst b/user_guide_src/source/general/creating_libraries.rst index d6b0631af..83742b619 100644 --- a/user_guide_src/source/general/creating_libraries.rst +++ b/user_guide_src/source/general/creating_libraries.rst @@ -224,6 +224,7 @@ extend the parent constructor:: public function __construct($config = array()) { parent::__construct($config); + // Your own constructor code } } @@ -256,4 +257,4 @@ To set your own sub-class prefix, open your $config['subclass_prefix'] = 'MY_'; Please note that all native CodeIgniter libraries are prefixed with CI\_ -so DO NOT use that as your prefix.
\ No newline at end of file +so DO NOT use that as your prefix. diff --git a/user_guide_src/source/general/models.rst b/user_guide_src/source/general/models.rst index eb842e927..0b20164e9 100644 --- a/user_guide_src/source/general/models.rst +++ b/user_guide_src/source/general/models.rst @@ -67,12 +67,6 @@ The basic prototype for a model class is this:: class Model_name extends CI_Model { - public function __construct() - { - parent::__construct(); - // Your own constructor code - } - } Where **Model_name** is the name of your class. Class names **must** have @@ -83,12 +77,6 @@ The file name must match the class name. For example, if this is your class:: class User_model extends CI_Model { - public function __construct() - { - parent::__construct(); - // Your own constructor code - } - } Your file will be this:: @@ -176,4 +164,4 @@ database. The following options for connecting are available to you: $config['pconnect'] = FALSE; $config['db_debug'] = TRUE; - $this->load->model('model_name', '', $config);
\ No newline at end of file + $this->load->model('model_name', '', $config); diff --git a/user_guide_src/source/libraries/sessions.rst b/user_guide_src/source/libraries/sessions.rst index b1f658d8f..994dc2e08 100644 --- a/user_guide_src/source/libraries/sessions.rst +++ b/user_guide_src/source/libraries/sessions.rst @@ -757,8 +757,8 @@ when creating a session driver for CodeIgniter: <http://php.net/sessionhandlerinterface>`_ interface. .. note:: You may notice that ``SessionHandlerInterface`` is provided - by PHP since version 5.4.0. CodeIgniter will automatically declare - the same interface if you're running an older PHP version. + by PHP since version 5.4.0. CodeIgniter will automatically declare + the same interface if you're running an older PHP version. The link will explain why and how. |