function DumpCompletionCommand::getSupportedShells
Return value
string[]
2 calls to DumpCompletionCommand::getSupportedShells()
- DumpCompletionCommand::configure in vendor/
symfony/ console/ Command/ DumpCompletionCommand.php - Configures the current command.
- DumpCompletionCommand::execute in vendor/
symfony/ console/ Command/ DumpCompletionCommand.php - Executes the current command.
File
-
vendor/
symfony/ console/ Command/ DumpCompletionCommand.php, line 134
Class
- DumpCompletionCommand
- Dumps the completion script for the current shell.
Namespace
Symfony\Component\Console\CommandCode
private function getSupportedShells() : array {
if (isset($this->supportedShells)) {
return $this->supportedShells;
}
$shells = [];
foreach (new \DirectoryIterator(__DIR__ . '/../Resources/') as $file) {
if (str_starts_with($file->getBasename(), 'completion.') && $file->isFile()) {
$shells[] = $file->getExtension();
}
}
sort($shells);
return $this->supportedShells = $shells;
}