|
eZ Publish
[trunk]
|
Performs rule based transformation of characters in a string. More...
Public Member Functions | |
| cacheFilePath ($prefix, $suffix, $key) | |
| eZCharTransform () | |
| setWordSeparator ($char) | |
| transform ($text, $rule, $charset=false, $useCache=true) | |
| transformByGroup ($text, $group, $charset=false, $useCache=true) | |
Static Public Member Functions | |
| static | commandUrlCleanup ($text, $charsetName) |
| static | commandUrlCleanupCompat ($text, $charsetName) |
| static | commandUrlCleanupIRI ($text, $charsetName) |
| static | instance () |
| Returns a shared instance of the eZCharTransform class. | |
| static | wordSeparator () |
Public Attributes | |
| const | CODE_DATE = 1177423380 |
| The timestamp for when the format of the cache files were last changed. | |
Protected Member Functions | |
| executeCacheFile ($text, $filepath, $timestamp=false) | |
Private Member Functions | |
| groupCommands ($group) | |
| storeCacheFile ($filepath, $transformationData, $extraCode, $type, $charsetName) | |
Static Private Member Functions | |
| cachedTransformationPath () | |
| static | varExport ($value) |
Performs rule based transformation of characters in a string.
Definition at line 19 of file ezchartransform.php.
| eZCharTransform::cachedTransformationPath | ( | ) | [static, private] |
Definition at line 186 of file ezchartransform.php.
Referenced by cacheFilePath().
| eZCharTransform::cacheFilePath | ( | $ | prefix, |
| $ | suffix, | ||
| $ | key | ||
| ) |
Get cache file path.
| $prefix | |
| $suffix | |
| $key |
Definition at line 256 of file ezchartransform.php.
Referenced by transform(), and transformByGroup().
| static eZCharTransform::commandUrlCleanup | ( | $ | text, |
| $ | charsetName | ||
| ) | [static] |
Definition at line 393 of file ezchartransform.php.
Referenced by eZCodeMapper\executeCommandCode().
| static eZCharTransform::commandUrlCleanupCompat | ( | $ | text, |
| $ | charsetName | ||
| ) | [static] |
Definition at line 381 of file ezchartransform.php.
Referenced by eZCodeMapper\executeCommandCode().
| static eZCharTransform::commandUrlCleanupIRI | ( | $ | text, |
| $ | charsetName | ||
| ) | [static] |
Definition at line 411 of file ezchartransform.php.
Referenced by eZCodeMapper\executeCommandCode().
| eZCharTransform::executeCacheFile | ( | $ | text, |
| $ | filepath, | ||
| $ | timestamp = false |
||
| ) | [protected] |
| $text | The text that should be transformed |
| $filepath | The filepath for the cache file |
| $timestamp | A timestamp value which is matched against the cache file, pass for instance the timestamp of the INI file. |
false if there is no cached data. Definition at line 275 of file ezchartransform.php.
Referenced by transform(), and transformByGroup().
| eZCharTransform::groupCommands | ( | $ | group | ) | [private] |
Finds all commands defined for group $group. The groups and their commands are defined in transform.ini.
Definition at line 207 of file ezchartransform.php.
Referenced by transformByGroup().
| static eZCharTransform::instance | ( | ) | [static] |
Returns a shared instance of the eZCharTransform class.
Definition at line 444 of file ezchartransform.php.
Referenced by eZMatrixDefinition\addColumn(), eZSearchLog\addPhrase(), eZIdentifierType\assignValue(), eZStringType\batchInitializeObjectAttributeData(), eZSearchEngine\buildWordIDArray(), cachedTransformationPath(), eZURLAliasML\convertToAlias(), eZURLAliasML\convertToAliasCompat(), executeCacheFile(), eZMatrixType\fetchClassAttributeHTTPInput(), eZContentFunctionCollection\fetchKeyword(), eZObjectRelationType\fetchObjectAttributeHTTPInput(), groupCommands(), eZSearchEngine\indexWords(), eZExtensionPackageHandler\install(), eZContentObjectStateGroup\isValid(), eZContentObjectState\isValid(), eZPackage\isValidName(), eZImageAliasHandler\normalizeImageName(), eZSearchEngine\normalizeText(), eZPackage\parseDOMTree(), repositoryByVendor(), eZStringType\sortKey(), eZIdentifierType\sortKey(), eZCountryType\sortKey(), eZURLAliasML\strtolower(), and wordSeparator().
| eZCharTransform::setWordSeparator | ( | $ | char | ) |
Sets the current word separator, set it to null to use default value.
Definition at line 376 of file ezchartransform.php.
| eZCharTransform::storeCacheFile | ( | $ | filepath, |
| $ | transformationData, | ||
| $ | extraCode, | ||
| $ | type, | ||
| $ | charsetName | ||
| ) | [private] |
Stores the mapping table $table in the cache file $filepath.
Definition at line 299 of file ezchartransform.php.
Referenced by transform(), and transformByGroup().
| eZCharTransform::transform | ( | $ | text, |
| $ | rule, | ||
| $ | charset = false, |
||
| $ | useCache = true |
||
| ) |
Transforms the text according to the rules defined in $rule using character set $charset.
| $text | The text string to be converted, currently Unicode arrays are not supported |
| $rule | Which transformation rule to use, can either be a string identifier or an array with identifiers. |
| $charset | Which charset to use when transforming, if false it will use current charset (i18n.ini). |
| $useCache | If true then it will use cache files for the mapping, if not it will have to calculate them each time. |
Definition at line 44 of file ezchartransform.php.
| eZCharTransform::transformByGroup | ( | $ | text, |
| $ | group, | ||
| $ | charset = false, |
||
| $ | useCache = true |
||
| ) |
Transforms the text according to the rules defined in $rule using character set $charset.
| $text | The text string to be converted, currently Unicode arrays are not supported |
| $group | Which transformation group to use, of which the rules will be applied. |
| $charset | Which charset to use when transforming, if false it will use current charset (i18n.ini). |
| $useCache | If true then it will use cache files for the tables, if not it will have to calculate them each time. |
Definition at line 104 of file ezchartransform.php.
| static eZCharTransform::varExport | ( | $ | value | ) | [static, private] |
Creates a text representation of the value $value which can be placed in files and be read back by a PHP parser as it was. The type of the values determines the output, it can be one of the following.
true or false null serializeData implemented. Definition at line 334 of file ezchartransform.php.
Referenced by storeCacheFile().
| static eZCharTransform::wordSeparator | ( | ) | [static] |
Returns the current word separator, if none is found it will read from site.ini URLTranslator/WordSeparator
Definition at line 344 of file ezchartransform.php.
Referenced by commandUrlCleanup(), commandUrlCleanupIRI(), and eZURLAliasFilterAppendNodeID\process().
| const eZCharTransform::CODE_DATE = 1177423380 |
The timestamp for when the format of the cache files were last changed.
This must be updated when the format changes to invalidate existing cache files. 1101288452 30. Jan. 2007 - 1170165730 24. Apr. 2007 - 1177423380
Definition at line 27 of file ezchartransform.php.