Doctrine\ORM\Mapping\Driver\DatabaseDriver
The DatabaseDriver reverse engineers the mapping metadata from a database.
- Author: Guilherme Blanco <guilhermeblanco@hotmail.com>
Synopsis
class DatabaseDriver
implements
MappingDriver
{
- // members
- private AbstractSchemaManager $_sm;
- private array $tables;
- private array $classToTableNames;
- private array $manyToManyTables;
- private array $classNamesForTables;
- private array $fieldNamesForColumns;
- private string $namespace;
- // methods
- public void __construct()
- public void setTables()
- private void reverseEngineerMappingFromDatabase()
- public void loadMetadataForClass()
- public void isTransient()
- public void getAllClassNames()
- public void setClassNameForTable()
- public void setFieldNameForColumn()
- private string getClassNameForTable()
- private string getFieldNameForColumn()
- public void setNamespace()
Hierarchy
Members
private
- $_sm — Doctrine\DBAL\Schema\AbstractSchemaManager
- $classNamesForTables — array
- $classToTableNames
- $fieldNamesForColumns — array
- $manyToManyTables — array
- $namespace
—
string
The namespace for the generated entities. - $tables — array
Methods
private
- getClassNameForTable() — Return the mapped class name for a table if it exists. Otherwise return "classified" version.
- getFieldNameForColumn() — Return the mapped field name for a column, if it exists. Otherwise return camelized version.
- reverseEngineerMappingFromDatabase()
public
- __construct()
- getAllClassNames() — {@inheritDoc}
- isTransient() — {@inheritDoc}
- loadMetadataForClass() — {@inheritDoc}
- setClassNameForTable() — Set class name for a table.
- setFieldNameForColumn() — Set field name for a column on a specific table.
- setNamespace() — Set the namespace for the generated entities.
- setTables() — Set tables manually instead of relying on the reverse engeneering capabilities of SchemaManager.