public function onLoad(DotArray $incoming, $prefix = null)
 {
     $options_key = $prefix ? $prefix . '._options' : '_options';
     $incoming_options = $incoming->exists($options_key) ? $incoming->get($options_key) : [];
     $this->options = array_merge($this->options, $incoming_options);
     $incoming->remove($options_key);
 }
Beispiel #2
0
 public function testRemoveUnknownKey()
 {
     $d = new DotArray($this->arr);
     $d->remove('foo.bar.baz');
     $this->assertSame($this->arr, $d->get());
 }