Свойство | Тип | Описание | |
---|---|---|---|
$action | string | The current action | |
$content | array | ||
$module | string | The current module |
Метод | Описание | |
---|---|---|
__construct ( Symfony\Component\HttpKernel\KernelInterface $kernel, string $action, string $module ) | ||
execute ( ) | Execute the action | |
getAction ( ) : string | Get the action | |
getContent ( ) : |
Since the display action in the backend is rather complicated and we want to make this work with our Kernel, I've added this getContent method to extract the output from the actual displaying. | |
getModule ( ) : string | Get the module | |
output ( integer $statusCode, mixed $data = null, string $message = null ) | Outputs an answer to the browser |
Метод | Описание | |
---|---|---|
setAction ( string $action ) | Set the action, for later use | |
setModule ( string $module ) | Set the module, for later use |
public __construct ( Symfony\Component\HttpKernel\KernelInterface $kernel, string $action, string $module ) | ||
$kernel | Symfony\Component\HttpKernel\KernelInterface | |
$action | string | The action to use. |
$module | string | The module to use. |
public getContent ( ) : |
||
Результат |
public output ( integer $statusCode, mixed $data = null, string $message = null ) | ||
$statusCode | integer | The status code to use, use one of the available constants (self::OK, self::BAD_REQUEST, self::FORBIDDEN, self::ERROR). |
$data | mixed | The data to be returned (will be encoded as JSON). |
$message | string | A text-message. |