public function calculateHash($recursive = false) {
        if (!$this->loaded) {
            $this->hash = null;
        } else {
            $key = $this->type . implode(', ', $this->fields);
            if ($this->type == XMLDB_KEY_FOREIGN ||
                $this->type == XMLDB_KEY_FOREIGN_UNIQUE) {
                $key .= $this->reftable . implode(', ', $this->reffields);
            }
                    ;
            $this->hash = md5($key);
        }
    }
public function calculateHash($recursive = false) {
        if (!$this->loaded) {
            $this->hash = null;
        } else {
            $key = $this->type . implode(', ', $this->fields);
            if ($this->type == XMLDB_KEY_FOREIGN ||
                $this->type == XMLDB_KEY_FOREIGN_UNIQUE) {
                $key .= $this->reftable . implode(', ', $this->reffields);
            }
                    ;
            $this->hash = md5($key);
        }
    }
public function calculateHash ( $ recursive = false ) { if ( ! $ this -> loaded ) { $ this -> hash = null ; } else { $ key = $ this -> type . implode ( ', ' , $ this -> fields ) ; if ( $ this -> type == XMLDB_KEY_FOREIGN || $ this -> type == XMLDB_KEY_FOREIGN_UNIQUE ) { $ key .= $ this -> reftable . implode ( ', ' , $ this -> reffields ) ; } ; $ this -> hash = md5 ( $ key ) ; } }
This function calculate and set the hash of one xmldb_key
@param bool $recursive
This function calculate and set the hash of one xmldb_key