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