lib/ezutils/classes/ezexpiryhandler.php
\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
)
:
boolChecks 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(
)
:
boolReturns 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
)
:
voidSets the expiry timestamp for a key
Parameters
| Name | Type | Description |
|---|---|---|
| $name | string | Expiry key |
| $value | int | Expiry timestamp value |