Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Public Attributes | Private Member Functions | List of all members
eZModuleOperationInfo Class Reference

The class eZModuleOperationInfo does. More...

## Public Member Functions
| __construct ( $moduleName, $useTriggers=true)
| isValid ()
| loadDefinition ()
| makeOperationKeyArray ( $operationDefinition, $operationParameters)
| makeKeyArray ( $keyDefinition, $parameterDefinition, $operationParameters)
| execute ( $operationName, $operationParameters, $mementoData=null)
| executeBody ( $includeFile, $className, $bodyStructure, $operationKeys, $operationParameterDefinitions, $operationParameters, &$mementoData, &$bodyCallCount, $operationName, $currentLoopData=null, $onInterrupt=null)
| executeTrigger (&$bodyReturnValue, $body, $operationParameterDefinitions, $operationParameters, &$bodyCallCount, $currentLoopData, $triggerRestored, $operationName, &$operationKeys)
| storeOperationMemento ( $operationKeys, $operationParameterDefinitions, $operationParameters, &$bodyCallCount, $operationName)
| removeBodyMemento ( $bodyName, $bodyKeys, $operationKeys, $operationParameterDefinitions, $operationParameters, &$bodyCallCount, $currentLoopData, $operationName)
| storeBodyMemento ( $bodyName, $bodyKeys, $operationKeys, $operationParameterDefinitions, $operationParameters, &$bodyCallCount, $currentLoopData, $operationName)
| restoreBodyMementoData ( $bodyName, &$mementoData, &$operationParameters, &$bodyCallCount, &$currentLoopData)
| executeClassMethod ( $includeFile, $className, $methodName, $operationParameterDefinitions, $operationParameters)

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

## Private Member Functions
| objectForClass ( $className)

## Detailed Description

The class eZModuleOperationInfo does.

Definition at line 17 of file ezmoduleoperationinfo.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZModuleOperationInfo::__construct | ( |  | $moduleName,
|  |  | $useTriggers = `true`
| ) |  |

Constructor

Parameters

  string | $moduleName |
  bool | $useTriggers |

Definition at line 37 of file ezmoduleoperationinfo.php.

## Member Function Documentation

## ◆ execute()

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

Definition at line 126 of file ezmoduleoperationinfo.php.

References $ModuleName, ERROR_CLASS_INSTANTIATE_FAILED, ERROR_MISSING_PARAMETER, ERROR_NO_CLASS, ERROR_NO_CLASS_METHOD, executeBody(), eZOperationMemento\fetchList(), eZOperationMemento\fetchMain(), makeOperationKeyArray(), STATUS_HALTED, STATUS_REPEAT, storeOperationMemento(), and eZDebug\writeError().

## ◆ executeBody()

eZModuleOperationInfo::executeBody | ( |  | $includeFile,
|  |  | $className,
|  |  | $bodyStructure,
|  |  | $operationKeys,
|  |  | $operationParameterDefinitions,
|  |  | $operationParameters,
|  | & | $mementoData,
|  | & | $bodyCallCount,
|  |  | $operationName,
|  |  | $currentLoopData = `null`,
|  |  | $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 also
  $includeFile)

Parameters

  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

Returns
  array

Definition at line 339 of file ezmoduleoperationinfo.php.

References executeClassMethod(), executeTrigger(), restoreBodyMementoData(), STATUS_CANCELLED, STATUS_CONTINUE, STATUS_HALTED, STATUS_REPEAT, and eZDebug\writeError().

Referenced by execute().

## ◆ executeClassMethod()

eZModuleOperationInfo::executeClassMethod | ( |  | $includeFile,
|  |  | $className,
|  |  | $methodName,
|  |  | $operationParameterDefinitions,
|  |  | $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

Returns
  array

Definition at line 771 of file ezmoduleoperationinfo.php.

References ERROR_CLASS_INSTANTIATE_FAILED, ERROR_MISSING_PARAMETER, ERROR_NO_CLASS, ERROR_NO_CLASS_METHOD, and objectForClass().

Referenced by executeBody().

## ◆ executeTrigger()

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

Executes an operation trigger

Parameters

  array | $bodyReturnValue | The current return value
  array | $body | Body data for the trigger being executed
  array | $operationParameterDefinitions | Operation parameters definition
  array | $operationParameters | Operation parameters values
  int | $bodyCallCount | Number of times the body was called
  array | $currentLoopData | Memento data for the operation
  bool | $triggerRestored | Boolean that indicates if operation data (memento) was restored
  string | $operationName | The operation name
  array | $operationKeys | Additional parameters. Only used by looping so far.

Returns

Definition at line 598 of file ezmoduleoperationinfo.php.

References eZTrigger\FETCH_TEMPLATE, eZTrigger\FETCH_TEMPLATE_REPEAT, eZTrigger\NO_CONNECTED_WORKFLOWS, eZTrigger\REDIRECT, eZTrigger\runTrigger(), STATUS_CANCELLED, STATUS_CONTINUE, eZTrigger\STATUS_CRON_JOB, STATUS_HALTED, eZContentObjectVersion\STATUS_REPEAT, STATUS_REPEAT, storeBodyMemento(), eZTrigger\WORKFLOW_CANCELLED, eZTrigger\WORKFLOW_DONE, and eZTrigger\WORKFLOW_RESET.

Referenced by executeBody().

## ◆ isValid()

eZModuleOperationInfo::isValid | ( |  | ) |

???

Returns
  bool

Definition at line 51 of file ezmoduleoperationinfo.php.

References $IsValid.

## ◆ loadDefinition()

eZModuleOperationInfo::loadDefinition | ( |  | ) |

Loads the operations definition for the current module

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

Definition at line 60 of file ezmoduleoperationinfo.php.

References $OperationList, eZModule\globalPathList(), and eZDebug\writeError().

## ◆ makeKeyArray()

eZModuleOperationInfo::makeKeyArray | ( |  | $keyDefinition,
|  |  | $parameterDefinition,
|  |  | $operationParameters
| ) |  |

Definition at line 98 of file ezmoduleoperationinfo.php.

Referenced by makeOperationKeyArray(), removeBodyMemento(), storeBodyMemento(), and storeOperationMemento().

## ◆ makeOperationKeyArray()

eZModuleOperationInfo::makeOperationKeyArray | ( |  | $operationDefinition,
|  |  | $operationParameters
| ) |  |

Definition at line 87 of file ezmoduleoperationinfo.php.

References makeKeyArray().

Referenced by execute().

## ◆ objectForClass()

eZModuleOperationInfo::objectForClass | ( |  | $className | ) |
| private

Helper method that keeps and returns the instances of operation objects

Parameters

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

Returns
  $className

Todo:
  Use a static variable instead of globals

Definition at line 840 of file ezmoduleoperationinfo.php.

Referenced by executeClassMethod().

## ◆ removeBodyMemento()

eZModuleOperationInfo::removeBodyMemento | ( |  | $bodyName,
|  |  | $bodyKeys,
|  |  | $operationKeys,
|  |  | $operationParameterDefinitions,
|  |  | $operationParameters,
|  | & | $bodyCallCount,
|  |  | $currentLoopData,
|  |  | $operationName
| ) |  |

Definition at line 681 of file ezmoduleoperationinfo.php.

References makeKeyArray().

## ◆ restoreBodyMementoData()

eZModuleOperationInfo::restoreBodyMementoData | ( |  | $bodyName,
|  | & | $mementoData,
|  | & | $operationParameters,
|  | & | $bodyCallCount,
|  | & | $currentLoopData
| ) |  |

Definition at line 721 of file ezmoduleoperationinfo.php.

Referenced by executeBody().

## ◆ storeBodyMemento()

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

Definition at line 701 of file ezmoduleoperationinfo.php.

References $ModuleName, eZOperationMemento\create(), eZHTTPTool\instance(), makeKeyArray(), and storeOperationMemento().

Referenced by executeTrigger().

## ◆ storeOperationMemento()

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

Definition at line 660 of file ezmoduleoperationinfo.php.

References $ModuleName, eZOperationMemento\create(), and makeKeyArray().

Referenced by execute(), and storeBodyMemento().

## Member Data Documentation

## ◆ $FunctionList

eZModuleOperationInfo::$FunctionList

Definition at line 856 of file ezmoduleoperationinfo.php.

## ◆ $IsValid

eZModuleOperationInfo::$IsValid

Definition at line 857 of file ezmoduleoperationinfo.php.

Referenced by isValid().

## ◆ $Memento

eZModuleOperationInfo::$Memento

Definition at line 863 of file ezmoduleoperationinfo.php.

## ◆ $ModuleName

eZModuleOperationInfo::$ModuleName

Definition at line 855 of file ezmoduleoperationinfo.php.

Referenced by execute(), storeBodyMemento(), and storeOperationMemento().

## ◆ $OperationList

eZModuleOperationInfo::$OperationList

Definition at line 19 of file ezmoduleoperationinfo.php.

Referenced by loadDefinition().

## ◆ $UseTriggers

eZModuleOperationInfo::$UseTriggers = false

Definition at line 858 of file ezmoduleoperationinfo.php.

## ◆ ERROR_CLASS_INSTANTIATE_FAILED

const eZModuleOperationInfo::ERROR_CLASS_INSTANTIATE_FAILED = 7

Definition at line 22 of file ezmoduleoperationinfo.php.

Referenced by execute(), and executeClassMethod().

## ◆ ERROR_MISSING_PARAMETER

const eZModuleOperationInfo::ERROR_MISSING_PARAMETER = 8

Definition at line 23 of file ezmoduleoperationinfo.php.

Referenced by execute(), and executeClassMethod().

## ◆ ERROR_NO_CLASS

const eZModuleOperationInfo::ERROR_NO_CLASS = 5

Definition at line 20 of file ezmoduleoperationinfo.php.

Referenced by execute(), and executeClassMethod().

## ◆ ERROR_NO_CLASS_METHOD

const eZModuleOperationInfo::ERROR_NO_CLASS_METHOD = 6

Definition at line 21 of file ezmoduleoperationinfo.php.

Referenced by execute(), and executeClassMethod().

## ◆ STATUS_CANCELLED

const eZModuleOperationInfo::STATUS_CANCELLED = 2

Definition at line 26 of file ezmoduleoperationinfo.php.

Referenced by executeBody(), executeTrigger(), and eZContentUpload\publishObject().

## ◆ STATUS_CONTINUE

const eZModuleOperationInfo::STATUS_CONTINUE = 1

Definition at line 25 of file ezmoduleoperationinfo.php.

Referenced by executeBody(), executeTrigger(), eZContentUpload\publishObject(), and eZContentFunctions\updateAndPublishObject().

## ◆ STATUS_HALTED

const eZModuleOperationInfo::STATUS_HALTED = 3

Definition at line 27 of file ezmoduleoperationinfo.php.

Referenced by execute(), executeBody(), executeTrigger(), and eZContentUpload\publishObject().

## ◆ STATUS_QUEUED

const eZModuleOperationInfo::STATUS_QUEUED = 5

Definition at line 29 of file ezmoduleoperationinfo.php.

## ◆ STATUS_REPEAT

const eZModuleOperationInfo::STATUS_REPEAT = 4

Definition at line 28 of file ezmoduleoperationinfo.php.

Referenced by execute(), executeBody(), and executeTrigger().

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

- ezmoduleoperationinfo.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.