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

Breadcrumb

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

class PrePoolCreateEvent

The pre command run event.

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

Hierarchy

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

Expanded class hierarchy of PrePoolCreateEvent

1 file declares its use of PrePoolCreateEvent
PoolBuilder.php in vendor/composer/composer/src/Composer/DependencyResolver/PoolBuilder.php

File

vendor/composer/composer/src/Composer/Plugin/PrePoolCreateEvent.php, line 25

Namespace

Composer\Plugin
View source
class PrePoolCreateEvent extends Event {
    
    /**
     * @var RepositoryInterface[]
     */
    private $repositories;
    
    /**
     * @var Request
     */
    private $request;
    
    /**
     * @var int[] array of stability => BasePackage::STABILITY_* value
     * @phpstan-var array<string, BasePackage::STABILITY_*>
     */
    private $acceptableStabilities;
    
    /**
     * @var int[] array of package name => BasePackage::STABILITY_* value
     * @phpstan-var array<string, BasePackage::STABILITY_*>
     */
    private $stabilityFlags;
    
    /**
     * @var array[] of package => version => [alias, alias_normalized]
     * @phpstan-var array<string, array<string, array{alias: string, alias_normalized: string}>>
     */
    private $rootAliases;
    
    /**
     * @var string[]
     * @phpstan-var array<string, string>
     */
    private $rootReferences;
    
    /**
     * @var BasePackage[]
     */
    private $packages;
    
    /**
     * @var BasePackage[]
     */
    private $unacceptableFixedPackages;
    
    /**
     * @param string                $name                   The event name
     * @param RepositoryInterface[] $repositories
     * @param int[]                 $acceptableStabilities  array of stability => BasePackage::STABILITY_* value
     * @param int[]                 $stabilityFlags         array of package name => BasePackage::STABILITY_* value
     * @param array[]               $rootAliases            array of package => version => [alias, alias_normalized]
     * @param string[]              $rootReferences
     * @param BasePackage[]         $packages
     * @param BasePackage[]         $unacceptableFixedPackages
     *
     * @phpstan-param array<string, BasePackage::STABILITY_*> $acceptableStabilities
     * @phpstan-param array<string, BasePackage::STABILITY_*> $stabilityFlags
     * @phpstan-param array<string, array<string, array{alias: string, alias_normalized: string}>> $rootAliases
     * @phpstan-param array<string, string> $rootReferences
     */
    public function __construct(string $name, array $repositories, Request $request, array $acceptableStabilities, array $stabilityFlags, array $rootAliases, array $rootReferences, array $packages, array $unacceptableFixedPackages) {
        parent::__construct($name);
        $this->repositories = $repositories;
        $this->request = $request;
        $this->acceptableStabilities = $acceptableStabilities;
        $this->stabilityFlags = $stabilityFlags;
        $this->rootAliases = $rootAliases;
        $this->rootReferences = $rootReferences;
        $this->packages = $packages;
        $this->unacceptableFixedPackages = $unacceptableFixedPackages;
    }
    
    /**
     * @return RepositoryInterface[]
     */
    public function getRepositories() : array {
        return $this->repositories;
    }
    public function getRequest() : Request {
        return $this->request;
    }
    
    /**
     * @return int[] array of stability => BasePackage::STABILITY_* value
     * @phpstan-return array<string, BasePackage::STABILITY_*>
     */
    public function getAcceptableStabilities() : array {
        return $this->acceptableStabilities;
    }
    
    /**
     * @return int[] array of package name => BasePackage::STABILITY_* value
     * @phpstan-return array<string, BasePackage::STABILITY_*>
     */
    public function getStabilityFlags() : array {
        return $this->stabilityFlags;
    }
    
    /**
     * @return array[] of package => version => [alias, alias_normalized]
     * @phpstan-return array<string, array<string, array{alias: string, alias_normalized: string}>>
     */
    public function getRootAliases() : array {
        return $this->rootAliases;
    }
    
    /**
     * @return string[]
     * @phpstan-return array<string, string>
     */
    public function getRootReferences() : array {
        return $this->rootReferences;
    }
    
    /**
     * @return BasePackage[]
     */
    public function getPackages() : array {
        return $this->packages;
    }
    
    /**
     * @return BasePackage[]
     */
    public function getUnacceptableFixedPackages() : array {
        return $this->unacceptableFixedPackages;
    }
    
    /**
     * @param BasePackage[] $packages
     */
    public function setPackages(array $packages) : void {
        $this->packages = $packages;
    }
    
    /**
     * @param BasePackage[] $packages
     */
    public function setUnacceptableFixedPackages(array $packages) : void {
        $this->unacceptableFixedPackages = $packages;
    }

}

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
PrePoolCreateEvent::$acceptableStabilities private property @phpstan-var array&lt;string, BasePackage::STABILITY_*&gt;
PrePoolCreateEvent::$packages private property
PrePoolCreateEvent::$repositories private property
PrePoolCreateEvent::$request private property
PrePoolCreateEvent::$rootAliases private property @phpstan-var array&lt;string, array&lt;string, array{alias: string, alias_normalized: string}&gt;&gt;
PrePoolCreateEvent::$rootReferences private property @phpstan-var array&lt;string, string&gt;
PrePoolCreateEvent::$stabilityFlags private property @phpstan-var array&lt;string, BasePackage::STABILITY_*&gt;
PrePoolCreateEvent::$unacceptableFixedPackages private property
PrePoolCreateEvent::getAcceptableStabilities public function @phpstan-return array&lt;string, BasePackage::STABILITY_*&gt;
PrePoolCreateEvent::getPackages public function
PrePoolCreateEvent::getRepositories public function
PrePoolCreateEvent::getRequest public function
PrePoolCreateEvent::getRootAliases public function @phpstan-return array&lt;string, array&lt;string, array{alias: string, alias_normalized: string}&gt;&gt;
PrePoolCreateEvent::getRootReferences public function @phpstan-return array&lt;string, string&gt;
PrePoolCreateEvent::getStabilityFlags public function @phpstan-return array&lt;string, BasePackage::STABILITY_*&gt;
PrePoolCreateEvent::getUnacceptableFixedPackages public function
PrePoolCreateEvent::setPackages public function
PrePoolCreateEvent::setUnacceptableFixedPackages public function
PrePoolCreateEvent::__construct public function @phpstan-param array&lt;string, BasePackage::STABILITY_*&gt; $acceptableStabilities
@phpstan-param array&lt;string, BasePackage::STABILITY_*&gt; $stabilityFlags
@phpstan-param array&lt;string, array&lt;string, array{alias: string, alias_normalized:…
Overrides Event::__construct

API Navigation

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