Example #1
0
 /**
  * @param array $options
  * @param bool  $recursive
  * @param bool  $reverse
  *
  * @return $this
  */
 public function mergeOptions(array $options, $recursive = false, $reverse = false)
 {
     $nameSpace = $this->getOptionNameSpace();
     if (!empty($nameSpace)) {
         $o = [];
         Config::set($nameSpace, $options, $o);
         $options = $o;
     }
     $this->getTargetConfigurableObject()->mergeOptions($options, $recursive, $reverse);
     return $this;
 }
Example #2
0
 public function testLoadOptional()
 {
     $this->assertEquals([], Config::load('non-existent.file', true));
 }
Example #3
0
 public function __construct(array $items = null, $flags = null)
 {
     parent::__construct($items, $flags);
     $this->mergeArray(['name' => null, 'version' => null, 'description' => null, 'authors' => []], true, true);
 }
Example #4
0
 public function interpolateOptions(array &$source = null, $defaultValue = null)
 {
     Config::interpolateArray($this->options, $source, $defaultValue);
     return $this;
 }