abstract class Request_Abstract (View source)

Constants

SCHEME_HTTP

SCHEME_HTTPS

Properties

string $module
string $controller
string $action
string $method
protected array $params
protected string $language
protected Exception $_exception
protected string $_base_uri
protected string $uri
protected string $dispatched
protected string $routed

Methods

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()

No description

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

getException()

No description

string
getModuleName()

No description

string
getControllerName()

No description

string
getActionName()

No description

setParam(string|array $name, string $value = null)

No description

setModuleName(string $module)

No description

setControllerName(string $controller)

No description

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

setRouted()

Set request as routed

Details

bool isGet()

No description

Return Value

bool

bool isPost()

No description

Return Value

bool

bool isPut()

No description

Return Value

bool

bool isHead()

No description

Return Value

bool

bool isOptions()

No description

Return Value

bool

bool isCli()

No description

Return Value

bool

bool isDispatched()

No description

Return Value

bool

bool isRouted()

No description

Return Value

bool

bool isXmlHttpRequest()

No description

Return Value

bool false

mixed getServer(string $name = null, mixed $default = null)

Retrieve $_SERVER variable

Parameters

string $name

the variable name, if not provided returns all

mixed $default

if this parameter is provide, this will be returned if the variable can not be found

Return Value

mixed

mixed getEnv(string $name = null, mixed $default = null)

Retrieve $_ENV variable

Parameters

string $name

the variable name, if not provided returns all

mixed $default

if this parameter is provide, this will be returned if the variable can not be found

Return Value

mixed

mixed getParam(string $name, mixed $default = null)

No description

Parameters

string $name
mixed $default

Return Value

mixed

array getParams()

No description

Return Value

array

Exception getException()

No description

Return Value

Exception

string getModuleName()

No description

Return Value

string

string getControllerName()

No description

Return Value

string

string getActionName()

No description

Return Value

string

Request_Abstract|bool setParam(string|array $name, string $value = null)

No description

Parameters

string|array $name

the variable name, or an array of key=>value pairs

string $value

Return Value

Request_Abstract|bool

Request_Abstract|bool setModuleName(string $module)

No description

Parameters

string $module

Return Value

Request_Abstract|bool

Request_Abstract|bool setControllerName(string $controller)

No description

Parameters

string $controller

Return Value

Request_Abstract|bool

Request_Abstract|bool setActionName(string $action)

No description

Parameters

string $action

Return Value

Request_Abstract|bool

string getMethod()

No description

Return Value

string

string getLanguage()

No description

Return Value

string

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.

Parameters

string $uri

base URI

Return Value

bool

string getBaseUri()

No description

Return Value

string

string getRequestUri()

No description

Return Value

string

setRequestUri(string $uri)

Since: 2.1.0

No description

Parameters

string $uri

request URI

bool setDispatched()

Set request as dispatched

Return Value

bool

Request_Abstract|bool setRouted()

Set request as routed

Return Value

Request_Abstract|bool