Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

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

## Public Member Functions
| __construct (eZCLI $cli, $quiet=true, $memoryMonitoring=false, eZScript $script=null, $logFile="trashpurge.log")
| run ( $iterationLimit=100, $sleep=1, $trashedDays=null)

## Protected Attributes
| $cli
| $quiet
| $memoryMonitoring
| $script
| $logFile

## Private Member Functions
| monitor ( $text)

## Detailed Description

Definition at line 12 of file ezscripttrashpurge.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZScriptTrashPurge::__construct | ( | eZCLI | $cli,
|  |  | $quiet = `true`,
|  |  | $memoryMonitoring = `false`,
|  | eZScript | $script = `null`,
|  |  | $logFile = `"trashpurge.log"`
| ) |  |

Constructor of eZScriptTrashPurge.

Parameters

  eZCLI | $cli | The instance of eZCLI.
  bool | $quiet | Whether the operation should be quiet or not.
  bool | $memoryMonitoring | Set to true to turn on memory monitoring.
  eZScript | $script | Optional eZScript object used while running.
  string | $logFile | Log file to use for memory monitoring.

Definition at line 59 of file ezscripttrashpurge.php.

References $cli, $logFile, $memoryMonitoring, $quiet, and $script.

## Member Function Documentation

## ◆ monitor()

eZScriptTrashPurge::monitor | ( |  | $text | ) |
| private

Log memory usage.

Parameters

  string | $text | Text to use while logging.

Definition at line 181 of file ezscripttrashpurge.php.

References eZLog\write().

Referenced by run().

## ◆ run()

eZScriptTrashPurge::run | ( |  | $iterationLimit = `100`,
|  |  | $sleep = `1`,
|  |  | $trashedDays = `null`
| ) |  |

Executes the purge operation

Parameters

  int | null | $iterationLimit | Number of trashed objects to treat per iteration, use null to use a default value.
  int | null | $sleep | Number of seconds to sleep between two iterations, use null to use a default value.
  int | null | $trashedDays | Number of days an object should had been in trash to be purged, use null to use a default value so any object in the trash will be purged.

Returns
  bool True if the operation succeeded.

Definition at line 77 of file ezscripttrashpurge.php.

References $db, $user, monitor(), and eZLog\rotateLog().

## Member Data Documentation

## ◆ $cli

eZScriptTrashPurge::$cli
| protected

Definition at line 20 of file ezscripttrashpurge.php.

Referenced by __construct().

## ◆ $logFile

eZScriptTrashPurge::$logFile
| protected

Definition at line 48 of file ezscripttrashpurge.php.

Referenced by __construct().

## ◆ $memoryMonitoring

eZScriptTrashPurge::$memoryMonitoring
| protected

Definition at line 34 of file ezscripttrashpurge.php.

Referenced by __construct().

## ◆ $quiet

eZScriptTrashPurge::$quiet
| protected

Definition at line 27 of file ezscripttrashpurge.php.

Referenced by __construct().

## ◆ $script

eZScriptTrashPurge::$script
| protected

Definition at line 41 of file ezscripttrashpurge.php.

Referenced by __construct().

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

- ezscripttrashpurge.php

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