public function putAction(Request $request, $resource, $id)
{
return $this->handler->handle($request, $this->response, $resource, function (ManagerInterface $manager, $object) use($id) {
$reflection = new \ReflectionObject($object);
$property = $reflection->getProperty('id');
$property->setAccessible(true);
$property->setValue($object, $id);
$manager->update($object);
return $object;
});
}