Http
class Http extends Request_Abstract (View source)
Constants
| SCHEME_HTTP | 
 | 
| SCHEME_HTTPS | 
 | 
Properties
| string | $module | from Request_Abstract | |
| string | $controller | from Request_Abstract | |
| string | $action | from Request_Abstract | |
| string | $method | from Request_Abstract | |
| protected array | $params | from Request_Abstract | |
| protected string | $language | from Request_Abstract | |
| protected Exception | $_exception | from Request_Abstract | |
| protected string | $_base_uri | from Request_Abstract | |
| protected string | $uri | from Request_Abstract | |
| protected string | $dispatched | from Request_Abstract | |
| protected string | $routed | from Request_Abstract | 
Methods
Check the request whether it is a Ajax Request
Retrieve $_SERVER variable
Retrieve $_ENV variable
No description
Set base URI, base URI is used when doing routing, in routing phase request URI is used to route a request, while base URI is used to skip the leading part(base URI) of request URI. That is, if comes a request with request URI a/b/c, then if you set base URI to "a/b", only "/c" will be used in routing phase.
Note:
generally, you don't need to set this, Yaf will determine it automatically.
Retrieve $_GET variable
Retrieve $_REQUEST variable
Retrieve $_POST variable
Retrieve $_COOKIE variable
Retrieve $_FILES variable
Retrieve variable from client, this method will search the name in $_REQUEST params, if the name is not found, then will search in $_POST, $_GET, $_COOKIE, $_SERVER
No description
Details
        
                            bool
    isGet()
        
    
    No description
        
                            bool
    isPost()
        
    
    No description
        
                            bool
    isPut()
        
    
    No description
        
                            bool
    isHead()
        
    
    No description
        
                            bool
    isOptions()
        
    
    No description
        
                            bool
    isCli()
        
    
    No description
        
                            bool
    isDispatched()
        
    
    No description
        
                            bool
    isRouted()
        
    
    No description
        
                            bool
    isXmlHttpRequest()
        
    
    Check the request whether it is a Ajax Request
Note:
This method depends on the request header: HTTP_X_REQUESTED_WITH, some Javascript library doesn't set this header while doing Ajax request
        
                            mixed
    getServer(string $name = null, mixed $default = null)
        
    
    Retrieve $_SERVER variable
        
                            mixed
    getEnv(string $name = null, mixed $default = null)
        
    
    Retrieve $_ENV variable
        
                            mixed
    getParam(string $name, mixed $default = null)
        
    
    No description
        
                            array
    getParams()
        
    
    No description
        
                            Exception
    getException()
        
    
    No description
        
                            string
    getModuleName()
        
    
    No description
        
                            string
    getControllerName()
        
    
    No description
        
                            string
    getActionName()
        
    
    No description
        
                            Request_Abstract|bool
    setParam(string|array $name, string $value = null)
        
    
    No description
        
                            Request_Abstract|bool
    setModuleName(string $module)
        
    
    No description
        
                            Request_Abstract|bool
    setControllerName(string $controller)
        
    
    No description
        
                            Request_Abstract|bool
    setActionName(string $action)
        
    
    No description
        
                            string
    getMethod()
        
    
    No description
        
                            string
    getLanguage()
        
    
    No description
        
                            bool
    setBaseUri(string $uri)
        
    
    Set base URI, base URI is used when doing routing, in routing phase request URI is used to route a request, while base URI is used to skip the leading part(base URI) of request URI. That is, if comes a request with request URI a/b/c, then if you set base URI to "a/b", only "/c" will be used in routing phase.
Note:
generally, you don't need to set this, Yaf will determine it automatically.
        
                            string
    getBaseUri()
        
    
    No description
        
                            string
    getRequestUri()
        
    
    No description
        
                            
    setRequestUri(string $uri)
        
    
    No description
        
                            bool
    setDispatched()
        
    
    Set request as dispatched
        
                            Request_Abstract|bool
    setRouted()
        
    
    Set request as routed
        
                            mixed
    getQuery(string $name = null, mixed $default = null)
        
    
    Retrieve $_GET variable
        
                            mixed
    getRequest(string $name = null, mixed $default = null)
        
    
    Retrieve $_REQUEST variable
        
                            mixed
    getPost(string $name = null, mixed $default = null)
        
    
    Retrieve $_POST variable
        
                            mixed
    getCookie(string $name = null, mixed $default = null)
        
    
    Retrieve $_COOKIE variable
        
                            mixed
    getFiles(string $name = null, mixed $default = null)
        
    
    Retrieve $_FILES variable
        
                            mixed
    get(string $name, string $default = null)
        
    
    Retrieve variable from client, this method will search the name in $_REQUEST params, if the name is not found, then will search in $_POST, $_GET, $_COOKIE, $_SERVER
        
                            
    __construct(string $request_uri, string $base_uri)
        
    
    No description