public function clearDocument()
    {
        $this->version = '1.0';
        $this->href = null;
        $this->scope = null;
        $this->attributes = new \StdClass();
        $this->links = new \StdClass();
        $this->items = [];
        $this->errors = null;
        return $this;
    }