eZPublish  3.8
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)
 
instance ($charset_code, $use_cache=true)
 
 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

 exists ($charset_code)
 
 fileName ($charset_code)
 

Private Member Functions

 flushCacheObject ()
 
 permissionSetting ()
 
 setPermissionSetting ($permissionArray)
 

Private 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...
 

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)
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().

eZCodePage::fileName (   $charset_code)
static

Returns the filename of the charset code $charset_code.

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

eZCodePage::flushCacheObject ( )
private
& eZCodePage::instance (   $charset_code,
  $use_cache = true 
)

Returns the only instance of the codepage for $charset_code.

Referenced by 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.
eZCodePage::permissionSetting ( )
private

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

Referenced by load().

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

Sets the permission setting for codepagefiles.

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
private

The read charset code, may differ from $RequestedCharsetCode.

Referenced by charsetCode(), and load().

eZCodePage::$CharsetEncodingScheme
private

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

eZCodePage::$CodeMap
private

Maps unicode to normal codes.

Referenced by convertStringFromUTF8(), and load().

eZCodePage::$MaxCharValue
private

The maximum key value for the mapping tables.

Referenced by load(), and maxCharValue().

eZCodePage::$MinCharValue
private

The minimum key value for the mapping tables.

Referenced by load(), and minCharValue().

eZCodePage::$RequestedCharsetCode
private

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

Referenced by requestedCharsetCode().

eZCodePage::$SubstituteChar
private

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

Referenced by convertStringFromUTF8(), and substituteChar().

eZCodePage::$UnicodeMap
private

Maps normal codes to unicode.

Referenced by load().

eZCodePage::$UTF8CodeMap
private

Maps utf8 to normal codes.

Referenced by load().

eZCodePage::$UTF8Map
private

Maps normal codes to utf8.

Referenced by load().

eZCodePage::$Valid
private

Whether the codepage is valid or not.

Referenced by isValid().


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