DependencyEntityFactory
Object to create and keep track of element or reference entities.
Table of Contents
Properties
- $elements : array<string|int, mixed>
- $references : array<string|int, mixed>
Methods
- getElement() : ElementEntity
- Gets and registers a new element.
- getReference() : ReferenceEntity
- Gets and registers a new reference.
- getReferencedElement() : ReferenceEntity
- Gets and registers a new reference.
Properties
$elements
protected
array<string|int, mixed>
$elements
= []
$references
protected
array<string|int, mixed>
$references
= []
Methods
getElement()
Gets and registers a new element.
public
getElement(string $table, int $id, array<string|int, mixed> $data, DependencyResolver $dependency) : ElementEntity
Parameters
- $table : string
- $id : int
- $data : array<string|int, mixed>
-
(optional)
- $dependency : DependencyResolver
Return values
ElementEntitygetReference()
Gets and registers a new reference.
public
getReference(ElementEntity $element, string $field) : ReferenceEntity
Parameters
- $element : ElementEntity
- $field : string
Return values
ReferenceEntitygetReferencedElement()
Gets and registers a new reference.
public
getReferencedElement(string $table, int $id, string $field, array<string|int, mixed> $data, DependencyResolver $dependency) : ReferenceEntity
Parameters
- $table : string
- $id : int
- $field : string
- $data : array<string|int, mixed>
-
(optional)
- $dependency : DependencyResolver