Chris@0: dataStore = $dataStore; Chris@0: } Chris@0: Chris@0: /** Chris@0: * Test for an entry from the cache Chris@0: * @param string $key Chris@0: * @return boolean Chris@0: */ Chris@0: public function has($key) Chris@0: { Chris@0: if (method_exists($this->dataStore, 'has')) { Chris@0: return $this->dataStore->has($key); Chris@0: } Chris@0: $test = $this->dataStore->get($key); Chris@0: return !empty($test); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Get an entry from the cache Chris@0: * @param string $key Chris@0: * @return array Chris@0: */ Chris@0: public function get($key) Chris@0: { Chris@0: return (array) $this->dataStore->get($key); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Store an entry in the cache Chris@0: * @param string $key Chris@0: * @param array $data Chris@0: */ Chris@0: public function set($key, $data) Chris@0: { Chris@0: $this->dataStore->set($key, $data); Chris@0: } Chris@0: }