AsseticBundle\Service::setCacheBusterStrategy PHP Метод

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

public setCacheBusterStrategy ( Assetic\Factory\Worker\WorkerInterface $cacheBusterStrategy )
$cacheBusterStrategy Assetic\Factory\Worker\WorkerInterface
    public function setCacheBusterStrategy(WorkerInterface $cacheBusterStrategy)
    {
        $this->cacheBusterStrategy = $cacheBusterStrategy;
        return $this;
    }

Usage Example

Пример #1
0
 public function testCacheBusterStrategyWorker()
 {
     $factory = $this->object->createAssetFactory($this->configuration->getModule('test_application'));
     // no workers by default:
     $this->assertAttributeEquals(array(), 'workers', $factory);
     $cacheBusterStrategy = $this->getMock('AsseticBundle\\CacheBuster\\LastModifiedStrategy');
     $this->object->setCacheBusterStrategy($cacheBusterStrategy);
     $factory = $this->object->createAssetFactory($this->configuration->getModule('test_application'));
     // cache buster strategy is added to workers list:
     $this->assertAttributeEquals(array($cacheBusterStrategy), 'workers', $factory);
 }
All Usage Examples Of AsseticBundle\Service::setCacheBusterStrategy