class DatabaseDriver implements MappingDriver (View source)

The DatabaseDriver reverse engineers the mapping metadata from a database.

Methods

__construct(AbstractSchemaManager $schemaManager)

No description

setNamespace(string $namespace)

Set the namespace for the generated entities.

bool
isTransient(string $className)

Returns whether the class with the specified name should have its metadata loaded.

string[]
getAllClassNames()

Gets the names of all mapped classes known to this driver.

setClassNameForTable(string $tableName, string $className)

Sets class name for a table.

setFieldNameForColumn(string $tableName, string $columnName, string $fieldName)

Sets field name for a column on a specific table.

setTables(Table[] $entityTables, Table[] $manyToManyTables)

Sets tables manually instead of relying on the reverse engineering capabilities of SchemaManager.

void
loadMetadataForClass(string $className, ClassMetadata $metadata, ClassMetadataBuildingContext $metadataBuildingContext)

Loads the metadata for the specified class into the provided container.

Details

__construct(AbstractSchemaManager $schemaManager)

Parameters

AbstractSchemaManager $schemaManager

setNamespace(string $namespace)

Set the namespace for the generated entities.

Parameters

string $namespace

bool isTransient(string $className)

Returns whether the class with the specified name should have its metadata loaded.

This is only the case if it is either mapped as an Entity or a MappedSuperclass.

Parameters

string $className

Return Value

bool

string[] getAllClassNames()

Gets the names of all mapped classes known to this driver.

Return Value

string[] The names of all mapped classes known to this driver.

setClassNameForTable(string $tableName, string $className)

Sets class name for a table.

Parameters

string $tableName
string $className

setFieldNameForColumn(string $tableName, string $columnName, string $fieldName)

Sets field name for a column on a specific table.

Parameters

string $tableName
string $columnName
string $fieldName

setTables(Table[] $entityTables, Table[] $manyToManyTables)

Sets tables manually instead of relying on the reverse engineering capabilities of SchemaManager.

Parameters

Table[] $entityTables
Table[] $manyToManyTables

void loadMetadataForClass(string $className, ClassMetadata $metadata, ClassMetadataBuildingContext $metadataBuildingContext)

Loads the metadata for the specified class into the provided container.

Parameters

string $className
ClassMetadata $metadata
ClassMetadataBuildingContext $metadataBuildingContext

Return Value

void