diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-01-19 13:31:53 +0100 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-01-19 13:31:53 +0100 |
commit | 0b175df60309f142249266720940fa2b3d7ccad7 (patch) | |
tree | 38dfff0d751d8eb02a305cbe6b7b8f68047f6f86 /system/core/Input.php | |
parent | fea45ad97f9f32738ed7ccc25bdb0405b6f6572f (diff) | |
parent | c3828718925a0f1660cddadc95b63e14f7189faa (diff) |
Automated merge with https://bitbucket.org/dhorrigan/codeigniter-reactor
Diffstat (limited to 'system/core/Input.php')
-rw-r--r-- | system/core/Input.php | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/system/core/Input.php b/system/core/Input.php index eb2048e58..3a52e37aa 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -618,19 +618,33 @@ class CI_Input { } // -------------------------------------------------------------------- - + /** * Is ajax Request? * * Test to see if a request contains the HTTP_X_REQUESTED_WITH header * - * @return boolean + * @return boolean */ public function is_ajax_request() { return ($this->server('HTTP_X_REQUESTED_WITH') === 'XMLHttpRequest'); } + // -------------------------------------------------------------------- + + /** + * Is cli Request? + * + * Test to see if a request was made from the command line + * + * @return boolean + */ + public function is_cli_request() + { + return (bool) defined('STDIN'); + } + } // END Input class |