eZ\Publish\Core\REST\Client\Input\Parser\Content::parse PHP Method

parse() public method

Parse input structure.
public parse ( array $data, ParsingDispatcher $parsingDispatcher ) : eZ\Publish\API\Repository\Values\Content\Content
$data array
$parsingDispatcher eZ\Publish\Core\REST\Common\Input\ParsingDispatcher
return eZ\Publish\API\Repository\Values\Content\Content
    public function parse(array $data, ParsingDispatcher $parsingDispatcher)
    {
        $versionInfo = $this->versionInfoParser->parse($data['CurrentVersion']['Version']['VersionInfo'], $parsingDispatcher);
        $fields = $this->parseFields($data['CurrentVersion']['Version']['Fields'], str_replace('/api/ezp/v2/content/objects/', '', $versionInfo->contentInfoId));
        return new Values\Content\Content($this->contentService, array('versionInfo' => $versionInfo, 'internalFields' => $fields));
    }