| Methods |
protected
|
_uniqueElementName(string $desired): string
Returns unique element name based on desired name.
Returns unique element name based on desired name.
|
#
|
public
|
add(object|array<mixed, mixed> $obj, array<mixed, mixed>|string $args = []): object
If you are using ContainerTrait only, then you can safely
use this add() method. If you are also using factory, or…
If you are using ContainerTrait only, then you can safely
use this add() method. If you are also using factory, or
initializer then redefine add() and call _addContainer, _addFactory.
|
#
|
protected
|
_addContainer(object $element, array{desired_name?: string, name?: string} $args): void
Extension to add() method which will perform linking of
the object with the current class.
Extension to add() method which will perform linking of
the object with the current class.
|
#
|
public
|
removeElement(string|object $shortName): $this
Remove child element if it exists.
Remove child element if it exists.
Parameters
| $shortName |
short name of the element
|
|
#
|
protected
|
_shorten(string $ownerName, string $itemShortName, ?string $origItemName): string
Method used internally for shortening object names.
Method used internally for shortening object names.
|
#
|
public
|
getElement(string $shortName): object
Find child element by its short name. Use in chaining.
Exception if not found.
Find child element by its short name. Use in chaining.
Exception if not found.
Parameters
| $shortName |
Short name of the child element
|
|
#
|
public
|
hasElement(string $shortName): bool
Parameters
| $shortName |
Short name of the child element
|
|
#
|