AsseticBundle\Configuration::getModule PHP Method

getModule() public method

public getModule ( $name, $default = null )
    public function getModule($name, $default = null)
    {
        $name = strtolower($name);
        return array_key_exists($name, $this->modules) ? $this->modules[$name] : $default;
    }

Usage Example

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\Configuration::getModule