eZ Publish  [4.2]
eZCodePage Class Reference

Handles codepage files for charset mapping. More...

List of all members.

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.

Public Attributes

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

Static Private Member Functions

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

Detailed Description

Handles codepage files for charset mapping.

Definition at line 36 of file ezcodepage.php.


Member Function Documentation

eZCodePage::cacheFileName ( charset_code)

Definition at line 366 of file ezcodepage.php.

eZCodePage::cacheFilepath ( )

Definition at line 500 of file ezcodepage.php.

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

Definition at line 682 of file ezcodepage.php.

eZCodePage::charToUnicode ( str,
pos,
&$  charLen 
)

Definition at line 265 of file ezcodepage.php.

Referenced by convertStringToUnicode().

eZCodePage::charToUtf8 ( str,
pos,
&$  charLen 
)

Definition at line 251 of file ezcodepage.php.

eZCodePage::codepageList ( )

Definition at line 387 of file ezcodepage.php.

eZCodePage::codeToUnicode ( code)

Definition at line 284 of file ezcodepage.php.

eZCodePage::codeToUtf8 ( code)

Definition at line 279 of file ezcodepage.php.

eZCodePage::convertString ( str)

Definition at line 56 of file ezcodepage.php.

eZCodePage::convertStringFromUTF8 ( multi_char)

Definition at line 102 of file ezcodepage.php.

eZCodePage::convertStringToUnicode ( str)

Definition at line 74 of file ezcodepage.php.

eZCodePage::convertUnicodeToString ( unicodeValues)

Definition at line 89 of file ezcodepage.php.

static eZCodePage::exists ( charset_code) [static]

Returns true if the codepage $charset_code exists.

Definition at line 349 of file ezcodepage.php.

Referenced by eZCodePageMapper\load().

eZCodePage::eZCodePage ( charset_code,
use_cache = true 
)

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

Definition at line 43 of file ezcodepage.php.

Referenced by instance().

eZCodePage::fileModification ( charset_code)

Definition at line 379 of file ezcodepage.php.

Referenced by eZCodePageMapper\load().

static eZCodePage::fileName ( charset_code) [static]

Returns the filename of the charset code $charset_code.

Definition at line 359 of file ezcodepage.php.

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

static eZCodePage::flushCacheObject ( ) [static, private]

Definition at line 776 of file ezcodepage.php.

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:
$charset_codestring
$use_cachebool
Returns:
eZCodePage

Definition at line 727 of file ezcodepage.php.

Referenced by convertString(), load(), and strlenFromUTF8().

eZCodePage::isValid ( )

Returns true if the codepage is valid for use.

Definition at line 714 of file ezcodepage.php.

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.

Definition at line 520 of file ezcodepage.php.

Referenced by eZCodePage().

eZCodePage::maxCharValue ( )
Returns:
the largest character value used in the mapping table.

Definition at line 706 of file ezcodepage.php.

eZCodePage::minCharValue ( )
Returns:
the lowest character value used in the mapping table.

Definition at line 698 of file ezcodepage.php.

static eZCodePage::permissionSetting ( ) [static, private]

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

Definition at line 742 of file ezcodepage.php.

Referenced by cacheFileName(), cacheFilepath(), flushCacheObject(), and load().

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

Definition at line 690 of file ezcodepage.php.

static eZCodePage::setPermissionSetting ( permissionArray) [static, private]

Sets the permission setting for codepagefiles.

Definition at line 761 of file ezcodepage.php.

Referenced by eZScript\initialize().

eZCodePage::setSubstituteChar ( char)

Definition at line 340 of file ezcodepage.php.

eZCodePage::storeCacheObject ( filename,
permissionArray 
)

Stores the cache object.

Definition at line 410 of file ezcodepage.php.

Referenced by load().

eZCodePage::strlen ( str)

Definition at line 225 of file ezcodepage.php.

Referenced by convertString(), convertStringFromUTF8(), and convertStringToUnicode().

eZCodePage::strlenFromUTF8 ( str)

Definition at line 246 of file ezcodepage.php.

eZCodePage::substituteChar ( )

Definition at line 335 of file ezcodepage.php.

eZCodePage::unicodeToChar ( ucode)

Definition at line 307 of file ezcodepage.php.

Referenced by convertUnicodeToString().

eZCodePage::unicodeToCode ( ucode)

Definition at line 328 of file ezcodepage.php.

eZCodePage::utf8ToChar ( ucode)

Definition at line 293 of file ezcodepage.php.

eZCodePage::utf8ToCode ( ucode)

Definition at line 321 of file ezcodepage.php.


Member Data Documentation

eZCodePage::$CharsetCode

The read charset code, may differ from $RequestedCharsetCode.

Definition at line 820 of file ezcodepage.php.

eZCodePage::$CharsetEncodingScheme

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

Definition at line 822 of file ezcodepage.php.

eZCodePage::$CodeMap

Maps unicode to normal codes.

Definition at line 828 of file ezcodepage.php.

eZCodePage::$MaxCharValue

The maximum key value for the mapping tables.

Definition at line 834 of file ezcodepage.php.

eZCodePage::$MinCharValue

The minimum key value for the mapping tables.

Definition at line 832 of file ezcodepage.php.

eZCodePage::$RequestedCharsetCode

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

Definition at line 818 of file ezcodepage.php.

eZCodePage::$SubstituteChar

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

Definition at line 838 of file ezcodepage.php.

eZCodePage::$UnicodeMap

Maps normal codes to unicode.

Definition at line 824 of file ezcodepage.php.

eZCodePage::$UTF8CodeMap

Maps utf8 to normal codes.

Definition at line 830 of file ezcodepage.php.

eZCodePage::$UTF8Map

Maps normal codes to utf8.

Definition at line 826 of file ezcodepage.php.

eZCodePage::$Valid

Whether the codepage is valid or not.

Definition at line 836 of file ezcodepage.php.

const eZCodePage::CACHE_CODE_DATE = 1028204478

Definition at line 38 of file ezcodepage.php.


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