Ejemplo n.º 1
0
 /**
  * @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;
     }
 }
Ejemplo n.º 2
0
<?php

\KayStrobach\Dyncss\Configuration\BeRegistry::get()->registerFileHandler('less', 'KayStrobach\\DyncssLess\\Parser\\LessParser');
Ejemplo n.º 3
0
 /**
  * @test
  */
 public function getAllFileHandler()
 {
     $this->fixture->registerFileHandler('less', 'GeneralUtility');
     $this->assertSame('array', gettype($this->fixture->getAllFileHandler()), 'Filetypes is not an array');
 }
Ejemplo n.º 4
0
<?php

\KayStrobach\Dyncss\Configuration\BeRegistry::get()->registerFileHandler('scss', 'tx_DyncssScss_Parser');