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

FieldType/RichText/Normalizer/Aggregate.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\FieldType\RichText\Normalizer;
8
9 use eZ\Publish\Core\FieldType\RichText\Normalizer;
10
16 class Aggregate extends Normalizer
17 {
23 protected $normalizers = [];
24
28 public function __construct(array $normalizers = [])
29 {
30 $this->normalizers = $normalizers;
31 }
32
42 public function accept($input)
43 {
44 return true;
45 }
46
54 public function normalize($input)
55 {
56 foreach ($this->normalizers as $normalizer) {
57 if ($normalizer->accept($input)) {
58 $input = $normalizer->normalize($input);
59 }
60 }
61
62 return $input;
63 }
64 }
eZ\Publish\Core\FieldType\RichText\Normalizer\Aggregate
Aggregate normalizer converts using configured normalizers in prioritized order.
Definition: FieldType/RichText/Normalizer/Aggregate.php:17
eZ\Publish\Core\FieldType\RichText\Normalizer\Aggregate\normalize
normalize($input)
Normalizes given $input by calling aggregated normalizers.
Definition: FieldType/RichText/Normalizer/Aggregate.php:54
eZ\Publish\Core\FieldType\RichText\Normalizer\Aggregate\accept
accept($input)
Check if normalizer accepts given $input for normalization.
Definition: FieldType/RichText/Normalizer/Aggregate.php:42
eZ\Publish\Core\FieldType\RichText\Normalizer\Aggregate\$normalizers
$normalizers
Definition: FieldType/RichText/Normalizer/Aggregate.php:23
eZ\Publish\Core\FieldType\RichText\Normalizer\Aggregate\__construct
__construct(array $normalizers=[])
Definition: FieldType/RichText/Normalizer/Aggregate.php:28
eZ\Publish\Core\FieldType\RichText\Normalizer
Abstract class for XML normalization of string input.
Definition: Normalizer.php:15
eZ\Publish\Core\FieldType\RichText\Normalizer
Definition: FieldType/RichText/Normalizer/Aggregate.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.