protected function isLoaded($table = null, $database = null)
    {
        //if no table
        if (is_null($table)) {
            //if no default table either
            if (!$this->table) {
                return false;
            }
            
            $table = $this->table;
        }
        
        //if no database
        if (is_null($database)) {
            //and no default database
            if (!$this->database) {
                return false;
            }
            
            $database = $this->database;
        }
        
        $meta = $this->getMeta($table, $database);
        
        return $this->isPrimarySet($meta[self::PRIMARY]);
    }
protected function isLoaded($table = null, $database = null)
    {
        //if no table
        if (is_null($table)) {
            //if no default table either
            if (!$this->table) {
                return false;
            }
            
            $table = $this->table;
        }
        
        //if no database
        if (is_null($database)) {
            //and no default database
            if (!$this->database) {
                return false;
            }
            
            $database = $this->database;
        }
        
        $meta = $this->getMeta($table, $database);
        
        return $this->isPrimarySet($meta[self::PRIMARY]);
    }
protected function isLoaded ( $ table = null , $ database = null ) { //if no table if ( is_null ( $ table ) ) { //if no default table either if ( ! $ this -> table ) { return false ; } $ table = $ this -> table ; } //if no database if ( is_null ( $ database ) ) { //and no default database if ( ! $ this -> database ) { return false ; } $ database = $ this -> database ; } $ meta = $ this -> getMeta ( $ table , $ database ) ; return $ this -> isPrimarySet ( $ meta [ self :: PRIMARY ] ) ; }
Checks to see if the model is populated

@param string|null         $table    Table name
@param Eden\Sql\Index|null $database Database object

@return Eden\Sql\Model
Checks to see if the model is populated