Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function write(Config $config, $target)
 {
     $file = new File($target);
     if ($file->exists()) {
         throw new \LogicException(sprintf("Config target file already exists '%s'", $target));
     }
     $data = sprintf("<?php\n\n// \nreturn %s;\n", var_export($config->getData(), true));
     $file->write($data);
     return $this;
 }
Exemplo n.º 2
0
 /**
  * Merge with another config
  *
  * @param Config $config
  *
  * @return $this
  */
 public function extend(Config $config)
 {
     $this->data = $this->merge($this->data, $config->getData());
     return $this;
 }