Class

eZ\Publish\Core\Persistence\TransformationProcessor\DefinitionBased

class DefinitionBased extends TransformationProcessor

Class for processing a set of transformations, loaded from .tr files, on a string.

Constants

T_COMMENT

T_WHITESPACE

T_SECTION

T_MAP

T_REPLACE

T_TRANSPOSE

T_TRANSPOSE_MODULO

Methods

DefinitionBased __construct(Parser $parser, PcreCompiler $compiler, array $ruleFiles = array())

Construct instance of TransformationProcessor\DefinitionBased.

string transform(string $string, array $ruleNames = array())

Transform the given string.

from TransformationProcessor
string transformByGroup(string $string, string $ruleGroup)

Transform the given string by group.

from TransformationProcessor

Details

at line 40
public DefinitionBased __construct(Parser $parser, PcreCompiler $compiler, array $ruleFiles = array())

Construct instance of TransformationProcessor\DefinitionBased.

Through the $ruleFiles array, a list of files with full text transformation rules is given. These files are parsed by {@link \eZ\Publish\Core\Persistence\TransformationProcessor\DefinitionBased\Parser} and then used for normalization in the full text search.

Parameters

Parser $parser
PcreCompiler $compiler
array $ruleFiles

Return Value

DefinitionBased

public string transform(string $string, array $ruleNames = array())

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

Return Value

string

public string transformByGroup(string $string, string $ruleGroup)

Transform the given string by group.

Transform the given string using a rule group.

Parameters

string $string
string $ruleGroup

Return Value

string