Documentation

SystemComponentRepository extends EntityRepository
in package

Repository for SystemComponents

This decorates SystemComponents with SystemComponentController class

Tags
copyright

Cloudrexx AG

author

Michael Ritter michael.ritter@comvation.com

subpackage

core_core

version
3.1.0

Table of Contents

Properties

$cx  : Cx
Main class instance
$loadedComponents  : array<string|int, mixed>
List of loaded (and decorated) components

Methods

__construct()  : mixed
Initialize repository
callAdjustResponseHooks()  : mixed
Call hook script of current SystemComponent after post-resolving
callPostComponentLoadHooks()  : mixed
Call hook script of all SystemComponents after they are loaded
callPostContentLoadHooks()  : mixed
Call hook script of all SystemComponents after loading content
callPostContentParseHooks()  : mixed
Call hook script of all SystemComponents after loading module content
callPostFinalizeHooks()  : mixed
Call hook script of all SystemComponents after finalization
callPostInitHooks()  : mixed
Call hook script of all SystemComponents after initalization
callPostResolveHooks()  : mixed
Call hook script of all SystemComponents after resolving
callPreContentLoadHooks()  : mixed
Call hook script of all SystemComponents before loading content
callPreContentParseHooks()  : mixed
Call hook script of all SystemComponents before loading module content
callPreFinalizeHooks()  : mixed
Call hook script of all SystemComponents before finalization
callPreResolveHooks()  : mixed
Call hook script of all SystemComponents before resolving
callRegisterEventListenersHooks()  : mixed
Call hook script of all SystemComponents to register event listeners
callRegisterEventsHooks()  : mixed
Call hook script of all SystemComponents to register events
find()  : SystemComponentController
Finds an entity by its primary key / identifier.
findActive()  : array<string|int, mixed>
Finds all active entities in the repository.
findAll()  : array<string|int, mixed>
Finds all entities in the repository.
findBy()  : array<string|int, mixed>
Finds entities by a set of criteria.
findOneBy()  : SystemComponentController
Finds a single entity by a set of criteria.
loadComponent()  : mixed
Load a component (tell it to parse its content)
setPreLoadedComponents()  : mixed
Loads the systemComponent using the doctrine entity manager for the existing SystemComponentController and adds it to the repository
callHook()  : mixed
Calls a hook on a component
callHooks()  : mixed
Calls a hook on all components
decorate()  : mixed
Decorates an entity or an array of entities
decorateEntity()  : SystemComponentController
Decorates a single entity
getComponentControllerClassFor()  : string
Returns class name to use for decoration

Properties

Methods

__construct()

Initialize repository

public __construct(EntityManager $em, ClassMetadata $class) : mixed
Parameters
$em : EntityManager

Doctrine entity manager

$class : ClassMetadata

Metadata of entity class handled by this repository

callAdjustResponseHooks()

Call hook script of current SystemComponent after post-resolving

public callAdjustResponseHooks(Response $response) : mixed
Parameters
$response : Response

Current response

Tags
todo

Re-enable for all modes.

callPostComponentLoadHooks()

Call hook script of all SystemComponents after they are loaded

public callPostComponentLoadHooks() : mixed

callPostContentLoadHooks()

Call hook script of all SystemComponents after loading content

public callPostContentLoadHooks() : mixed

callPostContentParseHooks()

Call hook script of all SystemComponents after loading module content

public callPostContentParseHooks() : mixed

callPostFinalizeHooks()

Call hook script of all SystemComponents after finalization

public callPostFinalizeHooks(mixed &$endcode) : mixed
Parameters
$endcode : mixed

callPreContentParseHooks()

Call hook script of all SystemComponents before loading module content

public callPreContentParseHooks() : mixed

callRegisterEventListenersHooks()

Call hook script of all SystemComponents to register event listeners

public callRegisterEventListenersHooks() : mixed

findActive()

Finds all active entities in the repository.

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

The active entities.

findAll()

Finds all entities in the repository.

public findAll() : array<string|int, mixed>

Overwritten in order to decorate result

Return values
array<string|int, mixed>

The entities.

findBy()

Finds entities by a set of criteria.

public findBy(array<string|int, mixed> $criteria[, array<string|int, mixed>|null $orderBy = null ][, int|null $limit = null ][, int|null $offset = null ]) : array<string|int, mixed>

Overwritten in order to decorate result

Parameters
$criteria : array<string|int, mixed>
$orderBy : array<string|int, mixed>|null = null
$limit : int|null = null
$offset : int|null = null
Return values
array<string|int, mixed>

loadComponent()

Load a component (tell it to parse its content)

public loadComponent(string $componentName) : mixed
Parameters
$componentName : string

Name of component to load

setPreLoadedComponents()

Loads the systemComponent using the doctrine entity manager for the existing SystemComponentController and adds it to the repository

public setPreLoadedComponents(array<string|int, mixed> $preLoadedComponents) : mixed
Parameters
$preLoadedComponents : array<string|int, mixed>

An array containing the preloaded components

callHooks()

Calls a hook on all components

protected callHooks(mixed $hookName, array<string|int, mixed> $arguments) : mixed
Parameters
$hookName : mixed
$arguments : array<string|int, mixed>

Arguments for the hook

decorate()

Decorates an entity or an array of entities

protected decorate(mixed $components) : mixed
Parameters
$components : mixed

SystemComponent or array of SystemComponents

Return values
mixed

SystemComponentController or array of SystemComponentControllers

getComponentControllerClassFor()

Returns class name to use for decoration

protected getComponentControllerClassFor(SystemComponent $component) : string

If the component does not have a class named "ComponentController" the default SystemComponentController class is used

Parameters
$component : SystemComponent

Component to get decoration class for

Return values
string

Full qualified class name


        
On this page

Search results