Beispiel #1
0
 /**
  * Loads the configuration into environment
  * @return  $this
  */
 public function load()
 {
     $data = ArrayDot::flatten($this->loader->load('.env', null));
     foreach ($data as $key => $value) {
         $this->set($key, $value);
     }
     return $this;
 }
Beispiel #2
0
 /**
  * {@inheritdoc}
  */
 public function set($key, $value)
 {
     list($namespace, $group, $item) = $this->parseKey($key);
     $collection = $this->getCollection($group, $namespace);
     $this->load($group, $namespace, $collection);
     if (is_null($item)) {
         $this->items[$collection] = $value;
     } else {
         ArrayDot::set($this->items[$collection], $item, $value);
     }
 }