public function testArrayDelimGet() { $array = ['test' => ['test' => 1, 'test2' => 2]]; $val1 = delim_get($array, 'test.test'); $val2 = delim_get($array, 'test.test2'); $this->assertEquals(1, $val1); $this->assertEquals(2, $val2); }
public function get($property = null, $default = null) { if (!$default && is_array($property)) { $this->data = array(); $this->merge($property); return; } if ($property) { $result = delim_get($this->data, $property, $this->getDelimiter()); return null === $result ? $default : $result; } return $this->data; }