コード例 #1
0
ファイル: VenneNamingStrategy.php プロジェクト: svobodni/web
 public function joinTableName($sourceEntity, $targetEntity, $propertyName = null)
 {
     if (Strings::endsWith($targetEntity, '::dynamic')) {
         $targetEntity = $this->detectTargetEntity($sourceEntity, $propertyName);
     }
     if (Strings::endsWith($sourceEntity, '::dynamic')) {
         $sourceEntity = $this->detectTargetEntity($targetEntity, $propertyName);
     }
     return strtolower($this->classToNamespace($sourceEntity)) . '_' . parent::joinTableName($sourceEntity, $targetEntity, $propertyName);
 }
コード例 #2
0
 public function classToTableName($className)
 {
     $tableName = parent::classToTableName($className);
     return $this->prependTablePrefix($tableName, $className);
 }