Beispiel #1
0
 /**
  * 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;
 }
Beispiel #2
0
 /**
  * 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();
     }));
 }
Beispiel #3
0
 public function __construct(LoaderInterface $loader, $environment, $defaultPath)
 {
     parent::__construct($loader, $environment);
     $this->defaultPath = $defaultPath;
     $this->loader = $loader;
     $this->files = $loader->getFilesystem();
 }
Beispiel #4
0
 /**
  * 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);
     }
 }
Beispiel #5
0
 public function __construct($app)
 {
     $this->app = $app;
     $items = (array) $app->make('config');
     $items = end($items);
     parent::__construct($items);
     $this->init();
 }
Beispiel #6
0
 /**
  * @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();
 }
 /**
  * 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);
 }
Beispiel #8
0
 /**
  * @param LoaderInterface $loader
  * @param string $env
  * @param array $setting
  */
 public function __construct(LoaderInterface $loader, $env, array $setting)
 {
     parent::__construct($loader, $env);
     $this->setting = $setting;
 }
Beispiel #9
0
 /**
  * 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);
 }
Beispiel #10
0
 public function __construct($name, $path = 'config')
 {
     $this->name = $name;
     $this->path = $path;
     parent::__construct(Config::get($name));
 }
Beispiel #11
0
 /**
  * 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);
 }
Beispiel #12
0
 /**
  * ConfigRepo constructor.
  * @param array $items
  */
 public function __construct(array $items = [])
 {
     $items = app('config')->get('backuplay');
     parent::__construct($items);
 }
Beispiel #13
0
 /**
  * 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);
 }
Beispiel #14
0
 public function __construct($name)
 {
     $this->name = $name;
     parent::__construct(Config::get($name, []));
 }
Beispiel #15
0
 /**
  * Constructor.
  *
  * @return void
  */
 public function __construct(array $items = [], CacheManager $cache = null)
 {
     $this->cache = $cache;
     parent::__construct($items);
 }