eZ Publish  [trunk]
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 18 of file ezcodepage.php.


Member Function Documentation

eZCodePage::cacheFileName ( charset_code)

Definition at line 348 of file ezcodepage.php.

Definition at line 482 of file ezcodepage.php.

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 664 of file ezcodepage.php.

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

Definition at line 247 of file ezcodepage.php.

Referenced by convertStringToUnicode().

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

Definition at line 233 of file ezcodepage.php.

Definition at line 369 of file ezcodepage.php.

Definition at line 266 of file ezcodepage.php.

Definition at line 261 of file ezcodepage.php.

Definition at line 38 of file ezcodepage.php.

Definition at line 84 of file ezcodepage.php.

Definition at line 56 of file ezcodepage.php.

eZCodePage::convertUnicodeToString ( unicodeValues)

Definition at line 71 of file ezcodepage.php.

static eZCodePage::exists ( charset_code) [static]

Returns true if the codepage $charset_code exists.

Definition at line 331 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 25 of file ezcodepage.php.

Referenced by instance().

eZCodePage::fileModification ( charset_code)

Definition at line 361 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 341 of file ezcodepage.php.

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

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

Definition at line 758 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:
string$charset_code
bool$use_cache
Returns:
eZCodePage

Definition at line 709 of file ezcodepage.php.

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

Returns true if the codepage is valid for use.

Definition at line 696 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 502 of file ezcodepage.php.

Referenced by eZCodePage().

Returns:
the largest character value used in the mapping table.

Definition at line 688 of file ezcodepage.php.

Returns:
the lowest character value used in the mapping table.

Definition at line 680 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 724 of file ezcodepage.php.

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

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

Definition at line 672 of file ezcodepage.php.

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

Sets the permission setting for codepagefiles.

Definition at line 743 of file ezcodepage.php.

Referenced by eZScript\initialize().

Definition at line 322 of file ezcodepage.php.

eZCodePage::storeCacheObject ( filename,
permissionArray 
)

Stores the cache object.

Definition at line 392 of file ezcodepage.php.

Referenced by load().

eZCodePage::strlen ( str)

Definition at line 207 of file ezcodepage.php.

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

Definition at line 228 of file ezcodepage.php.

Definition at line 317 of file ezcodepage.php.

Definition at line 289 of file ezcodepage.php.

Referenced by convertUnicodeToString().

Definition at line 310 of file ezcodepage.php.

eZCodePage::utf8ToChar ( ucode)

Definition at line 275 of file ezcodepage.php.

eZCodePage::utf8ToCode ( ucode)

Definition at line 303 of file ezcodepage.php.


Member Data Documentation

eZCodePage::$CharsetCode

The read charset code, may differ from $RequestedCharsetCode.

Definition at line 802 of file ezcodepage.php.

eZCodePage::$CharsetEncodingScheme

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

Definition at line 804 of file ezcodepage.php.

eZCodePage::$CodeMap

Maps unicode to normal codes.

Definition at line 810 of file ezcodepage.php.

eZCodePage::$MaxCharValue

The maximum key value for the mapping tables.

Definition at line 816 of file ezcodepage.php.

eZCodePage::$MinCharValue

The minimum key value for the mapping tables.

Definition at line 814 of file ezcodepage.php.

eZCodePage::$RequestedCharsetCode

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

Definition at line 800 of file ezcodepage.php.

eZCodePage::$SubstituteChar

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

Definition at line 820 of file ezcodepage.php.

eZCodePage::$UnicodeMap

Maps normal codes to unicode.

Definition at line 806 of file ezcodepage.php.

eZCodePage::$UTF8CodeMap

Maps utf8 to normal codes.

Definition at line 812 of file ezcodepage.php.

eZCodePage::$UTF8Map

Maps normal codes to utf8.

Definition at line 808 of file ezcodepage.php.

eZCodePage::$Valid

Whether the codepage is valid or not.

Definition at line 818 of file ezcodepage.php.

const eZCodePage::CACHE_CODE_DATE = 1028204478

Definition at line 20 of file ezcodepage.php.


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