示例#1
0
文件: DotArray.php 项目: nochso/omni
 /**
  * trySet sets a value at a certain path, expecting arrays or missing elements along the way.
  *
  * If any of the visited elements is not an array, a \RuntimeException is thrown.
  *
  * Use this if you want to avoid overwriting existing non-array values.
  *
  * @param string $path
  * @param mixed  $value
  *
  * @throws \RuntimeException
  */
 public function trySet($path, $value)
 {
     Dot::trySet($this->data, $path, $value);
 }