本文整理汇总了PHP中Illuminate\Config\Repository::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Repository::__construct方法的具体用法?PHP Repository::__construct怎么用?PHP Repository::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Config\Repository
的用法示例。
在下文中一共展示了Repository::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Create a new configuration repository.
*
* @param \Laradic\Config\Loaders\LoaderInterface $loader
* @param \Illuminate\Filesystem\Filesystem $files
* @param string $environment
*/
public function __construct(LoaderInterface $loader, Filesystem $files, $environment)
{
parent::__construct();
$this->setLoader($loader);
$this->files = $files;
$this->environment = $environment;
}
示例2: __construct
/**
* Settings constructor.
*
* @param CacheRepository $cache
* @param Manager $manager
*/
public function __construct(CacheRepository $cache, Manager $manager)
{
$this->cache = $cache;
parent::__construct($this->cache->rememberForever(self::CACHE_KEY, function () use($manager) {
return Entities\Settings::all()->pluck('value', 'name')->all();
}));
}
示例3: __construct
public function __construct(LoaderInterface $loader, $environment, $defaultPath)
{
parent::__construct($loader, $environment);
$this->defaultPath = $defaultPath;
$this->loader = $loader;
$this->files = $loader->getFilesystem();
}
示例4: __construct
/**
* Initialize the config repository and load files.
*
* @param Loader $loader
*/
public function __construct(Loader $loader)
{
parent::__construct();
$files = $loader->getFiles();
foreach ($files as $key => $path) {
$this->set($key, require $path);
}
}
示例5: __construct
public function __construct($app)
{
$this->app = $app;
$items = (array) $app->make('config');
$items = end($items);
parent::__construct($items);
$this->init();
}
示例6:
/**
* @param Finder $finder
* @param $configRoot
* @param null $envPath
*/
function __construct(Finder $finder, $configRoot, $envPath = null)
{
$this->isLoaded = false;
$this->finder = $finder;
$this->configRoot = $configRoot;
$this->envPath = $envPath;
parent::__construct();
}
示例7: __construct
/**
* Create a new configuration repository.
*
* @param LoaderInterface $loader
* @param SaverInterface $saver
* @param $environment
*/
public function __construct(LoaderInterface $loader, SaverInterface $saver, $environment)
{
$this->saver = $saver;
parent::__construct($loader, $environment);
}
示例8: __construct
/**
* @param LoaderInterface $loader
* @param string $env
* @param array $setting
*/
public function __construct(LoaderInterface $loader, $env, array $setting)
{
parent::__construct($loader, $env);
$this->setting = $setting;
}
示例9: __construct
/**
* Create a new translator instance.
* @param \Illuminate\Config\LoaderInterface $loader
* @param string $environment
* @return void
*/
public function __construct(LoaderInterface $loader, $environment)
{
parent::__construct($loader, $environment);
$appLoader = new FileLoader(new Filesystem(), app_path() . '/config');
$this->appRepository = new IlluminateRepository($appLoader, $environment);
}
示例10: __construct
public function __construct($name, $path = 'config')
{
$this->name = $name;
$this->path = $path;
parent::__construct(Config::get($name));
}
示例11: __construct
/**
* Create a new configuration repository.
*
* @param array $items
* @param FileWriter $writer
* @return void
*/
public function __construct($items = array(), $writer)
{
$this->writer = $writer;
parent::__construct($items);
}
示例12: __construct
/**
* ConfigRepo constructor.
* @param array $items
*/
public function __construct(array $items = [])
{
$items = app('config')->get('backuplay');
parent::__construct($items);
}
示例13: __construct
/**
* Create a new configuration repository.
*
* @param \Illuminate\Config\LoaderInterface $loader
* @param string $environment
* @return void
*/
public function __construct(LoaderInterface $loader, $environment)
{
$loader = new FileLoader($loader->getFilesystem(), app_path() . '/config');
parent::__construct($loader, $environment);
}
示例14: __construct
public function __construct($name)
{
$this->name = $name;
parent::__construct(Config::get($name, []));
}
示例15: __construct
/**
* Constructor.
*
* @return void
*/
public function __construct(array $items = [], CacheManager $cache = null)
{
$this->cache = $cache;
parent::__construct($items);
}