protected function emitValidRequestSources($mode)
    {
        $requestSources = [
            'ENVIRONMENT' => self::NATIVE,
            'SERVER'      => self::NATIVE,
        ];

        switch ($mode) {
            case Doozr_Kernel::RUNTIME_ENVIRONMENT_CLI:
                $requestSources = array_merge(
                    $requestSources,
                    [
                        'CLI' => self::NATIVE,
                    ]
                );
                break;

            case Doozr_Kernel::RUNTIME_ENVIRONMENT_WEB:
            case Doozr_Kernel::RUNTIME_ENVIRONMENT_HTTPD:
            default:
                $requestSources = array_merge(
                    $requestSources,
                    [
                        'GET'     => self::NATIVE,
                        'POST'    => self::NATIVE,
                        'HEAD'    => self::EMULATED,
                        'OPTIONS' => self::EMULATED,
                        'PUT'     => self::EMULATED,
                        'DELETE'  => self::EMULATED,
                        'TRACE'   => self::EMULATED,
                        'CONNECT' => self::EMULATED,
                        'COOKIE'  => self::NATIVE,
                        'REQUEST' => self::NATIVE,
                        'SESSION' => self::NATIVE,
                        'FILES'   => self::NATIVE,
                    ]
                );
                break;
        }

        return $requestSources;
    }
protected function emitValidRequestSources($mode)
    {
        $requestSources = [
            'ENVIRONMENT' => self::NATIVE,
            'SERVER'      => self::NATIVE,
        ];

        switch ($mode) {
            case Doozr_Kernel::RUNTIME_ENVIRONMENT_CLI:
                $requestSources = array_merge(
                    $requestSources,
                    [
                        'CLI' => self::NATIVE,
                    ]
                );
                break;

            case Doozr_Kernel::RUNTIME_ENVIRONMENT_WEB:
            case Doozr_Kernel::RUNTIME_ENVIRONMENT_HTTPD:
            default:
                $requestSources = array_merge(
                    $requestSources,
                    [
                        'GET'     => self::NATIVE,
                        'POST'    => self::NATIVE,
                        'HEAD'    => self::EMULATED,
                        'OPTIONS' => self::EMULATED,
                        'PUT'     => self::EMULATED,
                        'DELETE'  => self::EMULATED,
                        'TRACE'   => self::EMULATED,
                        'CONNECT' => self::EMULATED,
                        'COOKIE'  => self::NATIVE,
                        'REQUEST' => self::NATIVE,
                        'SESSION' => self::NATIVE,
                        'FILES'   => self::NATIVE,
                    ]
                );
                break;
        }

        return $requestSources;
    }
protected function emitValidRequestSources ( $ mode ) { $ requestSources = [ 'ENVIRONMENT' => self :: NATIVE , 'SERVER' => self :: NATIVE , ] ; switch ( $ mode ) { case Doozr_Kernel :: RUNTIME_ENVIRONMENT_CLI : $ requestSources = array_merge ( $ requestSources , [ 'CLI' => self :: NATIVE , ] ) ; break ; case Doozr_Kernel :: RUNTIME_ENVIRONMENT_WEB : case Doozr_Kernel :: RUNTIME_ENVIRONMENT_HTTPD : default : $ requestSources = array_merge ( $ requestSources , [ 'GET' => self :: NATIVE , 'POST' => self :: NATIVE , 'HEAD' => self :: EMULATED , 'OPTIONS' => self :: EMULATED , 'PUT' => self :: EMULATED , 'DELETE' => self :: EMULATED , 'TRACE' => self :: EMULATED , 'CONNECT' => self :: EMULATED , 'COOKIE' => self :: NATIVE , 'REQUEST' => self :: NATIVE , 'SESSION' => self :: NATIVE , 'FILES' => self :: NATIVE , ] ) ; break ; } return $ requestSources ; }
Combines the request sources to a single array by passed runtimeEnvironment.

@param string $mode The active runtimeEnvironment to return request sources for

@author Benjamin Carl <opensource@clickalicious.de>

@return array The combined request sources
Combines the request sources to a single array by passed runtimeEnvironment .