public function set($path, $value)
    {
        if ($value instanceof ValueReference) {
            $value = $value->get($this);
        }

        if (\is_array($value) || \is_object($value)) {
            $value = StructureHelper::toArray($value, true);
        }

        StructureHelper::setByPath($this->data, $path, $value, $this->separator);

        return $this;
    }
public function set($path, $value)
    {
        if ($value instanceof ValueReference) {
            $value = $value->get($this);
        }

        if (\is_array($value) || \is_object($value)) {
            $value = StructureHelper::toArray($value, true);
        }

        StructureHelper::setByPath($this->data, $path, $value, $this->separator);

        return $this;
    }
public function set ( $ path , $ value ) { if ( $ value instanceof ValueReference ) { $ value = $ value -> get ( $ this ) ; } if ( \ is_array ( $ value ) || \ is_object ( $ value ) ) { $ value = StructureHelper :: toArray ( $ value , true ) ; } StructureHelper :: setByPath ( $ this -> data , $ path , $ value , $ this -> separator ) ; return $ this ; }
Set a structure value and convert object to array.

@param   string $path  Structure Path (e.g. foo.content.showauthor)
@param   mixed  $value Value of entry.

@return  static  Return self to support chaining.

@since   2.0
Set a structure value and convert object to array .