From ee2ece8f59338087cef911073d16b2ee407a31bb Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 28 Sep 2015 13:18:05 +0300 Subject: [ci skip] Clarify docs about default_controller --- user_guide_src/source/general/controllers.rst | 22 +++++++++++++--------- user_guide_src/source/general/routing.rst | 15 ++++++++++----- 2 files changed, 23 insertions(+), 14 deletions(-) (limited to 'user_guide_src/source/general') diff --git a/user_guide_src/source/general/controllers.rst b/user_guide_src/source/general/controllers.rst index 7ab5a7f6a..7efb9349e 100644 --- a/user_guide_src/source/general/controllers.rst +++ b/user_guide_src/source/general/controllers.rst @@ -140,9 +140,12 @@ file and set this variable:: $route['default_controller'] = 'blog'; -Where Blog is the name of the controller class you want used. If you now +Where 'blog' is the name of the controller class you want used. If you now load your main index.php file without specifying any URI segments you'll -see your Hello World message by default. +see your "Hello World" message by default. + +For more information, please refer to the "Reserved Routes" section of the +:doc:`URI Routing ` documentation. Remapping Method Calls ====================== @@ -263,12 +266,12 @@ Trying to access it via the URL, like this, will not work:: Organizing Your Controllers into Sub-directories ================================================ -If you are building a large application you might find it convenient to -organize your controllers into sub-directories. CodeIgniter permits you -to do this. +If you are building a large application you might want to hierarchically +organize or structure your controllers into sub-directories. CodeIgniter +permits you to do this. -Simply create folders within your *application/controllers/* directory -and place your controller classes within them. +Simply create sub-directories under the main *application/controllers/* +one and place your controller classes within them. .. note:: When using this feature the first segment of your URI must specify the folder. For example, let's say you have a controller located @@ -281,8 +284,9 @@ and place your controller classes within them. example.com/index.php/products/shoes/show/123 Each of your sub-directories may contain a default controller which will be -called if the URL contains only the sub-folder. Simply name your default -controller as specified in your *application/config/routes.php* file. +called if the URL contains *only* the sub-directory. Simply put a controller +in there that matches the name of your 'default_controller' as specified in +your *application/config/routes.php* file. CodeIgniter also permits you to remap your URIs using its :doc:`URI Routing ` feature. diff --git a/user_guide_src/source/general/routing.rst b/user_guide_src/source/general/routing.rst index 766e0b2ab..dc5c0201e 100644 --- a/user_guide_src/source/general/routing.rst +++ b/user_guide_src/source/general/routing.rst @@ -170,11 +170,16 @@ There are three reserved routes:: $route['default_controller'] = 'welcome'; -This route indicates which controller class should be loaded if the URI -contains no data, which will be the case when people load your root URL. -In the above example, the "welcome" class would be loaded. You are -encouraged to always have a default route otherwise a 404 page will -appear by default. +This route points to the action that should be executed if the URI contains +no data, which will be the case when people load your root URL. +The setting accepts a **controller/method** value and ``index()`` would be +the default method if you don't specify one. In the above example, it is +``Welcome::index()`` that would be called. + +.. note:: You can NOT use a directory as a part of this setting! + +You are encouraged to always have a default route as otherwise a 404 page +will appear by default. :: -- cgit v1.2.3-24-g4f1b From 7f5c7533312d38ea922e6068cd097bf694fa3907 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 28 Sep 2015 17:05:52 +0300 Subject: [ci skip] Explain per-directory logic for 404_override too --- user_guide_src/source/general/routing.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'user_guide_src/source/general') diff --git a/user_guide_src/source/general/routing.rst b/user_guide_src/source/general/routing.rst index dc5c0201e..b2c9873ab 100644 --- a/user_guide_src/source/general/routing.rst +++ b/user_guide_src/source/general/routing.rst @@ -187,11 +187,13 @@ will appear by default. This route indicates which controller class should be loaded if the requested controller is not found. It will override the default 404 -error page. It won't affect to the ``show_404()`` function, which will +error page. Same per-directory rules as with 'default_controller' +apply here as well. + +It won't affect to the ``show_404()`` function, which will continue loading the default *error_404.php* file at *application/views/errors/error_404.php*. - :: $route['translate_uri_dashes'] = FALSE; -- cgit v1.2.3-24-g4f1b From c094becbcaf95fa8700ef7fc73c0b2bf808801a9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 8 Oct 2015 17:18:57 +0300 Subject: [ci skip] Fix broken links in user guide --- user_guide_src/source/general/controllers.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src/source/general') diff --git a/user_guide_src/source/general/controllers.rst b/user_guide_src/source/general/controllers.rst index 7efb9349e..5a111d8dc 100644 --- a/user_guide_src/source/general/controllers.rst +++ b/user_guide_src/source/general/controllers.rst @@ -145,7 +145,7 @@ load your main index.php file without specifying any URI segments you'll see your "Hello World" message by default. For more information, please refer to the "Reserved Routes" section of the -:doc:`URI Routing ` documentation. +:doc:`URI Routing ` documentation. Remapping Method Calls ====================== -- cgit v1.2.3-24-g4f1b From 4bb2b95a1b1f580427680c3bef71888e98c25523 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 12 Oct 2015 13:55:24 +0300 Subject: [ci skip] Add more info about security reporting to docs --- user_guide_src/source/general/security.rst | 3 +++ 1 file changed, 3 insertions(+) (limited to 'user_guide_src/source/general') diff --git a/user_guide_src/source/general/security.rst b/user_guide_src/source/general/security.rst index d4120d162..8afdaca31 100644 --- a/user_guide_src/source/general/security.rst +++ b/user_guide_src/source/general/security.rst @@ -5,6 +5,9 @@ Security This page describes some "best practices" regarding web security, and details CodeIgniter's internal security features. +.. note:: If you came here looking for a security contact, please refer to + our `Contribution Guide <../contributing/index>`. + URI Security ============ -- cgit v1.2.3-24-g4f1b From 01d53bd69aef482a42d5bbc94fd3496e79a97f23 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 23 Nov 2015 13:09:22 +0200 Subject: [ci skip] Update routing docs Close #4258 --- user_guide_src/source/general/routing.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'user_guide_src/source/general') diff --git a/user_guide_src/source/general/routing.rst b/user_guide_src/source/general/routing.rst index b2c9873ab..515368099 100644 --- a/user_guide_src/source/general/routing.rst +++ b/user_guide_src/source/general/routing.rst @@ -113,18 +113,19 @@ A typical RegEx route might look something like this:: In the above example, a URI similar to products/shirts/123 would instead call the "shirts" controller class and the "id_123" method. -With regular expressions, you can also catch a segment containing a -forward slash ('/'), which would usually represent the delimiter between -multiple segments. - +With regular expressions, you can also catch multiple segments at once. For example, if a user accesses a password protected area of your web application and you wish to be able to redirect them back to the same page after they log in, you may find this example useful:: $route['login/(.+)'] = 'auth/login/$1'; +.. note:: In the above example, if the ``$1`` placeholder contains a + slash, it will still be split into multiple parameters when + passed to ``Auth::login()``. + For those of you who don't know regular expressions and want to learn -more about them, `regular-expressions.info ` +more about them, `regular-expressions.info `_ might be a good starting point. .. note:: You can also mix and match wildcards with regular expressions. -- cgit v1.2.3-24-g4f1b From 343163624e2527df9ce0c22a6e4ccfebf5b9f48b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 20 Jun 2016 13:32:45 +0300 Subject: [ci skip] Remove non-existent parameter from log_message() docs Reported in #4671 --- user_guide_src/source/general/errors.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'user_guide_src/source/general') diff --git a/user_guide_src/source/general/errors.rst b/user_guide_src/source/general/errors.rst index 9c190feb1..a1cc3517a 100644 --- a/user_guide_src/source/general/errors.rst +++ b/user_guide_src/source/general/errors.rst @@ -78,11 +78,10 @@ The following functions let you generate errors: CodeIgniter automatically logs any ``show_404()`` calls. Setting the optional second parameter to FALSE will skip logging. -.. php:function:: log_message($level, $message, $php_error = FALSE) +.. php:function:: log_message($level, $message) :param string $level: Log level: 'error', 'debug' or 'info' :param string $message: Message to log - :param bool $php_error: Whether we're logging a native PHP error message :rtype: void This function lets you write messages to your log files. You must -- cgit v1.2.3-24-g4f1b From bcfe461f69c29805229c60d5643604edbae997aa Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 26 Jul 2016 20:34:30 +0300 Subject: [ci skip] More on dropping 5.2.x --- user_guide_src/source/general/requirements.rst | 4 ++-- user_guide_src/source/general/styleguide.rst | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'user_guide_src/source/general') diff --git a/user_guide_src/source/general/requirements.rst b/user_guide_src/source/general/requirements.rst index f90cdd30d..f2729f3d5 100644 --- a/user_guide_src/source/general/requirements.rst +++ b/user_guide_src/source/general/requirements.rst @@ -2,9 +2,9 @@ Server Requirements ################### -`PHP `_ version 5.4 or newer is recommended. +`PHP `_ version 5.6 or newer is recommended. -It should work on 5.2.4 as well, but we strongly advise you NOT to run +It should work on 5.3.7 as well, but we strongly advise you NOT to run such old versions of PHP, because of potential security and performance issues, as well as missing features. diff --git a/user_guide_src/source/general/styleguide.rst b/user_guide_src/source/general/styleguide.rst index 7704a59c5..9b4a84e14 100644 --- a/user_guide_src/source/general/styleguide.rst +++ b/user_guide_src/source/general/styleguide.rst @@ -345,8 +345,8 @@ inability for CodeIgniter to send proper headers. Compatibility ============= -CodeIgniter recommends PHP 5.4 or newer to be used, but it should be -compatible with PHP 5.2.4. Your code must either be compatible with this +CodeIgniter recommends PHP 5.6 or newer to be used, but it should be +compatible with PHP 5.3.7. Your code must either be compatible with this requirement, provide a suitable fallback, or be an optional feature that dies quietly without affecting a user's application. -- cgit v1.2.3-24-g4f1b From a838279625becfba98ccb7635d35c67297129c42 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 28 Jul 2016 16:40:12 +0300 Subject: Remove dead code written for PHP 5.2 --- .../source/general/compatibility_functions.rst | 32 ---------------------- user_guide_src/source/general/hooks.rst | 4 +-- user_guide_src/source/general/routing.rst | 4 +-- user_guide_src/source/general/security.rst | 7 +---- 4 files changed, 5 insertions(+), 42 deletions(-) (limited to 'user_guide_src/source/general') diff --git a/user_guide_src/source/general/compatibility_functions.rst b/user_guide_src/source/general/compatibility_functions.rst index 434b0982f..936f2a24b 100644 --- a/user_guide_src/source/general/compatibility_functions.rst +++ b/user_guide_src/source/general/compatibility_functions.rst @@ -222,29 +222,6 @@ Function reference For more information, please refer to the `PHP manual for array_column() `_. -.. php:function:: array_replace(array $array1[, ...]) - - :param array $array1: Array in which to replace elements - :param array ...: Array (or multiple ones) from which to extract elements - :returns: Modified array - :rtype: array - - For more information, please refer to the `PHP manual for - array_replace() `_. - -.. php:function:: array_replace_recursive(array $array1[, ...]) - - :param array $array1: Array in which to replace elements - :param array ...: Array (or multiple ones) from which to extract elements - :returns: Modified array - :rtype: array - - For more information, please refer to the `PHP manual for - array_replace_recursive() `_. - - .. important:: Only PHP's native function can detect endless recursion. - Unless you are running PHP 5.3+, be careful with references! - .. php:function:: hex2bin($data) :param array $data: Hexadecimal representation of data @@ -253,12 +230,3 @@ Function reference For more information, please refer to the `PHP manual for hex2bin() `_. - -.. php:function:: quoted_printable_encode($str) - - :param string $str: Input string - :returns: 8bit-encoded string - :rtype: string - - For more information, please refer to the `PHP manual for - quoted_printable_encode() `_. \ No newline at end of file diff --git a/user_guide_src/source/general/hooks.rst b/user_guide_src/source/general/hooks.rst index ffe3fef39..6cc3407a3 100644 --- a/user_guide_src/source/general/hooks.rst +++ b/user_guide_src/source/general/hooks.rst @@ -56,8 +56,8 @@ defined in your associative hook array: - **params** Any parameters you wish to pass to your script. This item is optional. -If you're running PHP 5.3+, you can also use lambda/anoymous functions -(or closures) as hooks, with a simpler syntax:: +You can also use lambda/anoymous functions (or closures) as hooks, with +a simpler syntax:: $hook['post_controller'] = function() { diff --git a/user_guide_src/source/general/routing.rst b/user_guide_src/source/general/routing.rst index 515368099..b53a85d31 100644 --- a/user_guide_src/source/general/routing.rst +++ b/user_guide_src/source/general/routing.rst @@ -133,8 +133,8 @@ might be a good starting point. Callbacks ========= -If you are using PHP >= 5.3 you can use callbacks in place of the normal -routing rules to process the back-references. Example:: +You can also use callbacks in place of the normal routing rules to process +the back-references. Example:: $route['products/([a-zA-Z]+)/edit/(\d+)'] = function ($product_type, $id) { diff --git a/user_guide_src/source/general/security.rst b/user_guide_src/source/general/security.rst index 8afdaca31..744a2c934 100644 --- a/user_guide_src/source/general/security.rst +++ b/user_guide_src/source/general/security.rst @@ -133,12 +133,7 @@ with that. Please read below. in PHP's own `Password Hashing `_ functions. Please use them, even if you're not running PHP 5.5+, CodeIgniter - provides them for you as long as you're running at least PHP version - 5.3.7 (and if you don't meet that requirement - please, upgrade). - - If you're one of the really unlucky people who can't even upgrade to a - more recent PHP version, use `hash_pbkdf() `, - which we also provide in our compatibility layer. + provides them for you. - DO NOT ever display or send a password in plain-text format! -- cgit v1.2.3-24-g4f1b From af88d57cf07e54f996d84da1926f252e963fa49b Mon Sep 17 00:00:00 2001 From: ihatehandles Date: Wed, 12 Oct 2016 05:25:24 +0200 Subject: Fixed typos --- user_guide_src/source/general/cli.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'user_guide_src/source/general') diff --git a/user_guide_src/source/general/cli.rst b/user_guide_src/source/general/cli.rst index b45be1aa8..764a6b835 100644 --- a/user_guide_src/source/general/cli.rst +++ b/user_guide_src/source/general/cli.rst @@ -47,11 +47,11 @@ in it:: Then save the file to your *application/controllers/* folder. -Now normally you would visit the your site using a URL similar to this:: +Now normally you would visit the site using a URL similar to this:: example.com/index.php/tools/message/to -Instead, we are going to open Terminal in Mac/Linux or go to Run > "cmd" +Instead, we are going to open the terminal in Mac/Linux or go to Run > "cmd" in Windows and navigate to our CodeIgniter project. .. code-block:: bash @@ -75,4 +75,4 @@ That's it! That, in a nutshell, is all there is to know about controllers on the command line. Remember that this is just a normal controller, so routing -and ``_remap()`` works fine. \ No newline at end of file +and ``_remap()`` works fine. -- cgit v1.2.3-24-g4f1b From 75b812f85b266dbe77518e56a4ad754a0d09eaff Mon Sep 17 00:00:00 2001 From: Hex Date: Mon, 24 Oct 2016 14:21:44 +0800 Subject: Fix small doc problem. --- user_guide_src/source/general/compatibility_functions.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src/source/general') diff --git a/user_guide_src/source/general/compatibility_functions.rst b/user_guide_src/source/general/compatibility_functions.rst index 936f2a24b..584968663 100644 --- a/user_guide_src/source/general/compatibility_functions.rst +++ b/user_guide_src/source/general/compatibility_functions.rst @@ -10,7 +10,7 @@ Being custom implementations, these functions will also have some set of dependencies on their own, but are still useful if your PHP setup doesn't offer them natively. -.. note:: Much like the `common functions `, the +.. note:: Much like the :doc:`common functions `, the compatibility functions are always available, as long as their dependencies are met. -- cgit v1.2.3-24-g4f1b From 26313bddee1fb67af10141671a47bbe703a025fd Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 14 Dec 2016 15:15:03 +0200 Subject: [ci skip] More doc changes related to PHP 5.4.8 requirement --- user_guide_src/source/general/common_functions.rst | 6 +++--- user_guide_src/source/general/compatibility_functions.rst | 1 - user_guide_src/source/general/requirements.rst | 4 ++-- user_guide_src/source/general/styleguide.rst | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) (limited to 'user_guide_src/source/general') diff --git a/user_guide_src/source/general/common_functions.rst b/user_guide_src/source/general/common_functions.rst index 6d6744cf7..602a6c763 100644 --- a/user_guide_src/source/general/common_functions.rst +++ b/user_guide_src/source/general/common_functions.rst @@ -24,9 +24,9 @@ loading any libraries or helpers. Example:: - if (is_php('5.3')) + if (is_php('5.5')) { - $str = quoted_printable_encode($str); + echo json_last_error_msg(); } Returns boolean TRUE if the installed version of PHP is equal to or @@ -185,4 +185,4 @@ loading any libraries or helpers. .. note:: This function was introduced because Suhosin terminated script execution, but this turned out to be a bug. A fix has been available for some time (version 0.9.34), but is - unfortunately not released yet. \ No newline at end of file + unfortunately not released yet. diff --git a/user_guide_src/source/general/compatibility_functions.rst b/user_guide_src/source/general/compatibility_functions.rst index 584968663..71559d0be 100644 --- a/user_guide_src/source/general/compatibility_functions.rst +++ b/user_guide_src/source/general/compatibility_functions.rst @@ -32,7 +32,6 @@ that is otherwise available only since PHP 5.5. Dependencies ============ -- PHP 5.3.7 - ``CRYPT_BLOWFISH`` support for ``crypt()`` Constants diff --git a/user_guide_src/source/general/requirements.rst b/user_guide_src/source/general/requirements.rst index f2729f3d5..2e24d6d03 100644 --- a/user_guide_src/source/general/requirements.rst +++ b/user_guide_src/source/general/requirements.rst @@ -4,7 +4,7 @@ Server Requirements `PHP `_ version 5.6 or newer is recommended. -It should work on 5.3.7 as well, but we strongly advise you NOT to run +It should work on 5.4.8 as well, but we strongly advise you NOT to run such old versions of PHP, because of potential security and performance issues, as well as missing features. @@ -18,4 +18,4 @@ Currently supported databases are: - SQLite via the *sqlite* (version 2), *sqlite3* (version 3) and *pdo* drivers - CUBRID via the *cubrid* and *pdo* drivers - Interbase/Firebird via the *ibase* and *pdo* drivers - - ODBC via the *odbc* and *pdo* drivers (you should know that ODBC is actually an abstraction layer) \ No newline at end of file + - ODBC via the *odbc* and *pdo* drivers (you should know that ODBC is actually an abstraction layer) diff --git a/user_guide_src/source/general/styleguide.rst b/user_guide_src/source/general/styleguide.rst index 9b4a84e14..5f25a5ae4 100644 --- a/user_guide_src/source/general/styleguide.rst +++ b/user_guide_src/source/general/styleguide.rst @@ -346,7 +346,7 @@ Compatibility ============= CodeIgniter recommends PHP 5.6 or newer to be used, but it should be -compatible with PHP 5.3.7. Your code must either be compatible with this +compatible with PHP 5.4.8. Your code must either be compatible with this requirement, provide a suitable fallback, or be an optional feature that dies quietly without affecting a user's application. @@ -633,4 +633,4 @@ Whenever appropriate, provide function argument defaults, which helps prevent PHP errors with mistaken calls and provides common fallback values which can save a few lines of code. Example:: - function foo($bar = '', $baz = FALSE) \ No newline at end of file + function foo($bar = '', $baz = FALSE) -- cgit v1.2.3-24-g4f1b From 24c866628d0ce5463d7e8b4eba512fa9e7752dfd Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 14 Dec 2016 16:14:13 +0200 Subject: Drop all PHP 5.3-related code --- user_guide_src/source/general/compatibility_functions.rst | 9 --------- user_guide_src/source/general/requirements.rst | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) (limited to 'user_guide_src/source/general') diff --git a/user_guide_src/source/general/compatibility_functions.rst b/user_guide_src/source/general/compatibility_functions.rst index 71559d0be..522e43f60 100644 --- a/user_guide_src/source/general/compatibility_functions.rst +++ b/user_guide_src/source/general/compatibility_functions.rst @@ -220,12 +220,3 @@ Function reference For more information, please refer to the `PHP manual for array_column() `_. - -.. php:function:: hex2bin($data) - - :param array $data: Hexadecimal representation of data - :returns: Binary representation of the given data - :rtype: string - - For more information, please refer to the `PHP manual for hex2bin() - `_. diff --git a/user_guide_src/source/general/requirements.rst b/user_guide_src/source/general/requirements.rst index 2e24d6d03..982a6014f 100644 --- a/user_guide_src/source/general/requirements.rst +++ b/user_guide_src/source/general/requirements.rst @@ -15,7 +15,7 @@ Currently supported databases are: - Oracle via the *oci8* and *pdo* drivers - PostgreSQL via the *postgre* and *pdo* drivers - MS SQL via the *mssql*, *sqlsrv* (version 2005 and above only) and *pdo* drivers - - SQLite via the *sqlite* (version 2), *sqlite3* (version 3) and *pdo* drivers + - SQLite via the *sqlite3* and *pdo* drivers - CUBRID via the *cubrid* and *pdo* drivers - Interbase/Firebird via the *ibase* and *pdo* drivers - ODBC via the *odbc* and *pdo* drivers (you should know that ODBC is actually an abstraction layer) -- cgit v1.2.3-24-g4f1b From 468d16a24f2ecd07e922e158f541e9f6831636f2 Mon Sep 17 00:00:00 2001 From: Tomaz Lovrec Date: Fri, 16 Dec 2016 12:00:19 +0000 Subject: Remove needless constructor in model documentation PHP will execute the parent constructor regardless if a constructor method is defined in the child class or not. Defining an empty constructor just to call the parents constructor can be considered bad practice. --- user_guide_src/source/general/models.rst | 6 ------ 1 file changed, 6 deletions(-) (limited to 'user_guide_src/source/general') diff --git a/user_guide_src/source/general/models.rst b/user_guide_src/source/general/models.rst index 1cfe736de..08e9f5b30 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); -- cgit v1.2.3-24-g4f1b From 1398b72b32e3fb9628be2e09ffe97bea88565868 Mon Sep 17 00:00:00 2001 From: Tomaz Lovrec Date: Fri, 16 Dec 2016 12:02:12 +0000 Subject: Add constructor comments to match controller docs Empty constructors are pointless and bad practice, but removing them from this part of the documentation makes it less readable, makes less of a point, and would be quite frankly weird. Added a comment that suggests that further user code should be put there, like it is in the controller documentation --- user_guide_src/source/general/core_classes.rst | 1 + user_guide_src/source/general/models.rst | 2 ++ 2 files changed, 3 insertions(+) (limited to 'user_guide_src/source/general') 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 08e9f5b30..eb842e927 100644 --- a/user_guide_src/source/general/models.rst +++ b/user_guide_src/source/general/models.rst @@ -70,6 +70,7 @@ The basic prototype for a model class is this:: public function __construct() { parent::__construct(); + // Your own constructor code } } @@ -85,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 } } -- cgit v1.2.3-24-g4f1b From 24fedeb2075194f0da475f45f400a0866d9577f9 Mon Sep 17 00:00:00 2001 From: klemens Date: Mon, 16 Jan 2017 21:01:58 +0100 Subject: spelling fixes --- user_guide_src/source/general/common_functions.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src/source/general') diff --git a/user_guide_src/source/general/common_functions.rst b/user_guide_src/source/general/common_functions.rst index 602a6c763..77b0df14e 100644 --- a/user_guide_src/source/general/common_functions.rst +++ b/user_guide_src/source/general/common_functions.rst @@ -101,7 +101,7 @@ loading any libraries or helpers. .. php:function:: set_status_header($code[, $text = '']) - :param int $code: HTTP Reponse status code + :param int $code: HTTP Response status code :param string $text: A custom message to set with the status code :rtype: void -- cgit v1.2.3-24-g4f1b