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

Client/Input/Parser/PolicyList.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\REST\Client\Input\Parser;
8
9 use eZ\Publish\Core\REST\Common\Input\BaseParser;
10 use eZ\Publish\Core\REST\Common\Input\ParsingDispatcher;
11
15 class PolicyList extends BaseParser
16 {
27 public function parse(array $data, ParsingDispatcher $parsingDispatcher)
28 {
29 $policies = array();
30
31 if (array_key_exists('Policy', $data) && is_array($data['Policy'])) {
32 foreach ($data['Policy'] as $rawPolicyData) {
33 $policies[] = $parsingDispatcher->parse(
34 $rawPolicyData,
35 $rawPolicyData['_media-type']
36 );
37 }
38 }
39
40 return $policies;
41 }
42 }
eZ\Publish\Core\REST\Client\Input\Parser\PolicyList
Parser for PolicyList.
Definition: Client/Input/Parser/PolicyList.php:16
eZ\Publish\Core\REST\Client\Input\Parser\PolicyList\parse
parse(array $data, ParsingDispatcher $parsingDispatcher)
Parse input structure.
Definition: Client/Input/Parser/PolicyList.php:27
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\Common\Input\ParsingDispatcher\parse
parse(array $data, $mediaType)
Parses the given $data according to $mediaType.
Definition: ParsingDispatcher.php:66
eZ\Publish\Core\REST\Client\Input\Parser
Definition: Publish/Core/REST/Client/Input/Parser/Content.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.