public function appendAttributes(array $attrs, $options = ["option" => "append"]) {
        $url = "entities/{$this->_id}/attrs";

        if ($this->_type) {
            $url .= "?type={$this->_type}";
        }

        if (count($options) > 0) {
            $prefix = ($this->_type) ? "&" : "?";
            $url .= $prefix . urldecode(http_build_query($options));
        }

        $updateEntity = new ContextFactory($attrs);
        return $this->_orion->create($url, $updateEntity);
    }
public function appendAttributes(array $attrs, $options = ["option" => "append"]) {
        $url = "entities/{$this->_id}/attrs";

        if ($this->_type) {
            $url .= "?type={$this->_type}";
        }

        if (count($options) > 0) {
            $prefix = ($this->_type) ? "&" : "?";
            $url .= $prefix . urldecode(http_build_query($options));
        }

        $updateEntity = new ContextFactory($attrs);
        return $this->_orion->create($url, $updateEntity);
    }
public function appendAttributes ( array $ attrs , $ options = [ "option" => "append" ] ) { $ url = "entities/{$this->_id}/attrs" ; if ( $ this -> _type ) { $ url .= "?type={$this->_type}" ; } if ( count ( $ options ) > 0 ) { $ prefix = ( $ this -> _type ) ? "&" : "?" ; $ url .= $ prefix . urldecode ( http_build_query ( $ options ) ) ; } $ updateEntity = new ContextFactory ( $ attrs ) ; return $ this -> _orion -> create ( $ url , $ updateEntity ) ; }
Update or Append new attributes
@param array $attrs
@return \Orion\Utils\HttpRequest
Update or Append new attributes