Documentation

DirectoryResource
in package
implements SelfCheckingResourceInterface

DirectoryResource represents a resources stored in a subdirectory tree.

Tags
author

Fabien Potencier fabien@symfony.com

final

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

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
throws
InvalidArgumentException
Return values
mixed

getPattern()

public getPattern() : string|null
Return values
string|null

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

Return values
bool

Search results