eZPublish  4.5
eZModuleOperationInfo Class Reference

The class eZModuleOperationInfo does. More...

Public Member Functions

 callClassMethod ($methodName, $classObject, $parameterArray)
 
 execute ($operationName, $operationParameters, $mementoData=null)
 Executes the operation. More...
 
 executeBody ($includeFile, $className, $bodyStructure, $operationKeys, $operationParameterDefinitions, $operationParameters, &$mementoData, &$bodyCallCount, $operationName, $currentLoopData=null)
 Executes the operation body. More...
 
 executeClassMethod ($includeFile, $className, $methodName, $operationParameterDefinitions, $operationParameters)
 Executes a class method in an operation body. More...
 
 executeTrigger (&$bodyReturnValue, $body, $operationParameterDefinitions, $operationParameters, &$bodyCallCount, $currentLoopData, $triggerRestored, $operationName, &$operationKeys)
 Executes an operation trigger. More...
 
 eZModuleOperationInfo ($moduleName, $useTriggers=true)
 Constructor. More...
 
 isValid ()
 ??? More...
 
 loadDefinition ()
 Loads the operations definition for the current module. More...
 
 makeKeyArray ($keyDefinition, $parameterDefinition, $operationParameters)
 
 makeOperationKeyArray ($operationDefinition, $operationParameters)
 
 removeBodyMemento ($bodyName, $bodyKeys, $operationKeys, $operationParameterDefinitions, $operationParameters, &$bodyCallCount, $currentLoopData, $operationName)
 
 restoreBodyMementoData ($bodyName, &$mementoData, &$operationParameters, &$bodyCallCount, &$currentLoopData)
 
 storeBodyMemento ($bodyName, $bodyKeys, $operationKeys, $operationParameterDefinitions, $operationParameters, &$bodyCallCount, $currentLoopData, $operationName)
 Packs the current body data (memento) for save & re-use. More...
 
 storeOperationMemento ($operationKeys, $operationParameterDefinitions, $operationParameters, &$bodyCallCount, $operationName)
 

Public Attributes

 $FunctionList
 
 $IsValid
 
 $Memento
 
 $ModuleName
 
 $UseTriggers = false
 
const ERROR_CLASS_INSTANTIATE_FAILED = 7
 
const ERROR_MISSING_PARAMETER = 8
 
const ERROR_NO_CLASS = 5
 
const ERROR_NO_CLASS_METHOD = 6
 
const STATUS_CANCELLED = 2
 
const STATUS_CONTINUE = 1
 
const STATUS_HALTED = 3
 
const STATUS_QUEUED = 5
 
const STATUS_REPEAT = 4
 

Private Member Functions

 objectForClass ($className)
 Helper method that keeps and returns the instances of operation objects. More...
 

Detailed Description

The class eZModuleOperationInfo does.

Member Function Documentation

eZModuleOperationInfo::callClassMethod (   $methodName,
  $classObject,
  $parameterArray 
)
Deprecated:
use call_user_func_array() instead
eZModuleOperationInfo::execute (   $operationName,
  $operationParameters,
  $mementoData = null 
)

Executes the operation.

Parameters
string$operationName
array$operationParameters
array$mementoData
Returns
mixed the operation execution result, or null if an error occured
eZModuleOperationInfo::executeBody (   $includeFile,
  $className,
  $bodyStructure,
  $operationKeys,
  $operationParameterDefinitions,
  $operationParameters,
$mementoData,
$bodyCallCount,
  $operationName,
  $currentLoopData = null 
)

Executes the operation body.

Parameters
string$includeFilePath to the file where the operation class is defined
string$classNameName of the class holding the operation methods (
See Also
$includeFile)
Parameters
array$bodyStructure
array$operationKeys
array$operationParameterDefinitions
array$operationParameters
array$mementoData
int$bodyCallCount
string$operationName
array$currentLoopData
Returns
array

Referenced by execute().

eZModuleOperationInfo::executeClassMethod (   $includeFile,
  $className,
  $methodName,
  $operationParameterDefinitions,
  $operationParameters 
)

Executes a class method in an operation body.

Parameters
string$includeFileThe file where the class & method are defined
string$classNameThe class where the method is implemented
string$methodNameThe method to call
mixed$operationParameterDefinitionsThe method parameters definition
mixed$operationParametersThe method parameters values
Returns
array

Referenced by executeBody().

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

Executes an operation trigger.

Parameters
array$bodyReturnValueThe current return value
array$bodyBody data for the trigger being executed
array$operationParameterDefinitionsOperation parameters definition
array$operationParametersOperation parameters values
int$bodyCallCountNumber of times the body was called
array$currentLoopDataMemento data for the operation
bool$triggerRestoredBoolean that indicates if operation data (memento) was restored
string$operationNameThe operation name
array$operationKeysAdditional parameters. Only used by looping so far.
Returns

Referenced by executeBody().

eZModuleOperationInfo::eZModuleOperationInfo (   $moduleName,
  $useTriggers = true 
)

Constructor.

Parameters
string$moduleName
bool$useTriggers
eZModuleOperationInfo::isValid ( )

???

Returns
bool
eZModuleOperationInfo::loadDefinition ( )

Loads the operations definition for the current module.

Returns
bool true if the operations were loaded, false if an error occured
eZModuleOperationInfo::makeKeyArray (   $keyDefinition,
  $parameterDefinition,
  $operationParameters 
)
eZModuleOperationInfo::makeOperationKeyArray (   $operationDefinition,
  $operationParameters 
)

Referenced by execute().

eZModuleOperationInfo::objectForClass (   $className)
private

Helper method that keeps and returns the instances of operation objects.

Parameters
string$classNameThe class the method should return an object for
Returns
$className
Todo:
Use a static variable instead of globals

Referenced by executeClassMethod().

eZModuleOperationInfo::removeBodyMemento (   $bodyName,
  $bodyKeys,
  $operationKeys,
  $operationParameterDefinitions,
  $operationParameters,
$bodyCallCount,
  $currentLoopData,
  $operationName 
)
eZModuleOperationInfo::restoreBodyMementoData (   $bodyName,
$mementoData,
$operationParameters,
$bodyCallCount,
$currentLoopData 
)

Referenced by executeBody().

eZModuleOperationInfo::storeBodyMemento (   $bodyName,
  $bodyKeys,
  $operationKeys,
  $operationParameterDefinitions,
  $operationParameters,
$bodyCallCount,
  $currentLoopData,
  $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
Returns
The memento

Referenced by executeTrigger().

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

Referenced by execute(), and storeBodyMemento().

Member Data Documentation

eZModuleOperationInfo::$FunctionList
eZModuleOperationInfo::$IsValid

Referenced by isValid().

eZModuleOperationInfo::$Memento
eZModuleOperationInfo::$ModuleName
eZModuleOperationInfo::$UseTriggers = false
const eZModuleOperationInfo::ERROR_CLASS_INSTANTIATE_FAILED = 7

Referenced by execute(), and executeClassMethod().

const eZModuleOperationInfo::ERROR_MISSING_PARAMETER = 8

Referenced by execute(), and executeClassMethod().

const eZModuleOperationInfo::ERROR_NO_CLASS = 5

Referenced by execute(), and executeClassMethod().

const eZModuleOperationInfo::ERROR_NO_CLASS_METHOD = 6

Referenced by execute(), and executeClassMethod().

const eZModuleOperationInfo::STATUS_QUEUED = 5
const eZModuleOperationInfo::STATUS_REPEAT = 4

The documentation for this class was generated from the following file: