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