/** * {@inheritdoc} * * @param string $tableName * @return \Doctrine\DBAL\Schema\Table * @throws SchemaException */ public function getTable($tableName) { $tableName = $this->getFullQualifiedAssetNameDenormalised($tableName); if (!isset($this->_tables[$tableName])) { throw SchemaException::tableDoesNotExist($tableName); } return $this->_tables[$tableName]; }
/** * constructor * @param string $table_name * @param Connection $conn */ public function __construct($table_name, \Doctrine\DBAL\Connection $conn) { $this->conn = $conn; $this->table_name = $table_name; $this->quoted_table_name = $this->conn->quoteIdentifier($this->table_name); $this->sm = $this->conn->getSchemaManager(); if (!$this->sm->tablesExist([$table_name])) { throw Schema\SchemaException::tableDoesNotExist($table_name); } foreach ($this->sm->listTableColumns($this->table_name) as $colum) { $this->columns[$colum->getName()] = $colum; $this->column_types[$colum->getName()] = $colum->getType()->getName(); } }
/** * @param string $tableName * @return Table */ public function getTable($tableName) { $tableName = strtolower($tableName); if (!isset($this->_tables[$tableName])) { throw SchemaException::tableDoesNotExist($tableName); } return $this->_tables[$tableName]; }