public function setValueByPath($path, $value)
    {
        if (is_string($path)) {
            $path = $this->parsePath($path);
        }

        $endPart = array_pop($path);
        $child = & $this->data;

        foreach ($path as $part) {
            if (isset($child[$part])) {
                $child = & $child[$part];
            } else {
                $child[$part] = [];
                $child = & $child[$part];
            }
        }

        $child[$endPart] = $value;
    }
public function setValueByPath($path, $value)
    {
        if (is_string($path)) {
            $path = $this->parsePath($path);
        }

        $endPart = array_pop($path);
        $child = & $this->data;

        foreach ($path as $part) {
            if (isset($child[$part])) {
                $child = & $child[$part];
            } else {
                $child[$part] = [];
                $child = & $child[$part];
            }
        }

        $child[$endPart] = $value;
    }
public function setValueByPath ( $ path , $ value ) { if ( is_string ( $ path ) ) { $ path = $ this -> parsePath ( $ path ) ; } $ endPart = array_pop ( $ path ) ; $ child = & $ this -> data ; foreach ( $ path as $ part ) { if ( isset ( $ child [ $ part ] ) ) { $ child = & $ child [ $ part ] ; } else { $ child [ $ part ] = [ ] ; $ child = & $ child [ $ part ] ; } } $ child [ $ endPart ] = $ value ; }
Assign a value by path within the DataSet instance,
overwrites any existing value.

@see $currentPath
@param string|array $path A path in internal or human format.
@param string|int|array|null $value The value to assign.
Assign a value by path within the DataSet instance overwrites any existing value .