Returns the aliases for the command.
public getAliases ( ) : array | ||
return | array | An array of aliases for the command |
use Symfony\Component\Console\Command\Command; class MyCommand extends Command { protected static $defaultName = 'my-command'; protected function configure() { $this->setAliases(['mc']); } protected function execute(InputInterface $input, OutputInterface $output) { $output->writeln('Hello, World!'); } }This example creates a command `my-command` with an alias `mc`. Both `my-command` and `mc` would trigger the same command. Package Library: The package library is `symfony/console`.
public getAliases ( ) : array | ||
return | array | An array of aliases for the command |