Controller
AbstractYes
Table of Contents
Constants
- ERROR_REQUIRED_PARAMETER = 'REPORT_CONTROLLER_22001'
- ERROR_UNKNOWN_ACTION = 'REPORT_CONTROLLER_22002'
- EVENT_ON_BEFORE_ACTION = 'onBeforeAction'
- STATUS_DENIED = 'denied'
- STATUS_ERROR = 'error'
- STATUS_INVALID_SIGN = 'invalid_sign'
- STATUS_NEED_AUTH = 'need_auth'
- STATUS_RESTRICTION = 'restriction'
- STATUS_SUCCESS = 'success'
Methods
- __construct() : mixed
- Constructor Controller.
- exec() : void
- Executes controller by specific action.
- getAction() : string
- Gets current action.
- getActionDescription() : array<string|int, mixed>
- Gets description of action.
- getErrorByCode() : array<string|int, Error>
- Getting once error with the necessary code.
- getErrors() : array<string|int, Error>
- Getting array of errors.
- setAction() : $this
- Sets action and description.
- setActionName() : $this
- Sets action name.
Constants
ERROR_REQUIRED_PARAMETER
public
mixed
ERROR_REQUIRED_PARAMETER
= 'REPORT_CONTROLLER_22001'
ERROR_UNKNOWN_ACTION
public
mixed
ERROR_UNKNOWN_ACTION
= 'REPORT_CONTROLLER_22002'
EVENT_ON_BEFORE_ACTION
public
mixed
EVENT_ON_BEFORE_ACTION
= 'onBeforeAction'
STATUS_DENIED
public
mixed
STATUS_DENIED
= 'denied'
STATUS_ERROR
public
mixed
STATUS_ERROR
= 'error'
STATUS_INVALID_SIGN
public
mixed
STATUS_INVALID_SIGN
= 'invalid_sign'
STATUS_NEED_AUTH
public
mixed
STATUS_NEED_AUTH
= 'need_auth'
STATUS_RESTRICTION
public
mixed
STATUS_RESTRICTION
= 'restriction'
STATUS_SUCCESS
public
mixed
STATUS_SUCCESS
= 'success'
Methods
__construct()
Constructor Controller.
public
__construct() : mixed
exec()
Executes controller by specific action.
public
exec() : void
This method contains all steps of life cycle controller.
getAction()
Gets current action.
public
getAction() : string
Return values
stringgetActionDescription()
Gets description of action.
public
getActionDescription() : array<string|int, mixed>
Return values
array<string|int, mixed>getErrorByCode()
Getting once error with the necessary code.
public
getErrorByCode(string $code) : array<string|int, Error>
Parameters
- $code : string
-
Code of error.
Return values
array<string|int, Error>getErrors()
Getting array of errors.
public
getErrors() : array<string|int, Error>
Return values
array<string|int, Error>setAction()
Sets action and description.
public
setAction(string $action, array<string|int, mixed> $description) : $this
Parameters
- $action : string
-
Action name.
- $description : array<string|int, mixed>
-
Action description.
Return values
$thissetActionName()
Sets action name.
public
setActionName(string $action) : $this
Parameters
- $action : string
-
Action name.