public function get($id) { if (!isset($this->cache[$id])) { // The Test class is a table gateway class $model = new Test(); $result = $model->select(array('id' => $id)); $data = $result->current(); $data['definition'] = $this->services->get('cipher')->decrypt($data['definition']); $this->cache[$id] = $data; } return $this->cache[$id]; }