class Application extends Application
Application.
Methods
|
__construct(KernelInterface $kernel)
Constructor. |
||
| integer |
run(InputInterface $input = null, OutputInterface $output = null)
Runs the current application. |
from Application |
| integer |
doRun(InputInterface $input, OutputInterface $output)
Runs the current application. |
|
|
setHelperSet(HelperSet $helperSet)
Set a helper set to be used with the command. |
from Application | |
| HelperSet |
getHelperSet()
Get the helper set associated with the command. |
from Application |
| InputDefinition |
getDefinition()
Gets the InputDefinition related to this Application. |
from Application |
| string |
getHelp()
Gets the help message. |
from Application |
|
setCatchExceptions(Boolean $boolean)
Sets whether to catch exceptions or not during commands execution. |
from Application | |
|
setAutoExit(Boolean $boolean)
Sets whether to automatically exit after a command execution or not. |
from Application | |
| string |
getName()
Gets the name of the application. |
from Application |
|
setName(string $name)
Sets the application name. |
from Application | |
| string |
getVersion()
Gets the application version. |
from Application |
|
setVersion(string $version)
Sets the application version. |
from Application | |
| string |
getLongVersion()
Returns the long version of the application. |
from Application |
| Command |
register(string $name)
Registers a new command. |
from Application |
|
addCommands(array $commands)
Adds an array of command objects. |
from Application | |
| Command |
add(Command $command)
Adds a command object. |
from Application |
| Command |
get(string $name)
Returns a registered command by name or alias. |
from Application |
| Boolean |
has(string $name)
Returns true if the command exists, false otherwise. |
from Application |
| array |
getNamespaces()
Returns an array of all unique namespaces used by currently registered commands. |
from Application |
| string |
findNamespace(string $namespace)
Finds a registered namespace by a name or an abbreviation. |
from Application |
| Command |
find(string $name)
Finds a command by name or alias. |
from Application |
| array |
all(string $namespace = null)
Gets the commands (registered in the given namespace if provided). |
from Application |
| static array |
getAbbreviations(array $names)
Returns an array of possible abbreviations given a set of names. |
from Application |
| string |
asText(string $namespace = null)
Returns a text representation of the Application. |
from Application |
| string|DOMDocument |
asXml(string $namespace = null, Boolean $asDom = false)
Returns an XML representation of the Application. |
from Application |
|
renderException(Exception $e, OutputInterface $output)
Renders a caught exception. |
from Application | |
| KernelInterface |
getKernel()
Gets the Kernel associated with this Console. |
Details
at line 35
public
__construct(KernelInterface $kernel)
Constructor.
in Application at line 107
public integer
run(InputInterface $input = null, OutputInterface $output = null)
Runs the current application.
at line 64
public integer
doRun(InputInterface $input, OutputInterface $output)
Runs the current application.
in Application at line 207
public
setHelperSet(HelperSet $helperSet)
Set a helper set to be used with the command.
in Application at line 219
public HelperSet
getHelperSet()
Get the helper set associated with the command.
in Application at line 229
public InputDefinition
getDefinition()
Gets the InputDefinition related to this Application.
in Application at line 239
public string
getHelp()
Gets the help message.
in Application at line 267
public
setCatchExceptions(Boolean $boolean)
Sets whether to catch exceptions or not during commands execution.
in Application at line 279
public
setAutoExit(Boolean $boolean)
Sets whether to automatically exit after a command execution or not.
in Application at line 291
public string
getName()
Gets the name of the application.
in Application at line 303
public
setName(string $name)
Sets the application name.
in Application at line 315
public string
getVersion()
Gets the application version.
in Application at line 327
public
setVersion(string $version)
Sets the application version.
in Application at line 339
public string
getLongVersion()
Returns the long version of the application.
in Application at line 357
public Command
register(string $name)
Registers a new command.
in Application at line 369
public
addCommands(array $commands)
Adds an array of command objects.
in Application at line 387
public Command
add(Command $command)
Adds a command object.
If a command with the same name already exists, it will be overridden.
in Application at line 411
public Command
get(string $name)
Returns a registered command by name or alias.
in Application at line 440
public Boolean
has(string $name)
Returns true if the command exists, false otherwise.
in Application at line 452
public array
getNamespaces()
Returns an array of all unique namespaces used by currently registered commands.
It does not returns the global namespace which always exists.
in Application at line 475
public string
findNamespace(string $namespace)
Finds a registered namespace by a name or an abbreviation.
in Application at line 514
public Command
find(string $name)
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.
in Application at line 576
public array
all(string $namespace = null)
Gets the commands (registered in the given namespace if provided).
The array keys are the full names and the values the command instances.
in Application at line 599
static public array
getAbbreviations(array $names)
Returns an array of possible abbreviations given a set of names.
in Application at line 628
public string
asText(string $namespace = null)
Returns a text representation of the Application.
in Application at line 667
public string|DOMDocument
asXml(string $namespace = null, Boolean $asDom = false)
Returns an XML representation of the Application.
in Application at line 719
public
renderException(Exception $e, OutputInterface $output)
Renders a caught exception.
at line 51
public KernelInterface
getKernel()
Gets the Kernel associated with this Console.