Property | Type | Description | |
---|---|---|---|
$entityFactory | leanmapper\IEntityFactory | ||
$mapper | leanmapper\IMapper | ||
$reflections | |||
$row |
Method | Description | |
---|---|---|
__call ( string $name, array $arguments ) : mixed | void | ||
__construct ( |
||
__get ( string $name ) : mixed | ||
__isset ( string $name ) : boolean | Tells whether given property exists and is not null | |
__set ( string $name, mixed $value ) | ||
__sleep ( ) : array | ||
assign ( array | Traversabl\Traversable $values, array $whitelist = null ) | Performs mass value assignment (using setters) | |
attach ( integer $id ) | Attaches entity | |
detach ( ) | Detaches entity | |
getData ( array $whitelist = null ) : array | Gets high-level values of properties | |
getHasManyRowDifferences ( ) : array | Gets current M:N differences | |
getModifiedRowData ( ) : array | Gets low-level values of underlying Row columns that were modified | |
getReflection ( leanmapper\IMapper $mapper = null ) : |
Gets reflection of current entity | |
getRowData ( ) : array | Gets low-level values of underlying Row columns | |
isDetached ( ) : boolean | Tells whether entity is in detached state (like newly created entity) | |
isModified ( ) : boolean | Tells whether entity was modified | |
makeAlive ( leanmapper\IEntityFactory $entityFactory = null, |
Provides dependencies | |
markAsUpdated ( ) | Marks entity as non-modified (isModified returns false right after this method call) |
Method | Description | |
---|---|---|
assignEntityToProperty ( |
||
createImplicitFilters ( string $entityClass, |
||
get ( $property, array $filterArgs = [] ) : mixed | ||
getCurrentReflection ( ) : |
Gets current entity's reflection (cached in memory) | |
getValueByPropertyWithRelationship ( |
||
initDefaults ( ) | Allows initialize properties' default values | |
mergeFilters ( array $filters1, array $filters2 ) : array | ||
set ( |
Method | Description | |
---|---|---|
addToOrRemoveFrom ( string $action, string $name, mixed $arg ) | ||
checkConsistency ( |
||
checkMethodArgumentsCount ( integer $expectedCount, array $arguments, string $methodName ) | ||
getBelongsToManyValue ( |
||
getBelongsToOneValue ( |
||
getHasManyValue ( |
||
getHasOneValue ( |
||
setEntityFactory ( leanmapper\IEntityFactory $entityFactory ) | ||
useMapper ( leanmapper\IMapper $mapper ) | Provides an mapper for entity |
public __construct ( |
||
$arg |
protected assignEntityToProperty ( |
||
$entity | ||
$property | micro-optimalization |
protected createImplicitFilters ( string $entityClass, |
||
$entityClass | string | |
$caller | ||
return |
protected getCurrentReflection ( ) : |
||
return |
public getHasManyRowDifferences ( ) : array | ||
return | array |
public getModifiedRowData ( ) : array | ||
return | array |
public static getReflection ( leanmapper\IMapper $mapper = null ) : |
||
$mapper | leanmapper\IMapper | |
return |
public getRowData ( ) : array | ||
return | array |
protected getValueByPropertyWithRelationship ( |
||
$property | micro-optimalization | |
$targetTableFiltering | ||
$relationshipTableFiltering | ||
return |
protected initDefaults ( ) |
public isDetached ( ) : boolean | ||
return | boolean |
public isModified ( ) : boolean | ||
return | boolean |
public makeAlive ( leanmapper\IEntityFactory $entityFactory = null, |
||
$entityFactory | leanmapper\IEntityFactory | |
$connection | ||
$mapper | leanmapper\IMapper |
public markAsUpdated ( ) |
protected IEntityFactory,leanmapper $entityFactory | ||
return | leanmapper\IEntityFactory |
protected static EntityReflection[],LeanMapper\Reflection $reflections | ||
return |