public function setData($data) { foreach (array_dot($data) as $key => $value) { $arrKey = explode('.', $key); $locale = array_pop($arrKey); $item = implode($arrKey, '.'); $this->setLine($item, $locale, $value); } }
/** * @param string $source 데이터 소스 * @return LangData */ public function load($source) { $data = $this->files->getRequire($source); $langData = new LangData(); $langData->setData($data); return $langData; }