Class

Symfony\Component\Config\Resource\DirectoryResource

class DirectoryResource implements ResourceInterface, Serializable

DirectoryResource represents a resources stored in a subdirectory tree.

Methods

__construct(string $resource, string $pattern = null)

Constructor.

string __toString()

Returns a string representation of the Resource.

mixed getResource()

Returns the resource tied to this Resource.

getPattern()

bool isFresh(int $timestamp)

Returns true if the resource has not been updated since the given timestamp.

serialize()

unserialize($serialized)

Details

at line 30
public __construct(string $resource, string $pattern = null)

Constructor.

Parameters

string $resource The file path to the resource
string $pattern A pattern to restrict monitored files

at line 41
public string __toString()

Returns a string representation of the Resource.

Return Value

string A string representation of the Resource

at line 51
public mixed getResource()

Returns the resource tied to this Resource.

Return Value

mixed The resource

at line 56
public getPattern()

at line 68
public bool isFresh(int $timestamp)

Returns true if the resource has not been updated since the given timestamp.

Parameters

int $timestamp The last time the resource was loaded

Return Value

bool true if the resource has not been updated, false otherwise

at line 93
public serialize()

at line 98
public unserialize($serialized)

Parameters

$serialized