class DefaultNamingStrategy implements NamingStrategy (View source)

The default NamingStrategy

Methods

string
classToTableName(string $className)

Returns a table name for an entity class.

string
propertyToColumnName(string $propertyName, string|null $className = null)

Returns a column name for a property.

string
referenceColumnName()

Returns the default reference column name.

string
joinColumnName(string $propertyName)

Returns a join column name for a property.

string
joinTableName(string $sourceEntity, string $targetEntity, string|null $propertyName = null)

Returns a join table name.

string
joinKeyColumnName(string $entityName, string|null $referencedColumnName = null)

Returns the foreign key column name for the given parameters.

Details

string classToTableName(string $className)

Returns a table name for an entity class.

Parameters

string $className The fully-qualified class name.

Return Value

string A table name.

string propertyToColumnName(string $propertyName, string|null $className = null)

Returns a column name for a property.

Parameters

string $propertyName A property name.
string|null $className The fully-qualified class name.

Return Value

string A column name.

string referenceColumnName()

Returns the default reference column name.

Return Value

string A column name.

string joinColumnName(string $propertyName)

Returns a join column name for a property.

Parameters

string $propertyName A property name.

Return Value

string A join column name.

string joinTableName(string $sourceEntity, string $targetEntity, string|null $propertyName = null)

Returns a join table name.

Parameters

string $sourceEntity The source entity.
string $targetEntity The target entity.
string|null $propertyName A property name.

Return Value

string A join table name.

string joinKeyColumnName(string $entityName, string|null $referencedColumnName = null)

Returns the foreign key column name for the given parameters.

Parameters

string $entityName An entity.
string|null $referencedColumnName A property.

Return Value

string A join column name.