PHP Class eZCharTransform

\sa eZCodeMapper
Afficher le fichier Open project: ezsystems/ezpublish-legacy Class Usage Examples

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
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.

Method Details

cacheFilePath() public méthode

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

cachedTransformationPath() public méthode

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

commandUrlCleanup() static public méthode

static public commandUrlCleanup ( $text, $charsetName )

commandUrlCleanupCompat() static public méthode

static public commandUrlCleanupCompat ( $text, $charsetName )

commandUrlCleanupIRI() static public méthode

static public commandUrlCleanupIRI ( $text, $charsetName )

eZCharTransform() public méthode

*! Constructor
public eZCharTransform ( )

executeCacheFile() protected méthode

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

groupCommands() public méthode

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() static public méthode

Returns a shared instance of the eZCharTransform class.
static public instance ( ) : eZCharTransform
Résultat eZCharTransform

setWordSeparator() public méthode

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

storeCacheFile() public méthode

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

transform() public méthode

\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() public méthode

\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() static public méthode

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 public méthode

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