本文整理汇总了PHP中Illuminate\Translation\Translator::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Translator::__construct方法的具体用法?PHP Translator::__construct怎么用?PHP Translator::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Translation\Translator
的用法示例。
在下文中一共展示了Translator::__construct方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Create a new translator instance.
* @param \Illuminate\Translation\LoaderInterface $loader
* @param string $locale
* @param \Illuminate\Filesystem\Filesystem $files
* @return void
*/
public function __construct(LoaderInterface $loader, $locale, $fallbackLocale, Filesystem $files)
{
parent::__construct($loader, $locale);
parent::setFallback($fallbackLocale);
$appLoader = new FileLoader($files, app_path() . '/lang');
$this->appTranslator = new IlluminateTranslator($appLoader, $locale);
}
示例2: __construct
/**
* Translator constructor.
*/
public function __construct(Application $app, LoaderInterface $loader, $locale)
{
parent::__construct($loader, $locale);
$this->suspendInPlaceEdit = 0;
$this->inPlaceEditing = null;
$this->useDB = 1;
// fill in missing keys from DB by default
$this->app = $app;
}
示例3: __construct
public function __construct(LoaderInterface $loader, $locale, $debugbar)
{
$this->debugbar = $debugbar;
parent::__construct($loader, $locale);
}
示例4: __construct
public function __construct(LoaderInterface $database, LoaderInterface $loader, $locale, Application $app)
{
$this->database = $database;
$this->app = $app;
parent::__construct($loader, $locale);
}
示例5: __construct
/**
* Build the language class
*
* @param Container $app
*/
public function __construct(Container $app)
{
$this->app = $app;
$this->domain = $app['config']->get('polyglot::domain');
parent::__construct($app['translation.loader'], $app['config']->get('app.locale'));
}