class Yaf_Request_Http extends Yaf_Request_Abstract (View source)

Constants

SCHEME_HTTP

SCHEME_HTTPS

Properties

string $module from  Yaf_Request_Abstract
string $controller from  Yaf_Request_Abstract
string $action from  Yaf_Request_Abstract
string $method from  Yaf_Request_Abstract
protected array $params from  Yaf_Request_Abstract
protected string $language from  Yaf_Request_Abstract
protected Yaf_Exception $_exception from  Yaf_Request_Abstract
protected string $_base_uri from  Yaf_Request_Abstract
protected string $uri from  Yaf_Request_Abstract
protected string $dispatched from  Yaf_Request_Abstract
protected string $routed from  Yaf_Request_Abstract

Methods

bool
isGet()

No description

bool
isDelete()

No description

bool
isPatch()

No description

string|null
getRaw()

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, string $default = null)

Retrieve $_SERVER variable

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

Retrieve $_ENV variable

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

No description

array
getParams()

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, bool $format_name = true)

No description

setControllerName(string $controller, bool $format_name = true)

No description

setActionName(string $action, bool $format_name = true)

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

setDispatched(bool $dispatched = null)

Set request as dispatched

setRouted(bool $flag = null)

Set request as routed

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

No description

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

No description

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

No description

mixed
getPost(string $name = '', mixed $default = null)

No description

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

No description

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

No description

__construct(string $request_uri = '', string $base_uri = '')

No description

Details

bool isGet()

No description

Return Value

bool

bool isDelete()

No description

Return Value

bool

bool isPatch()

No description

Return Value

bool

string|null getRaw()

No description

Return Value

string|null

Yaf_Request_Abstract|null clearParams()

No description

Return Value

Yaf_Request_Abstract|null

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

final bool isDispatched()

No description

Return Value

bool

final bool isRouted()

No description

Return Value

bool

bool isXmlHttpRequest()

No description

Return Value

bool

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

Retrieve $_SERVER variable

Parameters

string $name

the variable name, if not provided returns all

string $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, string $default = null)

Retrieve $_ENV variable

Parameters

string $name

the variable name, if not provided returns all

string $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 = '')

No description

Parameters

string $name
mixed $default

Return Value

mixed

array getParams()

No description

Return Value

array

Yaf_Exception getException()

No description

Return Value

Yaf_Exception

string getModuleName()

No description

Return Value

string

string getControllerName()

No description

Return Value

string

string getActionName()

No description

Return Value

string

Yaf_Request_Abstract|bool|null 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

Yaf_Request_Abstract|bool|null

Yaf_Request_Abstract|bool setModuleName(string $module, bool $format_name = true)

No description

Parameters

string $module
bool $format_name

Return Value

Yaf_Request_Abstract|bool

Yaf_Request_Abstract|bool setControllerName(string $controller, bool $format_name = true)

No description

Parameters

string $controller
bool $format_name

Return Value

Yaf_Request_Abstract|bool

Yaf_Request_Abstract|bool setActionName(string $action, bool $format_name = true)

No description

Parameters

string $action
bool $format_name

Return Value

Yaf_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

Yaf_Request_Abstract|null setRequestUri(string $uri)

Since: 2.1.0

No description

Parameters

string $uri

request URI

Return Value

Yaf_Request_Abstract|null

final Yaf_Request_Abstract|null setDispatched(bool $dispatched = null)

Set request as dispatched

Parameters

bool $dispatched

Return Value

Yaf_Request_Abstract|null

final Yaf_Request_Abstract|null setRouted(bool $flag = null)

Set request as routed

Parameters

bool $flag

Return Value

Yaf_Request_Abstract|null

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

No description

Parameters

string $name
mixed $default

Return Value

mixed

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

No description

Parameters

string $name
mixed $default

Return Value

mixed

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

No description

Parameters

string $name
mixed $default

Return Value

mixed

mixed getPost(string $name = '', mixed $default = null)

No description

Parameters

string $name
mixed $default

Return Value

mixed

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

No description

Parameters

string $name
mixed $default

Return Value

mixed

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

No description

Parameters

string $name
mixed $default

Return Value

mixed

__construct(string $request_uri = '', string $base_uri = '')

No description

Parameters

string $request_uri
string $base_uri