[李景山php]每天laravel-20161024|ArrayLoader.php
来源:互联网 发布:ai软件基础工具教程 编辑:程序博客网 时间:2024/05/17 03:12
<?phpnamespace Illuminate\Translation;// set namespaceclass ArrayLoader implements LoaderInterface{// a arrayloader to implements loader Interface /** * All of the translation messages. * * @var array */ protected $messages = [];// the big store to save the message /** * Load the messages for the given locale. * * @param string $locale * @param string $group * @param string $namespace * @return array */ public function load($locale, $group, $namespace = null) {// load the messages for the given locale. $namespace = $namespace ?: '*';//set the default namespace if (isset($this->messages[$namespace][$locale][$group])) {// if set then return it return $this->messages[$namespace][$locale][$group]; } return [];//default return null } /** * Add a new namespace to the loader. * * @param string $namespace * @param string $hint * @return void */ public function addNamespace($namespace, $hint) { // }//Add a new namespace to the loader /** * Add messages to the loader. * * @param string $locale * @param string $group * @param array $messages * @param string|null $namespace * @return $this */ public function addMessages($locale, $group, array $messages, $namespace = null) {// Add messages to the loader $namespace = $namespace ?: '*';//set the default namespace $this->messages[$namespace][$locale][$group] = $messages;// set the message return $this;// return this instance }}
0 0
- [李景山php]每天laravel-20161024|ArrayLoader.php
- [李景山php]每天laravel-20160922|RedisServicProvider.php
- [李景山php]每天laravel-20160923|Hub.php
- [李景山php]每天laravel-20160924|PiplineServiceProvider.php
- [李景山php]每天laravel-20160925|Pipeline.php
- [李景山php]每天laravel-20160926|DatabasePresenceVerifier.php
- [李景山php]每天laravel-20160927|Factory.php
- [李景山php]每天laravel-20160928|PresenceVerifierInterface.php
- [李景山php]每天laravel-20160929|ValidatesWhenResolved.php
- [李景山php]每天laravel-20160930|ValidationException.php
- [李景山php]每天laravel-20161001|ValidationServiceProvider.php
- [李景山php]每天laravel-20161016|JsonResponse.php
- [李景山php]每天laravel-20161017|ResponseTrait.php
- [李景山php]每天laravel-20161017|UploadedFile.php
- [李景山php]每天laravel-20161023|Reponse.php
- [李景山php]每天laravel-20161025|LoaderInterface.php
- [李景山php]每天laravel-20161026|TranslationServiceProvider.php
- [李景山php]每天laravel-20161026|TranslationServiceProvider.php
- Windows系统 AndroidStudio检测不到模拟器的解决方案
- Java(抽象类与抽象方法)
- HTML颜色名称和颜色代码表
- SecureCRT连接Linux显示Mysql记录中文乱码
- 元素内容必须由格式正确的字符数据或标记组成
- [李景山php]每天laravel-20161024|ArrayLoader.php
- 原型模式——对象创建型模式
- CentOS 6 服务器安全策略配置
- 手机号码实名认证
- 设计模式--单例模式
- 公共模板和模板布局
- [李景山php]每天laravel-20161025|LoaderInterface.php
- tftp服务
- 占位