getEntityClass() public method

*
public getEntityClass ( $table, Row $row = null )
$row Row
 /**
  * @inheritdoc
  */
 public function getEntityClass($table, Row $row = NULL)
 {
     if (isset($this->tables[$table][self::K_ENTITY_CLASS])) {
         return $this->tables[$table][self::K_ENTITY_CLASS];
     }
     return parent::getEntityClass($table, $row);
 }
Beispiel #2
0
 public function getEntityClass($table, Row $row = NULL)
 {
     if ($table === 'salaries') {
         return $this->defaultEntityNamespace . '\\Salary';
     }
     if ($table === 'departments') {
         return $this->defaultEntityNamespace . '\\Department';
     }
     if ($table === 'employees') {
         return $this->defaultEntityNamespace . '\\Employee';
     }
     return parent::getEntityClass($table, $row);
 }
Beispiel #3
0
 /**
  * Gets fully qualified entity class name from given table name
  *
  * @param  string $table
  * @param  Row|null $row
  * @return string
  */
 public function getEntityClass($table, Row $row = NULL)
 {
     if (isset($this->tableToRepositoryMapping[$table])) {
         $repository = get_class($this->tableToRepositoryMapping[$table]);
         if (isset($this->repositoryToEntityMapping[$repository])) {
             return $this->repositoryToEntityMapping[$repository];
         }
     }
     return parent::getEntityClass($table, $row);
 }