eZ\Publish\Core\REST\Server\Input\Parser\Criterion\ContentTypeId::parse PHP Method

parse() public method

Parses input structure to a Criterion object.
public parse ( array $data, ParsingDispatcher $parsingDispatcher ) : eZ\Publish\API\Repository\Values\Content\Query\Criterion\ContentTypeId
$data array
$parsingDispatcher eZ\Publish\Core\REST\Common\Input\ParsingDispatcher
return eZ\Publish\API\Repository\Values\Content\Query\Criterion\ContentTypeId
    public function parse(array $data, ParsingDispatcher $parsingDispatcher)
    {
        if (!array_key_exists('ContentTypeIdCriterion', $data)) {
            throw new Exceptions\Parser('Invalid <ContentTypeIdCriterion> format');
        }
        return new ContentTypeIdCriterion($data['ContentTypeIdCriterion']);
    }
ContentTypeId