eZPublish  4.7
eZCodePage Class Reference

Handles codepage files for charset mapping. More...

Public Member Functions

 cacheFileName ($charset_code)
 
 cacheFilepath ()
 
 charsetCode ()
 
 charToUnicode ($str, $pos, &$charLen)
 
 charToUtf8 ($str, $pos, &$charLen)
 
 codepageList ()
 
 codeToUnicode ($code)
 
 codeToUtf8 ($code)
 
 convertString ($str)
 
 convertStringFromUTF8 ($multi_char)
 
 convertStringToUnicode ($str)
 
 convertUnicodeToString ($unicodeValues)
 
 eZCodePage ($charset_code, $use_cache=true)
 
 fileModification ($charset_code)
 
 isValid ()
 
 load ($use_cache=true)
 
 maxCharValue ()
 
 minCharValue ()
 
 requestedCharsetCode ()
 
 setSubstituteChar ($char)
 
 storeCacheObject ($filename, $permissionArray)
 
 strlen ($str)
 
 strlenFromUTF8 ($str)
 
 substituteChar ()
 
 unicodeToChar ($ucode)
 
 unicodeToCode ($ucode)
 
 utf8ToChar ($ucode)
 
 utf8ToCode ($ucode)
 

Static Public Member Functions

static exists ($charset_code)
 
static fileName ($charset_code)
 
static instance ($charset_code, $use_cache=true)
 Returns a shared instance of the eZCodePage pr the $charset_code param. More...
 

Public Attributes

 $CharsetCode
 The read charset code, may differ from $RequestedCharsetCode. More...
 
 $CharsetEncodingScheme
 Encoding scheme for current charset, for instance utf-8, singlebyte, multibyte. More...
 
 $CodeMap
 Maps unicode to normal codes. More...
 
 $MaxCharValue
 The maximum key value for the mapping tables. More...
 
 $MinCharValue
 The minimum key value for the mapping tables. More...
 
 $RequestedCharsetCode
 The charset code which was requested, may differ from $CharsetCode. More...
 
 $SubstituteChar
 The character to use when an alternative doesn't exist. More...
 
 $UnicodeMap
 Maps normal codes to unicode. More...
 
 $UTF8CodeMap
 Maps utf8 to normal codes. More...
 
 $UTF8Map
 Maps normal codes to utf8. More...
 
 $Valid
 Whether the codepage is valid or not. More...
 
const CACHE_CODE_DATE = 1028204478
 

Static Private Member Functions

static flushCacheObject ()
 
static permissionSetting ()
 
static setPermissionSetting ($permissionArray)
 

Detailed Description

Handles codepage files for charset mapping.

Member Function Documentation

eZCodePage::cacheFileName (   $charset_code)
eZCodePage::cacheFilepath ( )
eZCodePage::charsetCode ( )
Returns
the charset code which is in use. This may not be the charset that was requested due to aliases.
See Also
requestedCharsetCode
eZCodePage::charToUnicode (   $str,
  $pos,
$charLen 
)

Referenced by convertStringToUnicode().

eZCodePage::charToUtf8 (   $str,
  $pos,
$charLen 
)
eZCodePage::codepageList ( )
eZCodePage::codeToUnicode (   $code)
eZCodePage::codeToUtf8 (   $code)
eZCodePage::convertString (   $str)
eZCodePage::convertStringFromUTF8 (   $multi_char)
eZCodePage::convertStringToUnicode (   $str)
eZCodePage::convertUnicodeToString (   $unicodeValues)
static eZCodePage::exists (   $charset_code)
static

Returns true if the codepage $charset_code exists.

Referenced by eZCodePageMapper\load().

eZCodePage::eZCodePage (   $charset_code,
  $use_cache = true 
)

Initializes the codepage with the charset code $charset_code, and then loads it.

Referenced by instance().

eZCodePage::fileModification (   $charset_code)

Referenced by eZCodePageMapper\load().

static eZCodePage::fileName (   $charset_code)
static

Returns the filename of the charset code $charset_code.

Referenced by exists(), fileModification(), and eZCodePageMapper\load().

static eZCodePage::flushCacheObject ( )
staticprivate

Referenced by setPermissionSetting().

static eZCodePage::instance (   $charset_code,
  $use_cache = true 
)
static

Returns a shared instance of the eZCodePage pr the $charset_code param.

Parameters
string$charset_code
bool$use_cache
Returns
eZCodePage

Referenced by eZTextCodec\initializeInputCodepage(), eZTextCodec\initializeOutputCodepage(), eZCodePageMapper\load(), and eZCodePageMapper\setSubstituteCharacter().

eZCodePage::isValid ( )

Returns true if the codepage is valid for use.

eZCodePage::load (   $use_cache = true)

Loads the codepage from disk. If $use_cache is true and a cached version is found it is used instead. If $use_cache is true and no cache was found a new cache is created.

Referenced by eZCodePage().

eZCodePage::maxCharValue ( )
Returns
the largest character value used in the mapping table.
eZCodePage::minCharValue ( )
Returns
the lowest character value used in the mapping table.
static eZCodePage::permissionSetting ( )
staticprivate

Gets the permission setting for codepage files & returns it. If the permission setting doesnt exists: returns false.

Referenced by cacheFileName(), and cacheFilepath().

eZCodePage::requestedCharsetCode ( )
Returns
the charset code which was requested, may differ from charsetCode()
static eZCodePage::setPermissionSetting (   $permissionArray)
staticprivate

Sets the permission setting for codepagefiles.

Referenced by eZScript\initialize().

eZCodePage::setSubstituteChar (   $char)
eZCodePage::storeCacheObject (   $filename,
  $permissionArray 
)

Stores the cache object.

Referenced by load().

eZCodePage::strlen (   $str)
eZCodePage::strlenFromUTF8 (   $str)
eZCodePage::substituteChar ( )
eZCodePage::unicodeToChar (   $ucode)

Referenced by convertUnicodeToString().

eZCodePage::unicodeToCode (   $ucode)
eZCodePage::utf8ToChar (   $ucode)
eZCodePage::utf8ToCode (   $ucode)

Member Data Documentation

eZCodePage::$CharsetCode

The read charset code, may differ from $RequestedCharsetCode.

Referenced by charsetCode(), and load().

eZCodePage::$CharsetEncodingScheme

Encoding scheme for current charset, for instance utf-8, singlebyte, multibyte.

eZCodePage::$CodeMap

Maps unicode to normal codes.

Referenced by convertStringFromUTF8().

eZCodePage::$MaxCharValue

The maximum key value for the mapping tables.

Referenced by maxCharValue().

eZCodePage::$MinCharValue

The minimum key value for the mapping tables.

Referenced by minCharValue().

eZCodePage::$RequestedCharsetCode

The charset code which was requested, may differ from $CharsetCode.

Referenced by requestedCharsetCode().

eZCodePage::$SubstituteChar

The character to use when an alternative doesn't exist.

Referenced by convertStringFromUTF8(), and substituteChar().

eZCodePage::$UnicodeMap

Maps normal codes to unicode.

eZCodePage::$UTF8CodeMap

Maps utf8 to normal codes.

eZCodePage::$UTF8Map

Maps normal codes to utf8.

eZCodePage::$Valid

Whether the codepage is valid or not.

Referenced by isValid().

const eZCodePage::CACHE_CODE_DATE = 1028204478

The documentation for this class was generated from the following file: