/**
  * @author Andreas Glaser
  */
 public function testGet()
 {
     foreach ($this->array as $key => $value) {
         $this->assertEquals($value, ArrayHelper::get($this->array, $key));
     }
     foreach ($this->arrayAssoc as $key => $value) {
         $this->assertEquals($value, ArrayHelper::get($this->arrayAssoc, $key));
     }
 }
예제 #2
0
 /**
  * @param $path
  *
  * @return null
  * @author Andreas Glaser
  */
 protected function pathToAlias($path)
 {
     if ($this->autoRootAlias) {
         $path = $this->autoRootAlias . '.' . $path;
     }
     $lastPos = strrpos($path, '.');
     $field = substr($path, $lastPos + 1);
     $path = substr($path, 0, $lastPos);
     return ArrayHelper::get($this->aliasMap, $path) . '.' . $field;
 }