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

Breadcrumb

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

function BaseCommand::getApplication

Gets the application instance for this command.

Overrides Command::getApplication

1 call to BaseCommand::getApplication()
GlobalCommand::complete in vendor/composer/composer/src/Composer/Command/GlobalCommand.php
@inheritdoc

File

vendor/composer/composer/src/Composer/Command/BaseCommand.php, line 60

Class

BaseCommand
Base class for Composer commands

Namespace

Composer\Command

Code

public function getApplication() : Application {
    $application = parent::getApplication();
    if (!$application instanceof Application) {
        throw new \RuntimeException('Composer commands can only work with an ' . Application::class . ' instance set');
    }
    return $application;
}

API Navigation

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