Пример #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;
 }
Пример #2
0
 public function testLoadOptional()
 {
     $this->assertEquals([], Config::load('non-existent.file', true));
 }
Пример #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);
 }
Пример #4
0
 public function interpolateOptions(array &$source = null, $defaultValue = null)
 {
     Config::interpolateArray($this->options, $source, $defaultValue);
     return $this;
 }