Class Locale
Independent LDML-based access to locale information with cache integration.
- Core\Object implements Core\Chainable
- Core\Set implements Core\Accessor
- Core\Locale
Direct known subclasses
Package: Core\Locale
Since: 3.0
Requires: PHP 5.3
Version: 1.0
Located at Locale.inc.php
Methods summary
protected
|
|
public static
|
#
active( integer $categories = self::All )
Returns the currently active locale instances for a given set of categories. |
public static
|
|
public static
|
|
public static
boolean
|
|
public static
Locale_Iterator
|
|
public static
boolean
|
#
valid( $name )
Validates a locale name. To test, whether a locale is supported, use
the |
protected static
array
|
#
_parseLocale( string $locale )
Parses a given locale name and returns an associative array of all name components. |
public
string
|
#
hash( )
Returns a hash value for the current instance that is unique for each object but equal for all equal objects. The default implementation returns the SPL object hash. The hash value is solely based on the locale name. |
public
mixed
|
|
public static
string
|
#
resourcePathFor( string $type, string $object = null )
Returns the resource path for a given resource type or object name. |
public
boolean
|
Methods inherited from Core\Object
__autocreateFactory()
,
__call()
,
__processParameters()
,
__toString()
,
attachMethod()
,
chain()
,
getValueForKey()
,
getValueForKeyPath()
,
getValueForUndefinedKey()
,
issetValueForKey()
,
setValueForKey()
,
setValueForKeyPath()
,
setValueForUndefinedKey()
,
uuid()
Constants summary
integer |
All
Sets a locale for all categories. |
#
0x3f
|
integer |
Collate
Sets a locale for string comparison. |
#
0x01
|
integer |
CharacterType
Sets a locale for character classification and conversion. |
#
0x02
|
integer |
Monetary
Sets a locale for monetary functions. |
#
0x04
|
integer |
Numeric
Sets a locale for the decimal separator. |
#
0x08
|
integer |
Time
Sets a locale for date and time formatting. |
#
0x10
|
integer |
Messages
Sets a locale for system responses. |
#
0x20
|
string |
CacheClass
Cache class used for parsed LDML data. |
#
'CoreLocale'
|
string |
LDMLResourceType
Resource type for CLDR data in LDML (XML) format. |
#
'ldml'
|
Constants inherited from Core\Object
AnyParameterType
,
AutochainParameterType
,
AutocreateParameterType
,
BooleanParameterType
,
CharParameterType
,
EnumParameterType
,
IntegerParameterType
,
RealParameterType
,
StringParameterType
,
UserParameterType
Properties summary
protected static
array
|
$_activeInstances
Active instances per locale category. |
#
array (
self::Collate => null,
self::CharacterType => null,
self::Monetary => null,
self::Numeric => null,
self::Time => null,
self::Messages => null,
)
|
protected
|
$_v_data
Root data node of this locale. |
|
protected
string
|
$_v_language
Language code of this locale. |
|
protected
string
|
$_v_name
Standardised name of this locale. |
|
protected
array
|
$_v_options
Associative options array from locale initialisation. |
|
protected
string
|
$_v_script
Script name of this locale. |
|
protected
string
|
$_v_territory
Territory code of this locale. |
|
protected
string
|
$_v_variant
Variant identifier of this locale. |
Magic properties
public
string
|
$name
Standardised name of this locale. |
public read-only
|
$data
Root data node of this locale. |
public read-only
string
|
$language
Language code of this locale. |
public read-only
array
|
$options
Associative options array from locale initialisation. |
public read-only
string
|
$script
Script name of this locale. |
public read-only
string
|
$territory
Territory code of this locale. |
public read-only
string
|
$variant
Variant identifier of this locale. |