. */ namespace Doctrine\ORM\Mapping; use Doctrine\ORM\Mapping\ClassMetadata; use Doctrine\DBAL\Platforms\AbstractPlatform; /** * A set of rules for determining the physical column, alias and table quotes * * @since 2.3 * @author Fabio B. Silva */ abstract class QuoteStrategy { /** * @var \Doctrine\DBAL\Platforms\AbstractPlatform */ protected $platform; /** * @param AbstractPlatform $platform */ public function __construct(AbstractPlatform $platform) { $this->platform = $platform; } /** * Gets the (possibly quoted) column name for safe use in an SQL statement. * * @param string $fieldName * @param ClassMetadata $class * @return string */ abstract public function getColumnName($fieldName, ClassMetadata $class); /** * Gets the (possibly quoted) primary table name for safe use in an SQL statement. * * @param ClassMetadata $class * @return string */ abstract public function getTableName(ClassMetadata $class); /** * Gets the (possibly quoted) name of the join table. * * @param ClassMetadata $class * @return string */ abstract public function getJoinTableName(array $association, ClassMetadata $class); /** * Gets the (possibly quoted) identifier column names for safe use in an SQL statement. * * @param ClassMetadata $class * @return array */ abstract public function getIdentifierColumnNames(ClassMetadata $class); /** * Gets the column alias. * * @param string $columnName * @param integer $counter * @param ClassMetadata $class * @return string */ abstract public function getColumnAlias($columnName, $counter, ClassMetadata $class = null); }