PHP Class Backend\Modules\Locale\Engine\CacheBuilder

Datei anzeigen Open project: forkcms/forkcms Class Usage Examples

Protected Properties

Property Type Description
$database SpoonDatabase
$locale
$types array

Public Methods

Method Description
__construct ( SpoonDatabase $database )
buildCache ( string $language, string $application )

Protected Methods

Method Description
addSpoonLocale ( array &$json, string $language ) Adds months and days from spoonLocale to the json
buildJsonCache ( string $language, string $application ) : array Builds the array that will be put in cache
dumpJsonCache ( string $language, string $application ) dumps the locale in cache as a json object
getLocale ( string $language, string $application ) : array Fetches locale for a certain language application combo

Method Details

__construct() public method

public __construct ( SpoonDatabase $database )
$database SpoonDatabase

addSpoonLocale() protected method

Adds months and days from spoonLocale to the json
protected addSpoonLocale ( array &$json, string $language )
$json array
$language string

buildCache() public method

public buildCache ( string $language, string $application )
$language string
$application string Backend or Frontend

buildJsonCache() protected method

Builds the array that will be put in cache
protected buildJsonCache ( string $language, string $application ) : array
$language string
$application string
return array

dumpJsonCache() protected method

dumps the locale in cache as a json object
protected dumpJsonCache ( string $language, string $application )
$language string
$application string

getLocale() protected method

Fetches locale for a certain language application combo
protected getLocale ( string $language, string $application ) : array
$language string
$application string
return array

Property Details

$database protected_oe property

protected SpoonDatabase $database
return SpoonDatabase

$locale protected_oe property

protected $locale

$types protected_oe property

protected array $types
return array