src/RequestData.php
public static function initialize()
    {
        switch($_SERVER['REQUEST_METHOD']) {
            case "POST":
                self::$_method = self::POST;
                break;
            case "GET":
                self::$_method = self::GET;
                break;
            case "PUT":
                self::$_method = self::PUT;
                break;
            case "DELETE":
                self::$_method = self::DELETE;
                break;
            default:
                self::$_method = self::HEAD;
        }
        self::$_data = array();
        self::_parseData($_GET);
        self::_parseData($_POST);
        
        if(
            isset($_SERVER['HTTPS']) &&
            $_SERVER['HTTPS'] !== null &&
            $_SERVER['HTTPS'] !== "off"
        ) {
            self::$_https = true;
        } else {
            self::$_https = false;
        }
        
        self::$_domain = (string) $_SERVER['HTTP_HOST'];
        self::$_file = (string) $_SERVER['SCRIPT_FILENAME'];
        if(isset($_SERVER['PATH_INFO'])) {
            self::$_pathInfo = (string) $_SERVER['PATH_INFO'];
        } else {
            self::$_pathInfo = "";
        }
    }
public static function initialize()
    {
        switch($_SERVER['REQUEST_METHOD']) {
            case "POST":
                self::$_method = self::POST;
                break;
            case "GET":
                self::$_method = self::GET;
                break;
            case "PUT":
                self::$_method = self::PUT;
                break;
            case "DELETE":
                self::$_method = self::DELETE;
                break;
            default:
                self::$_method = self::HEAD;
        }
        self::$_data = array();
        self::_parseData($_GET);
        self::_parseData($_POST);
        
        if(
            isset($_SERVER['HTTPS']) &&
            $_SERVER['HTTPS'] !== null &&
            $_SERVER['HTTPS'] !== "off"
        ) {
            self::$_https = true;
        } else {
            self::$_https = false;
        }
        
        self::$_domain = (string) $_SERVER['HTTP_HOST'];
        self::$_file = (string) $_SERVER['SCRIPT_FILENAME'];
        if(isset($_SERVER['PATH_INFO'])) {
            self::$_pathInfo = (string) $_SERVER['PATH_INFO'];
        } else {
            self::$_pathInfo = "";
        }
    }
public static function initialize ( ) { switch ( $ _SERVER [ 'REQUEST_METHOD' ] ) { case "POST" : self :: $ _method = self :: POST ; break ; case "GET" : self :: $ _method = self :: GET ; break ; case "PUT" : self :: $ _method = self :: PUT ; break ; case "DELETE" : self :: $ _method = self :: DELETE ; break ; default : self :: $ _method = self :: HEAD ; } self :: $ _data = array ( ) ; self :: _parseData ( $ _GET ) ; self :: _parseData ( $ _POST ) ; if ( isset ( $ _SERVER [ 'HTTPS' ] ) && $ _SERVER [ 'HTTPS' ] !== null && $ _SERVER [ 'HTTPS' ] !== "off" ) { self :: $ _https = true ; } else { self :: $ _https = false ; } self :: $ _domain = ( string ) $ _SERVER [ 'HTTP_HOST' ] ; self :: $ _file = ( string ) $ _SERVER [ 'SCRIPT_FILENAME' ] ; if ( isset ( $ _SERVER [ 'PATH_INFO' ] ) ) { self :: $ _pathInfo = ( string ) $ _SERVER [ 'PATH_INFO' ] ; } else { self :: $ _pathInfo = "" ; } }
Initializes this class. This means, the request and input data will be
loaded and parsed.
Initializes this class . This means the request and input data will be loaded and parsed .