getVariables() public méthode

Returns list of variables
public getVariables ( ) : array
Résultat array
Exemple #1
0
 /**
  * Compile .scss file
  *
  * @param string $in  Input path (.scss)
  * @param string $out Output path (.css)
  *
  * @return array
  */
 protected function compile($in, $out)
 {
     $start = microtime(true);
     $css = $this->scss->compile(file_get_contents($in), $in);
     $elapsed = round(microtime(true) - $start, 4);
     $v = Version::VERSION;
     $t = date('r');
     $css = "/* compiled by scssphp {$v} on {$t} ({$elapsed}s) */\n\n" . $css;
     $etag = md5($css);
     file_put_contents($out, $css);
     file_put_contents($this->metadataName($out), serialize(['etag' => $etag, 'imports' => $this->scss->getParsedFiles(), 'vars' => crc32(serialize($this->scss->getVariables()))]));
     return [$css, $etag];
 }