src/Database/Model.php
protected static function loadSchema()
    {
        // Make sure there's a place to store the schema
        if (!array_key_exists(static::table(), static::$_schema)) {
            static::$_schema[static::table()] = null;
        }

        // Make sure we haven't already fetched
        // the tables schema.
        if (static::$_schema[static::table()] === null) {
            $result = static::connection()->prepare("DESCRIBE `" . static::table() . "`")->exec();
            foreach ($result->fetchAll(\PDO::FETCH_COLUMN) as $column) {
                static::$_schema[static::table()][$column['Field']] = array(
                    'type'    => $column['Type'],
                    'default' => $column['Default'],
                    'null'    => $column['Null'] == 'NO' ? false : true,
                    'key'     => $column['Key'],
                    'extra'   => $column['Extra']
                );
            }
        }
    }
protected static function loadSchema()
    {
        // Make sure there's a place to store the schema
        if (!array_key_exists(static::table(), static::$_schema)) {
            static::$_schema[static::table()] = null;
        }

        // Make sure we haven't already fetched
        // the tables schema.
        if (static::$_schema[static::table()] === null) {
            $result = static::connection()->prepare("DESCRIBE `" . static::table() . "`")->exec();
            foreach ($result->fetchAll(\PDO::FETCH_COLUMN) as $column) {
                static::$_schema[static::table()][$column['Field']] = array(
                    'type'    => $column['Type'],
                    'default' => $column['Default'],
                    'null'    => $column['Null'] == 'NO' ? false : true,
                    'key'     => $column['Key'],
                    'extra'   => $column['Extra']
                );
            }
        }
    }
protected static function loadSchema ( ) { // Make sure there's a place to store the schema if ( ! array_key_exists ( static :: table ( ) , static :: $ _schema ) ) { static :: $ _schema [ static :: table ( ) ] = null ; } // Make sure we haven't already fetched // the tables schema. if ( static :: $ _schema [ static :: table ( ) ] === null ) { $ result = static :: connection ( ) -> prepare ( "DESCRIBE `" . static :: table ( ) . "`" ) -> exec ( ) ; foreach ( $ result -> fetchAll ( \ PDO :: FETCH_COLUMN ) as $ column ) { static :: $ _schema [ static :: table ( ) ] [ $ column [ 'Field' ] ] = array ( 'type' => $ column [ 'Type' ] , 'default' => $ column [ 'Default' ] , 'null' => $ column [ 'Null' ] == 'NO' ? false : true , 'key' => $ column [ 'Key' ] , 'extra' => $ column [ 'Extra' ] ) ; } } }
Used to fetch the tables schema.

@access protected
Used to fetch the tables schema .