Backend\Modules\Locale\Engine\CacheBuilder::buildJsonCache PHP Метод

buildJsonCache() защищенный Метод

Builds the array that will be put in cache
protected buildJsonCache ( string $language, string $application ) : array
$language string
$application string
Результат array
    protected function buildJsonCache($language, $application)
    {
        // init var
        $json = array();
        foreach ($this->types as $type) {
            // loop locale
            foreach ($this->locale as $i => $item) {
                // types match
                if ($item['type'] == $type) {
                    if ($application == 'Backend') {
                        $json[$type][$item['module']][$item['name']] = $item['value'];
                    } else {
                        $json[$type][$item['name']] = $item['value'];
                    }
                }
            }
        }
        $this->addSpoonLocale($json, $language);
        return $json;
    }