public function parse($buffer, $presets = array()) { $options = array(); $this->setVariables($presets); switch ($this->formatterName) { case 'compressed': $options['compress'] = true; break; } $parser = new avada_Less_Parser($options); $parser->setImportDirs($this->getImportDirs()); foreach ($this->libFunctions as $name => $func) { $parser->registerFunction($name, $func); } $parser->parse($buffer); if (count($this->registeredVars)) { $parser->ModifyVars($this->registeredVars); } return $parser->getCss(); }