PHP Class Bluz\Controller\Reflection

Author: Anton Shevchuk
Inheritance: use trait Bluz\Common\Options
Show file Open project: bluzphp/framework Class Usage Examples

Protected Properties

Property Type Description
$accept list of Accept
$acl list of Acl
$cache cache TTL
$file full path to file
$method list of HTTP methods
$params described params
$privilege privilege
$route routers
$values default values of params

Public Methods

Method Description
__construct ( string $file ) Constructor of Reflection
__set_state ( $array ) : Reflection Set state required for working with var_export (used inside PHP File cache)
getAccept ( ) : array | null Get accepted type
getAcl ( ) : array | null Get Acl privileges
getCache ( ) : integer Get Cache TTL
getFile ( ) : string Get path to file
getMethod ( ) : array | null Get HTTP Method
getParams ( ) : array Get all params
getPrivilege ( ) : string Get Privilege fo ACL
getRoute ( ) : array | null Get Route
params ( array $requestParams ) : array Process request params
process ( ) : void Process to get reflection from file
setAccept ( string $accept ) : void Set accepted types
setAcl ( string $acl ) : void Set Acl privileges
setCache ( string $ttl ) : void Set Cache TTL
setMethod ( string $method ) : void Set HTTP Method
setParam ( string $param ) : void Set param types
setPrivilege ( string $privilege ) : void Set Privilege fo ACL allow only one privilege
setRoute ( string $route ) : void Set Route

Protected Methods

Method Description
initRoute ( ) : void Init Route
prepareCache ( string $cache ) : integer Prepare Cache
prepareRoutePattern ( string $route ) : string Prepare Route pattern

Method Details

__construct() public method

Constructor of Reflection
public __construct ( string $file )
$file string

__set_state() public static method

Set state required for working with var_export (used inside PHP File cache)
public static __set_state ( $array ) : Reflection
$array
return Reflection

getAccept() public method

Get accepted type
public getAccept ( ) : array | null
return array | null

getAcl() public method

Get Acl privileges
public getAcl ( ) : array | null
return array | null

getCache() public method

Get Cache TTL
public getCache ( ) : integer
return integer

getFile() public method

Get path to file
public getFile ( ) : string
return string

getMethod() public method

Get HTTP Method
public getMethod ( ) : array | null
return array | null

getParams() public method

Get all params
public getParams ( ) : array
return array

getPrivilege() public method

Get Privilege fo ACL
public getPrivilege ( ) : string
return string

getRoute() public method

Get Route
public getRoute ( ) : array | null
return array | null

initRoute() protected method

Init Route
protected initRoute ( ) : void
return void

params() public method

- type conversion - set default value
public params ( array $requestParams ) : array
$requestParams array
return array

prepareCache() protected method

Prepare Cache
protected prepareCache ( string $cache ) : integer
$cache string
return integer

prepareRoutePattern() protected method

Prepare Route pattern
protected prepareRoutePattern ( string $route ) : string
$route string
return string

process() public method

Process to get reflection from file
public process ( ) : void
return void

setAccept() public method

Set accepted types
public setAccept ( string $accept ) : void
$accept string
return void

setAcl() public method

Set Acl privileges
public setAcl ( string $acl ) : void
$acl string
return void

setCache() public method

Set Cache TTL
public setCache ( string $ttl ) : void
$ttl string
return void

setMethod() public method

Set HTTP Method
public setMethod ( string $method ) : void
$method string
return void

setParam() public method

Set param types
public setParam ( string $param ) : void
$param string
return void

setPrivilege() public method

Set Privilege fo ACL allow only one privilege
public setPrivilege ( string $privilege ) : void
$privilege string
return void

setRoute() public method

Set Route
public setRoute ( string $route ) : void
$route string
return void

Property Details

$accept protected property

list of Accept
protected $accept

$acl protected property

list of Acl
protected $acl

$cache protected property

cache TTL
protected $cache

$file protected property

full path to file
protected $file

$method protected property

list of HTTP methods
protected $method

$params protected property

described params
protected $params

$privilege protected property

privilege
protected $privilege

$route protected property

routers
protected $route

$values protected property

default values of params
protected $values