Overview

Namespaces

  • LeanMapper
    • Bridges
      • Nette
        • DI
    • Exception
    • Reflection
    • Relationship

Classes

  • Caller
  • Connection
  • DataDifference
  • DefaultEntityFactory
  • DefaultEntityReflectionProvider
  • DefaultMapper
  • Entity
  • EntityDataDecoder
  • Events
  • Filtering
  • FilteringResult
  • FilteringResultDecorator
  • Fluent
  • ImplicitFilters
  • Repository
  • Result
  • ResultProxy
  • Row

Interfaces

  • IEntityFactory
  • IEntityReflectionProvider
  • IMapper
  • Overview
  • Namespace
  • Class

Class DefaultMapper

Default IMapper implementation

LeanMapper\DefaultMapper implements LeanMapper\IMapper
Namespace: LeanMapper
Author: Vojtěch Kohout
Located at LeanMapper/DefaultMapper.php
Methods summary
public string
# getPrimaryKey( string $table )

Gets primary key name from given table name

Gets primary key name from given table name

Parameters

$table

Returns

string

Implementation of

LeanMapper\IMapper::getPrimaryKey()
public string
# getTable( string $entityClass )

Gets table name from given fully qualified entity class name

Gets table name from given fully qualified entity class name

Parameters

$entityClass

Returns

string

Implementation of

LeanMapper\IMapper::getTable()
public string
# getEntityClass( string $table, LeanMapper\Row $row = null )

Gets fully qualified entity class name from given table name

Gets fully qualified entity class name from given table name

Parameters

$table
$row

Returns

string

Implementation of

LeanMapper\IMapper::getEntityClass()
public string
# getColumn( string $entityClass, string $field )

Gets table column name from given fully qualified entity class name and entity field name

Gets table column name from given fully qualified entity class name and entity field name

Parameters

$entityClass
$field

Returns

string

Implementation of

LeanMapper\IMapper::getColumn()
public string
# getEntityField( string $table, string $column )

Gets entity field (property) name from given table name and table column

Gets entity field (property) name from given table name and table column

Parameters

$table
$column

Returns

string

Implementation of

LeanMapper\IMapper::getEntityField()
public string
# getRelationshipTable( string $sourceTable, string $targetTable )

Gets relationship table name from given source table name and target table name

Gets relationship table name from given source table name and target table name

Parameters

$sourceTable
$targetTable

Returns

string

Implementation of

LeanMapper\IMapper::getRelationshipTable()
public string
# getRelationshipColumn( string $sourceTable, string $targetTable )

Gets name of column that contains foreign key from given source table name and target table name

Gets name of column that contains foreign key from given source table name and target table name

Parameters

$sourceTable
$targetTable

Returns

string

Implementation of

LeanMapper\IMapper::getRelationshipColumn()
public string
# getTableByRepositoryClass( string $repositoryClass )

Gets table name from repository class name

Gets table name from repository class name

Parameters

$repositoryClass

Returns

string

Implementation of

LeanMapper\IMapper::getTableByRepositoryClass()
public array|LeanMapper\ImplicitFilters
# getImplicitFilters( string $entityClass, LeanMapper\Caller $caller = null )

Gets filters that should be used used every time when given entity is loaded from database

Gets filters that should be used used every time when given entity is loaded from database

Parameters

$entityClass
$caller

Returns

array|LeanMapper\ImplicitFilters

Implementation of

LeanMapper\IMapper::getImplicitFilters()
protected string
# trimNamespace( string $class )

Trims namespace part from fully qualified class name

Trims namespace part from fully qualified class name

Parameters

$class

Returns

string
Properties summary
protected string $defaultEntityNamespace
# 'Model\Entity'
protected string $relationshipTableGlue
# '_'
tharos/leanmapper v3.4.1 API documentation API documentation generated by ApiGen