2015-01-15 16:15:11 +00:00
|
|
|
<?php
|
|
|
|
|
2015-01-18 00:07:54 +01:00
|
|
|
namespace Doctrine\Tests\ORM\Mapping\NamingStrategy;
|
|
|
|
|
|
|
|
use Doctrine\ORM\Mapping\DefaultNamingStrategy;
|
2015-01-15 16:15:11 +00:00
|
|
|
|
|
|
|
/**
|
2015-01-18 00:07:54 +01:00
|
|
|
* Stub naming strategy to verify `joinColumnName` proper behavior
|
2015-01-15 16:15:11 +00:00
|
|
|
*/
|
|
|
|
class JoinColumnClassNamingStrategy extends DefaultNamingStrategy
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
|
|
|
public function joinColumnName($propertyName, $className = null)
|
|
|
|
{
|
2015-01-18 00:07:54 +01:00
|
|
|
return strtolower($this->classToTableName($className))
|
|
|
|
. '_' . $propertyName
|
|
|
|
. '_' . $this->referenceColumnName();
|
2015-01-15 16:15:11 +00:00
|
|
|
}
|
|
|
|
}
|