/** * @return Project */ public function getItem($id) { $this->transaction->requestTransaction(); $data = $this->conn->fetchAssoc('SELECT * FROM `' . CoreTables::PROJECT_TBL . '` WHERE `id` = :id', [':id' => $id]); if (null === $data) { $this->transaction->requestRollback(); throw new ItemNotFoundException('The specified item has not been found.', $id); } return Project::fromArray($data); }