PHP Класс eZCharTransform

\sa eZCodeMapper
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
cacheFilePath ( $prefix, $suffix, $key ) *! Get cache file path.
cachedTransformationPath ( ) *! \private \static \return the path of the cached transformation tables.
commandUrlCleanup ( $text, $charsetName )
commandUrlCleanupCompat ( $text, $charsetName )
commandUrlCleanupIRI ( $text, $charsetName )
eZCharTransform ( ) *! Constructor
groupCommands ( $group ) *! \private Finds all commands defined for group \a $group.
instance ( ) : eZCharTransform Returns a shared instance of the eZCharTransform class.
setWordSeparator ( $char ) *! Sets the current word separator, set it to \c null to use default value.
storeCacheFile ( $filepath, $transformationData, $extraCode, $type, $charsetName ) *! \private Stores the mapping table \a $table in the cache file \a $filepath.
transform ( $text, $rule, $charset = false, $useCache = true ) *! Transforms the text according to the rules defined in \a $rule using character set \a $charset.
transformByGroup ( $text, $group, $charset = false, $useCache = true ) *! Transforms the text according to the rules defined in \a $rule using character set \a $charset.
varExport ( $value ) *! \private Creates a text representation of the value \a $value which can be placed in files and be read back by a PHP parser as it was.
wordSeparator ( ) *! \static Returns the current word separator, if none is found it will read from site.ini URLTranslator/WordSeparator \sa setWordSeparator

Защищенные методы

Метод Описание
executeCacheFile ( $text, $filepath, $timestamp = false ) *! \private \param $text The text that should be transformed \param $filepath The filepath for the cache file \param $timestamp A timestamp value which is matched against the cache file, pass for instance the timestamp of the INI file.

Описание методов

cacheFilePath() публичный Метод

\param $prefix \param $suffix \param $key \return cache file path.
public cacheFilePath ( $prefix, $suffix, $key )

cachedTransformationPath() публичный Метод

*! \private \static \return the path of the cached transformation tables.

commandUrlCleanup() статический публичный Метод

static public commandUrlCleanup ( $text, $charsetName )

commandUrlCleanupCompat() статический публичный Метод

static public commandUrlCleanupCompat ( $text, $charsetName )

commandUrlCleanupIRI() статический публичный Метод

static public commandUrlCleanupIRI ( $text, $charsetName )

eZCharTransform() публичный Метод

*! Constructor
public eZCharTransform ( )

executeCacheFile() защищенный Метод

\return The restored transformation data or \c false if there is no cached data.
protected executeCacheFile ( $text, $filepath, $timestamp = false )

groupCommands() публичный Метод

The groups and their commands are defined in \c transform.ini. \return An array with commands, each entry contains of: - command - Name of the command - parameters - Array with parameters for command - text - Textual representation of the command + parameters
public groupCommands ( $group )

instance() статический публичный Метод

Returns a shared instance of the eZCharTransform class.
static public instance ( ) : eZCharTransform
Результат eZCharTransform

setWordSeparator() публичный Метод

*! Sets the current word separator, set it to \c null to use default value.
public setWordSeparator ( $char )

storeCacheFile() публичный Метод

*! \private Stores the mapping table \a $table in the cache file \a $filepath.
public storeCacheFile ( $filepath, $transformationData, $extraCode, $type, $charsetName )

transform() публичный Метод

\param $text The text string to be converted, currently Unicode arrays are not supported \param $rule Which transformation rule to use, can either be a string identifier or an array with identifiers. \param $charset Which charset to use when transforming, if \c false it will use current charset (i18n.ini). \param $useCache If \c true then it will use cache files for the mapping, if not it will have to calculate them each time.
public transform ( $text, $rule, $charset = false, $useCache = true )

transformByGroup() публичный Метод

\param $text The text string to be converted, currently Unicode arrays are not supported \param $group Which transformation group to use, of which the rules will be applied. \param $charset Which charset to use when transforming, if \c false it will use current charset (i18n.ini). \param $useCache If \c true then it will use cache files for the tables, if not it will have to calculate them each time.
public transformByGroup ( $text, $group, $charset = false, $useCache = true )

varExport() статический публичный Метод

The type of the values determines the output, it can be one of the following. - boolean, becomes \c true or \c false - null, becomes \c null - string, adds \ (backslash) to backslashes, double quotes, dollar signs and newlines. Then wraps the whole string in " (double quotes). - numeric, displays the value as-is. - array, expands all value recursively using this function - object, creates a representation of an object creation if the object has \c serializeData implemented.
static public varExport ( $value )

wordSeparator() статический публичный Метод

*! \static Returns the current word separator, if none is found it will read from site.ini URLTranslator/WordSeparator \sa setWordSeparator
static public wordSeparator ( )