/**
* @param Document|array $documentOrSource Document object or source array
* @return Message
*
* @throws \Exception
* @throws GdbotsPbjException
*/
public function unmarshal($documentOrSource)
{
if ($documentOrSource instanceof Document) {
return $this->doUnmarshal($documentOrSource->getData());
}
return $this->doUnmarshal($documentOrSource);
}