AssetManager\Resolver\ConcatResolver::setAssetFilterManager PHP Метод

setAssetFilterManager() публичный Метод

Set the AssetFilterManager.
public setAssetFilterManager ( AssetManager\Service\AssetFilterManager $filterManager )
$filterManager AssetManager\Service\AssetFilterManager
    public function setAssetFilterManager(AssetFilterManager $filterManager)
    {
        $this->filterManager = $filterManager;
    }

Usage Example

 public function testResolveAssetSuccess()
 {
     $resolver = new ConcatResolver();
     $asset1 = array('bacon' => array(__FILE__, __FILE__));
     $callback = function ($file) {
         $asset = new \Assetic\Asset\FileAsset($file);
         return $asset;
     };
     $aggregateResolver = $this->getMock(ResolverInterface::class);
     $aggregateResolver->expects($this->exactly(2))->method('resolve')->will($this->returnCallback($callback));
     $resolver->setAggregateResolver($aggregateResolver);
     $assetFilterManager = new AssetFilterManager();
     $mimeResolver = new MimeResolver();
     $assetFilterManager->setMimeResolver($mimeResolver);
     $resolver->setMimeResolver($mimeResolver);
     $resolver->setAssetFilterManager($assetFilterManager);
     $resolver->setConcats($asset1);
     $asset = $resolver->resolve('bacon');
     $this->assertTrue($asset instanceof AggregateAsset);
     $this->assertEquals($asset->dump(), file_get_contents(__FILE__) . file_get_contents(__FILE__));
 }