FileAccess Orion

ConfigDumperCommand
in package

Table of Contents

COMMAND_DUMP  = 'dump'
COMMAND_ERROR  = 'error'
COMMAND_HELP  = 'help'
DEFAULT_SCRIPT_NAME  = __CLASS__
HELP_TEMPLATE  = <<<EOH <info>Usage:</info> %s [-h|--help|help] [-i|--ignore-unresolved] <configFile> <className> <info>Arguments:</info> <info>-h|--help|help</info> This usage message <info>-i|--ignore-unresolved</info> Ignore classes with unresolved direct dependencies. <info><configFile></info> Path to a config file for which to generate configuration. If the file does not exist, it will be created. If it does exist, it must return an array, and the file will be updated with new configuration. <info><className></info> Name of the class to reflect and for which to generate dependency configuration. Reads the provided configuration file (creating it if it does not exist), and injects it with ConfigAbstractFactory dependency configuration for the provided class name, writing the changes back to the file. EOH
$helper  : ConsoleHelper
$scriptName  : string
__construct()  : mixed
__invoke()  : int
createArguments()  : stdClass
createErrorArgument()  : stdClass
createHelpArgument()  : stdClass
help()  : void
parseArgs()  : stdClass

Constants

HELP_TEMPLATE

public mixed HELP_TEMPLATE = <<<EOH <info>Usage:</info> %s [-h|--help|help] [-i|--ignore-unresolved] <configFile> <className> <info>Arguments:</info> <info>-h|--help|help</info> This usage message <info>-i|--ignore-unresolved</info> Ignore classes with unresolved direct dependencies. <info><configFile></info> Path to a config file for which to generate configuration. If the file does not exist, it will be created. If it does exist, it must return an array, and the file will be updated with new configuration. <info><className></info> Name of the class to reflect and for which to generate dependency configuration. Reads the provided configuration file (creating it if it does not exist), and injects it with ConfigAbstractFactory dependency configuration for the provided class name, writing the changes back to the file. EOH

Properties

Methods

__construct()

public __construct([string $scriptName = self::DEFAULT_SCRIPT_NAME ][, ConsoleHelper $helper = null ]) : mixed
Parameters
$scriptName : string = self::DEFAULT_SCRIPT_NAME
$helper : ConsoleHelper = null
Return values
mixed

__invoke()

public __invoke(array<string|int, mixed> $args) : int
Parameters
$args : array<string|int, mixed>

Argument list, minus script name

Return values
int

Exit status

createArguments()

private createArguments(string $command, string $configFile, array<string|int, mixed> $config, string $class, bool $ignoreUnresolved) : stdClass
Parameters
$command : string
$configFile : string

File from which config originates, and to which it will be written.

$config : array<string|int, mixed>

Parsed configuration.

$class : string

Name of class to reflect.

$ignoreUnresolved : bool

If to ignore classes with unresolved direct dependencies.

Return values
stdClass

createErrorArgument()

private createErrorArgument(string $message) : stdClass
Parameters
$message : string
Return values
stdClass

createHelpArgument()

private createHelpArgument() : stdClass
Return values
stdClass

help()

private help([resource $resource = STDOUT ]) : void
Parameters
$resource : resource = STDOUT

Defaults to STDOUT

Return values
void

parseArgs()

private parseArgs(array<string|int, mixed> $args) : stdClass
Parameters
$args : array<string|int, mixed>
Return values
stdClass

Search results