/** * @param int $id * @return \databox|null */ public function find($id) { $row = $this->fetchRow($id); if (is_array($row)) { return $this->factory->create($id, $row); } return null; }
public function find($id) { $rows = $this->cache->fetch($this->cacheKey); if (isset($rows[$id])) { return $this->factory->create($id, $rows[$id]); } return $this->repository->find($id); }