Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

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

## Static Public Member Functions
static | instance ( $filename=false)
static | resetHandler ()
static | cleanupGeneratingFiles ()
static | cleanupEmptyDirectories ( $path)
static | addGeneratingFile ( $file)
static | removeGeneratingFile ( $file)
static | preFork ()

## Static Public Attributes
static | $globalHandler

## Static Private Attributes
static | $generatingFiles = array()
static | $isShutdownFunctionRegistered = false

## Detailed Description

Special failure object which can be used by some of the cluster functions to inform about failures or special exceptions.

Currently used by the processCache function to report that the retrieve callback failed to retrieve data because of expiration.

Definition at line 10 of file ezclusterfilehandler.php.

## Member Function Documentation

## ◆ addGeneratingFile()

static eZClusterFileHandler::addGeneratingFile | ( |  | $file | ) |
| static

Adds a file to the generating list

Parameters

  eZDFSFileHandler | eZDFSFileHandler | $file | Cluster file handler instance Note that this method expect a version of the handler where the filePath is the REAL one, not the .generating

Definition at line 121 of file ezclusterfilehandler.php.

## ◆ cleanupEmptyDirectories()

static eZClusterFileHandler::cleanupEmptyDirectories | ( |  | $path | ) |
| static

Goes trough the directory path and removes empty directories, starting at the leaf and deleting down until a non empty directory is reached. If the path is not a directory, nothing will happen.

Parameters

  string | $path |

Definition at line 102 of file ezclusterfilehandler.php.

References eZDir\cleanupEmptyDirectories(), eZDir\dirpath(), and eZDebugSetting\writeDebug().

Referenced by eZFSFileHandler\delete(), and eZFSFileHandler\purge().

## ◆ cleanupGeneratingFiles()

static eZClusterFileHandler::cleanupGeneratingFiles | ( |  | ) |
| static

Cluster shutdown handler. Terminates generation for unterminated files. This situation doesn't happen by default, but may with custom code that doesn't follow recommendations.

Definition at line 77 of file ezclusterfilehandler.php.

References removeGeneratingFile(), and eZDebug\writeWarning().

Referenced by resetHandler().

## ◆ instance()

static eZClusterFileHandler::instance | ( |  | $filename = `false` | ) |
| static

Returns the configured instance of an eZClusterFileHandlerInterface See ClusteringSettings.FileHandler in file.ini

Parameters

  string | bool | $filename | Optional filename the handler should be initialized with

Returns
  eZClusterFileHandlerInterface

Definition at line 21 of file ezclusterfilehandler.php.

References $globalHandler, eZExecution\addCleanupHandler(), and eZExtension\getHandlerClass().

Referenced by eZImageAliasHandler\aliasList(), eZPackage\appendSimpleFile(), eZContentCache\cleanup(), eZCache\clearClassID(), eZCache\clearDesignBaseCache(), eZCache\clearItem(), eZCache\clearSortKey(), eZCache\clearStateLimitations(), eZCache\clearTextToImageCache(), eZImageManager\convert(), eZImageManager\createImageAlias(), eZBinaryFileType\deleteStoredObjectAttribute(), eZMediaType\deleteStoredObjectAttribute(), eZContentCache\exists(), eZContentLanguage\expireCache(), eZContentLanguage\fetchList(), eZBinaryFileType\fetchObjectAttributeHTTPInput(), eZMediaType\fetchObjectAttributeHTTPInput(), eZBinaryFile\fileSize(), eZMedia\fileSize(), eZNodeviewfunctions\generateNodeView(), eZUser\getUserCacheByUserId(), eZTemplateCacheBlock\handle(), eZFilePassthroughHandler\handleFileDownload(), eZTemplateImageOperator\hasImage(), eZImageAliasHandler\imageAlias(), eZImageAliasHandler\initialize(), eZBinaryFileType\insertHTTPFile(), eZMediaType\insertHTTPFile(), eZBinaryFileType\insertRegularFile(), eZMediaType\insertRegularFile(), eZURLWildcard\loadCacheFile(), eZTemplateImageOperator\loadImage(), eZBinaryFile\metaData(), eZPDF\modify(), preFork(), eZTemplateCacheFunction\processCached(), eZCache\purgeTextToImageCache(), eZUser\purgeUserCacheByUserId(), eZImageAliasHandler\recreateDOMTree(), eZImageAliasHandler\removeAliasFile(), eZSubtreeCache\removeExpiryCacheFromDisk(), eZContentCache\restore(), eZImageType\restoreTrashedObjectAttribute(), eZTemplateImageOperator\setLoadImage(), eZContentCache\store(), eZTemplateImageOperator\storeImage(), eZURI\transformURI(), eZBinaryFileType\trashStoredObjectAttribute(), eZImageType\trashStoredObjectAttribute(), eZMediaType\trashStoredObjectAttribute(), eZBinaryFileType\unserializeContentObjectAttribute(), eZMediaType\unserializeContentObjectAttribute(), and eZImageAliasHandler\updateAliasPath().

## ◆ preFork()

static eZClusterFileHandler::preFork | ( |  | ) |
| static

Performs required operations before forking a process

- disconnects DB based cluster handlers from the database

Definition at line 151 of file ezclusterfilehandler.php.

References instance().

## ◆ removeGeneratingFile()

static eZClusterFileHandler::removeGeneratingFile | ( |  | $file | ) |
| static

Removes a file from the generating list

Parameters

  eZDFSFileHandler | $file | Cluster file handler instance Note that this method expect a version of the handler where the filePath is the REAL one, not the .generating

Todo:
  Clustering: apply the eZClusterFileHandlerInterface to all cluster handlers

Definition at line 137 of file ezclusterfilehandler.php.

Referenced by cleanupGeneratingFiles().

## ◆ resetHandler()

static eZClusterFileHandler::resetHandler | ( |  | ) |
| static

Resets the handler so that a new one can be loaded

Definition at line 67 of file ezclusterfilehandler.php.

References cleanupGeneratingFiles().

## Member Data Documentation

## ◆ $generatingFiles

eZClusterFileHandler::$generatingFiles = array()
| static private

Definition at line 169 of file ezclusterfilehandler.php.

## ◆ $globalHandler

eZClusterFileHandler::$globalHandler
| static

Definition at line 181 of file ezclusterfilehandler.php.

Referenced by instance().

## ◆ $isShutdownFunctionRegistered

eZClusterFileHandler::$isShutdownFunctionRegistered = false
| static private

Definition at line 175 of file ezclusterfilehandler.php.

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

- ezclusterfilehandler.php

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