PHP Класс Neos\Flow\Mvc\Controller\AbstractController

Наследование: implements Neos\Flow\Mvc\Controller\ControllerInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$arguments Arguments Arguments passed to the controller
$controllerContext ControllerContext
$flashMessageContainer Neos\Flow\Mvc\FlashMessageContainer ..) to add a new Flash Message.
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$request Neos\Flow\Mvc\ActionRequest The current action request directed to this controller
$response Neos\Flow\Http\Response The response which will be returned by this action controller
$supportedMediaTypes array A list of IANA media types which are supported by this controller
$uriBuilder Neos\Flow\Mvc\Routing\UriBuilder
$validatorResolver Neos\Flow\Validation\ValidatorResolver

Открытые методы

Метод Описание
addFlashMessage ( string $messageBody, string $messageTitle = '', string $severity = Error\Message::SEVERITY_OK, array $messageArguments = [], integer $messageCode = null ) : void Creates a Message object and adds it to the FlashMessageContainer.
getControllerContext ( ) : ControllerContext Returns this controller's context.

Защищенные методы

Метод Описание
forward ( string $actionName, string $controllerName = null, string $packageKey = null, array $arguments = [] ) : void Forwards the request to another action and / or controller.
forwardToRequest ( ActionRequest $request ) : void Forwards the request to another action and / or controller.
initializeController ( Neos\Flow\Mvc\RequestInterface $request, Neos\Flow\Mvc\ResponseInterface $response ) Initializes the controller
mapRequestArgumentsToControllerArguments ( ) : void Maps arguments delivered by the request object to the local controller arguments.
redirect ( string $actionName, string $controllerName = null, string $packageKey = null, array $arguments = null, integer $delay, integer $statusCode = 303, string $format = null ) : void Redirects the request to another action and / or controller.
redirectToRequest ( ActionRequest $request, integer $delay, integer $statusCode = 303 ) : void Redirects the request to another action and / or controller.
redirectToUri ( mixed $uri, integer $delay, integer $statusCode = 303 ) Redirects to another URI
throwStatus ( integer $statusCode, string $statusMessage = null, string $content = null ) Sends the specified HTTP status immediately.

Описание методов

addFlashMessage() публичный Метод

This method should be used to add FlashMessages rather than interacting with the container directly.
См. также: Error\Message
public addFlashMessage ( string $messageBody, string $messageTitle = '', string $severity = Error\Message::SEVERITY_OK, array $messageArguments = [], integer $messageCode = null ) : void
$messageBody string text of the FlashMessage
$messageTitle string optional header of the FlashMessage
$severity string severity of the FlashMessage (one of the Message::SEVERITY_* constants)
$messageArguments array arguments to be passed to the FlashMessage
$messageCode integer
Результат void

forward() защищенный Метод

Request is directly transferred to the other action / controller
См. также: redirect()
protected forward ( string $actionName, string $controllerName = null, string $packageKey = null, array $arguments = [] ) : void
$actionName string Name of the action to forward to
$controllerName string Unqualified object name of the controller to forward to. If not specified, the current controller is used.
$packageKey string Key of the package containing the controller to forward to. May also contain the sub package, concatenated with backslash (Vendor.Foo\Bar\Baz). If not specified, the current package is assumed.
$arguments array Arguments to pass to the target action
Результат void

forwardToRequest() защищенный Метод

Request is directly transfered to the other action / controller
См. также: redirectToRequest()
protected forwardToRequest ( ActionRequest $request ) : void
$request Neos\Flow\Mvc\ActionRequest The request to redirect to
Результат void

getControllerContext() публичный Метод

Note that the context is only available after processRequest() has been called.
public getControllerContext ( ) : ControllerContext
Результат ControllerContext The current controller context

initializeController() защищенный Метод

This method should be called by the concrete processRequest() method.
protected initializeController ( Neos\Flow\Mvc\RequestInterface $request, Neos\Flow\Mvc\ResponseInterface $response )
$request Neos\Flow\Mvc\RequestInterface
$response Neos\Flow\Mvc\ResponseInterface

mapRequestArgumentsToControllerArguments() защищенный Метод

Maps arguments delivered by the request object to the local controller arguments.
protected mapRequestArgumentsToControllerArguments ( ) : void
Результат void

redirect() защищенный Метод

Redirect will be sent to the client which then performs another request to the new URI. NOTE: This method only supports web requests and will throw an exception if used with other request types.
См. также: forward()
protected redirect ( string $actionName, string $controllerName = null, string $packageKey = null, array $arguments = null, integer $delay, integer $statusCode = 303, string $format = null ) : void
$actionName string Name of the action to forward to
$controllerName string Unqualified object name of the controller to forward to. If not specified, the current controller is used.
$packageKey string Key of the package containing the controller to forward to. If not specified, the current package is assumed.
$arguments array Array of arguments for the target action
$delay integer (optional) The delay in seconds. Default is no delay.
$statusCode integer (optional) The HTTP status code for the redirect. Default is "303 See Other"
$format string The format to use for the redirect URI
Результат void

redirectToRequest() защищенный Метод

Redirect will be sent to the client which then performs another request to the new URI. NOTE: This method only supports web requests and will throw an exception if used with other request types.
См. также: forwardToRequest()
protected redirectToRequest ( ActionRequest $request, integer $delay, integer $statusCode = 303 ) : void
$request Neos\Flow\Mvc\ActionRequest The request to redirect to
$delay integer (optional) The delay in seconds. Default is no delay.
$statusCode integer (optional) The HTTP status code for the redirect. Default is "303 See Other"
Результат void

redirectToUri() защищенный Метод

Redirects to another URI
protected redirectToUri ( mixed $uri, integer $delay, integer $statusCode = 303 )
$uri mixed Either a string representation of a URI or a \Neos\Flow\Http\Uri object
$delay integer (optional) The delay in seconds. Default is no delay.
$statusCode integer (optional) The HTTP status code for the redirect. Default is "303 See Other"

throwStatus() защищенный Метод

NOTE: This method only supports web requests and will throw an exception if used with other request types.
protected throwStatus ( integer $statusCode, string $statusMessage = null, string $content = null )
$statusCode integer The HTTP status code
$statusMessage string A custom HTTP status message
$content string Body content which further explains the status

Описание свойств

$arguments защищенное свойство

Arguments passed to the controller
protected Arguments,Neos\Flow\Mvc\Controller $arguments
Результат Arguments

$controllerContext защищенное свойство

protected ControllerContext,Neos\Flow\Mvc\Controller $controllerContext
Результат ControllerContext

$flashMessageContainer защищенное свойство

..) to add a new Flash Message.
protected FlashMessageContainer,Neos\Flow\Mvc $flashMessageContainer
Результат Neos\Flow\Mvc\FlashMessageContainer

$persistenceManager защищенное свойство

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
Результат Neos\Flow\Persistence\PersistenceManagerInterface

$request защищенное свойство

The current action request directed to this controller
protected ActionRequest,Neos\Flow\Mvc $request
Результат Neos\Flow\Mvc\ActionRequest

$response защищенное свойство

The response which will be returned by this action controller
protected Response,Neos\Flow\Http $response
Результат Neos\Flow\Http\Response

$supportedMediaTypes защищенное свойство

A list of IANA media types which are supported by this controller
См. также: http://www.iana.org/assignments/media-types/index.html
protected array $supportedMediaTypes
Результат array

$uriBuilder защищенное свойство

protected UriBuilder,Neos\Flow\Mvc\Routing $uriBuilder
Результат Neos\Flow\Mvc\Routing\UriBuilder

$validatorResolver защищенное свойство

protected ValidatorResolver,Neos\Flow\Validation $validatorResolver
Результат Neos\Flow\Validation\ValidatorResolver