Documentation

FileResource
in package
implements ResourceInterface

A resource is something formulae can be loaded from.

Tags
author

Kris Wallsmith kris.wallsmith@gmail.com

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

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

Search results