BumbleDocGen / Technical description of the project / Renderer / Template functions / RootEntityCollection
RootEntityCollection class:
namespace BumbleDocGen\Core\Parser\Entity;
abstract class RootEntityCollection extends \BumbleDocGen\Core\Parser\Entity\BaseEntityCollection implements \IteratorAggregate, \Traversable- findEntity
- get
- getEntityCollectionName
- getEntityLinkData
- getIterator - Retrieve an external iterator
- getLoadedOrCreateNew
- has
- isEmpty
- remove
- updateEntitiesCache
- # findEntity | source code
public function findEntity(string $search, bool $useUnsafeKeys = true): \BumbleDocGen\Core\Parser\Entity\RootEntityInterface|null;Parameters:
| Name | Type | Description |
|---|---|---|
| $search | string | - |
| $useUnsafeKeys | bool | - |
Return value: \BumbleDocGen\Core\Parser\Entity\RootEntityInterface | null
- # get | source code
public function get(string $objectName): \BumbleDocGen\Core\Parser\Entity\RootEntityInterface|null;Parameters:
| Name | Type | Description |
|---|---|---|
| $objectName | string | - |
Return value: \BumbleDocGen\Core\Parser\Entity\RootEntityInterface | null
- # getEntityCollectionName | source code
public function getEntityCollectionName(): string;Parameters: not specified
Return value: string
- # getEntityLinkData | source code
public function getEntityLinkData(string $rawLink, string|null $defaultEntityName = null, bool $useUnsafeKeys = true): array;Parameters:
| Name | Type | Description |
|---|---|---|
| $rawLink | string | Raw link to an entity or entity element |
| $defaultEntityName | string | null | Entity name to use if the link does not contain a valid or existing entity name, but only a cursor on an entity element |
| $useUnsafeKeys | bool | - |
Return value: array
- # getIterator | source code
// Implemented in BumbleDocGen\Core\Parser\Entity\BaseEntityCollection
public function getIterator(): \Generator;Retrieve an external iterator
Parameters: not specified
Return value: \Generator
Throws:
- \Exception - on failure.
See:
- # getLoadedOrCreateNew | source code
public function getLoadedOrCreateNew(string $objectName, bool $withAddClassEntityToCollectionEvent = false): \BumbleDocGen\Core\Parser\Entity\RootEntityInterface;Parameters:
| Name | Type | Description |
|---|---|---|
| $objectName | string | - |
| $withAddClassEntityToCollectionEvent | bool | - |
Return value: \BumbleDocGen\Core\Parser\Entity\RootEntityInterface
See:
- # has | source code
// Implemented in BumbleDocGen\Core\Parser\Entity\BaseEntityCollection
public function has(string $objectName): bool;Parameters:
| Name | Type | Description |
|---|---|---|
| $objectName | string | - |
Return value: bool
- # isEmpty | source code
// Implemented in BumbleDocGen\Core\Parser\Entity\BaseEntityCollection
public function isEmpty(): bool;Parameters: not specified
Return value: bool
- # remove | source code
// Implemented in BumbleDocGen\Core\Parser\Entity\BaseEntityCollection
public function remove(string $objectName): void;Parameters:
| Name | Type | Description |
|---|---|---|
| $objectName | string | - |
Return value: void
- # updateEntitiesCache | source code
public function updateEntitiesCache(): void;Parameters: not specified
Return value: void
Throws: