public function delete(PathParam $id) { $todo = $this->db->find($id->get()); if (is_null($todo)) { throw new NotFoundException(); } $this->db->delete($todo); }
public function assimilateRace(PathParam $race, Entity $e) { $r = $e->bind(Race::getClass()); $r->setRace($race->get()); $this->dbm->save($r); }
public function getFoo(RequestReader $req, PathParam $id, GetParam $type = null) { return array('method' => $req->getHttpMethod(), 'id' => $id->get(), 'type' => $type == null ? null : $type->get()); }