public function updateSection(Section $section, SectionUpdateStruct $sectionUpdateStruct)
{
$inputMessage = $this->outputVisitor->visit($sectionUpdateStruct);
$inputMessage->headers['Accept'] = $this->outputVisitor->getMediaType('Section');
$inputMessage->headers['X-HTTP-Method-Override'] = 'PATCH';
// Should originally be PATCH, but PHP's shiny new internal web server
// dies with it.
$result = $this->client->request('POST', $section->id, $inputMessage);
try {
return $this->inputDispatcher->parse($result);
} catch (ForbiddenException $e) {
throw new InvalidArgumentException($e->getMessage(), $e->getCode());
}
}