Collection
extends ArrayObject
in package
Contains a collection of Templates that may be queried.
Table of Contents
- $factory : Factory
- $writerCollection : Collection
- __construct() : mixed
- Constructs this collection and requires a factory to load templates.
- getTemplatesPath() : string
- Returns the path where all templates are stored.
- getTransformations() : array<string|int, Transformation>
- Returns a list of all transformations contained in the templates of this collection.
- load() : void
- Loads a template with the given name or file path.
Properties
$factory
private
Factory
$factory
$writerCollection
private
Collection
$writerCollection
Methods
__construct()
Constructs this collection and requires a factory to load templates.
public
__construct(Factory $factory, Collection $writerCollection) : mixed
Parameters
- $factory : Factory
- $writerCollection : Collection
Return values
mixed —getTemplatesPath()
Returns the path where all templates are stored.
public
getTemplatesPath() : string
Return values
string —getTransformations()
Returns a list of all transformations contained in the templates of this collection.
public
getTransformations() : array<string|int, Transformation>
Return values
array<string|int, Transformation> —load()
Loads a template with the given name or file path.
public
load(Transformer $transformer, string $nameOrPath) : void
Parameters
- $transformer : Transformer
- $nameOrPath : string