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

public setFilterManager ( Assetic\FilterManager $filterManager )
$filterManager Assetic\FilterManager
Пример #1
0
 public function testSetFilterManager()
 {
     $value = new \Assetic\FilterManager();
     $result = $this->object->setFilterManager($value);
     $this->assertNull($result);
     $this->assertSame($value, $this->object->getFilterManager());
 }
Пример #2
0
 /**
  * @param ServiceLocatorInterface $serviceLocator
  * @return \AsseticBundle\Service
  */
 public function createService(ServiceLocatorInterface $serviceLocator)
 {
     $configuration = $serviceLocator->get('Configuration');
     $asseticConfig = new Configuration($configuration['assetic_configuration']);
     $asseticAssetManager = $serviceLocator->get('Assetic\\AssetManager');
     $asseticFilterManager = $serviceLocator->get('Assetic\\FilterManager');
     $asseticService = new Service($asseticConfig);
     $asseticService->setAssetManager($asseticAssetManager);
     $asseticService->setFilterManager($asseticFilterManager);
     $strategies = isset($configuration['assetic_configuration']['strategies']) ? $configuration['assetic_configuration']['strategies'] : array();
     return $asseticService;
 }
Пример #3
0
 /**
  * @param ServiceLocatorInterface $locator
  * @return \AsseticBundle\Service
  */
 public function createService(ServiceLocatorInterface $locator)
 {
     $asseticConfig = $locator->get('AsseticConfiguration');
     if ($asseticConfig->detectBaseUrl()) {
         /** @var $request \Zend\Http\PhpEnvironment\Request */
         $request = $locator->get('Request');
         if (method_exists($request, 'getBaseUrl')) {
             $asseticConfig->setBaseUrl($request->getBaseUrl());
         }
     }
     $asseticService = new Service($asseticConfig);
     $asseticService->setAssetManager($locator->get('AsseticAssetManager'));
     $asseticService->setAssetWriter($locator->get('AsseticAssetWriter'));
     $asseticService->setFilterManager($locator->get('AsseticFilterManager'));
     // Cache buster is not mandatory
     if ($locator->has('AsseticCacheBuster')) {
         $asseticService->setCacheBusterStrategy($locator->get('AsseticCacheBuster'));
     }
     return $asseticService;
 }
 /**
  * @param ContainerInterface $locator
  * @param string $requestedName
  * @param array $options, optional
  *
  * @return \AsseticBundle\Service
  */
 public function __invoke(ContainerInterface $locator, $requestedName, array $options = null)
 {
     $asseticConfig = $locator->get('AsseticConfiguration');
     if ($asseticConfig->detectBaseUrl()) {
         /** @var $request \Zend\Http\PhpEnvironment\Request */
         $request = $locator->get('Request');
         if (method_exists($request, 'getBaseUrl')) {
             $asseticConfig->setBaseUrl($request->getBaseUrl());
         }
     }
     $asseticService = new Service($asseticConfig);
     $asseticService->setAssetManager($locator->get('Assetic\\AssetManager'));
     $asseticService->setAssetWriter($locator->get('Assetic\\AssetWriter'));
     $asseticService->setFilterManager($locator->get('Assetic\\FilterManager'));
     // Cache buster is not mandatory
     if ($locator->has('AsseticCacheBuster')) {
         $asseticService->setCacheBusterStrategy($locator->get('AsseticCacheBuster'));
     }
     return $asseticService;
 }