diff options
author | Andrey Andreev <narf@devilix.net> | 2016-12-16 13:52:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-16 13:52:54 +0100 |
commit | ba03c314a0181abb1e25d47b1d90053df0eb0ef4 (patch) | |
tree | 6ed4db85f996a9f5d768fd73e8493e012e7ef6c6 /user_guide_src | |
parent | facb347dcb5fe6f32d2c57fbe24db59d11a3ab6d (diff) | |
parent | 1398b72b32e3fb9628be2e09ffe97bea88565868 (diff) |
Merge pull request #4947 from slax0rr/develop
[ci skip] Remove needless constructor in model general topics documentation
Diffstat (limited to 'user_guide_src')
-rw-r--r-- | user_guide_src/source/general/core_classes.rst | 1 | ||||
-rw-r--r-- | user_guide_src/source/general/models.rst | 8 |
2 files changed, 3 insertions, 6 deletions
diff --git a/user_guide_src/source/general/core_classes.rst b/user_guide_src/source/general/core_classes.rst index 07c0b00ba..79f73ef06 100644 --- a/user_guide_src/source/general/core_classes.rst +++ b/user_guide_src/source/general/core_classes.rst @@ -101,6 +101,7 @@ your new class in your application controller's constructors. public function __construct() { parent::__construct(); + // Your own constructor code } public function index() diff --git a/user_guide_src/source/general/models.rst b/user_guide_src/source/general/models.rst index 1cfe736de..eb842e927 100644 --- a/user_guide_src/source/general/models.rst +++ b/user_guide_src/source/general/models.rst @@ -22,12 +22,6 @@ model class might look like:: public $content; public $date; - public function __construct() - { - // Call the CI_Model constructor - parent::__construct(); - } - public function get_last_ten_entries() { $query = $this->db->get('entries', 10); @@ -76,6 +70,7 @@ The basic prototype for a model class is this:: public function __construct() { parent::__construct(); + // Your own constructor code } } @@ -91,6 +86,7 @@ The file name must match the class name. For example, if this is your class:: public function __construct() { parent::__construct(); + // Your own constructor code } } |