eZ Publish  [4.2]
eZExpiryHandler Class Reference

Keeps track of expiry keys and their timestamps. More...

List of all members.

Public Member Functions

 eZExpiryHandler ()
 hasTimestamp ($name)
 isModified ()
 Returns the data modification status.
 restore ()
 setTimestamp ($name, $value)
 store ()
 timestamp ($name)

Static Public Member Functions

static fetchData ($path)
static getTimestamp ($name, $default=false)
static hasInstance ()
static instance ()
 Returns a shared instance of the eZExpiryHandler class.
static registerShutdownFunction ()
static shutdown ()

Public Attributes

 $IsModified
 $Timestamps

Static Private Attributes

static $isShutdownFunctionRegistered = false

Detailed Description

Keeps track of expiry keys and their timestamps.

Definition at line 40 of file ezexpiryhandler.php.


Member Function Documentation

eZExpiryHandler::eZExpiryHandler ( )

Constructor

Definition at line 45 of file ezexpiryhandler.php.

Referenced by hasInstance(), and instance().

static eZExpiryHandler::fetchData ( path) [static]

Includes the expiry file and extracts the $Timestamps variable from it.

Definition at line 69 of file ezexpiryhandler.php.

static eZExpiryHandler::getTimestamp ( name,
default = false 
) [static]
Returns:
the timestamp value for the expiry key $name if it exists or false if not,

Definition at line 134 of file ezexpiryhandler.php.

Referenced by eZTemplateCacheBlock\handle(), and eZTemplateCacheFunction\processCached().

static eZExpiryHandler::hasInstance ( ) [static]
Returns:
true if there's a unique instance of the expiry handler, false otherwise.

Definition at line 164 of file ezexpiryhandler.php.

Referenced by shutdown().

eZExpiryHandler::hasTimestamp ( name)
Returns:
true if the expiry key $name exists.

Definition at line 112 of file ezexpiryhandler.php.

eZExpiryHandler::isModified ( )

Returns the data modification status.

Returns:
bool true if data was modified, false if it wasn't
Deprecated:
4.2 will be removed in 4.3

Definition at line 196 of file ezexpiryhandler.php.

eZExpiryHandler::restore ( )

Will load timestamp values from disk.

Definition at line 58 of file ezexpiryhandler.php.

Referenced by eZExpiryHandler().

eZExpiryHandler::setTimestamp ( name,
value 
)

Sets the timestamp value $value for expiry key $name.

Definition at line 103 of file ezexpiryhandler.php.

static eZExpiryHandler::shutdown ( ) [static]

Called at the end of execution and will store the data if it is modified.

Definition at line 172 of file ezexpiryhandler.php.

eZExpiryHandler::store ( )

Will store the current timestamp values to disk.

Definition at line 78 of file ezexpiryhandler.php.

eZExpiryHandler::timestamp ( name)
Returns:
the timestamp value for the expiry key $name if it exists or false if not,

Definition at line 120 of file ezexpiryhandler.php.


Member Data Documentation

eZExpiryHandler::$IsModified

Definition at line 213 of file ezexpiryhandler.php.

eZExpiryHandler::$isShutdownFunctionRegistered = false [static, private]

Definition at line 205 of file ezexpiryhandler.php.

Referenced by registerShutdownFunction().

eZExpiryHandler::$Timestamps

Definition at line 207 of file ezexpiryhandler.php.

Referenced by fetchData(), and restore().


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