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

Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$commandManager CommandManager
$environment Neos\Flow\Utility\Environment
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$packageManager Neos\Flow\Package\PackageManagerInterface

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

Метод Описание
build ( mixed $commandLine ) : Request Builds a CLI request object from a command line.
injectCommandManager ( CommandManager $commandManager ) : void
injectEnvironment ( Environment $environment ) : void
injectObjectManager ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : void
injectPackageManager ( Neos\Flow\Package\PackageManagerInterface $packageManager ) : void

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

Метод Описание
extractArgumentNameFromCommandLinePart ( string $commandLinePart ) : string Extracts the option or argument name from the name / value pair of a command line.
getValueOfCurrentCommandLineOption ( string $currentArgument, array &$rawCommandLineArguments, string $expectedArgumentType ) : string Returns the value of the first argument of the given input array. Shifts the parsed argument off the array.
parseRawCommandLineArguments ( array $rawCommandLineArguments, string $controllerObjectName, string $controllerCommandName ) : array Takes an array of unparsed command line arguments and options and converts it separated by named arguments, options and unnamed arguments.

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

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

The given command line may be a string (e.g. "mypackage:foo do-that-thing --force") or an array consisting of the individual parts. The array must not include the script name (like in $argv) but start with command right away.
public build ( mixed $commandLine ) : Request
$commandLine mixed The command line, either as a string or as an array
Результат Request The CLI request as an object

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

Extracts the option or argument name from the name / value pair of a command line.
protected extractArgumentNameFromCommandLinePart ( string $commandLinePart ) : string
$commandLinePart string Part of the command line, e.g. "my-important-option=SomeInterestingValue"
Результат string The lowercased argument name, e.g. "myimportantoption"

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

Returns the value of the first argument of the given input array. Shifts the parsed argument off the array.
protected getValueOfCurrentCommandLineOption ( string $currentArgument, array &$rawCommandLineArguments, string $expectedArgumentType ) : string
$currentArgument string The current argument
$rawCommandLineArguments array
$expectedArgumentType string The expected type of the current argument, because booleans get special attention
Результат string The value of the first argument

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

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

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

public injectEnvironment ( Environment $environment ) : void
$environment Neos\Flow\Utility\Environment
Результат void

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

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

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

public injectPackageManager ( Neos\Flow\Package\PackageManagerInterface $packageManager ) : void
$packageManager Neos\Flow\Package\PackageManagerInterface
Результат void

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

Takes an array of unparsed command line arguments and options and converts it separated by named arguments, options and unnamed arguments.
protected parseRawCommandLineArguments ( array $rawCommandLineArguments, string $controllerObjectName, string $controllerCommandName ) : array
$rawCommandLineArguments array The unparsed command parts (such as "--foo") as an array
$controllerObjectName string Object name of the designated command controller
$controllerCommandName string Command name of the recognized command (ie. method name without "Command" suffix)
Результат array All and exceeding command line arguments

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

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

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

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

protected Environment,Neos\Flow\Utility $environment
Результат Neos\Flow\Utility\Environment

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

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

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

protected PackageManagerInterface,Neos\Flow\Package $packageManager
Результат Neos\Flow\Package\PackageManagerInterface