CEC registry class. Used to register chains and chain functions to invoke.

Following 3 types of CEC functions/callbacks are supported at the moment: - Callbacks, which should only be invoked. They don't return a value and have no break conditions, @see CEC_Hook::execute() - Callbacks, which should return a value and/or should modify a passed parameter,

see \CEC_Hook::executeAndReturn()
see \CEC_Hook::executeWhileBreakCondition()
author Timo A. Hummel
author Murat Purc
package Contenido Backend classes
subpackage CEC

 Methods

Adds a chain function which is to invoke.

addChainFunction(string $sChainName, string $sFunctionName) : bool

Parameters

$sChainName

string

Chain name

$sFunctionName

string

Name of function/callback to invoke. Feasible values are: - "ClassName->methodName" to invoke a method of a ClassName instance. A instance of the clas will be created here. - "ClassName::methodName" to invoke a static method of ClassName. - "FunctionName" to invoke a function. NOTE: Necessary files must be manually included before or by defined autoloader.

Returns

boolTrue on success, otherwhise false

Checks if a chain function exists.

chainFunctionExists(string $sChainName, string $sFunctionName) : bool

Parameters

$sChainName

string

Chain name

$sFunctionName

string

Name of function to check

Returns

bool

Returns a instance of cApiCECRegistry

getInstance() : \cApiCECRegistry

Returns the iterator for a desired chain.

getIterator(string $sChainName) : \cIterator

TODO : cIterator should be replaced by ArrayIterator (@see http://www.php.net/spl) but ArrayIterator uses rewind() instead of reset()...

Parameters

$sChainName

string

Chain name

Returns

Returns list of registered chain names

getRegisteredChainNames() : array

Returns

array

Checks if a chain is registered or not.

isChainRegistered(string $sChainName) : bool

Parameters

$sChainName

string

Returns

bool

Registers a chain (adds the chain to the internal chain holder)

registerChain(string $sChainName) : void

Parameters

$sChainName

string

Removes a chain function.

removeChainFunction(string $sChainName, string $sFunctionName) 

Parameters

$sChainName

string

Chain name

$sFunctionName

string

Name of function to remove from chain.

Unregisters a chain

unregisterChain(string $sChainName) : void

Parameters

$sChainName

string

Constructor

__construct() : void

Adds the chain to the internal chain holder

_addChain(string $sChainName, array $aParameters) : void

Parameters

$sChainName

string

Chain name

$aParameters

array

Chain parameter

Resets the chain iterator.

_resetIterator(string $sChainName) : void

Parameters

$sChainName

string

Prevent cloning

__clone() : void

 Properties

 

List of available chains

$_aChains : array

 

Self instance

$_instance : \cApiCECRegistry