DirectoryResource
in package
implements
SelfCheckingResourceInterface
DirectoryResource represents a resources stored in a subdirectory tree.
Tags
Interfaces, Classes and Traits
- SelfCheckingResourceInterface
- Interface for Resources that can check for freshness autonomously, without special support from external services.
Table of Contents
- $pattern : mixed
- $resource : mixed
- __construct() : mixed
- __toString() : string
- getPattern() : string|null
- getResource() : string
- isFresh() : bool
- Returns true if the resource has not been updated since the given timestamp.
Properties
$pattern
private
mixed
$pattern
$resource
private
mixed
$resource
Methods
__construct()
public
__construct(string $resource[, string|null $pattern = null ]) : mixed
Parameters
- $resource : string
-
The file path to the resource
- $pattern : string|null = null
-
A pattern to restrict monitored files
Tags
Return values
mixed —__toString()
public
__toString() : string
Return values
string —getPattern()
public
getPattern() : string|null
Return values
string|null —getResource()
public
getResource() : string
Return values
string —isFresh()
Returns true if the resource has not been updated since the given timestamp.
public
isFresh(int $timestamp) : bool
Parameters
- $timestamp : int
-
The last time the resource was loaded