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

Core/REST/Client/Input/Parser/Policy.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 use eZ\Publish\Core\REST\Client;
12
16 class Policy extends BaseParser
17 {
28 public function parse(array $data, ParsingDispatcher $parsingDispatcher)
29 {
30 $limitations = array();
31
32 if (array_key_exists('limitations', $data)) {
33 foreach ($data['limitations']['limitation'] as $limitation) {
34 $limitations[] = $parsingDispatcher->parse(
35 $limitation,
36 $limitation['_media-type']
37 );
38 }
39 }
40
41 return new Client\Values\User\Policy(
42 array(
43 'id' => $data['id'],
44 'module' => $data['module'],
45 'function' => $data['function'],
46 'limitations' => $limitations,
47 )
48 );
49 }
50 }
eZ\Publish\Core\REST\Client\Input\Parser\Policy
Parser for Policy.
Definition: Core/REST/Client/Input/Parser/Policy.php:17
eZ\Publish\Core\REST\Client\Input\Parser\Policy\parse
parse(array $data, ParsingDispatcher $parsingDispatcher)
Parse input structure.
Definition: Core/REST/Client/Input/Parser/Policy.php:28
eZ\Publish\Core\REST\Client\Values\User\Policy
Implementation of the \eZ\Publish\API\Repository\Values\User\Policy class.
Definition: Core/REST/Client/Values/User/Policy.php:18
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
eZ\Publish\Core\REST\Client
Definition: Core/REST/Client/ContentService.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.