/** * @param $inputFile notCompiled Dynamic Css file * * @return string path to the compiled file, or to the input file, if not modified * * @todo add typehinting */ public static function getCompiledFile($inputFile) { $currentFile = self::fixPathForInput($inputFile); $pathInfo = pathinfo($currentFile); $parser = \KayStrobach\Dyncss\Configuration\BeRegistry::get()->getFileHandler($pathInfo['extension']); if ($parser !== null) { $parser->setOverrides(self::getOverrides()); $outputFile = $parser->compileFile($currentFile); return self::fixPathForOutput($outputFile); } else { return $inputFile; } }
<?php \KayStrobach\Dyncss\Configuration\BeRegistry::get()->registerFileHandler('less', 'KayStrobach\\DyncssLess\\Parser\\LessParser');
<?php \KayStrobach\Dyncss\Configuration\BeRegistry::get()->registerFileHandler('scss', 'tx_DyncssScss_Parser');