PHP Class eZ\Publish\Core\Persistence\TransformationProcessor\PcreCompiler

Afficher le fichier Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Свойство Type Description
$converter eZ\Publish\Core\Persistence\Utf8Converter Class for converting UTF-8 characters.

Méthodes publiques

Méthode Description
__construct ( Utf8Converter $converter ) Construct from UTF8Converter.
compile ( array $ast ) : array Compile AST into a set of regular expressions.

Méthodes protégées

Méthode Description
compileCharacter ( string $char ) : string Compile a single source character definition into a plain UTF-8 character.
compileMap ( array $rule ) : array Compile map rule.
compileReplace ( array $rule ) : array Compile replace rule.
compileRule ( array $rule ) : array Compiles a single rule.
compileTargetCharacter ( string $char ) : callback Compile target into a closure, which can be used by preg_replace_callback.
compileTranspose ( array $rule ) : array Compile transpose rule.
compileTransposeModulo ( array $rule ) : array Compile transpose modulo rule.
getModuloCharRange ( string $start, string $end, string $modulo ) : string Get string with all characters defined by parameters.
getTransposeClosure ( string $operator, string $value ) : callback Returns a closure which modifies the provided character by the given value.

Method Details

__construct() public méthode

Construct from UTF8Converter.
public __construct ( Utf8Converter $converter )
$converter eZ\Publish\Core\Persistence\Utf8Converter

compile() public méthode

The returned array contains a set of regular expressions and their replacement callbacks. The regular expressions can then be applied to strings to executed the transformations.
public compile ( array $ast ) : array
$ast array
Résultat array

compileCharacter() protected méthode

Handles the two formats from the possible character definitions: - U+xxxx : Unicode value in hexadecimal - xx: Ascii value in hexadecimal
protected compileCharacter ( string $char ) : string
$char string
Résultat string

compileMap() protected méthode

Compile map rule.
protected compileMap ( array $rule ) : array
$rule array
Résultat array

compileReplace() protected méthode

Compile replace rule.
protected compileReplace ( array $rule ) : array
$rule array
Résultat array

compileRule() protected méthode

Compiles a single rule.
protected compileRule ( array $rule ) : array
$rule array
Résultat array

compileTargetCharacter() protected méthode

Compile target into a closure, which can be used by preg_replace_callback.
protected compileTargetCharacter ( string $char ) : callback
$char string
Résultat callback

compileTranspose() protected méthode

Compile transpose rule.
protected compileTranspose ( array $rule ) : array
$rule array
Résultat array

compileTransposeModulo() protected méthode

Compile transpose modulo rule.
protected compileTransposeModulo ( array $rule ) : array
$rule array
Résultat array

getModuloCharRange() protected méthode

Returns a string containing all UTF-8 characters starting with the specified $start character up to the $end character with the step size defined in $modulo.
protected getModuloCharRange ( string $start, string $end, string $modulo ) : string
$start string
$end string
$modulo string
Résultat string

getTransposeClosure() protected méthode

Returns a closure which modifies the provided character by the given value.
protected getTransposeClosure ( string $operator, string $value ) : callback
$operator string
$value string
Résultat callback

Property Details

$converter protected_oe property

Class for converting UTF-8 characters.
protected Utf8Converter,eZ\Publish\Core\Persistence $converter
Résultat eZ\Publish\Core\Persistence\Utf8Converter