TwigResource
in package
implements
ResourceInterface
A Twig template resource.
Tags
Interfaces, Classes and Traits
- ResourceInterface
- A resource is something formulae can be loaded from.
Table of Contents
- $loader : mixed
- $name : mixed
- __construct() : mixed
- __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
$loader
private
mixed
$loader
$name
private
mixed
$name
Methods
__construct()
public
__construct(Twig_LoaderInterface $loader, mixed $name) : mixed
Parameters
- $loader : Twig_LoaderInterface
- $name : mixed
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