芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/lugarcollectibles.com/system/library/language.php
directory = $directory; } /** * * * @param string $key * * @return string */ public function get($key) { return (isset($this->data[$key]) ? $this->data[$key] : $key); } public function set($key, $value) { $this->data[$key] = $value; } /** * * * @return array */ public function all() { return $this->data; } /** * * * @param string $filename * @param string $key * * @return array */ public function load($filename, $key = '') { if (!$key) { $_ = array(); $file = DIR_LANGUAGE . $this->default . '/' . $filename . '.php'; if (is_file($file)) { require($file); } $file = DIR_LANGUAGE . $this->directory . '/' . $filename . '.php'; if (is_file($file)) { require($file); } $this->data = array_merge($this->data, $_); } else { // Put the language into a sub key $this->data[$key] = new Language($this->directory); $this->data[$key]->load($filename); } return $this->data; } }