diff options
author | Andrey Andreev <narf@devilix.net> | 2013-11-12 16:04:55 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2013-11-12 16:04:55 +0100 |
commit | f964b16f3db95d655420dfae2012ee9fbb98a1a8 (patch) | |
tree | a3a2acf87bf15604da653c67e1a348097225f817 /system/core/URI.php | |
parent | 35e3b0bc4f723b938160da87aeb5ad9e054507c4 (diff) |
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
Diffstat (limited to 'system/core/URI.php')
-rw-r--r-- | system/core/URI.php | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/system/core/URI.php b/system/core/URI.php index bc086d223..bad9985d7 100644 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -99,7 +99,7 @@ class CI_URI { if ($protocol === 'AUTO') { // Is the request coming from the command line? - if ($this->_is_cli_request()) + if (is_cli()) { $this->_set_uri_string($this->_parse_argv()); return; @@ -280,23 +280,6 @@ class CI_URI { // -------------------------------------------------------------------- /** - * Is CLI Request? - * - * Duplicate of method from the Input class to test to see if - * a request was made from the command line. - * - * @see CI_Input::is_cli_request() - * @used-by CI_URI::_fetch_uri_string() - * @return bool - */ - protected function _is_cli_request() - { - return (PHP_SAPI === 'cli') OR defined('STDIN'); - } - - // -------------------------------------------------------------------- - - /** * Parse CLI arguments * * Take each command line argument and assume it is a URI segment. |