DependencyResolver
Object to handle and determine dependent references of elements.
Table of Contents
Properties
- $action : DependencyCollectionAction|null
- $elements : array<string|int, mixed>
- $eventDispatcher : EventDispatcherInterface|null
- $factory : DependencyEntityFactory|null
- $outerMostParents : array<string|int, mixed>|null
- $workspace : int
Methods
- addElement() : ElementEntity
- Adds an element to be checked for dependent references.
- getAction() : DependencyCollectionAction|null
- getElements() : array<string|int, mixed>
- Gets the registered elements.
- getEventDispatcher() : EventDispatcherInterface|null
- getFactory() : DependencyEntityFactory
- Gets an instance of the factory to keep track of element or reference entities.
- getNestedElements() : array<string|int, mixed>
- Gets all nested elements (including the parent) of a particular outermost parent element.
- getOuterMostParents() : array<string|int, ElementEntity>
- Gets the outermost parents that define complete dependent structure each.
- getWorkspace() : int
- setAction() : void
- setEventDispatcher() : void
- setWorkspace() : void
- processOuterMostParent() : void
- Processes and registers the outermost parents accordant to the registered elements.
Properties
$action
protected
DependencyCollectionAction|null
$action
= null
$elements
protected
array<string|int, mixed>
$elements
= []
$eventDispatcher
protected
EventDispatcherInterface|null
$eventDispatcher
= null
$factory
protected
DependencyEntityFactory|null
$factory
$outerMostParents
protected
array<string|int, mixed>|null
$outerMostParents
$workspace
protected
int
$workspace
= 0
Methods
addElement()
Adds an element to be checked for dependent references.
public
addElement(string $table, int $id[, array<string|int, mixed> $data = [] ]) : ElementEntity
Parameters
- $table : string
- $id : int
- $data : array<string|int, mixed> = []
Return values
ElementEntitygetAction()
public
getAction() : DependencyCollectionAction|null
Return values
DependencyCollectionAction|nullgetElements()
Gets the registered elements.
public
getElements() : array<string|int, mixed>
Return values
array<string|int, mixed>getEventDispatcher()
public
getEventDispatcher() : EventDispatcherInterface|null
Return values
EventDispatcherInterface|nullgetFactory()
Gets an instance of the factory to keep track of element or reference entities.
public
getFactory() : DependencyEntityFactory
Return values
DependencyEntityFactorygetNestedElements()
Gets all nested elements (including the parent) of a particular outermost parent element.
public
getNestedElements(ElementEntity $outerMostParent) : array<string|int, mixed>
Parameters
- $outerMostParent : ElementEntity
Return values
array<string|int, mixed>getOuterMostParents()
Gets the outermost parents that define complete dependent structure each.
public
getOuterMostParents() : array<string|int, ElementEntity>
Return values
array<string|int, ElementEntity>getWorkspace()
public
getWorkspace() : int
Return values
intsetAction()
public
setAction(DependencyCollectionAction $action) : void
Parameters
- $action : DependencyCollectionAction
setEventDispatcher()
public
setEventDispatcher(EventDispatcherInterface $eventDispatcher) : void
Parameters
- $eventDispatcher : EventDispatcherInterface
setWorkspace()
public
setWorkspace(int $workspace) : void
Parameters
- $workspace : int
processOuterMostParent()
Processes and registers the outermost parents accordant to the registered elements.
protected
processOuterMostParent(ElementEntity $element) : void
Parameters
- $element : ElementEntity