public function getCachedContent() { $fileContents = ''; foreach ($this->files as $parameters) { $compiler = new n2lessc(); if (!empty($parameters['importDir'])) { $compiler->addImportDir($parameters['importDir']); } $compiler->addImportDir(N2LIBRARYASSETS . NDS . "less" . NDS); $compiler->setVariables($parameters['context']); $fileContents .= $compiler->compileFile($parameters['file']); } return $fileContents; }
protected function to($what, &$out, $until = false, $allowNewline = false) { if (is_string($allowNewline)) { $validChars = $allowNewline; } else { $validChars = $allowNewline ? "." : "[^\n]"; } if (!$this->match('(' . $validChars . '*?)' . n2lessc::preg_quote($what), $m, !$until)) { return false; } if ($until) { $this->count -= strlen($what); } // give back $what $out = $m[1]; return true; }