/** * Constructor * * @param array $options Array of options * @param ILess_CacheInterface The cache implementation * @param ILess_Importer $importer The importer * @param array $outputFilters Array of output filters */ public function __construct(array $options = array(), ILess_CacheInterface $cache = null, array $importers = array(), array $outputFilters = array()) { $importDirs = array(); // we have an import dirs option if (isset($options['import_dirs'])) { $importDirs = (array) $options['import_dirs']; unset($options['import_dirs']); } $env = new ILess_Environment($options, new ILess_FunctionRegistry()); if (!$importers) { $importers = array(new ILess_Importer_FileSystem($importDirs)); } // output filters foreach ($outputFilters as $filter) { $this->appendFilter($filter); } $this->cache = $cache ? $cache : new ILess_Cache_None(); parent::__construct($env, new ILess_Importer($env, $importers, $this->cache)); }
public function __construct(ILess_Environment $env, ILess_Importer $importer) { parent::__construct($env, $importer); ILess_Math::setup(16); ILess_UnitConversion::setup(); }