Puli\Manager\Api\Repository\PathMapping::listRepositoryPaths PHP Method

listRepositoryPaths() public method

Contrary to {@link getRepositoryPath()}, this array also contains all nested repository paths that are mapped by this mapping.
public listRepositoryPaths ( ) : string[]
return string[] A list of all mapped repository paths.
    public function listRepositoryPaths()
    {
        if (null === $this->state) {
            throw new NotLoadedException('The mapping is not loaded.');
        }
        return $this->repositoryPaths;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function rollback()
 {
     if (!$this->mapping->isLoaded()) {
         return;
     }
     $packageName = $this->containingPackage->getName();
     $this->mappings->remove($this->mapping->getRepositoryPath(), $packageName);
     foreach ($this->mapping->listRepositoryPaths() as $repositoryPath) {
         $this->mappingsByResource->remove($repositoryPath, $packageName);
         $this->conflictDetector->release($repositoryPath, $packageName);
     }
     // Unload after iterating, otherwise the paths are gone
     $this->mapping->unload();
 }
All Usage Examples Of Puli\Manager\Api\Repository\PathMapping::listRepositoryPaths