PHP Class ApiComponent, Platform-API-plugin

Author: :dayunlong ([email protected])
Inheritance: extends CComponent
ファイルを表示 Open project: nodesagency/Platform-API-plugin Class Usage Examples

Protected Properties

Property Type Description
$allowJsonp boolean
$controller Controller Reference to the current controller
$publicActions array List of actions that can be accessed without authentication
$request CakeRequest Reference to the current request
$response CakeResponse Reference to the current response

Public Methods

Method Description
allowJsonp ( $value = true ) : void Allow jsonp
allowPublic ( string $action ) : void Allow public access to an action
beforeRedirect ( Controller $controller, mixed $url, integer $status = null, boolean $exit = true ) : void beforeRedirection
beforeRender ( Controller $controller ) : void beforeRender callback
denyPublic ( string $action ) : boolean Deny public access to an action
hasError ( ) : boolean Is the current controller an Error controller?
initialize ( Controller $controller ) : void initialize callback
startup ( Controller $controller ) : void startup method

Protected Methods

Method Description
configureApiAccess ( ) : void Ensures that the current request is validated for Authentication
configureRequestDetectors ( ) : void Configure detectors for API requests
setup ( Controller $controller ) : void Setup method

Method Details

allowJsonp() public method

Allow jsonp
public allowJsonp ( $value = true ) : void
return void

allowPublic() public method

Allow public access to an action
public allowPublic ( string $action ) : void
$action string
return void

beforeRedirect() public method

beforeRedirection
public beforeRedirect ( Controller $controller, mixed $url, integer $status = null, boolean $exit = true ) : void
$controller Controller
$url mixed
$status integer
$exit boolean
return void

beforeRender() public method

beforeRender callback
public beforeRender ( Controller $controller ) : void
$controller Controller
return void

configureApiAccess() protected method

Ensures that the current request is validated for Authentication
protected configureApiAccess ( ) : void
return void

configureRequestDetectors() protected method

Add detectors for ->is('api') and ->is('json') on CakeRequest
protected configureRequestDetectors ( ) : void
return void

denyPublic() public method

Deny public access to an action
public denyPublic ( string $action ) : boolean
$action string
return boolean

hasError() public method

Is the current controller an Error controller?
public hasError ( ) : boolean
return boolean

initialize() public method

initialize callback
public initialize ( Controller $controller ) : void
$controller Controller
return void

setup() protected method

Setup method
protected setup ( Controller $controller ) : void
$controller Controller
return void

startup() public method

startup method
public startup ( Controller $controller ) : void
$controller Controller
return void

Property Details

$allowJsonp protected_oe property

protected bool $allowJsonp
return boolean

$controller protected_oe property

Reference to the current controller
protected Controller $controller
return Controller

$publicActions protected_oe property

List of actions that can be accessed without authentication
protected array $publicActions
return array

$request protected_oe property

Reference to the current request
protected CakeRequest $request
return CakeRequest

$response protected_oe property

Reference to the current response
protected CakeResponse $response
return CakeResponse