Leafo\ScssPhp\Compiler::setVariables PHP Метод

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

Set variables
public setVariables ( array $variables )
$variables array
    public function setVariables(array $variables)
    {
        $this->registeredVars = array_merge($this->registeredVars, $variables);
    }

Usage Example

Пример #1
0
 /**
  * Filters an asset just before it's dumped.
  *
  * @param AssetInterface $asset
  */
 public function filterDump(AssetInterface $asset)
 {
     $this->dispatch(new LoadThemeVariables($variables = new Collection()));
     $compiler = new Compiler();
     if ($dir = $asset->getSourceDirectory()) {
         $compiler->addImportPath($dir);
     }
     $compiler->setVariables($variables->all());
     $asset->setContent($this->parser->parse($compiler->compile($asset->getContent())));
 }
All Usage Examples Of Leafo\ScssPhp\Compiler::setVariables
Compiler