private function isUpToDate($path, Table &$table) {
        $classPath = $this->getClassPath(get_called_class());
        $return = null;
        // update if any parent is changed
        foreach (class_parents(get_called_class()) as $parent) {
            if ($parent === get_class())
                break;

            $parent = str_replace(array(
                'DScribe', 'DBScribe', 'DSLive'
                    ), array(
                'd-scribe/core/src', 'd-scribe/db-scribe/src', 'd-scribe/ds-live/src'
                    ), $parent);

            $parentPath = $this->getClassPath($parent);
            if (!is_readable($path) ||
                    (is_readable($path) && is_readable($parentPath) && filemtime($classPath) < filemtime($parentPath))) {
                $return = $this->prepareUpdate($path, $table);
                break;
            }
        }

        if ($return === null && (!is_readable($path) ||
                (is_readable($path) &&
                @filemtime($path) < @filemtime(MODULES . str_replace('\\', '/', get_called_class()) . '.php')))) {
            $return = $this->prepareUpdate($path, $table);
        }

        if (count($this->getCachedSettings()) !== count($table->getColumns(true))) {
            foreach ($this->getModelTable($this->getTableName()) as $class) {
                unlink(DATA . 'mapper' . DIRECTORY_SEPARATOR . str_replace('\\', '.', $class));
            }
//            return $this->isUpToDate($path, $table);
        }
        return ($return === null) ? false : $return;
    }
private function isUpToDate($path, Table &$table) {
        $classPath = $this->getClassPath(get_called_class());
        $return = null;
        // update if any parent is changed
        foreach (class_parents(get_called_class()) as $parent) {
            if ($parent === get_class())
                break;

            $parent = str_replace(array(
                'DScribe', 'DBScribe', 'DSLive'
                    ), array(
                'd-scribe/core/src', 'd-scribe/db-scribe/src', 'd-scribe/ds-live/src'
                    ), $parent);

            $parentPath = $this->getClassPath($parent);
            if (!is_readable($path) ||
                    (is_readable($path) && is_readable($parentPath) && filemtime($classPath) < filemtime($parentPath))) {
                $return = $this->prepareUpdate($path, $table);
                break;
            }
        }

        if ($return === null && (!is_readable($path) ||
                (is_readable($path) &&
                @filemtime($path) < @filemtime(MODULES . str_replace('\\', '/', get_called_class()) . '.php')))) {
            $return = $this->prepareUpdate($path, $table);
        }

        if (count($this->getCachedSettings()) !== count($table->getColumns(true))) {
            foreach ($this->getModelTable($this->getTableName()) as $class) {
                unlink(DATA . 'mapper' . DIRECTORY_SEPARATOR . str_replace('\\', '.', $class));
            }
//            return $this->isUpToDate($path, $table);
        }
        return ($return === null) ? false : $return;
    }
private function isUpToDate ( $ path , Table & $ table ) { $ classPath = $ this -> getClassPath ( get_called_class ( ) ) ; $ return = null ; // update if any parent is changed foreach ( class_parents ( get_called_class ( ) ) as $ parent ) { if ( $ parent === get_class ( ) ) break ; $ parent = str_replace ( array ( 'DScribe' , 'DBScribe' , 'DSLive' ) , array ( 'd-scribe/core/src' , 'd-scribe/db-scribe/src' , 'd-scribe/ds-live/src' ) , $ parent ) ; $ parentPath = $ this -> getClassPath ( $ parent ) ; if ( ! is_readable ( $ path ) || ( is_readable ( $ path ) && is_readable ( $ parentPath ) && filemtime ( $ classPath ) < filemtime ( $ parentPath ) ) ) { $ return = $ this -> prepareUpdate ( $ path , $ table ) ; break ; } } if ( $ return === null && ( ! is_readable ( $ path ) || ( is_readable ( $ path ) && @ filemtime ( $ path ) < @ filemtime ( MODULES . str_replace ( '\\' , '/' , get_called_class ( ) ) . '.php' ) ) ) ) { $ return = $ this -> prepareUpdate ( $ path , $ table ) ; } if ( count ( $ this -> getCachedSettings ( ) ) !== count ( $ table -> getColumns ( true ) ) ) { foreach ( $ this -> getModelTable ( $ this -> getTableName ( ) ) as $ class ) { unlink ( DATA . 'mapper' . DIRECTORY_SEPARATOR . str_replace ( '\\' , '.' , $ class ) ) ; } //            return $this->isUpToDate($path, $table); } return ( $ return === null ) ? false : $ return ; }
Checks if the table is uptodate with the mapper settings
@param string $path Path to save the schema to
@param Table $table
@return boolean
Checks if the table is uptodate with the mapper settings