PHP Class Bluz\Controller\Controller

Author: Anton Shevchuk
Inheritance: implements JsonSerializable, use trait Bluz\Common\Helper, use trait Bluz\Response\ResponseTrait
Afficher le fichier Open project: bluzphp/framework Class Usage Examples

Protected Properties

Свойство Type Description
$controller string
$data Data
$file string
$module string
$reflection Reflection
$render string One of HTML, JSON or empty string
$template string

Méthodes publiques

Méthode Description
__construct ( string $module, string $controller ) Constructor of Statement
__toString ( ) : string Magic cast to string
assign ( string $key, mixed $value ) : Controller Assign key/value pair to Data object
checkAccept ( ) Check Accept
checkMethod ( ) Check Method
checkPrivilege ( ) Check Privilege
getData ( ) : Data Get controller Data container
getReflection ( ) : Reflection Get Reflection
jsonSerialize ( ) : array Specify data which should be serialized to JSON
run ( array $params = [] ) : Data __invoke

Méthodes protégées

Méthode Description
getFile ( ) : string Get controller file path
setFile ( ) : void Setup controller file
setReflection ( ) : Reflection Retrieve reflection for anonymous function

Method Details

__construct() public méthode

Constructor of Statement
public __construct ( string $module, string $controller )
$module string
$controller string

__toString() public méthode

Magic cast to string
public __toString ( ) : string
Résultat string

assign() public méthode

Assign key/value pair to Data object
public assign ( string $key, mixed $value ) : Controller
$key string
$value mixed
Résultat Controller

checkAccept() public méthode

Check Accept
public checkAccept ( )

checkMethod() public méthode

Check Method
public checkMethod ( )

checkPrivilege() public méthode

Check Privilege
public checkPrivilege ( )

getData() public méthode

Get controller Data container
public getData ( ) : Data
Résultat Data

getFile() protected méthode

Get controller file path
protected getFile ( ) : string
Résultat string

getReflection() public méthode

Get Reflection
public getReflection ( ) : Reflection
Résultat Reflection

jsonSerialize() public méthode

Specify data which should be serialized to JSON
public jsonSerialize ( ) : array
Résultat array

run() public méthode

__invoke
public run ( array $params = [] ) : Data
$params array
Résultat Data

setFile() protected méthode

Setup controller file
protected setFile ( ) : void
Résultat void

setReflection() protected méthode

Retrieve reflection for anonymous function
protected setReflection ( ) : Reflection
Résultat Reflection

Property Details

$controller protected_oe property

protected string $controller
Résultat string

$data protected_oe property

protected Data $data
Résultat Data

$file protected_oe property

protected string $file
Résultat string

$module protected_oe property

protected string $module
Résultat string

$reflection protected_oe property

protected Reflection,Bluz\Controller $reflection
Résultat Reflection

$render protected_oe property

One of HTML, JSON or empty string
protected string $render
Résultat string

$template protected_oe property

protected string $template
Résultat string