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

Breadcrumb

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

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

... See full list

File

vendor/composer/composer/src/Composer/Installer/PackageEvent.php, line 26

Namespace

Composer\Installer
View 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&#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
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

API Navigation

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