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\PluginView 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's arguments. | |
Event::getFlags | public | function | Returns the event's flags. | |
Event::getName | public | function | Returns the event'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 |