lithium\g11n\Message::cache()
Returns or sets the page cache used for mapping message ids to translations.
Parameters
-
array
$cache
A multidimensional array to use when pre-populating the cache. The structure of the array is
scope/locale/id
. Iffalse
, the cache is cleared.
Returns
arrayReturns an array of cached pages, formatted per the description for $cache
.
Source
public static function cache($cache = null) {
if ($cache === false) {
static::$_cachedPages = [];
}
if (is_array($cache)) {
static::$_cachedPages += $cache;
}
return static::$_cachedPages;
}