class ImmutablePathList

Defines a path list that cannot be changed.

@internal This is an internal part of Package Manager and may be changed or removed at any time without warning. External code should not interact with this class.

Hierarchy

  • class \Drupal\package_manager\ImmutablePathList implements \PhpTuf\ComposerStager\API\Path\Value\PathListInterface

Expanded class hierarchy of ImmutablePathList

3 files declare their use of ImmutablePathList
PreApplyEvent.php in core/modules/package_manager/src/Event/PreApplyEvent.php
PreCreateEvent.php in core/modules/package_manager/src/Event/PreCreateEvent.php
StatusCheckEvent.php in core/modules/package_manager/src/Event/StatusCheckEvent.php

File

core/modules/package_manager/src/ImmutablePathList.php, line 17

Namespace

Drupal\package_manager
View source
final class ImmutablePathList implements PathListInterface {
    public function __construct(PathListInterface $decorated) {
    }
    
    /**
     * {@inheritdoc}
     */
    public function add(string ...$paths) : never {
        throw new \LogicException('Immutable path lists cannot be changed.');
    }
    
    /**
     * {@inheritdoc}
     */
    public function getAll() : array {
        return $this->decorated
            ->getAll();
    }

}

Members

Title Sort descending Modifiers Object type Summary
ImmutablePathList::add public function
ImmutablePathList::getAll public function
ImmutablePathList::__construct public function

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.