DependencyResolver

Object to handle and determine dependent references of elements.

Table of Contents

Properties

$elements  : array<string|int, mixed>
$eventCallbacks  : array<string|int, mixed>
$factory  : DependencyEntityFactory|null
$outerMostParents  : array<string|int, mixed>|null
$outerMostParentsRequireReferences  : bool
$workspace  : int

Methods

addElement()  : ElementEntity
Adds an element to be checked for dependent references.
executeEventCallback()  : mixed
Executes a registered callback (if any) for a particular event.
getElements()  : array<string|int, mixed>
Gets the registered elements.
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, mixed>|array<string|int, ElementEntity>
Gets the outermost parents that define complete dependent structure each.
getWorkspace()  : int
Gets the current workspace.
setEventCallback()  : DependencyResolver
Sets a callback for a particular event.
setOuterMostParentsRequireReferences()  : DependencyResolver
Sets the condition that outermost parents required at least one child or parent reference.
setWorkspace()  : mixed
Sets the current workspace.
processOuterMostParent()  : mixed
Processes and registers the outermost parents accordant to the registered elements.

Properties

$elements

protected array<string|int, mixed> $elements = []

$eventCallbacks

protected array<string|int, mixed> $eventCallbacks = []

$outerMostParents

protected array<string|int, mixed>|null $outerMostParents

$outerMostParentsRequireReferences

protected bool $outerMostParentsRequireReferences = false

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
ElementEntity

executeEventCallback()

Executes a registered callback (if any) for a particular event.

public executeEventCallback(string $eventName, object $caller[, array<string|int, mixed> $callerArguments = [] ]) : mixed
Parameters
$eventName : string
$caller : object
$callerArguments : array<string|int, mixed> = []

getElements()

Gets the registered elements.

public getElements() : array<string|int, mixed>
Return values
array<string|int, mixed>

getNestedElements()

Gets all nested elements (including the parent) of a particular outermost parent element.

public getNestedElements(ElementEntity $outerMostParent) : array<string|int, mixed>
Parameters
$outerMostParent : ElementEntity
Tags
throws
RuntimeException
Return values
array<string|int, mixed>

getOuterMostParents()

Gets the outermost parents that define complete dependent structure each.

public getOuterMostParents() : array<string|int, mixed>|array<string|int, ElementEntity>
Return values
array<string|int, mixed>|array<string|int, ElementEntity>

getWorkspace()

Gets the current workspace.

public getWorkspace() : int
Return values
int

setOuterMostParentsRequireReferences()

Sets the condition that outermost parents required at least one child or parent reference.

public setOuterMostParentsRequireReferences(bool $outerMostParentsRequireReferences) : DependencyResolver
Parameters
$outerMostParentsRequireReferences : bool
Return values
DependencyResolver

setWorkspace()

Sets the current workspace.

public setWorkspace(int $workspace) : mixed
Parameters
$workspace : int

processOuterMostParent()

Processes and registers the outermost parents accordant to the registered elements.

protected processOuterMostParent(ElementEntity $element) : mixed
Parameters
$element : ElementEntity

        
On this page

Search results