Final Class Yiisoft\Config\Command\InfoCommand
| Inheritance | Yiisoft\Config\Command\InfoCommand » Composer\Command\BaseCommand |
|---|
Protected Methods
| Method | Description | Defined By |
|---|---|---|
| configure() | Yiisoft\Config\Command\InfoCommand | |
| execute() | Yiisoft\Config\Command\InfoCommand |
Method Details
| protected void configure ( ) |
protected function configure(): void
{
$this
->setName('yii-config-info')
->addArgument('package', InputArgument::OPTIONAL);
}
| protected integer execute ( \Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output ) | ||
| $input | \Symfony\Component\Console\Input\InputInterface | |
| $output | \Symfony\Component\Console\Output\OutputInterface | |
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);
}
Signup or Login in order to comment.