PHP Класс Neos\Flow\Cli\CommandController

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

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

Свойство Тип Описание
$arguments Neos\Flow\Mvc\Controller\Arguments
$commandManager CommandManager
$commandMethodName string Name of the command method
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$output ConsoleOutput
$request Request
$response Response

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

Метод Описание
__construct ( ) Constructs the command controller
getFlowInvocationString ( ) : string Returns the CLI Flow command depending on the environment
injectCommandManager ( CommandManager $commandManager ) : void
injectObjectManager ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : void Injects the reflection service
processRequest ( Neos\Flow\Mvc\RequestInterface $request, Neos\Flow\Mvc\ResponseInterface $response ) : void Processes a command line request.

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

Метод Описание
callCommandMethod ( ) : void Calls the specified command method and passes the arguments.
forward ( string $commandName, string $controllerObjectName = null, array $arguments = [] ) : void Forwards the request to another command and / or CommandController.
initializeCommandMethodArguments ( ) : void Initializes the arguments array of this controller by creating an empty argument object for each of the method arguments found in the designated command method.
mapRequestArgumentsToControllerArguments ( ) : void Maps arguments delivered by the request object to the local controller arguments.
output ( string $text, array $arguments = [] ) : void Outputs specified text to the console window You can specify arguments that will be passed to the text via sprintf
outputFormatted ( string $text = '', array $arguments = [], integer $leftPadding ) : void Formats the given text to fit into MAXIMUM_LINE_LENGTH and outputs it to the console window
outputLine ( string $text = '', array $arguments = [] ) : void Outputs specified text to the console window and appends a line break
quit ( integer $exitCode ) : void Exits the CLI through the dispatcher and makes sure that Flow is properly shut down.
resolveCommandMethodName ( ) : string Resolves and checks the current command method name
sendAndExit ( integer $exitCode ) : void Sends the response and exits the CLI without any further code execution Should be used for commands that flush code caches.

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

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

Constructs the command controller
public __construct ( )

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

If the command returns a string, it is appended to the content in the response object. If the command doesn't return anything and a valid view exists, the view is rendered automatically.
protected callCommandMethod ( ) : void
Результат void

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

Request is directly transferred to the other command / controller without the need for a new request.
protected forward ( string $commandName, string $controllerObjectName = null, array $arguments = [] ) : void
$commandName string
$controllerObjectName string
$arguments array
Результат void

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

Returns the CLI Flow command depending on the environment
public getFlowInvocationString ( ) : string
Результат string

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

Initializes the arguments array of this controller by creating an empty argument object for each of the method arguments found in the designated command method.
protected initializeCommandMethodArguments ( ) : void
Результат void

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

public injectCommandManager ( CommandManager $commandManager ) : void
$commandManager CommandManager
Результат void

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

Injects the reflection service
public injectObjectManager ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : void
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
Результат void

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

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

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

Outputs specified text to the console window You can specify arguments that will be passed to the text via sprintf
См. также: http://www.php.net/sprintf
protected output ( string $text, array $arguments = [] ) : void
$text string Text to output
$arguments array Optional arguments to use for sprintf
Результат void

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

Formats the given text to fit into MAXIMUM_LINE_LENGTH and outputs it to the console window
См. также: outputLine()
protected outputFormatted ( string $text = '', array $arguments = [], integer $leftPadding ) : void
$text string Text to output
$arguments array Optional arguments to use for sprintf
$leftPadding integer The number of spaces to use for indentation
Результат void

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

Outputs specified text to the console window and appends a line break
См. также: output()
См. также: outputLines()
protected outputLine ( string $text = '', array $arguments = [] ) : void
$text string Text to output
$arguments array Optional arguments to use for sprintf
Результат void

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

Processes a command line request.
public processRequest ( Neos\Flow\Mvc\RequestInterface $request, Neos\Flow\Mvc\ResponseInterface $response ) : void
$request Neos\Flow\Mvc\RequestInterface The request object
$response Neos\Flow\Mvc\ResponseInterface The response, modified by this handler
Результат void

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

If your command relies on functionality which is triggered through the Bootstrap shutdown (such as the persistence framework), you must use quit() instead of exit().
protected quit ( integer $exitCode ) : void
$exitCode integer Exit code to return on exit (see http://www.php.net/exit)
Результат void

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

Note: The resulting command method name might not have the correct case, which isn't a problem because PHP is case insensitive regarding method names.
protected resolveCommandMethodName ( ) : string
Результат string Method name of the current command

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

Sends the response and exits the CLI without any further code execution Should be used for commands that flush code caches.
protected sendAndExit ( integer $exitCode ) : void
$exitCode integer Exit code to return on exit
Результат void

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

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

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

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

protected CommandManager,Neos\Flow\Cli $commandManager
Результат CommandManager

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

Name of the command method
protected string $commandMethodName
Результат string

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

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
Результат Neos\Flow\ObjectManagement\ObjectManagerInterface

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

protected ConsoleOutput,Neos\Flow\Cli $output
Результат ConsoleOutput

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

protected Request,Neos\Flow\Cli $request
Результат Request

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

protected Response,Neos\Flow\Cli $response
Результат Response