Inheritance: implements AssetManager\Resolver\ResolverInterface, implements AssetManager\Resolver\MimeResolverAwareInterface
 /**
  * @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;
 }
 /**
  * {@inheritDoc}
  *
  * @return PathStackResolver
  */
 public function createService(ServiceLocatorInterface $serviceLocator)
 {
     $config = $serviceLocator->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;
 }
 public function testWillRefuseInvalidPath()
 {
     $resolver = new PathStackResolver();
     $this->setExpectedException('AssetManager\\Exception\\InvalidArgumentException');
     $resolver->addPath(null);
 }
 /**
  * Test Collect returns valid list of assets
  *
  * @covers \AssetManager\Resolver\PathStackResolver::collect
  */
 public function testCollectDirectory()
 {
     $resolver = new PathStackResolver();
     $resolver->addPath(realpath(__DIR__ . '/../'));
     $dir = substr(__DIR__, strrpos(__DIR__, '/', 0) + 1);
     $this->assertContains($dir . DIRECTORY_SEPARATOR . basename(__FILE__), $resolver->collect());
     $this->assertNotContains($dir . DIRECTORY_SEPARATOR . 'i-do-not-exist.php', $resolver->collect());
 }