\Hazaar\Application\Request
Cli
Summary
Methods Properties Constants
get
has
set
No constants
Properties
$args
$args
Inherited
$config
$config
Inherited
$controller
$controller
Inherited
$dispatched
$dispatched
Inherited
$exception
$exception
Inherited
$params
$params
Inherited
$response_type
$response_type
Methods
init()
init($args)

Parameters

$args

No description

Inherited
__get()
__get($key)

Parameters

$key

No description

Inherited
__unset()
__unset($key)

Parameters

$key

No description

Inherited
count()
count()
Inherited
evaluate()
evaluate($string)

Parses a request URL string and turns it into a controller name, action name, and argument list. This is essentially the core method of Hazaar that decides what to execute based on

Parameters

$string

No description

Inherited
get()
get($key, $default = null)

Parameters

$key

No description

$default

No description

Inherited
getActionName()
getActionName()
Inherited
getBasePath()
getBasePath()
Inherited
getControllerName()
getControllerName()
Inherited
getException()
getException()
Inherited
getParams()
getParams($filter = null) : array
Return an array of request parameters as key/value pairs.

Parameters

$filterarray

Only include parameters with keys specified in this filter.

Returns

array
Inherited
getPath()
getPath() : string

Return the request path suffix. This is the path that comes after the controller and action path elements. Take the path /myapp/public/index/test/foo/bar for example. In this case this method would return ‘/foo/bar’.

Tags

Since

1.0.0

Returns

string

The path suffix of the request URI

Inherited
getRawPath()
getRawPath() : string

Return the complete raw request URI relative to the application path. That is the full path including the controller and action elements. Take the path /myapp/public/index/test/foo/bar for example. In this case this method would return ‘/index/test/foo/bar’.

Tags

Since

1.0.0

Returns

string

The raw request URI relative to the application path.

Inherited
getResponseType()
getResponseType() : string
Returns the requested response type.

The requested response type can be set in the request itself. If it is not set, then the default will be ‘html’ or the X-Requested-With header will be checked to determine the response type.

This method is used internally to determine the response type to send when one has not been explicitly used. Normally the response type is determined by the Controller\Response object type returned by a controller action.

Returns

string
Inherited
has()
has($keys)

Parameters

$keys

No description

Inherited
hasException()
hasException()
Inherited
hasParams()
hasParams()
Inherited
isDELETE()
isDELETE()
Inherited
isDispatched()
isDispatched()
Inherited
isGET()
isGET()
Inherited
isMobileDevice()
isMobileDevice() : boolean
Detect if a request originated on a mobile device

This method will return true to indicate that the requesting device is a mobile browser. It uses the freely available script from detectmobilebrowsers.com

Returns

boolean

True to indicate requesting device is a mobile browser, false otherwise.

Inherited
isPOST()
isPOST()
Inherited
isPUT()
isPUT()
Inherited
method()
method()
Inherited
processRoute()
processRoute()
Inherited
referer()
referer()
Inherited
remove()
remove($key)

Parameters

$key

No description

Inherited
resetAction()
resetAction()
Inherited
set()
set($key, $value)

Parameters

$key

No description

$value

No description

Inherited
setActionName()
setActionName($name)

Parameters

$name

No description

Inherited
setControllerName()
setControllerName($name)

Parameters

$name

No description

Inherited
setDispatched()
setDispatched($flag = true)

Parameters

$flag

No description

Inherited
setException()
setException($e)

Parameters

$e\Hazaar\Application\Request\Exception

No description

Inherited
setParams()
setParams($array)

Parameters

$arrayarray

No description

Inherited
setResponseType()
setResponseType($type)

Parameters

$type

No description