本文整理匯總了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'));
}