PHP Interface LeanMapper\IEntityFactory

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

Public Methods

Method Description
createCollection ( array $entities ) : mixed Allows wrap set of entities in custom collection
createEntity ( string $entityClass, Row | Traversabl\Traversable | array | null $arg = null ) : Entity Creates entity instance from given entity class name and argument

Method Details

createCollection() public method

Allows wrap set of entities in custom collection
public createCollection ( array $entities ) : mixed
$entities array
return mixed

createEntity() public method

Creates entity instance from given entity class name and argument
public createEntity ( string $entityClass, Row | Traversabl\Traversable | array | null $arg = null ) : Entity
$entityClass string
$arg Row | Traversabl\Traversable | array | null
return Entity