kernel/private/classes/ezscripttrashpurge.php

Show: inherited
Table of Contents

This class handles purging of trash items. It is used by both the script and cronjob.

Copyright
Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.  
License
eZ Business Use License Agreement Version 2.0  
Package
kernel  
Version
4.6.0  

\eZScriptTrashPurge

Package: kernel

This class handles purging of trash items. It is used by both the script and cronjob.

Copyright
Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.  
License
eZ Business Use License Agreement Version 2.0  
Version
4.6.0  

Properties

Propertyprotected\eZCLI  $cli= ''

eZCLI object used along running the operation.

Details
Type
\eZCLI
Propertyprotectedstring  $logFile= ''

Filename to use while logging memory monitoring.

Details
Type
string
Propertyprotectedbool  $memoryMonitoring= ''

Whether memory monitoring is active.

Details
Type
bool
Propertyprotectedbool  $quiet= ''

Whether the operation should be quiet.

Details
Type
bool
Propertyprotected\eZScript  $script= ''

eZScript object used along running the operation.

Details
Type
\eZScript

Methods

methodpublic__construct( \eZCLI $cli, bool $quiet = true, bool $memoryMonitoring = false, \eZScript $script = null, string $logFile = "trashpurge.log" ) : void

Constructor of eZScriptTrashPurge.

Parameters
Name Type Description
$cli \eZCLI

The instance of eZCLI.

$quiet bool

Whether the operation should be quiet or not.

$memoryMonitoring bool

Set to true to turn on memory monitoring.

$script \eZScript

Optional eZScript object used while running.

$logFile string

Log file to use for memory monitoring.

methodprivatemonitor( string $text ) : void

Log memory usage.

Parameters
Name Type Description
$text string

Text to use while logging.

methodpublicrun( int | null $iterationLimit = 100, int | null $sleep = 1 ) : bool

Executes the purge operation

Parameters
Name Type Description
$iterationLimit int | null

Number of trashed objects to treat per iteration, use null to use a default value.

$sleep int | null

Number of seconds to sleep between two iterations, use null to use a default value.

Returns
Type Description
bool True if the operation succeeded.
Documentation was generated by DocBlox 0.18.1.