PHP Class Bluz\Controller\Mapper\AbstractMapper

Author: Anton Shevchuk
Show file Open project: bluzphp/framework Class Usage Examples

Protected Properties

Property Type Description
$controller string
$crud instance of CRUD
$data query data
$map array [ METHOD => [ 'module' => 'module', 'controller' => 'controller', 'acl' => 'privilege', ], ]
$method HTTP Method
$module string
$params params of query
$primary identifier
$relation relation list
$relationId relation Id

Public Methods

Method Description
__construct ( ) Prepare request for processing
addMap ( string $method, string $module, string $controller, String $acl = null ) Add mapping data
delete ( string $module, string $controller, String $acl = null ) Add mapping for DELETE method
get ( string $module, string $controller, String $acl = null ) Add mapping for GET method
getCrud ( ) : AbstractCrud Get crud instance
getPrimaryKey ( ) : array Return primary key
head ( string $module, string $controller, String $acl = null ) Add mapping for HEAD method
options ( string $module, string $controller, String $acl = null ) Add mapping for OPTIONS method
patch ( string $module, string $controller, String $acl = null ) Add mapping for PATCH method
post ( string $module, string $controller, String $acl = null ) Add mapping for POST method
put ( string $module, string $controller, String $acl = null ) Add mapping for PUT method
run ( ) : mixed Run REST controller
setCrud ( AbstractCrud $crud ) Set Crud

Method Details

__construct() public method

Prepare request for processing
public __construct ( )

addMap() public method

Add mapping data
public addMap ( string $method, string $module, string $controller, String $acl = null )
$method string
$module string
$controller string
$acl String

delete() public method

Add mapping for DELETE method
public delete ( string $module, string $controller, String $acl = null )
$module string
$controller string
$acl String

get() public method

Add mapping for GET method
public get ( string $module, string $controller, String $acl = null )
$module string
$controller string
$acl String

getCrud() public method

Get crud instance
public getCrud ( ) : AbstractCrud
return Bluz\Crud\AbstractCrud

getPrimaryKey() public method

Return primary key
public getPrimaryKey ( ) : array
return array

head() public method

Add mapping for HEAD method
public head ( string $module, string $controller, String $acl = null )
$module string
$controller string
$acl String

options() public method

Add mapping for OPTIONS method
public options ( string $module, string $controller, String $acl = null )
$module string
$controller string
$acl String

patch() public method

Add mapping for PATCH method
public patch ( string $module, string $controller, String $acl = null )
$module string
$controller string
$acl String

post() public method

Add mapping for POST method
public post ( string $module, string $controller, String $acl = null )
$module string
$controller string
$acl String

put() public method

Add mapping for PUT method
public put ( string $module, string $controller, String $acl = null )
$module string
$controller string
$acl String

run() public method

Run REST controller
public run ( ) : mixed
return mixed

setCrud() public method

Set Crud
public setCrud ( AbstractCrud $crud )
$crud Bluz\Crud\AbstractCrud

Property Details

$controller protected property

protected string $controller
return string

$crud protected property

instance of CRUD
protected $crud

$data protected property

query data
protected $data

$map protected property

[ METHOD => [ 'module' => 'module', 'controller' => 'controller', 'acl' => 'privilege', ], ]
protected array $map
return array

$method protected property

HTTP Method
protected $method

$module protected property

protected string $module
return string

$params protected property

params of query
protected $params

$primary protected property

identifier
protected $primary

$relation protected property

relation list
protected $relation

$relationId protected property

relation Id
protected $relationId