private function ApplicationDescription::inspectApplication in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/console/Descriptor/ApplicationDescription.php \Symfony\Component\Console\Descriptor\ApplicationDescription::inspectApplication()
2 calls to ApplicationDescription::inspectApplication()
- ApplicationDescription::getCommands in vendor/
symfony/ console/ Descriptor/ ApplicationDescription.php - ApplicationDescription::getNamespaces in vendor/
symfony/ console/ Descriptor/ ApplicationDescription.php
File
- vendor/
symfony/ console/ Descriptor/ ApplicationDescription.php, line 103
Class
- ApplicationDescription
- @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
Namespace
Symfony\Component\Console\DescriptorCode
private function inspectApplication() {
$this->commands = array();
$this->namespaces = array();
$all = $this->application
->all($this->namespace ? $this->application
->findNamespace($this->namespace) : null);
foreach ($this
->sortCommands($all) as $namespace => $commands) {
$names = array();
/** @var Command $command */
foreach ($commands as $name => $command) {
if (!$command
->getName()) {
continue;
}
if ($command
->getName() === $name) {
$this->commands[$name] = $command;
}
else {
$this->aliases[$name] = $command;
}
$names[] = $name;
}
$this->namespaces[$namespace] = array(
'id' => $namespace,
'commands' => $names,
);
}
}