public static function getInterface()
    {
        $return = 'http';
        $isCliOrCron = \count(\array_filter(array(
            \defined('STDIN'),
            isset($_SERVER['argv']),
            !\array_key_exists('REQUEST_METHOD', $_SERVER),
        ))) > 0;
        if ($isCliOrCron) {
            // TERM is a linux/unix thing
            $return = isset($_SERVER['TERM']) || \array_key_exists('PATH', $_SERVER)
                ? 'cli'
                : 'cron';
        } elseif (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
            $return = 'ajax';
        }
        return $return;
    }
public static function getInterface()
    {
        $return = 'http';
        $isCliOrCron = \count(\array_filter(array(
            \defined('STDIN'),
            isset($_SERVER['argv']),
            !\array_key_exists('REQUEST_METHOD', $_SERVER),
        ))) > 0;
        if ($isCliOrCron) {
            // TERM is a linux/unix thing
            $return = isset($_SERVER['TERM']) || \array_key_exists('PATH', $_SERVER)
                ? 'cli'
                : 'cron';
        } elseif (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
            $return = 'ajax';
        }
        return $return;
    }
public static function getInterface ( ) { $ return = 'http' ; $ isCliOrCron = \ count ( \ array_filter ( array ( \ defined ( 'STDIN' ) , isset ( $ _SERVER [ 'argv' ] ) , ! \ array_key_exists ( 'REQUEST_METHOD' , $ _SERVER ) , ) ) ) > 0 ; if ( $ isCliOrCron ) { // TERM is a linux/unix thing $ return = isset ( $ _SERVER [ 'TERM' ] ) || \ array_key_exists ( 'PATH' , $ _SERVER ) ? 'cli' : 'cron' ; } elseif ( isset ( $ _SERVER [ 'HTTP_X_REQUESTED_WITH' ] ) && $ _SERVER [ 'HTTP_X_REQUESTED_WITH' ] == 'XMLHttpRequest' ) { $ return = 'ajax' ; } return $ return ; }
Returns cli, cron, ajax, or http

@return string cli | cron | ajax | http
Returns cli cron ajax or http