Exemple #1
0
 public function update(PathParam $id, Entity $entity)
 {
     $todo = $entity->bind(Todo::getClass());
     $todo->setId($id->get());
     $this->db->save($todo);
     return $todo->marshal();
 }
Exemple #2
0
 public function get($id)
 {
     $resp = $this->client->get($this->baseUrl . "/todo/" . $id);
     return Todo::unmarshal($resp->json());
 }