Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

ContentTypeParser.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\REST\Server\Input\Parser\FacetBuilder;
8
9 use eZ\Publish\Core\REST\Common\Input\BaseParser;
10 use eZ\Publish\Core\REST\Common\Input\ParsingDispatcher;
11 use eZ\Publish\Core\REST\Common\Exceptions;
12 use eZ\Publish\API\Repository\Values\Content\Query\FacetBuilder\ContentTypeFacetBuilder;
13
17 class ContentTypeParser extends BaseParser
18 {
29 public function parse(array $data, ParsingDispatcher $parsingDispatcher)
30 {
31 if (!array_key_exists('ContentType', $data)) {
32 throw new Exceptions\Parser('Invalid <ContentType> format');
33 }
34
35 return new ContentTypeFacetBuilder($data['ContentType']);
36 }
37 }
eZ\Publish\API\Repository\Values\Content\Query\FacetBuilder\ContentTypeFacetBuilder
Building a content type facet.
Definition: ContentTypeFacetBuilder.php:17
eZ\Publish\Core\REST\Common\Input\BaseParser
Definition: BaseParser.php:12
eZ\Publish\Core\REST\Common\Input\ParsingDispatcher
Parsing dispatcher.
Definition: ParsingDispatcher.php:15
eZ\Publish\Core\REST\Server\Input\Parser\FacetBuilder\ContentTypeParser
Parser for ContentType facet builder.
Definition: ContentTypeParser.php:18
eZ\Publish\Core\REST\Server\Input\Parser\FacetBuilder\ContentTypeParser\parse
parse(array $data, ParsingDispatcher $parsingDispatcher)
Parses input structure to a FacetBuilder object.
Definition: ContentTypeParser.php:29
eZ\Publish\Core\REST\Common\Exceptions
Definition: Core/REST/Common/Exceptions/ForbiddenException.php:7
eZ\Publish\Core\REST\Server\Input\Parser\FacetBuilder
Definition: ContentTypeParser.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.