Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ApplicationDescription.php

function ApplicationDescription::getCommand

Throws

CommandNotFoundException

File

vendor/symfony/console/Descriptor/ApplicationDescription.php, line 70

Class

ApplicationDescription
@author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>

Namespace

Symfony\Component\Console\Descriptor

Code

public function getCommand(string $name) : Command {
    if (!isset($this->commands[$name]) && !isset($this->aliases[$name])) {
        throw new CommandNotFoundException(\sprintf('Command "%s" does not exist.', $name));
    }
    return $this->commands[$name] ?? $this->aliases[$name];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal