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

Server/Input/Parser/SessionInput.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\REST\Server\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\Common\Exceptions;
12 use eZ\Publish\Core\REST\Server\Values\SessionInput as SessionInputValue;
13
17 class SessionInput extends BaseParser
18 {
27 public function parse(array $data, ParsingDispatcher $parsingDispatcher)
28 {
29 $sessionInput = new SessionInputValue();
30
31 if (!array_key_exists('login', $data)) {
32 throw new Exceptions\Parser("Missing 'login' attribute for SessionInput.");
33 }
34
35 $sessionInput->login = $data['login'];
36
37 if (!array_key_exists('password', $data)) {
38 throw new Exceptions\Parser("Missing 'password' attribute for SessionInput.");
39 }
40
41 $sessionInput->password = $data['password'];
42
43 return $sessionInput;
44 }
45 }
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\SessionInput
Parser for SessionInput.
Definition: Server/Input/Parser/SessionInput.php:18
eZ\Publish\Core\REST\Server\Input\Parser\SessionInput\parse
parse(array $data, ParsingDispatcher $parsingDispatcher)
Parse input structure.
Definition: Server/Input/Parser/SessionInput.php:27
eZ\Publish\Core\REST\Server\Values\SessionInput
SessionInput view model.
Definition: Server/Values/SessionInput.php:15
eZ\Publish\Core\REST\Common\Exceptions
Definition: Core/REST/Common/Exceptions/ForbiddenException.php:7
eZ\Publish\Core\REST\Server\Input\Parser
Definition: ContentCreate.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.