StorageStrategy
AbstractYes
Table of Contents
Methods
- areItemsBound() : bool
- Returns true if the items are bound
- bindItems() : Result
- Bind the provided items with each other
- getChildElements() : array<string|int, ItemIdentifier>
- Fetch ItemIdentifier objects that are children to the provided parent from the DB.
- getParentElements() : array<string|int, ItemIdentifier>
- Fetch ItemIdentifier objects that are parents to the provided child from the DB.
- replaceAllItemBindings() : Result
- Replace all bindings of $oldItem to $newItem
- unbindItems() : Result
- Unbind the provided items
Methods
areItemsBound()
Returns true if the items are bound
public
abstract areItemsBound(ItemIdentifier $parent, ItemIdentifier $child) : bool
Parameters
- $parent : ItemIdentifier
- $child : ItemIdentifier
Return values
boolbindItems()
Bind the provided items with each other
public
bindItems(ItemIdentifier $parent, ItemIdentifier $child) : Result
Parameters
- $parent : ItemIdentifier
- $child : ItemIdentifier
Return values
ResultgetChildElements()
Fetch ItemIdentifier objects that are children to the provided parent from the DB.
public
abstract getChildElements(ItemIdentifier $parent, int $childEntityTypeId) : array<string|int, ItemIdentifier>
Only children with $child->getEntityTypeId() === $childEntityTypeId are returned
Parameters
- $parent : ItemIdentifier
- $childEntityTypeId : int
Return values
array<string|int, ItemIdentifier>getParentElements()
Fetch ItemIdentifier objects that are parents to the provided child from the DB.
public
abstract getParentElements(ItemIdentifier $child, int $parentEntityTypeId) : array<string|int, ItemIdentifier>
Only parents with $parent->getEntityTypeId() === $parentEntityTypeId are returned
Parameters
- $child : ItemIdentifier
- $parentEntityTypeId : int
Return values
array<string|int, ItemIdentifier>replaceAllItemBindings()
Replace all bindings of $oldItem to $newItem
public
replaceAllItemBindings(ItemIdentifier $oldItem, ItemIdentifier $newItem) : Result
Parameters
- $oldItem : ItemIdentifier
- $newItem : ItemIdentifier
Return values
ResultunbindItems()
Unbind the provided items
public
unbindItems(ItemIdentifier $parent, ItemIdentifier $child) : Result
Parameters
- $parent : ItemIdentifier
- $child : ItemIdentifier