Concrete subclass of PHRUTS_MessageResources that reads message keys and corresponding strings from named property resources.
The config property defines the base property resource name, and must be specified.
IMPLEMENTATION NOTE: This class trades memory for speed by caching all messages located via generalizing the PHRUTS_Locale under the original locale as well. This results in specific messages being stored in the message cache more than once, but improves response time on subsequent requests for the same locale + key combination.
This class searches for a message key for property resources in the following sequence:
config + "_" + localeLanguage + "_" + localeCountry + "_" + localeVariant config + "_" + localeLanguage + "_" + localeCountry config + "_" + localeLanguage config + "_" + default locale config
Located in /util/PHRUTS_PropertyMessageResources.php (line 50)
PHRUTS_MessageResources | --PHRUTS_PropertyMessageResources
The set of locale keys for which we have already loaded messages, keyed by the value calculated in localeKey method.
The cache of messages we have accumulated over time, keyed by the value calculated in messageKey method.
Inherited from PHRUTS_MessageResources
PHRUTS_MessageResources::$config
PHRUTS_MessageResources::$defaultLocale
PHRUTS_MessageResources::$formats
PHRUTS_MessageResources::$log
PHRUTS_MessageResources::$returnNull
Construct a new PHRUTS_PropertyMessageResources according to the specified parameters.
Returns a text message for the specified key, for the specified PHRUTS_Locale.
A null string result will be returned by this method if no relevant message resource is found. This method searches through the locale hierarchy (i.e. variant --> language --> country) for the message.
Returns a text message for the specified key, for the specified PHRUTS_Locale.
A null string result will be returned by this method if no relevant message resource is found.
Returns a text message for the specified key, for the specified PHRUTS_Locale.
A null string result will be returned by this method if no relevant message resource is found for this key or PHRUTS_Locale, if the returnNull property is set. Otherwise, an appropriate error message will be returned.
Load the messages associated with the specified PHRUTS_Locale key.
For this implementation, the config property should contain a fully qualified package and resource name, separated by periods, of a series of property resources to be loaded from the class loader that created this PHRUTS_PropertyMessageResources instance.
Inherited From PHRUTS_MessageResources
PHRUTS_MessageResources::__construct()
PHRUTS_MessageResources::formatMessage()
PHRUTS_MessageResources::getBaseMessage()
PHRUTS_MessageResources::getConfig()
PHRUTS_MessageResources::getMessage()
PHRUTS_MessageResources::getReturnNull()
PHRUTS_MessageResources::isPresent()
PHRUTS_MessageResources::localeKey()
PHRUTS_MessageResources::messageKey()
PHRUTS_MessageResources::messageKeyByLocaleKey()
PHRUTS_MessageResources::setReturnNull()
PHRUTS_MessageResources::__wakeup()
Documentation generated on Sat, 31 May 2008 15:46:28 +0200 by phpDocumentor 1.4.1