src/Titon/Db/Repository.php
public function getSchema() {
        if ($this->_schema instanceof Schema) {
            return $this->_schema;

        // Manually defined columns
        // Allows for full schema and key/index support
        } else if ($this->_schema && is_array($this->_schema)) {
            $columns = $this->_schema;

        // Inspect database for columns
        // This approach should only be used for validating columns and types
        } else {
            $columns = $this->getDriver()->describeTable($this->getTable());
        }

        $this->setSchema(new Schema($this->getTable(), $columns));

        return $this->_schema;
    }
public function getSchema() {
        if ($this->_schema instanceof Schema) {
            return $this->_schema;

        // Manually defined columns
        // Allows for full schema and key/index support
        } else if ($this->_schema && is_array($this->_schema)) {
            $columns = $this->_schema;

        // Inspect database for columns
        // This approach should only be used for validating columns and types
        } else {
            $columns = $this->getDriver()->describeTable($this->getTable());
        }

        $this->setSchema(new Schema($this->getTable(), $columns));

        return $this->_schema;
    }
public function getSchema ( ) { if ( $ this -> _schema instanceof Schema ) { return $ this -> _schema ; // Manually defined columns // Allows for full schema and key/index support } else if ( $ this -> _schema && is_array ( $ this -> _schema ) ) { $ columns = $ this -> _schema ; // Inspect database for columns // This approach should only be used for validating columns and types } else { $ columns = $ this -> getDriver ( ) -> describeTable ( $ this -> getTable ( ) ) ; } $ this -> setSchema ( new Schema ( $ this -> getTable ( ) , $ columns ) ) ; return $ this -> _schema ; }
Return a schema object that represents the database table.

@return \Titon\Db\Driver\Schema
Return a schema object that represents the database table .