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

parse() public method

Parse input structure.
public parse ( array $data, ParsingDispatcher $parsingDispatcher ) : eZ\Publish\API\Repository\Values\Relation\Version
$data array
$parsingDispatcher eZ\Publish\Core\REST\Common\Input\ParsingDispatcher
return eZ\Publish\API\Repository\Values\Relation\Version
    public function parse(array $data, ParsingDispatcher $parsingDispatcher)
    {
        return new Values\Content\Relation(array('id' => $data['_href'], 'sourceContentInfo' => $this->contentService->loadContentInfo($data['SourceContent']['_href']), 'destinationContentInfo' => $this->contentService->loadContentInfo($data['DestinationContent']['_href']), 'type' => $this->convertRelationType($data['RelationType'])));
    }