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

Breadcrumb

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

class PreCommandRunEvent

The pre command run event.

@author Jordi Boggiano <j.boggiano@seld.be>

Hierarchy

  • class \Composer\EventDispatcher\Event
    • class \Composer\Plugin\PreCommandRunEvent extends \Composer\EventDispatcher\Event

Expanded class hierarchy of PreCommandRunEvent

2 files declare their use of PreCommandRunEvent
BaseCommand.php in vendor/composer/composer/src/Composer/Command/BaseCommand.php
EventDispatcher.php in vendor/composer/composer/src/Composer/EventDispatcher/EventDispatcher.php

File

vendor/composer/composer/src/Composer/Plugin/PreCommandRunEvent.php, line 23

Namespace

Composer\Plugin
View source
class PreCommandRunEvent extends Event {
    
    /**
     * @var InputInterface
     */
    private $input;
    
    /**
     * @var string
     */
    private $command;
    
    /**
     * Constructor.
     *
     * @param string         $name    The event name
     * @param string         $command The command about to be executed
     */
    public function __construct(string $name, InputInterface $input, string $command) {
        parent::__construct($name);
        $this->input = $input;
        $this->command = $command;
    }
    
    /**
     * Returns the console input
     */
    public function getInput() : InputInterface {
        return $this->input;
    }
    
    /**
     * Returns the command about to be executed
     */
    public function getCommand() : string {
        return $this->command;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
Event::$args protected property
Event::$flags protected property
Event::$name protected property
Event::$propagationStopped private property
Event::getArguments public function Returns the event&#039;s arguments.
Event::getFlags public function Returns the event&#039;s flags.
Event::getName public function Returns the event&#039;s name.
Event::isPropagationStopped public function Checks if stopPropagation has been called
Event::stopPropagation public function Prevents the event from being passed to further listeners
PreCommandRunEvent::$command private property
PreCommandRunEvent::$input private property
PreCommandRunEvent::getCommand public function Returns the command about to be executed
PreCommandRunEvent::getInput public function Returns the console input
PreCommandRunEvent::__construct public function Constructor. Overrides Event::__construct

API Navigation

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