interface NamingStrategy (View source)

A set of rules for determining the physical column and table names

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
embeddedFieldToColumnName(string $propertyName, string $embeddedColumnName, string $className = null, string $embeddedClassName = null)

Returns a column name for an embedded property.

string
referenceColumnName()

Returns the default reference column name.

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

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 embeddedFieldToColumnName(string $propertyName, string $embeddedColumnName, string $className = null, string $embeddedClassName = null)

Returns a column name for an embedded property.

Parameters

string $propertyName
string $embeddedColumnName
string $className
string $embeddedClassName

Return Value

string

string referenceColumnName()

Returns the default reference column name.

Return Value

string A column name.

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

Returns a join column name for a property.

Parameters

string $propertyName A property name.
string|null $className The fully-qualified class 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.