lib/ezutils/classes/ezexpiryhandler.php
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
Methods


fetchData(
string $path
)
:
void
static
Includes the expiry file and extracts the $Timestamps variable from it.
Parameters
Name | Type | Description |
---|---|---|
$path | string |


getTimestamp(
string $name, int $default
=
false
)
:
mixed
static
Returns the expiry timestamp for a key, or a default value if it isn't set
Parameters
Returns
Name | Type | Description |
---|---|---|
$name | string | Expiry key name |
$default | int | Default value that will be returned if the key isn't set |
Type | Description |
---|---|
mixed | The expiry timestamp, or $default |


hasInstance(
)
:
bool
static
Checks if a shared instance of eZExpiryHandler exists
Returns
Type | Description |
---|---|
bool | true if an instance exists, false otherwise |


hasTimestamp(
string $name
)
:
bool
Checks if an expiry timestamp exist
Parameters
Returns
Name | Type | Description |
---|---|---|
$name | string | Expiry key name |
Type | Description |
---|---|
bool | true if the timestamp exists, false otherwise |


instance(
)
:
\eZExpiryHandler
static
Returns a shared instance of the eZExpiryHandler class
Returns
Type | Description |
---|---|
\eZExpiryHandler |


isModified(
)
:
bool
Returns the data modification status
Returns
Details
Type | Description |
---|---|
bool | true if data was modified, false if it wasn't |
- Deprecated
- 4.2 will be removed in 4.3


setTimestamp(
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 |