File modules/cms/generator/filter/LessFilter.class.php

Last commit: Sat Sep 26 01:41:20 2020 +0200	Jan Dankert	Refactoring: Removing old require.php files. With class autoloading, they are not necessary any more.
1 <?php 2 3 4 namespace cms\generator\filter; 5 6 7 use util\Less; 8 9 class LessFilter extends AbstractFilter 10 { 11 public $sourceMap = false; 12 public $indentation = ' '; 13 public $compress = false; 14 public $variables = array(); 15 16 public function filter($value) 17 { 18 $parser = new Less(array( 19 'sourceMap' => $this->sourceMap, 20 'indentation' => $this->indentation, 21 'outputSourceFiles' => false, 22 'compress' => (bool) $this->compress, 23 )); 24 25 $parser->parse($value); 26 27 $parser->modifyVars( (array) $this->variables ); 28 29 return $parser->getCss(); 30 } 31 }
Download modules/cms/generator/filter/LessFilter.class.php
History Sat, 26 Sep 2020 01:41:20 +0200 Jan Dankert Refactoring: Removing old require.php files. With class autoloading, they are not necessary any more. Fri, 18 Sep 2020 23:04:13 +0200 Jan Dankert Refactoring: Renaming module "cms/publish" to "cms/generator"