Final Class Yiisoft\YiiDevTool\App\YiiDevToolApplication
| Inheritance | Yiisoft\YiiDevTool\App\YiiDevToolApplication » Symfony\Component\Console\Application |
|---|
Public Methods
Protected Methods
| Method | Description | Defined By |
|---|---|---|
| getDefaultCommands() | Yiisoft\YiiDevTool\App\YiiDevToolApplication | |
| getDefaultInputDefinition() | Yiisoft\YiiDevTool\App\YiiDevToolApplication |
Method Details
| public mixed __construct ( array $config ) | ||
| $config | array | |
public function __construct(
private array $config
) {
parent::__construct($this->header);
$this->setDefaultCommand('list-commands');
}
| public mixed getConfig ( string $name ) | ||
| $name | string | |
public function getConfig(string $name): mixed
{
return $this->config[$name] ?? null;
}
| protected array getDefaultCommands ( ) |
protected function getDefaultCommands(): array
{
$packageService = new PackageService();
return [
(new HelpCommand())->setHidden(true),
(new ListCommandsCommand())
->setName('list-commands')
->setHidden(true),
new CheckoutCommand(),
new CloneCommand($packageService),
new CommitCommand(),
new TestCommand(),
new RequestPullCommand(),
new ExecCommand(),
new ComposerFixDependenciesCommand(),
new ComposerUpdateCommand($packageService),
new ListCommand(),
new InstallCommand($packageService),
new LintCommand(),
new PullCommand(),
new PushCommand(),
new ReplicateFilesCommand(),
new ReplicateComposerConfigCommand(),
new ReplicateCopyFileCommand(),
new StatusCommand(),
new UpdateCommand($packageService),
new WhatCommand(),
new MakeCommand(),
new MissingCommand(),
new ForksRepositoriesCommand(),
new SyncUpstreamRepositoriesCommand(),
new SettingsCommand(),
new ProtectBranchCommand(),
new ContributorsCommand(),
new EnableCommand(),
new DisableCommand(),
new AddChangelogCommand(),
new SwitchCommand(),
new IdeCommand(),
new BuildStatusCommand(),
];
}
| protected \Symfony\Component\Console\Input\InputDefinition getDefaultInputDefinition ( ) |
protected function getDefaultInputDefinition(): InputDefinition
{
return new InputDefinition([
new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'),
new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'),
new InputOption('--verbose', '-v', InputOption::VALUE_NONE, 'Increase the verbosity of messages'),
]);
}
| public string getRootDir ( ) |
public function getRootDir(): string
{
if ($this->rootDir === null) {
throw new RuntimeException('The root directory is not configured.');
}
return $this->rootDir;
}
| public self setRootDir ( string $path ) | ||
| $path | string | |
public function setRootDir(string $path): self
{
$this->rootDir = $path;
return $this;
}
Signup or Login in order to comment.