class PackageEvent
The Package Event.
@author Jordi Boggiano <j.boggiano@seld.be>
Hierarchy
- class \Composer\EventDispatcher\Event
- class \Composer\Installer\PackageEvent extends \Composer\EventDispatcher\Event
Expanded class hierarchy of PackageEvent
6 files declare their use of PackageEvent
- AllowedPackages.php in composer/
Plugin/ Scaffold/ AllowedPackages.php - EventDispatcher.php in vendor/
composer/ composer/ src/ Composer/ EventDispatcher/ EventDispatcher.php - Handler.php in composer/
Plugin/ Scaffold/ Handler.php - Plugin.php in composer/
Plugin/ Scaffold/ Plugin.php - PostPackageEventListenerInterface.php in composer/
Plugin/ Scaffold/ PostPackageEventListenerInterface.php
File
-
vendor/
composer/ composer/ src/ Composer/ Installer/ PackageEvent.php, line 26
Namespace
Composer\InstallerView source
class PackageEvent extends Event {
/**
* @var Composer
*/
private $composer;
/**
* @var IOInterface
*/
private $io;
/**
* @var bool
*/
private $devMode;
/**
* @var RepositoryInterface
*/
private $localRepo;
/**
* @var OperationInterface[]
*/
private $operations;
/**
* @var OperationInterface The operation instance which is being executed
*/
private $operation;
/**
* Constructor.
*
* @param OperationInterface[] $operations
*/
public function __construct(string $eventName, Composer $composer, IOInterface $io, bool $devMode, RepositoryInterface $localRepo, array $operations, OperationInterface $operation) {
parent::__construct($eventName);
$this->composer = $composer;
$this->io = $io;
$this->devMode = $devMode;
$this->localRepo = $localRepo;
$this->operations = $operations;
$this->operation = $operation;
}
public function getComposer() : Composer {
return $this->composer;
}
public function getIO() : IOInterface {
return $this->io;
}
public function isDevMode() : bool {
return $this->devMode;
}
public function getLocalRepo() : RepositoryInterface {
return $this->localRepo;
}
/**
* @return OperationInterface[]
*/
public function getOperations() : array {
return $this->operations;
}
/**
* Returns the package instance.
*/
public function getOperation() : OperationInterface {
return $this->operation;
}
}
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 | |
PackageEvent::$composer | private | property | ||
PackageEvent::$devMode | private | property | ||
PackageEvent::$io | private | property | ||
PackageEvent::$localRepo | private | property | ||
PackageEvent::$operation | private | property | ||
PackageEvent::$operations | private | property | ||
PackageEvent::getComposer | public | function | ||
PackageEvent::getIO | public | function | ||
PackageEvent::getLocalRepo | public | function | ||
PackageEvent::getOperation | public | function | Returns the package instance. | |
PackageEvent::getOperations | public | function | ||
PackageEvent::isDevMode | public | function | ||
PackageEvent::__construct | public | function | Constructor. | Overrides Event::__construct |