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