public function calculateHash($recursive = false) {
        if (!$this->loaded) {
            $this->hash = null;
        } else {
            $key = $this->name . $this->path . $this->comment;
            if ($this->tables) {
                foreach ($this->tables as $tbl) {
                    $table = $this->getTable($tbl->getName());
                    if ($recursive) {
                        $table->calculateHash($recursive);
                    }
                    $key .= $table->getHash();
                }
            }
            $this->hash = md5($key);
        }
    }
public function calculateHash($recursive = false) {
        if (!$this->loaded) {
            $this->hash = null;
        } else {
            $key = $this->name . $this->path . $this->comment;
            if ($this->tables) {
                foreach ($this->tables as $tbl) {
                    $table = $this->getTable($tbl->getName());
                    if ($recursive) {
                        $table->calculateHash($recursive);
                    }
                    $key .= $table->getHash();
                }
            }
            $this->hash = md5($key);
        }
    }
public function calculateHash ( $ recursive = false ) { if ( ! $ this -> loaded ) { $ this -> hash = null ; } else { $ key = $ this -> name . $ this -> path . $ this -> comment ; if ( $ this -> tables ) { foreach ( $ this -> tables as $ tbl ) { $ table = $ this -> getTable ( $ tbl -> getName ( ) ) ; if ( $ recursive ) { $ table -> calculateHash ( $ recursive ) ; } $ key .= $ table -> getHash ( ) ; } } $ this -> hash = md5 ( $ key ) ; } }
This function calculate and set the hash of one xmldb_structure
@param bool $recursive
This function calculate and set the hash of one xmldb_structure