eZ Publish  [trunk]
eZExpiryHandler Class Reference

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

List of all members.

Public Member Functions

 eZExpiryHandler ()
 Constructor.
 hasTimestamp ($name)
 Checks if an expiry timestamp exist.
 isModified ()
 Returns the data modification status.
 restore ()
 Load the expiry timestamps from cache.
 setTimestamp ($name, $value)
 Sets the expiry timestamp for a key.
 store ()
 Stores the current timestamps values to cache.
 timestamp ($name)
 Returns the expiry timestamp for a key.

Static Public Member Functions

static fetchData ($path)
 Includes the expiry file and extracts the $Timestamps variable from it.
static getTimestamp ($name, $default=false)
 Returns the expiry timestamp for a key, or a default value if it isn't set.
static hasInstance ()
 Checks if a shared instance of eZExpiryHandler exists.
static instance ()
 Returns a shared instance of the eZExpiryHandler class.
static registerShutdownFunction ()
 Registers the shutdown function.
static shutdown ()
 Called at the end of execution and will store the data if it is modified.

Public Attributes

 $IsModified
 $Timestamps

Static Private Attributes

static $isShutdownFunctionRegistered = false

Detailed Description

Keeps track of expiry keys and their timestamps.

Definition at line 15 of file ezexpiryhandler.php.


Member Function Documentation

Constructor.

Definition at line 20 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.

Parameters:
string$path

Definition at line 46 of file ezexpiryhandler.php.

static eZExpiryHandler::getTimestamp ( name,
default = false 
) [static]

Returns the expiry timestamp for a key, or a default value if it isn't set.

Parameters:
string$nameExpiry key name
int$defaultDefault value that will be returned if the key isn't set
Returns:
mixed The expiry timestamp, or $default

Definition at line 113 of file ezexpiryhandler.php.

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

static eZExpiryHandler::hasInstance ( ) [static]

Checks if a shared instance of eZExpiryHandler exists.

Returns:
bool true if an instance exists, false otherwise

Definition at line 144 of file ezexpiryhandler.php.

Referenced by shutdown().

Checks if an expiry timestamp exist.

Parameters:
string$nameExpiry key name
Returns:
bool true if the timestamp exists, false otherwise

Definition at line 83 of file ezexpiryhandler.php.

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 177 of file ezexpiryhandler.php.

Load the expiry timestamps from cache.

Returns:
void

Definition at line 35 of file ezexpiryhandler.php.

Referenced by eZExpiryHandler().

eZExpiryHandler::setTimestamp ( name,
value 
)

Sets the expiry timestamp for a key.

Parameters:
string$nameExpiry key
int$valueExpiry timestamp value

Definition at line 70 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 152 of file ezexpiryhandler.php.

Stores the current timestamps values to cache.

Definition at line 55 of file ezexpiryhandler.php.

Returns the expiry timestamp for a key.

Parameters:
string$nameExpiry key
Returns:
int|false The timestamp if it exists, false otherwise

Definition at line 95 of file ezexpiryhandler.php.


Member Data Documentation

eZExpiryHandler::$IsModified

Definition at line 198 of file ezexpiryhandler.php.

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

Definition at line 186 of file ezexpiryhandler.php.

Referenced by registerShutdownFunction().

eZExpiryHandler::$Timestamps

Definition at line 192 of file ezexpiryhandler.php.

Referenced by fetchData(), and restore().


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