src/Marshaler/Elastica/DocumentMarshaler.php
public function unmarshal($documentOrSource)
    {
        if ($documentOrSource instanceof Document) {
            return $this->doUnmarshal($documentOrSource->getData());
        }

        return $this->doUnmarshal($documentOrSource);
    }
public function unmarshal($documentOrSource)
    {
        if ($documentOrSource instanceof Document) {
            return $this->doUnmarshal($documentOrSource->getData());
        }

        return $this->doUnmarshal($documentOrSource);
    }
@param Document|array $documentOrSource Document object or source array

@return Message

@throws \Exception
@throws GdbotsPbjException