Class

eZModuleOperationInfo

class eZModuleOperationInfo

Constants

ERROR_NO_CLASS

ERROR_NO_CLASS_METHOD

ERROR_CLASS_INSTANTIATE_FAILED

ERROR_MISSING_PARAMETER

STATUS_CONTINUE

STATUS_CANCELLED

STATUS_HALTED

STATUS_REPEAT

STATUS_QUEUED

Properties

$ModuleName
$FunctionList
$IsValid
$UseTriggers
eZOperationMemento $Memento

Methods

__construct(string $moduleName, bool $useTriggers = true)

Constructor

bool isValid()

???

bool loadDefinition()

Loads the operations definition for the current module

makeOperationKeyArray($operationDefinition, $operationParameters)

makeKeyArray($keyDefinition, $parameterDefinition, $operationParameters)

mixed execute(string $operationName, array $operationParameters, array $mementoData = null)

Executes the operation

array executeBody(string $includeFile, string $className, array $bodyStructure, array $operationKeys, array $operationParameterDefinitions, array $operationParameters, array $mementoData, int $bodyCallCount, string $operationName, array $currentLoopData = null, array $onInterrupt = null)

Executes the operation body

executeTrigger($bodyReturnValue, $body, $operationParameterDefinitions, $operationParameters, $bodyCallCount, $currentLoopData, $triggerRestored, $operationName, $operationKeys)

Executes an operation trigger

storeOperationMemento($operationKeys, $operationParameterDefinitions, $operationParameters, $bodyCallCount, $operationName)

removeBodyMemento($bodyName, $bodyKeys, $operationKeys, $operationParameterDefinitions, $operationParameters, $bodyCallCount, $currentLoopData, $operationName)

The storeBodyMemento(string $bodyName, array $bodyKeys, array $operationKeys, array $operationParameterDefinitions, array $operationParameters, int $bodyCallCount, array $currentLoopData, string $operationName)

Packs the current body data (memento) for save & re-use

restoreBodyMementoData($bodyName, $mementoData, $operationParameters, $bodyCallCount, $currentLoopData)

array executeClassMethod(string $includeFile, string $className, string $methodName, mixed $operationParameterDefinitions, mixed $operationParameters)

Executes a class method in an operation body

$className objectForClass(string $className)

Helper method that keeps and returns the instances of operation objects

Details

at line 36
public __construct(string $moduleName, bool $useTriggers = true)

Constructor

Parameters

string $moduleName
bool $useTriggers

at line 50
public bool isValid()

???

Return Value

bool

at line 59
public bool loadDefinition()

Loads the operations definition for the current module

Return Value

bool true if the operations were loaded, false if an error occured

at line 86
public makeOperationKeyArray($operationDefinition, $operationParameters)

Parameters

$operationDefinition
$operationParameters

at line 97
public makeKeyArray($keyDefinition, $parameterDefinition, $operationParameters)

Parameters

$keyDefinition
$parameterDefinition
$operationParameters

at line 125
public mixed execute(string $operationName, array $operationParameters, array $mementoData = null)

Executes the operation

Parameters

string $operationName
array $operationParameters
array $mementoData

Return Value

mixed the operation execution result, or null if an error occured

at line 338
public array executeBody(string $includeFile, string $className, array $bodyStructure, array $operationKeys, array $operationParameterDefinitions, array $operationParameters, array $mementoData, int $bodyCallCount, string $operationName, array $currentLoopData = null, array $onInterrupt = null)

Executes the operation body

Parameters

string $includeFile Path to the file where the operation class is defined
string $className Name of the class holding the operation methods (see $includeFile)
array $bodyStructure
array $operationKeys
array $operationParameterDefinitions
array $operationParameters
array $mementoData
int $bodyCallCount
string $operationName
array $currentLoopData
array $onInterrupt method array that must be called if the operation is interrupted

Return Value

array

at line 598
public executeTrigger($bodyReturnValue, $body, $operationParameterDefinitions, $operationParameters, $bodyCallCount, $currentLoopData, $triggerRestored, $operationName, $operationKeys)

Executes an operation trigger

Parameters

$bodyReturnValue
$body
$operationParameterDefinitions
$operationParameters
$bodyCallCount
$currentLoopData
$triggerRestored
$operationName
$operationKeys

at line 660
public storeOperationMemento($operationKeys, $operationParameterDefinitions, $operationParameters, $bodyCallCount, $operationName)

Parameters

$operationKeys
$operationParameterDefinitions
$operationParameters
$bodyCallCount
$operationName

at line 681
public removeBodyMemento($bodyName, $bodyKeys, $operationKeys, $operationParameterDefinitions, $operationParameters, $bodyCallCount, $currentLoopData, $operationName)

Parameters

$bodyName
$bodyKeys
$operationKeys
$operationParameterDefinitions
$operationParameters
$bodyCallCount
$currentLoopData
$operationName

at line 701
public The storeBodyMemento(string $bodyName, array $bodyKeys, array $operationKeys, array $operationParameterDefinitions, array $operationParameters, int $bodyCallCount, array $currentLoopData, string $operationName)

Packs the current body data (memento) for save & re-use

Parameters

string $bodyName
array $bodyKeys
array $operationKeys
array $operationParameterDefinitions
array $operationParameters
int $bodyCallCount
array $currentLoopData
string $operationName

Return Value

The memento

at line 721
public restoreBodyMementoData($bodyName, $mementoData, $operationParameters, $bodyCallCount, $currentLoopData)

Parameters

$bodyName
$mementoData
$operationParameters
$bodyCallCount
$currentLoopData

at line 771
public array executeClassMethod(string $includeFile, string $className, string $methodName, mixed $operationParameterDefinitions, mixed $operationParameters)

Executes a class method in an operation body

Parameters

string $includeFile The file where the class & method are defined
string $className The class where the method is implemented
string $methodName The method to call
mixed $operationParameterDefinitions The method parameters definition
mixed $operationParameters The method parameters values

Return Value

array

at line 840
public $className objectForClass(string $className)

Helper method that keeps and returns the instances of operation objects

Parameters

string $className The class the method should return an object for

Return Value

$className