當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Lang::file方法代碼示例

本文整理匯總了PHP中Lang::file方法的典型用法代碼示例。如果您正苦於以下問題:PHP Lang::file方法的具體用法?PHP Lang::file怎麽用?PHP Lang::file使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Lang的用法示例。


在下文中一共展示了Lang::file方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * 
  * UploaderHandler Overrides
  *
  */
 function __construct($options)
 {
     $error_messages = \Lang::file('juploader', \Config::get('application.language'), 'errors');
     if (count($error_messages) == 0) {
         $error_messages = \Lang::file('juploader', 'en', 'errors');
     }
     if (count($error_messages) > 0) {
         $this->error_messages = $error_messages;
     }
     parent::__construct($options, true);
 }
開發者ID:ajayvaineela,項目名稱:laravel-juploader,代碼行數:16,代碼來源:BaseUploadHandler.php

示例2: function

Event::listen(View::loader, function ($bundle, $view) {
    return View::file($bundle, $view, Bundle::path($bundle) . 'views');
});
/*
|--------------------------------------------------------------------------
| Laravel Language Loader
|--------------------------------------------------------------------------
|
| The Laravel language loader is responsible for returning the array of
| language lines for a given bundle, language, and "file". A default
| implementation has been provided which uses the default language
| directories included with Laravel.
|
*/
Event::listen(Lang::loader, function ($bundle, $language, $file) {
    return Lang::file($bundle, $language, $file);
});
/*
|--------------------------------------------------------------------------
| Attach The Laravel Profiler
|--------------------------------------------------------------------------
|
| If the profiler is enabled, we will attach it to the Laravel events
| for both queries and logs. This allows the profiler to intercept
| any of the queries or logs performed by the application.
|
*/
if (Config::get('application.profiler')) {
    Profiler::attach();
}
/*
開發者ID:bankorh,項目名稱:ecom1_laravel,代碼行數:31,代碼來源:start.php

示例3: json_encode

			title: "<?php 
echo $config->title;
?>
",
			data: <?php 
echo json_encode($config->data);
?>
,
			actions: <?php 
echo json_encode($config->actions);
?>
,
			edit_fields: <?php 
echo json_encode($editFields['arrayFields']);
?>
,
			languages: <?php 
echo json_encode(Lang::file('administrator', Config::get('application.language'), 'knockout'));
?>
		};
</script>

<?php 
echo Form::token();
?>

<script id="settingsTemplate" type="text/html">
	<?php 
echo View::make("administrator::templates.settings");
?>
</script>
開發者ID:SerdarSanri,項目名稱:admin,代碼行數:31,代碼來源:settings.php

示例4: function

| system to retrieve the response. Feel free to modify this function to
| your tastes and the needs of your application.
|
| Similarly, we use an event to handle the display of 500 level errors
| within the application. These errors are fired when there is an
| uncaught exception thrown in the application.
|
*/
Event::listen('404', function () {
    return Response::error('404');
});
Event::listen('500', function () {
    return Response::error('500');
});
Event::listen(Laravel\Lang::loader, function ($bundle, $language, $file) {
    $lines = Lang::file($bundle, $language, $file);
    if (count($lines)) {
        Log::debug('Loaded file:' . $bundle . '\\' . $language . '\\' . $file . ' has ' . count($lines) . ' lines');
    } else {
        Log::debug('Loaded EMPTY file:' . $bundle . '\\' . $language . '\\' . $file);
    }
    return $lines;
});
/*
|--------------------------------------------------------------------------
| Route Filters
|--------------------------------------------------------------------------
|
| Filters provide a convenient method for attaching functionality to your
| routes. The built-in before and after filters are called before and
| after every request to your application, and you may even create
開發者ID:rajakhoury,項目名稱:laravel-skeleton,代碼行數:31,代碼來源:routes.php


注:本文中的Lang::file方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。