Final Class Yiisoft\Config\Command\InfoCommand
| Inheritance | Yiisoft\ |
|---|
Protected Methods
| Method | Description | Defined By |
|---|---|---|
| configure() | Yiisoft\ |
|
| execute() | Yiisoft\ |
Method Details
| protected void configure ( ) |
protected function configure(): void
{
$this
->setName('yii-config-info')
->addArgument('package', InputArgument::OPTIONAL);
}
| protected integer execute ( \ | ||
| $input | \ |
|
| $output | \ |
|
protected function execute(InputInterface $input, OutputInterface $output): int
{
$io = new SymfonyStyle($input, $output);
$composer = $this->requireComposer();
$packageName = $input->getArgument('package');
if (is_string($packageName)) {
$package = $composer->getRepositoryManager()->getLocalRepository()->findPackage($packageName, '*');
if ($package === null) {
$io->error('Package "' . $packageName . '" not found.');
return 1;
}
return $this->vendorPackage($composer, $package, $io);
}
return $this->rootPackage($composer, $io);
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.