[SECURITY] Filter disallowed properties in form editor
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / Classes / Domain / Configuration / ArrayProcessing / ArrayProcessing.php
1 <?php
2 declare(strict_types = 1);
3 namespace TYPO3\CMS\Form\Domain\Configuration\ArrayProcessing;
4
5 /*
6 * This file is part of the TYPO3 CMS project.
7 *
8 * It is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, either version 2
10 * of the License, or any later version.
11 *
12 * For the full copyright and license information, please read the
13 * LICENSE.txt file that was distributed with this source code.
14 *
15 * The TYPO3 project - inspiring people to share!
16 */
17
18 /**
19 * Helper for array processing
20 *
21 * Scope: frontend / backend
22 */
23 class ArrayProcessing
24 {
25
26 /**
27 * @var string
28 */
29 protected $identifier;
30
31 /**
32 * @var string
33 */
34 protected $expression;
35
36 /**
37 * @var callable
38 */
39 protected $processor;
40
41 /**
42 * @param string $identifier
43 * @param string $expression
44 * @param callable $processor
45 */
46 public function __construct(string $identifier, string $expression, callable $processor)
47 {
48 $this->identifier = $identifier;
49 $this->expression = $expression;
50 $this->processor = $processor;
51 }
52
53 /**
54 * @return string
55 */
56 public function getIdentifier(): string
57 {
58 return $this->identifier;
59 }
60
61 /**
62 * @return string
63 */
64 public function getExpression(): string
65 {
66 return $this->expression;
67 }
68
69 /**
70 * @return callable
71 */
72 public function getProcessor(): callable
73 {
74 return $this->processor;
75 }
76 }