/** * Returns filter manager * * @return \Assetic\FilterManager */ public function getFilterManager() { if (!$this->filterManager) { $options = $this->getOptions(); $this->filterManager = new \Assetic\FilterManager(); $lessFilter = new \Assetic\Filter\LessFilter(null, $options['nodePath']); $lessFilter->setCompress(true); $this->filterManager->set('less', $lessFilter); $this->filterManager->set('closure', new \Assetic\Filter\GoogleClosure\CompilerJarFilter($options['closureCompilerPath'], $options['javaPath'])); $jpegOptimFilter = new \Assetic\Filter\JpegoptimFilter($options['jpegOptimPath']); $jpegOptimFilter->setStripAll(true); $this->filterManager->set('jpegoptim', $jpegOptimFilter); $optiPngFilter = new \Assetic\Filter\OptiPngFilter($options['optiPngPath']); $optiPngFilter->setLevel(2); $this->filterManager->set('optipng', $optiPngFilter); // $this->filterManager->set('closure', new \Assetic\Filter\UglifyJsFilter($options['uglifyPath'])); } return $this->filterManager; }
/** * Gets the 'assetic.filter.less' service. * * This service is shared. * This method always returns the same instance of the service. * * @return \Assetic\Filter\LessFilter A Assetic\Filter\LessFilter instance. */ protected function getAssetic_Filter_LessService() { $this->services['assetic.filter.less'] = $instance = new \Assetic\Filter\LessFilter('/usr/local/bin/node', array(0 => '/usr/local/lib/node_modules')); $instance->setTimeout(NULL); $instance->setCompress(NULL); $instance->setLoadPaths(array()); return $instance; }
/** * Gets the 'assetic.filter.less' service. * * This service is shared. * This method always returns the same instance of the service. * * @return Assetic\Filter\LessFilter A Assetic\Filter\LessFilter instance. */ protected function getAssetic_Filter_LessService() { $this->services['assetic.filter.less'] = $instance = new \Assetic\Filter\LessFilter(NULL, array(0 => NULL)); $instance->setTimeout(NULL); $instance->setCompress(NULL); return $instance; }
/** * Gets the 'assetic.filter.less' service. * * This service is shared. * This method always returns the same instance of the service. * * @return \Assetic\Filter\LessFilter A Assetic\Filter\LessFilter instance. */ protected function getAssetic_Filter_LessService() { $this->services['assetic.filter.less'] = $instance = new \Assetic\Filter\LessFilter('C:\\Program Files\\nodejs\\node.exe', array(0 => 'C:\\Users\\MrZANO\\AppData\\Roaming\\npm\\node_modules')); $instance->setTimeout(NULL); $instance->setCompress(NULL); $instance->setLoadPaths(array()); return $instance; }