PHP Class eZ\Publish\Core\Persistence\TransformationProcessor

Show file Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Property Type Description
$compiledRules array Compiled rules, which can directly be applied to the input strings.
$compiler eZ\Publish\Core\Persistence\TransformationProcessor\PcreCompiler Transformation compiler.
$ruleFiles array Parsed rule files.

Public Methods

Method Description
__construct ( PcreCompiler $compiler, array $ruleFiles = [] ) Construct instance of TransformationProcessor.
transform ( string $string, array $ruleNames = [] ) : string Transform the given string.
transformByGroup ( string $string, string $ruleGroup ) : string Transform the given string by group.

Protected Methods

Method Description
getRules ( ) : array Loads rules.

Method Details

__construct() public method

Through the $ruleFiles array, a list of files with full text transformation rules is given.
public __construct ( PcreCompiler $compiler, array $ruleFiles = [] )
$compiler eZ\Publish\Core\Persistence\TransformationProcessor\PcreCompiler
$ruleFiles array

getRules() abstract protected method

Loads rules.
abstract protected getRules ( ) : array
return array

transform() public method

Transform the given string using the given rules. If no rules are specified, all available rules will be used for the transformation.
public transform ( string $string, array $ruleNames = [] ) : string
$string string
$ruleNames array
return string

transformByGroup() public method

Transform the given string using a rule group.
public transformByGroup ( string $string, string $ruleGroup ) : string
$string string
$ruleGroup string
return string

Property Details

$compiledRules protected property

Compiled rules, which can directly be applied to the input strings.
protected array $compiledRules
return array

$compiler protected property

Transformation compiler.
protected PcreCompiler,eZ\Publish\Core\Persistence\TransformationProcessor $compiler
return eZ\Publish\Core\Persistence\TransformationProcessor\PcreCompiler

$ruleFiles protected property

Parsed rule files.
protected array $ruleFiles
return array