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

Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
eZ\Publish\Core\Persistence\TransformationProcessor Class Reference

Interface for processing a set of transformations on a string. More...

Inheritance diagram for eZ\Publish\Core\Persistence\TransformationProcessor:

## Public Member Functions
| __construct (PcreCompiler $compiler, array $ruleFiles=[])
| Construct instance of TransformationProcessor. More...
| transform ($string, array $ruleNames=[])
| Transform the given string. More...
| transformByGroup ($string, $ruleGroup)
| Transform the given string by group. More...

## Public Attributes
const | T_COMMENT = 1
const | T_WHITESPACE = 2
const | T_SECTION = 10
const | T_MAP = 11
const | T_REPLACE = 12
const | T_TRANSPOSE = 13
const | T_TRANSPOSE_MODULO = 14

## Protected Member Functions
| getRules ()
| Loads rules. More...

## Protected Attributes
| $ruleFiles = []
| $compiledRules = null
| $compiler = null

## Detailed Description

Interface for processing a set of transformations on a string.

Definition at line 14 of file TransformationProcessor.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\Persistence\TransformationProcessor::__construct | ( | PcreCompiler | $compiler,
|  | array | $ruleFiles = `[]`
| ) |  |

Construct instance of TransformationProcessor.

Through the $ruleFiles array, a list of files with full text transformation rules is given.

Parameters

  \eZ\Publish\Core\Persistence\TransformationProcessor\PcreCompiler | $compiler |
  array | $ruleFiles |

Reimplemented in eZ\Publish\Core\Persistence\TransformationProcessor\PreprocessedBased.

Definition at line 54 of file TransformationProcessor.php.

References eZ\Publish\Core\Persistence\TransformationProcessor\$compiler, and eZ\Publish\Core\Persistence\TransformationProcessor\$ruleFiles.

## Member Function Documentation

## ◆ getRules()

eZ\Publish\Core\Persistence\TransformationProcessor::getRules | ( |  | ) |
| abstract protected

Loads rules.

Returns
  array

Reimplemented in eZ\Publish\Core\Persistence\TransformationProcessor\PreprocessedBased, and eZ\Publish\Core\Persistence\TransformationProcessor\DefinitionBased.

Referenced by eZ\Publish\Core\Persistence\TransformationProcessor\transform(), and eZ\Publish\Core\Persistence\TransformationProcessor\transformByGroup().

## ◆ transform()

eZ\Publish\Core\Persistence\TransformationProcessor::transform | ( |  | $string,
|  | array | $ruleNames = `[]`
| ) |  |

Transform the given string.

Transform the given string using the given rules. If no rules are specified, all available rules will be used for the transformation.

Parameters

  string | $string |
  array | $ruleNames |

Returns
  string

Definition at line 78 of file TransformationProcessor.php.

References eZ\Publish\Core\Persistence\TransformationProcessor\getRules().

## ◆ transformByGroup()

eZ\Publish\Core\Persistence\TransformationProcessor::transformByGroup | ( |  | $string,
|  |  | $ruleGroup
| ) |  |

Transform the given string by group.

Transform the given string using a rule group.

Parameters

  string | $string |
  string | $ruleGroup |

Returns
  string

Definition at line 111 of file TransformationProcessor.php.

References eZ\Publish\Core\Persistence\TransformationProcessor\getRules().

## Member Data Documentation

## ◆ $compiledRules

eZ\Publish\Core\Persistence\TransformationProcessor::$compiledRules = null
| protected

Definition at line 36 of file TransformationProcessor.php.

Referenced by eZ\Publish\Core\Persistence\TransformationProcessor\DefinitionBased\getRules(), and eZ\Publish\Core\Persistence\TransformationProcessor\PreprocessedBased\getRules().

## ◆ $compiler

eZ\Publish\Core\Persistence\TransformationProcessor::$compiler = null
| protected

Definition at line 43 of file TransformationProcessor.php.

Referenced by eZ\Publish\Core\Persistence\TransformationProcessor\DefinitionBased\__construct(), eZ\Publish\Core\Persistence\TransformationProcessor\__construct(), and eZ\Publish\Core\Persistence\TransformationProcessor\PreprocessedBased\__construct().

## ◆ $ruleFiles

eZ\Publish\Core\Persistence\TransformationProcessor::$ruleFiles = []
| protected

Definition at line 29 of file TransformationProcessor.php.

Referenced by eZ\Publish\Core\Persistence\TransformationProcessor\DefinitionBased\__construct(), eZ\Publish\Core\Persistence\TransformationProcessor\__construct(), and eZ\Publish\Core\Persistence\TransformationProcessor\PreprocessedBased\__construct().

## ◆ T_COMMENT

const eZ\Publish\Core\Persistence\TransformationProcessor::T_COMMENT = 1

Definition at line 16 of file TransformationProcessor.php.

Referenced by eZ\Publish\Core\Persistence\TransformationProcessor\DefinitionBased\Parser\__construct(), and eZ\Publish\Core\Persistence\TransformationProcessor\DefinitionBased\Parser\parseString().

## ◆ T_MAP

const eZ\Publish\Core\Persistence\TransformationProcessor::T_MAP = 11

Definition at line 19 of file TransformationProcessor.php.

Referenced by eZ\Publish\Core\Persistence\TransformationProcessor\DefinitionBased\Parser\__construct(), and eZ\Publish\Core\Persistence\TransformationProcessor\PcreCompiler\compileRule().

## ◆ T_REPLACE

const eZ\Publish\Core\Persistence\TransformationProcessor::T_REPLACE = 12

Definition at line 20 of file TransformationProcessor.php.

Referenced by eZ\Publish\Core\Persistence\TransformationProcessor\DefinitionBased\Parser\__construct(), and eZ\Publish\Core\Persistence\TransformationProcessor\PcreCompiler\compileRule().

## ◆ T_SECTION

const eZ\Publish\Core\Persistence\TransformationProcessor::T_SECTION = 10

Definition at line 18 of file TransformationProcessor.php.

Referenced by eZ\Publish\Core\Persistence\TransformationProcessor\DefinitionBased\Parser\__construct(), and eZ\Publish\Core\Persistence\TransformationProcessor\DefinitionBased\Parser\parseString().

## ◆ T_TRANSPOSE

const eZ\Publish\Core\Persistence\TransformationProcessor::T_TRANSPOSE = 13

Definition at line 21 of file TransformationProcessor.php.

Referenced by eZ\Publish\Core\Persistence\TransformationProcessor\DefinitionBased\Parser\__construct(), and eZ\Publish\Core\Persistence\TransformationProcessor\PcreCompiler\compileRule().

## ◆ T_TRANSPOSE_MODULO

const eZ\Publish\Core\Persistence\TransformationProcessor::T_TRANSPOSE_MODULO = 14

Definition at line 22 of file TransformationProcessor.php.

Referenced by eZ\Publish\Core\Persistence\TransformationProcessor\DefinitionBased\Parser\__construct(), and eZ\Publish\Core\Persistence\TransformationProcessor\PcreCompiler\compileRule().

## ◆ T_WHITESPACE

const eZ\Publish\Core\Persistence\TransformationProcessor::T_WHITESPACE = 2

Definition at line 17 of file TransformationProcessor.php.

Referenced by eZ\Publish\Core\Persistence\TransformationProcessor\DefinitionBased\Parser\__construct(), and eZ\Publish\Core\Persistence\TransformationProcessor\DefinitionBased\Parser\parseString().

The documentation for this class was generated from the following file:

- TransformationProcessor.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.