Property | Type | Description | |
---|---|---|---|
$cache | Neos\Cache\Frontend\VariableFrontend | ||
$cacheKey | string | Key used to store / retrieve cached data | |
$cldrBasePath | string | An absolute path to the directory where CLDR resides. It is changed only in tests. | |
$cldrParser | |||
$parsedData | array | ||
$sourcePaths | array |
Absolute path or path to the files represented by this class' instance. |
Method | Description | |
---|---|---|
__construct ( array $sourcePaths ) | Contructs the model | |
findNodesWithinPath ( string $path, string $nodeName ) : mixed | Returns all nodes with given name found within given path | |
getAttributeValue ( string $nodeString, string $attributeName ) : mixed | Parses the node string and returns a value of attribute for name provided. | |
getElement ( string $path ) : mixed | Returns string value from a path given. | |
getNodeName ( string $nodeString ) : string | Returns node name extracted from node string | |
getRawArray ( string $path ) : mixed | Returns multi-dimensional array representing desired node and it's children. | |
getRawData ( string $path ) : mixed | Returns multi-dimensional array representing desired node and it's children, or a string value if the path points to a leaf. | |
initializeObject ( ) : void | When it's called, CLDR file is parsed or cache is loaded, if available. | |
injectCache ( Neos\Cache\Frontend\VariableFrontend $cache ) : void | Injects the Flow_I18n_Cldr_CldrModelCache cache | |
injectParser ( |
Method | Description | |
---|---|---|
mergeTwoParsedFiles ( mixed $firstParsedData, mixed $secondParsedData ) : array | Merges two sets of data from two separate CLDR files into one array. | |
parseFiles ( array $sourcePaths ) : array | Parses given CLDR files using CldrParser and merges parsed data. | |
resolveAliases ( mixed $data, string $currentPath ) : mixed | Resolves any 'alias' nodes in parsed CLDR data. |
public __construct ( array $sourcePaths ) | ||
$sourcePaths | array |
public getElement ( string $path ) : mixed | ||
$path | string | A path to the element to get |
return | mixed | String with desired element, or FALSE on failure |
public static getNodeName ( string $nodeString ) : string | ||
$nodeString | string | String with node name and optional attribute(s) |
return | string | Name of the node |
public getRawArray ( string $path ) : mixed | ||
$path | string | A path to the node to get |
return | mixed | Array of matching data, or FALSE on failure |
public getRawData ( string $path ) : mixed | ||
$path | string | A path to the node to get |
return | mixed | Array or string of matching data, or FALSE on failure |
public initializeObject ( ) : void | ||
return | void |
public injectCache ( Neos\Cache\Frontend\VariableFrontend $cache ) : void | ||
$cache | Neos\Cache\Frontend\VariableFrontend | |
return | void |
public injectParser ( |
||
$parser | ||
return | void |
protected parseFiles ( array $sourcePaths ) : array | ||
$sourcePaths | array | |
return | array | Parsed and merged data |
protected VariableFrontend,Neos\Cache\Frontend $cache | ||
return | Neos\Cache\Frontend\VariableFrontend |
protected string $cacheKey | ||
return | string |
protected string $cldrBasePath | ||
return | string |
protected CldrParser,Neos\Flow\I18n\Cldr $cldrParser | ||
return |