From 838c9a96f645aac24daa31285efa1051535c4219 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 13 Sep 2013 14:05:13 +0300 Subject: Drop the unused parameter from log_message() / CI_Log::write_log() --- user_guide_src/source/general/common_functions.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'user_guide_src/source/general/common_functions.rst') diff --git a/user_guide_src/source/general/common_functions.rst b/user_guide_src/source/general/common_functions.rst index 32e8a8be0..e085ef808 100644 --- a/user_guide_src/source/general/common_functions.rst +++ b/user_guide_src/source/general/common_functions.rst @@ -96,11 +96,10 @@ please see the :doc:`Error Handling ` documentation. log_message() ============= -.. 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 :returns: void This function is an alias for ``CI_Log::write_log()``. For more info, -- cgit v1.2.3-24-g4f1b From f964b16f3db95d655420dfae2012ee9fbb98a1a8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Nov 2013 17:04:55 +0200 Subject: Deprecate CI_Input::is_cli_request() and add common function is_cli() to replace it Calls to this function are often needed before the Input library is available --- user_guide_src/source/general/common_functions.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'user_guide_src/source/general/common_functions.rst') diff --git a/user_guide_src/source/general/common_functions.rst b/user_guide_src/source/general/common_functions.rst index e085ef808..2dfec9cc0 100644 --- a/user_guide_src/source/general/common_functions.rst +++ b/user_guide_src/source/general/common_functions.rst @@ -173,6 +173,19 @@ is_https() Returns TRUE if a secure (HTTPS) connection is used and FALSE in any other case (including non-HTTP requests). +is_cli() +======== + +.. php:function:: is_cli() + + :returns: bool + +Returns TRUE if the application is run through the command line +and FALSE if not. + +.. note:: This function checks both if the ``PHP_SAPI`` value is 'cli' + or if the ``STDIN`` constant is defined. + function_usable() ================= -- cgit v1.2.3-24-g4f1b From 528591deb8f3a1b9663b43c66d75ba1a4059e8fe Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Thu, 9 Jan 2014 10:04:43 -0600 Subject: fix doc warnings --- user_guide_src/source/general/common_functions.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'user_guide_src/source/general/common_functions.rst') diff --git a/user_guide_src/source/general/common_functions.rst b/user_guide_src/source/general/common_functions.rst index 2dfec9cc0..e9259795f 100644 --- a/user_guide_src/source/general/common_functions.rst +++ b/user_guide_src/source/general/common_functions.rst @@ -71,7 +71,7 @@ documentation for more information. show_error() ============ -.. php:function:: show_error($message, $status_code, $heading = 'An Error Was Encountered') +.. php:function:: show_error($message, $status_code, $heading = 'An Error Was Encountered') :noindex: :param mixed $message: Error message :param int $status_code: HTTP Response status code @@ -84,7 +84,7 @@ please see the :doc:`Error Handling ` documentation. show_404() ========== -.. php:function:: show_404($page = '', $log_error = TRUE) +.. php:function:: show_404($page = '', $log_error = TRUE) :noindex: :param string $page: URI string :param bool $log_error: Whether to log the error @@ -96,7 +96,7 @@ please see the :doc:`Error Handling ` documentation. log_message() ============= -.. php:function:: log_message($level, $message) +.. php:function:: log_message($level, $message) :noindex: :param string $level: Log level: 'error', 'debug' or 'info' :param string $message: Message to log -- cgit v1.2.3-24-g4f1b From 05be0879777021a73ca55548c6edd61d17012a4d Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Thu, 9 Jan 2014 10:10:30 -0600 Subject: d'oh - :noindex: in wrong place Signed-off-by: Connor Tumbleson --- user_guide_src/source/general/common_functions.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'user_guide_src/source/general/common_functions.rst') diff --git a/user_guide_src/source/general/common_functions.rst b/user_guide_src/source/general/common_functions.rst index e9259795f..a1007cb4b 100644 --- a/user_guide_src/source/general/common_functions.rst +++ b/user_guide_src/source/general/common_functions.rst @@ -71,7 +71,7 @@ documentation for more information. show_error() ============ -.. php:function:: show_error($message, $status_code, $heading = 'An Error Was Encountered') :noindex: +.. :noindex: php:function:: show_error($message, $status_code, $heading = 'An Error Was Encountered') :param mixed $message: Error message :param int $status_code: HTTP Response status code @@ -84,7 +84,7 @@ please see the :doc:`Error Handling ` documentation. show_404() ========== -.. php:function:: show_404($page = '', $log_error = TRUE) :noindex: +.. :noindex: php:function:: show_404($page = '', $log_error = TRUE) :param string $page: URI string :param bool $log_error: Whether to log the error @@ -96,7 +96,7 @@ please see the :doc:`Error Handling ` documentation. log_message() ============= -.. php:function:: log_message($level, $message) :noindex: +.. :noindex: php:function:: log_message($level, $message) :param string $level: Log level: 'error', 'debug' or 'info' :param string $message: Message to log -- cgit v1.2.3-24-g4f1b