FileResource
in package
implements
ResourceInterface
A resource is something formulae can be loaded from.
Tags
Interfaces, Classes and Traits
- ResourceInterface
- A resource is something formulae can be loaded from.
Table of Contents
- $path : mixed
- __construct() : mixed
- Constructor.
- __toString() : string
- Returns a unique string for the current resource.
- getContent() : string
- Returns the content of the resource.
- isFresh() : bool
- Checks if a timestamp represents the latest resource.
Properties
$path
private
mixed
$path
Methods
__construct()
Constructor.
public
__construct(string $path) : mixed
Parameters
- $path : string
-
The path to a file
Return values
mixed —__toString()
Returns a unique string for the current resource.
public
__toString() : string
Return values
string —A unique string to identity the current resource
getContent()
Returns the content of the resource.
public
getContent() : string
Return values
string —The content
isFresh()
Checks if a timestamp represents the latest resource.
public
isFresh(mixed $timestamp) : bool
Parameters
- $timestamp : mixed
-
A UNIX timestamp
Return values
bool —True if the timestamp is up to date