lib/ezutils/classes/ezexpiryhandler.php

Show: inherited
Table of Contents

File containing the eZExpiryHandler class.

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

\eZExpiryHandler

Package: Default

Keeps track of expiry keys and their timestamps

Class
eZExpiryHandler ezexpiryhandler.php  

Properties

Propertypublicbool  $IsModified= ''

Wether data has been modified or not

Details
Type
bool
Propertypublicarray  $Timestamps= ''

Holds the expiry timestamps array

Details
Type
array
Propertyprivatebool  $isShutdownFunctionRegistered= 'false'
static

Indicates if thre shutdown function has been registered

Default valuefalseDetails
Type
bool

Methods

methodpubliceZExpiryHandler( ) : void

Constructor

methodpublicfetchData( string $path ) : void
static

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

Parameters
Name Type Description
$path string
methodpublicgetTimestamp( string $name, int $default = false ) : mixed
static

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

Parameters
Name Type Description
$name string

Expiry key name

$default int

Default value that will be returned if the key isn't set

Returns
Type Description
mixed The expiry timestamp, or $default
methodpublichasInstance( ) : bool
static

Checks if a shared instance of eZExpiryHandler exists

Returns
Type Description
bool true if an instance exists, false otherwise
methodpublichasTimestamp( string $name ) : bool

Checks if an expiry timestamp exist

Parameters
Name Type Description
$name string

Expiry key name

Returns
Type Description
bool true if the timestamp exists, false otherwise
methodpublicinstance( ) : \eZExpiryHandler
static

Returns a shared instance of the eZExpiryHandler class

Returns
Type Description
\eZExpiryHandler
methodpublicisModified( ) : bool

Returns the data modification status

Returns
Type Description
bool true if data was modified, false if it wasn't
Details
Deprecated
4.2 will be removed in 4.3  
methodpublicregisterShutdownFunction( ) : void
static

Registers the shutdown function.

methodpublicrestore( ) : void

Load the expiry timestamps from cache

methodpublicsetTimestamp( string $name, int $value ) : void

Sets the expiry timestamp for a key

Parameters
Name Type Description
$name string

Expiry key

$value int

Expiry timestamp value

methodpublicshutdown( ) : void
static

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

methodpublicstore( ) : void

Stores the current timestamps values to cache

methodpublictimestamp( string $name ) : int | false

Returns the expiry timestamp for a key

Parameters
Name Type Description
$name string

Expiry key

Returns
Type Description
int | false The timestamp if it exists, false otherwise
Documentation was generated by DocBlox 0.18.1.