[ Index ] |
PHP Cross Reference of phpBB-3.1.12-deutsch |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 1161 lines (38 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
Application:: (48 methods):
__construct()
setDispatcher()
run()
doRun()
setHelperSet()
getHelperSet()
setDefinition()
getDefinition()
getHelp()
setCatchExceptions()
setAutoExit()
getName()
setName()
getVersion()
setVersion()
getLongVersion()
register()
addCommands()
add()
get()
has()
getNamespaces()
findNamespace()
find()
all()
getAbbreviations()
asText()
asXml()
renderException()
getTerminalWidth()
getTerminalHeight()
getTerminalDimensions()
configureIO()
doRunCommand()
getCommandName()
getDefaultInputDefinition()
getDefaultCommands()
getDefaultHelperSet()
getSttyColumns()
getConsoleMode()
getAbbreviationSuggestions()
extractNamespace()
findAlternativeCommands()
findAlternativeNamespace()
findAlternatives()
stringWidth()
splitStringByWidth()
extractAllNamespaces()
Class: Application - X-Ref
An Application is the container for a collection of commands.__construct($name = 'UNKNOWN', $version = 'UNKNOWN') X-Ref |
Constructor. param: string $name The name of the application param: string $version The version of the application |
setDispatcher(EventDispatcherInterface $dispatcher) X-Ref |
No description |
run(InputInterface $input = null, OutputInterface $output = null) X-Ref |
Runs the current application. param: InputInterface $input An Input instance param: OutputInterface $output An Output instance return: int 0 if everything went fine, or an error code |
doRun(InputInterface $input, OutputInterface $output) X-Ref |
Runs the current application. param: InputInterface $input An Input instance param: OutputInterface $output An Output instance return: int 0 if everything went fine, or an error code |
setHelperSet(HelperSet $helperSet) X-Ref |
Set a helper set to be used with the command. param: HelperSet $helperSet The helper set |
getHelperSet() X-Ref |
Get the helper set associated with the command. return: HelperSet The HelperSet instance associated with this command |
setDefinition(InputDefinition $definition) X-Ref |
Set an input definition set to be used with this application. param: InputDefinition $definition The input definition |
getDefinition() X-Ref |
Gets the InputDefinition related to this Application. return: InputDefinition The InputDefinition instance |
getHelp() X-Ref |
Gets the help message. return: string A help message. |
setCatchExceptions($boolean) X-Ref |
Sets whether to catch exceptions or not during commands execution. param: bool $boolean Whether to catch exceptions or not during commands execution |
setAutoExit($boolean) X-Ref |
Sets whether to automatically exit after a command execution or not. param: bool $boolean Whether to automatically exit after a command execution or not |
getName() X-Ref |
Gets the name of the application. return: string The application name |
setName($name) X-Ref |
Sets the application name. param: string $name The application name |
getVersion() X-Ref |
Gets the application version. return: string The application version |
setVersion($version) X-Ref |
Sets the application version. param: string $version The application version |
getLongVersion() X-Ref |
Returns the long version of the application. return: string The long application version |
register($name) X-Ref |
Registers a new command. param: string $name The command name return: Command The newly created command |
addCommands(array $commands) X-Ref |
Adds an array of command objects. param: Command[] $commands An array of commands |
add(Command $command) X-Ref |
Adds a command object. If a command with the same name already exists, it will be overridden. param: Command $command A Command object return: Command The registered command |
get($name) X-Ref |
Returns a registered command by name or alias. param: string $name The command name or alias return: Command A Command object |
has($name) X-Ref |
Returns true if the command exists, false otherwise. param: string $name The command name or alias return: bool true if the command exists, false otherwise |
getNamespaces() X-Ref |
Returns an array of all unique namespaces used by currently registered commands. It does not returns the global namespace which always exists. return: array An array of namespaces |
findNamespace($namespace) X-Ref |
Finds a registered namespace by a name or an abbreviation. param: string $namespace A namespace or abbreviation to search for return: string A registered namespace |
find($name) X-Ref |
Finds a command by name or alias. Contrary to get, this command tries to find the best match if you give it an abbreviation of a name or alias. param: string $name A command name or a command alias return: Command A Command instance |
all($namespace = null) X-Ref |
Gets the commands (registered in the given namespace if provided). The array keys are the full names and the values the command instances. param: string $namespace A namespace name return: Command[] An array of Command instances |
getAbbreviations($names) X-Ref |
Returns an array of possible abbreviations given a set of names. param: array $names An array of names return: array An array of abbreviations |
asText($namespace = null, $raw = false) X-Ref |
Returns a text representation of the Application. param: string $namespace An optional namespace name param: bool $raw Whether to return raw command list return: string A string representing the Application |
asXml($namespace = null, $asDom = false) X-Ref |
Returns an XML representation of the Application. param: string $namespace An optional namespace name param: bool $asDom Whether to return a DOM or an XML string return: string|\DOMDocument An XML string representing the Application |
renderException($e, $output) X-Ref |
Renders a caught exception. param: \Exception $e An exception instance param: OutputInterface $output An OutputInterface instance |
getTerminalWidth() X-Ref |
Tries to figure out the terminal width in which this application runs. return: int|null |
getTerminalHeight() X-Ref |
Tries to figure out the terminal height in which this application runs. return: int|null |
getTerminalDimensions() X-Ref |
Tries to figure out the terminal dimensions based on the current environment. return: array Array containing width and height |
configureIO(InputInterface $input, OutputInterface $output) X-Ref |
Configures the input and output instances based on the user arguments and options. param: InputInterface $input An InputInterface instance param: OutputInterface $output An OutputInterface instance |
doRunCommand(Command $command, InputInterface $input, OutputInterface $output) X-Ref |
Runs the current command. If an event dispatcher has been attached to the application, events are also dispatched during the life-cycle of the command. param: Command $command A Command instance param: InputInterface $input An Input instance param: OutputInterface $output An Output instance return: int 0 if everything went fine, or an error code |
getCommandName(InputInterface $input) X-Ref |
Gets the name of the command based on input. param: InputInterface $input The input interface return: string The command name |
getDefaultInputDefinition() X-Ref |
Gets the default input definition. return: InputDefinition An InputDefinition instance |
getDefaultCommands() X-Ref |
Gets the default commands that should always be available. return: Command[] An array of default Command instances |
getDefaultHelperSet() X-Ref |
Gets the default helper set with the helpers that should always be available. return: HelperSet A HelperSet instance |
getSttyColumns() X-Ref |
Runs and parses stty -a if it's available, suppressing any error output. return: string |
getConsoleMode() X-Ref |
Runs and parses mode CON if it's available, suppressing any error output. return: string <width>x<height> or null if it could not be parsed |
getAbbreviationSuggestions($abbrevs) X-Ref |
Returns abbreviated suggestions in string format. param: array $abbrevs Abbreviated suggestions to convert return: string A formatted string of abbreviated suggestions |
extractNamespace($name, $limit = null) X-Ref |
Returns the namespace part of the command name. This method is not part of public API and should not be used directly. param: string $name The full name of the command param: string $limit The maximum number of parts of the namespace return: string The namespace of the command |
findAlternativeCommands($name, $abbrevs) X-Ref |
Finds alternative commands of $name. param: string $name The full name of the command param: array $abbrevs The abbreviations return: array A sorted array of similar commands |
findAlternativeNamespace($name, $abbrevs) X-Ref |
Finds alternative namespace of $name. param: string $name The full name of the namespace param: array $abbrevs The abbreviations return: array A sorted array of similar namespace |
findAlternatives($name, $collection, $abbrevs, $callback = null) X-Ref |
Finds alternative of $name among $collection, if nothing is found in $collection, try in $abbrevs. param: string $name The string param: array|\Traversable $collection The collection param: array $abbrevs The abbreviations param: callable $callback The callable to transform collection item before comparison return: array A sorted array of similar string |
stringWidth($string) X-Ref |
No description |
splitStringByWidth($string, $width) X-Ref |
No description |
extractAllNamespaces($name) X-Ref |
Returns all namespaces of the command name. param: string $name The full name of the command return: array The namespaces of the command |
Generated: Thu Jan 11 00:25:41 2018 | Cross-referenced by PHPXref 0.7.1 |