contains($id)) { return $this->data[$id]; } return false; } /** * {@inheritdoc} */ public function contains($id) { return isset($this->data[$id]) || array_key_exists($id, $this->data); } /** * Puts data into the cache. * * @param string $id The cache id. * @param mixed $content * @param int $lifeTime Setting a lifetime is not supported by this cache and the parameter will be ignored. * @return boolean */ public function save($id, $content, $lifeTime = 0) { $this->data[$id] = $content; return true; } /** * {@inheritdoc} */ public function delete($id) { if (!$this->contains($id)) { return false; } unset($this->data[$id]); return true; } /** * {@inheritdoc} */ public function flushAll() { $this->data = array(); return true; } }