Property | Type | Description | |
---|---|---|---|
$connection | |||
$entityClass | string | ||
$entityFactory | leanmapper\IEntityFactory | ||
$events | |||
$mapper | leanmapper\IMapper | ||
$table | string |
Method | Description | |
---|---|---|
__construct ( |
||
__get ( string $name ) : array | null | ||
delete ( mixed $arg ) : mixed | Removes given entity (or entity with given id) from database | |
persist ( |
Stores values of entity's modified properties into database (inserts new row when entity is in detached state) |
Method | Description | |
---|---|---|
checkEntityType ( |
Checks whether give entity is instance of required type | |
createEntities ( array $rows, string | null $entityClass = null, string | null $table = null ) : array | Creates new set of Entity's instances from given array of \Dibi\Row instances | |
createEntity ( |
Creates new Entity instance from given \Dibi\Row instance | |
createFluent ( ) : |
||
deleteFromDatabase ( mixed $arg ) : mixed | Performs database delete (can be customized) | |
getTable ( ) : string | Gets name of (main) database table related to entity that repository can handle | |
initEvents ( ) | Allows initialize repository's events | |
insertIntoDatabase ( |
Performs database insert (can be customized) | |
persistHasManyChanges ( |
Persists changes in M:N relationships | |
updateInDatabase ( |
Performs database update (can be customized) |
Method | Description | |
---|---|---|
getDocComment ( ) : string | ||
getIdValue ( |
public __construct ( |
||
$connection | ||
$mapper | leanmapper\IMapper | |
$entityFactory | leanmapper\IEntityFactory |
protected checkEntityType ( |
||
$entity |
protected deleteFromDatabase ( mixed $arg ) : mixed | ||
$arg | mixed | |
return | mixed |
protected insertIntoDatabase ( |
||
$entity | ||
return | mixed |
protected persistHasManyChanges ( |
||
$entity |
protected updateInDatabase ( |
||
$entity | ||
return | mixed |
protected IEntityFactory,leanmapper $entityFactory | ||
return | leanmapper\IEntityFactory |