core/base/Boot.php
public function getIsCli()
    {
        if ($this->_isCli === null) {
            $this->_isCli = $this->getSapiName() === 'cli';
        }

        return $this->_isCli;
    }
public function getIsCli()
    {
        if ($this->_isCli === null) {
            $this->_isCli = $this->getSapiName() === 'cli';
        }

        return $this->_isCli;
    }
public function getIsCli ( ) { if ( $ this -> _isCli === null ) { $ this -> _isCli = $ this -> getSapiName ( ) === 'cli' ; } return $ this -> _isCli ; }
Getter method whether current request is cli or not.

If not set via setIsCli() the value is determined trough php_sapi_name();

@return boolean Whether current request is console env or not.
@since 1.0.12
Getter method whether current request is cli or not .