/** * @param RokBooster_Compressor_IGroup $group * @param $options * @param bool $wrapped */ public function __construct(RokBooster_Compressor_IGroup $group, $options, $wrapped = true) { $this->options = $options; $this->group = $group; $this->wrapped = $wrapped; $this->wrapper_file_name = md5(serialize($this->options) . '-' . $this->group->getChecksum()) . self::FILE_EXTENSION; $this->wrapper_file_path = preg_replace('#[/\\\\]+#', DIRECTORY_SEPARATOR, $this->options->cache_path) . DIRECTORY_SEPARATOR . $this->wrapper_file_name; }
/** * @param RokBooster_Compressor_IGroup $group * @param $options * @param bool $wrapped * * @throws Exception * @return RokBooster_Compressor_IOutputContainer */ public static function create(RokBooster_Compressor_IGroup $group, $options, $wrapped = true) { if (!array_key_exists($group->getChecksum(), self::$outputContainers)) { $output_container_class = 'RokBooster_Compressor_OutputContainer_' . ucfirst($options->data_storage); if (!class_exists($output_container_class)) { throw new Exception('Unable to find Output container for data storage ' . $options->data_storage, 500); } self::$outputContainers[$group->getChecksum()] = new $output_container_class($group, $options, $wrapped); } return self::$outputContainers[$group->getChecksum()]; }
/** * @param $checksum */ protected function finishedRendering(RokBooster_Compressor_IGroup $group) { $this->generator_state_cache->remove($group->getChecksum()); }