AssetManager\Resolver\PathStackResolver::addPaths PHP Method

addPaths() public method

Add many paths to the stack at once
public addPaths ( array | Traversabl\Traversable $paths )
$paths array | Traversabl\Traversable
    public function addPaths($paths)
    {
        foreach ($paths as $path) {
            $this->addPath($path);
        }
    }

Usage Example

 /**
  * @inheritDoc
  */
 public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
 {
     $config = $container->get('config');
     $pathStackResolver = new PathStackResolver();
     $paths = array();
     if (isset($config['asset_manager']['resolver_configs']['paths'])) {
         $paths = $config['asset_manager']['resolver_configs']['paths'];
     }
     $pathStackResolver->addPaths($paths);
     return $pathStackResolver;
 }
All Usage Examples Of AssetManager\Resolver\PathStackResolver::addPaths