Locale/Data.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Locale
- Subpackage
- Data
- Version
- $Id: Data.php 24766 2012-05-06 02:51:42Z adamlundrigan $
\Zend_Locale_Data
Locale data reader, handles the CLDR
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

\Zend_Cache_Core $_cache = nullInternal cache for ldml values
nullDetails- Type
- \Zend_Cache_Core
- Access
- private

boolean $_cacheDisabled = falseInternal option, cache disabled
falseDetails- Type
- boolean
- Access
- private

boolean $_cacheTags = falseInternal value to remember if cache supports tags
falseDetails- Type
- boolean

\ressource $_ldml = array()Locale files
array()Details- Type
- \ressource
- Access
- private
Methods

_calendarDetail(string $locale, array $list) : stringFind the details for supplemental calendar datas
| Name | Type | Description |
|---|---|---|
| $locale | string | Locale for Detaildata |
| $list | array | List to search |
| Type | Description |
|---|---|
| string | Key for Detaildata |

_checkLocale(string | \Zend_Locale $locale) : stringInternal function for checking the locale
| Name | Type | Description |
|---|---|---|
| $locale | string | \Zend_Locale | Locale to check |
| Type | Description |
|---|---|
| string |

_findRoute(string $locale, string $path, string $attribute, string $value, array $temp) : voidFind possible routing to other path or locale
| Name | Type | Description |
|---|---|---|
| $locale | string | |
| $path | string | |
| $attribute | string | |
| $value | string | |
| $temp | array |
| Exception | Description |
|---|---|
| \Zend_Locale_Exception |
- Access
- private

_getFile(string $locale, string $path, string $attribute = false, string $value = false, $temp = array()) : voidRead the right LDML file
| Name | Type | Description |
|---|---|---|
| $locale | string | |
| $path | string | |
| $attribute | string | |
| $value | string | |
| $temp |
- Access
- private

_readFile(string $locale, string $path, string $attribute, string $value, $temp) : arrayRead the content from locale
Can be called like:
Case 1: _readFile('ar','/ldml/delimiter') -> returns [] = test Case 1: _readFile('ar','/ldml/second[@type=myone]') -> returns [] = content Case 2: _readFile('ar','/ldml/second','type') -> returns [myone] = content; [mysecond] = content2 Case 3: _readFile('ar','/ldml/delimiter',,'right') -> returns [right] = test Case 4: _readFile('ar','/ldml/third','type','myone') -> returns [myone] = mythird
| Name | Type | Description |
|---|---|---|
| $locale | string | |
| $path | string | |
| $attribute | string | |
| $value | string | |
| $temp |
| Type | Description |
|---|---|
| array |
- Access
- private

disableCache(\unknown_type $flag) : voidDisables the cache
| Name | Type | Description |
|---|---|---|
| $flag | \unknown_type |

getCache() : \Zend_Cache_CoreReturns the set cache
| Type | Description |
|---|---|
| \Zend_Cache_Core | The set cache |

getContent(string $locale, string $path, string $value = false) : stringRead the LDML file, get a single path defined value
| Name | Type | Description |
|---|---|---|
| $locale | string | |
| $path | string | |
| $value | string |
| Type | Description |
|---|---|
| string |
- Access
- public

getList(string $locale, string $path, string $value = false) : arrayRead the LDML file, get a array of multipath defined value
| Name | Type | Description |
|---|---|---|
| $locale | string | |
| $path | string | |
| $value | string |
| Type | Description |
|---|---|
| array |
- Access
- public

setCache(\Zend_Cache_Core $cache) : voidSet a cache for Zend_Locale_Data
| Name | Type | Description |
|---|---|---|
| $cache | \Zend_Cache_Core | A cache frontend |