Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
ezpContentPublishingProcess Class Reference
Inheritance diagram for ezpContentPublishingProcess:

## Public Member Functions
| version ()
| publish ()
| isAlive ()
| reset ( $message)
Public Member Functions inherited from eZPersistentObject
| __construct ( $row=null)
| eZPersistentObject ( $row=null)
| fill ( $row)
| remove ( $conditions=null, $extraConditions=null)
| store ( $fieldFilters=null)
| sync ( $fieldFilters=null)
| attributes ()
| hasAttribute ( $attr)
| attribute ( $attr, $noFunction=false)
| setAttribute ( $attr, $val)
| hasDirtyData ()
| setHasDirtyData ( $hasDirtyData)

## Static Public Member Functions
static | definition ()
static | fetchByContentVersionId ( $contentObjectVersionId)
static | fetchByContentObjectVersion ( $contentObjectId, $version)
static | currentWorkingProcessCount ()
static | isProcessing (eZContentObjectVersion $versionObject)
static | queue (eZContentObjectVersion $version)
static | fetchProcesses ( $status)
Static Public Member Functions inherited from eZPersistentObject
static | replaceFieldsWithShortNames (eZDBInterface $db, array $fieldDefs, &$fields)
static | count ( $def, $conds=null, $field=null)
static | fetchObject ( $def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null)
static | removeObject ( $def, $conditions=null, $extraConditions=null)
static | storeObject ( $obj, $fieldFilters=null)
static | conditionText ( $conditions)
static | conditionTextByRow ( $conditions, $row)
static | fetchObjectList ( $def, $field_filters=null, $conds=null, $sorts=null, $limit=null, $asObject=true, $grouping=false, $custom_fields=null, $custom_tables=null, $custom_conds=null)
static | handleRows ( $rows, $class_name, $asObject)
static | swapRow ( $table, $keys, $order_id, $rows, $id1, $id2)
static | newObjectOrder ( $def, $orderField, $conditions)
static | reorderObject ( $def, $orderField, $conditions, $down=true)
static | escapeArray ( $array)
static | updateObjectList ( $parameters)
static | getShortAttributeName ( $db, $def, $attrName)

## Public Attributes
const | STATUS_WORKING = 1
const | STATUS_FINISHED = 2
const | STATUS_PENDING = 3
const | STATUS_DEFERRED = 4
const | STATUS_UNKNOWN = 5
Public Attributes inherited from eZPersistentObject
| $PersistentDataDirty
| $ID
| $ContentObjectID
| $SectionID
| $OwnerID
| $ClassID
| $Published
| $Modified
| $CurrentVersion
| $Status
| $RemoteID
| $LanguageMask
| $InitialLanguageID
| $NodeID
| $ParentNodeID
| $MainNodeID
| $ContentObjectVersion
| $ContentObjectIsPublished
| $Depth
| $SortField
| $SortOrder
| $Priority
| $ModifiedSubNode
| $PathString
| $PathIdentificationString
| $IsHidden
| $IsInvisible
| $UserID
| $Name
| $Locale
| $Identifier
| $NavigationPartIdentifier
| $SerializedDescriptionList
| $URLAliasName
| $AlwaysAvailable
| $CanTranslate
| $DataInt1
| $DataInt2
| $DataInt3
| $DataInt4
| $DataFloat1
| $DataFloat2
| $DataFloat3
| $DataFloat4
| $DataText1
| $DataText2
| $DataText3
| $DataText4
| $DataText5
| $SerializedDataText
| $Category
| $PolicyID
| $Values
| $Created
| $CurrencyCode
| $ProductCollectionID
| $ItemCount
| $Price
| $IsVATIncluded
| $VATValue
| $DiscountValue
| $Email
| $IsTemporary
| $IsArchived
| $IsActive
| $OrderID
| $ModifierID
| $Code
| $Symbol
| $AutoRateValue
| $CustomRateValue
| $RateFactor
| $Main
| $MementoKey
| $MainKey
| $WorkflowEventPos
| $LanguageID
| $ContentObjectStateGroupID
| $contentobject_attribute_id
| $contentobject_id
| $rating
| $rating_count
| $rating_average

## Private Member Functions
| setStatus ( $status, $store=true, $reason=null)
| logStatusChange ( $status, $reason=null)
| getStatusString ( $status)

## Private Attributes
| $versionObject = null

## Additional Inherited Members
Static Protected Member Functions inherited from eZPersistentObject
static | replaceFieldsWithLongNames (eZDBInterface $db, array $fieldDefs, &$fields)

## Detailed Description

Definition at line 18 of file ezpcontentpublishingprocess.php.

## Member Function Documentation

## ◆ currentWorkingProcessCount()

static ezpContentPublishingProcess::currentWorkingProcessCount | ( |  | ) |
| static

Returns the number of currently working publishing processes

Returns
  int

Definition at line 127 of file ezpcontentpublishingprocess.php.

References eZPersistentObject\count().

Referenced by ezpContentPublishingQueueProcessor\isSlotAvailable().

## ◆ definition()

static ezpContentPublishingProcess::definition | ( |  | ) |
| static

eZPersistentObject definition

Returns
  array

Reimplemented from eZPersistentObject.

Definition at line 38 of file ezpcontentpublishingprocess.php.

Referenced by ezpContentPublishingQueueProcessor\cleanupFinishedProcesses().

## ◆ fetchByContentObjectVersion()

static ezpContentPublishingProcess::fetchByContentObjectVersion | ( |  | $contentObjectId,
|  |  | $version
| ) |  |
| static

Fetches a process by its content object ID + version

Parameters

  int | $contentObjectId |
  int | $version |

Returns
  ezpContentPublishingProcess

Definition at line 109 of file ezpcontentpublishingprocess.php.

References $version, and fetchByContentVersionId().

Referenced by ezpContentPublishingQueue\isQueued().

## ◆ fetchByContentVersionId()

static ezpContentPublishingProcess::fetchByContentVersionId | ( |  | $contentObjectVersionId | ) |
| static

Fetches a process by its content object version

Parameters

  int | $contentObjectVersionId |

Returns
  ezpContentPublishingProcess

Definition at line 94 of file ezpcontentpublishingprocess.php.

Referenced by fetchByContentObjectVersion().

## ◆ fetchProcesses()

static ezpContentPublishingProcess::fetchProcesses | ( |  | $status | ) |
| static

Fetches processes, filtered by status

Parameters

  int | $status | One of ezpContentPublishingProcess::STATUS_*

Returns
  array( ezpContentPublishingProcess )

Definition at line 298 of file ezpcontentpublishingprocess.php.

References $status.

Referenced by ezpContentPublishingQueueProcessor\cleanupDeadProcesses(), and ezpContentPublishingQueueProcessor\cleanupFinishedProcesses().

## ◆ getStatusString()

ezpContentPublishingProcess::getStatusString | ( |  | $status | ) |
| private

Definition at line 377 of file ezpcontentpublishingprocess.php.

References $status.

Referenced by logStatusChange().

## ◆ isAlive()

ezpContentPublishingProcess::isAlive | ( |  | ) |

Checks if the system process is running

Returns
  bool

Exceptions

  Exception | if the process isn't in WORKING status

Definition at line 314 of file ezpcontentpublishingprocess.php.

References eZPersistentObject\attribute().

## ◆ isProcessing()

static ezpContentPublishingProcess::isProcessing | ( | eZContentObjectVersion | $versionObject | ) |
| static

Checks if an object is already being processed

Parameters

  eZContentObjectVersion | $versionObject |

Returns
  bool

Definition at line 137 of file ezpcontentpublishingprocess.php.

References $count, and $versionObject.

## ◆ logStatusChange()

ezpContentPublishingProcess::logStatusChange | ( |  | $status,
|  |  | $reason = `null`
| ) |  |
| private

Logs a debug message when the process' status is updated

Parameters

  string | $status | New status
  null | $reason | Optional reason

Definition at line 359 of file ezpcontentpublishingprocess.php.

References $status, eZPersistentObject\attribute(), getStatusString(), version(), and eZDebugSetting\writeDebug().

Referenced by setStatus().

## ◆ publish()

ezpContentPublishingProcess::publish | ( |  | ) |

Starts the publishing process for the linked version. After publishing, the child process is terminated.

Returns
  false|int false if the fork fails, the pid of the child process after the fork

Definition at line 156 of file ezpcontentpublishingprocess.php.

References $db, $ini, exit, eZClusterFileHandler\instance(), ezpKernel\instance(), eZClusterFileHandler\preFork(), reset(), eZPersistentObject\setAttribute(), setStatus(), ezpContentPublishingQueue\signals(), STATUS_DEFERRED, STATUS_FINISHED, STATUS_UNKNOWN, eZPersistentObject\store(), and version().

## ◆ queue()

static ezpContentPublishingProcess::queue | ( | eZContentObjectVersion | $version | ) |
| static

Adds a version to the publishing queue

Parameters

  eZContentObjectVersion | $version |

Returns
  ezpContentPublishingProcess

Definition at line 280 of file ezpcontentpublishingprocess.php.

References $row, and $version.

Referenced by ezpContentPublishingQueue\add().

## ◆ reset()

ezpContentPublishingProcess::reset | ( |  | $message | ) |

Resets the current process to the PENDING state

Todo:
  Monitor the reset operation, using some kind of counter. The process must NOT get high priority, as it might block a slot if it fails constantly Maybe use a STATUS_RESET status, that gives lower priority to the item

Definition at line 331 of file ezpcontentpublishingprocess.php.

References eZPersistentObject\setAttribute(), setStatus(), and eZPersistentObject\store().

Referenced by publish().

## ◆ setStatus()

ezpContentPublishingProcess::setStatus | ( |  | $status,
|  |  | $store = `true`,
|  |  | $reason = `null`
| ) |  |
| private

Sets the status to $status and stores (by default) the persistent object

Parameters

  int | $status |
  bool | $store |

Definition at line 343 of file ezpcontentpublishingprocess.php.

References $status, logStatusChange(), eZPersistentObject\setAttribute(), and eZPersistentObject\store().

Referenced by publish(), and reset().

## ◆ version()

ezpContentPublishingProcess::version | ( |  | ) |

Returns the version object the process is linked to

Returns
  eZContentObjectVersion

Definition at line 81 of file ezpcontentpublishingprocess.php.

References $versionObject, and eZPersistentObject\attribute().

Referenced by logStatusChange(), and publish().

## Member Data Documentation

## ◆ $versionObject

ezpContentPublishingProcess::$versionObject = null
| private

Definition at line 390 of file ezpcontentpublishingprocess.php.

Referenced by isProcessing(), and version().

## ◆ STATUS_DEFERRED

const ezpContentPublishingProcess::STATUS_DEFERRED = 4

Set when an operation is deferred to crontab

Definition at line 27 of file ezpcontentpublishingprocess.php.

Referenced by publish().

## ◆ STATUS_FINISHED

const ezpContentPublishingProcess::STATUS_FINISHED = 2

Definition at line 21 of file ezpcontentpublishingprocess.php.

Referenced by ezpContentPublishingQueueProcessor\cleanupFinishedProcesses(), and publish().

## ◆ STATUS_PENDING

const ezpContentPublishingProcess::STATUS_PENDING = 3

Definition at line 22 of file ezpcontentpublishingprocess.php.

## ◆ STATUS_UNKNOWN

const ezpContentPublishingProcess::STATUS_UNKNOWN = 5

Joker status, used for non handling operation results

Definition at line 32 of file ezpcontentpublishingprocess.php.

Referenced by publish().

## ◆ STATUS_WORKING

const ezpContentPublishingProcess::STATUS_WORKING = 1

Definition at line 20 of file ezpcontentpublishingprocess.php.

Referenced by ezpContentPublishingQueueProcessor\cleanupDeadProcesses().

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

- ezpcontentpublishingprocess.php

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