/** * @see npOptimizerBase */ public function configure(array $configuration = array()) { parent::configure($configuration); if (isset($configuration['files'])) { parent::setFiles($configuration['files']); } else { if (isset($configuration['folders'])) { parent::setFiles($this->findPngImages($configuration['folders'])); } else { throw new sfConfigurationException('You must define either a "files" or a "folders" option to use this optimizer'); } } // PNG images will be replaced by their optimized versions $this->replaceFiles = true; }
/** * @see npOptimizerBase */ public function configure(array $configuration = array()) { parent::configure($configuration); if (isset($configuration['files'])) { parent::setFiles($configuration['files']); } if (!isset($configuration['destination'])) { throw new sfConfigurationException('You must provide a "destination" option to use a combinable optimizer'); } $this->destination = $configuration['destination']; if (isset($configuration['timestamp'])) { $this->timestamp = $configuration['timestamp']; } $this->replaceFiles = false; }