$objectCache
$objectCache : array<mixed,\Charcoal\Model\ModelInterface>
A store of cached objects.
Full implementation, as a trait, of the `HierarchicalInterface`
$master : \Charcoal\Object\HierarchicalInterface|null
The object's parent, if any, in the hierarchy.
$hierarchy : array<mixed,\Charcoal\Object\HierarchicalInterface>|null
Store a copy of the object's ancestry.
$children : array<mixed,\Charcoal\Object\HierarchicalInterface>|null
Store a copy of the object's descendants.
$siblings : array<mixed,\Charcoal\Object\HierarchicalInterface>|null
Store a copy of the object's siblings.
resetHierarchy() : \Charcoal\Object\HierarchicalInterface
Reset this object's hierarchy.
The object's hierarchy can be rebuilt with \self::hierarchy().
Chainable
setMaster(mixed $master) : \Charcoal\Object\HierarchicalInterface
Set this object's immediate parent.
mixed | $master | The object's parent (or master). |
The current object cannot be its own parent.
Chainable
master() : \Charcoal\Object\HierarchicalInterface|null
Retrieve this object's immediate parent.
toplevelMaster() : \Charcoal\Object\HierarchicalInterface|null
Retrieve the top-level ancestor of this object.
setChildren(array $children) : \Charcoal\Object\HierarchicalInterface
array | $children | The children to set. |
Chainable
addChild(mixed $child) : \Charcoal\Object\HierarchicalInterface
mixed | $child | The child object (or ident) to add. |
The current object cannot be its own child.
Chainable
objFromIdent(mixed $ident) : \Charcoal\Object\HierarchicalInterface|null
mixed | $ident | The ident. |
If the identifier is not a scalar value.
addObjectToCache(\Charcoal\Model\ModelInterface $obj) : \Charcoal\Object\HierarchicalInterface
Add an object to the cache store.
\Charcoal\Model\ModelInterface | $obj | The object to store. |
Chainable