/** * Factory method for AssetFilterCollection * * @param string $ext The extension An array of filters to put in the collection * @return FilterCollection */ protected function _makeFilters($ext, $target) { $config = array('paths' => $this->_Config->paths($ext, $target), 'target' => $target, 'theme' => $this->_Config->theme()); $filters = $this->_Config->filters($ext, $target); $filterSettings = $this->_Config->filterConfig($filters); return new AssetFilterCollection($filters, $config, $filterSettings); }
/** * Get the AssetCompress factory based on the config object. * * @return AssetCompress\Factory */ protected function factory() { if (empty($this->factory)) { $this->config->theme($this->theme); $this->factory = new Factory($this->config); } return $this->factory; }
/** * Returns the list of files required to generate a named build * * @param string $target The name of the build target to generate. * @return array The list of files to be processed * @throws RuntimeException */ protected function _getFilesList($build) { if (!empty($this->_fileList[$build])) { return $this->_fileList[$build]; } $ext = $this->_Config->getExt($build); $this->_Scanner = $this->_makeScanner($this->_Config->paths($ext, $build), $this->_Config->theme()); $this->filters = $this->_makeFilters($ext, $build); $output = ''; $files = $this->_Config->files($build); if (empty($files)) { throw new RuntimeException(sprintf('No files found for build file "%s"', $build)); } foreach ($files as &$file) { $file = $this->_findFile($file); } return $this->_fileList[$build] = $files; }