Пример #1
0
    /**
     * Get table
     * 
     * @param  string $table
     * @param  string $schema
     * @param  string $database
     * @return Object\TableObject 
     */
    public function getTable($table, $schema = null)
    {
        $tableObj = new Object\TableObject($table);
        $tableObj->setColumns($this->getColumns($table));
        $tableObj->setConstraints($this->getConstraints($table, $schema));

        return $tableObj;
    }
Пример #2
0
 /**
  * Get table
  * 
  * @param  string $tableName
  * @param  string $schema
  * @param  string $database
  * @return Object\TableObject 
  */
 public function getTable($tableName, $schema = null)
 {
     // set values for database & schema
     $database = $database ?: '__DEFAULT_DB__';
     if ($schema == null && $this->defaultSchema != null) {
         $schema = $this->defaultSchema;
     }
     $table = new Object\TableObject($tableName);
     $table->setColumns($this->getColumns($tableName, $schema, $database));
     return $table;
 }