PHP Interface LeanMapper\IMapper

Author: Vojtěch Kohout
Mostra file Open project: tharos/leanmapper Interface Usage Examples

Public Methods

Method Description
getColumn ( string $entityClass, string $field ) : string Gets table column name from given fully qualified entity class name and entity field name
getEntityClass ( string $table, Row $row = null ) : string Gets fully qualified entity class name from given table name
getEntityField ( string $table, string $column ) : string Gets entity field (property) name from given table name and table column
getImplicitFilters ( string $entityClass, Caller $caller = null ) : array | ImplicitFilters Gets filters that should be used used every time when given entity is loaded from database
getPrimaryKey ( string $table ) : string Gets primary key name from given table name
getRelationshipColumn ( string $sourceTable, string $targetTable ) : string Gets name of column that contains foreign key from given source table name and target table name
getRelationshipTable ( string $sourceTable, string $targetTable ) : string Gets relationship table name from given source table name and target table name
getTable ( string $entityClass ) : string Gets table name from given fully qualified entity class name
getTableByRepositoryClass ( string $repositoryClass ) : string Gets table name from repository class name

Method Details

getColumn() public method

Gets table column name from given fully qualified entity class name and entity field name
public getColumn ( string $entityClass, string $field ) : string
$entityClass string
$field string
return string

getEntityClass() public method

Gets fully qualified entity class name from given table name
public getEntityClass ( string $table, Row $row = null ) : string
$table string
$row Row
return string

getEntityField() public method

Gets entity field (property) name from given table name and table column
public getEntityField ( string $table, string $column ) : string
$table string
$column string
return string

getImplicitFilters() public method

Gets filters that should be used used every time when given entity is loaded from database
public getImplicitFilters ( string $entityClass, Caller $caller = null ) : array | ImplicitFilters
$entityClass string
$caller Caller
return array | ImplicitFilters

getPrimaryKey() public method

Gets primary key name from given table name
public getPrimaryKey ( string $table ) : string
$table string
return string

getRelationshipColumn() public method

Gets name of column that contains foreign key from given source table name and target table name
public getRelationshipColumn ( string $sourceTable, string $targetTable ) : string
$sourceTable string
$targetTable string
return string

getRelationshipTable() public method

Gets relationship table name from given source table name and target table name
public getRelationshipTable ( string $sourceTable, string $targetTable ) : string
$sourceTable string
$targetTable string
return string

getTable() public method

Gets table name from given fully qualified entity class name
public getTable ( string $entityClass ) : string
$entityClass string
return string

getTableByRepositoryClass() public method

Gets table name from repository class name
public getTableByRepositoryClass ( string $repositoryClass ) : string
$repositoryClass string
return string