Template
Model representing a template.
Interfaces, Classes & Used Traits
- ArrayAccess
- Countable
- IteratorAggregate
Properties
$name Line 36
private$name : string
$author Line 39
private$author : string
$version Line 42
private$version : string
$copyright Line 45
private$copyright : string
$description Line 48
private$description : string
$transformations Line 51
private$transformations : \phpDocumentor\Transformer\Transformation[]
$parameters Line 54
private$parameters : \phpDocumentor\Transformer\Template\Parameter[]
$files Line 57
private$files : \League\Flysystem\MountManager
Methods
__construct() Line 64
Initializes this object with a name and optionally with contents.
public__construct(string $name, MountManager $files) : mixed
Parameters
Name for this template.
Returns
mixed —Returns
string —
setAuthor() Line 85
The name of the author of this template (optionally including mail address).
publicsetAuthor(string $author) : void
Parameters
Name of the author optionally including mail address between angle brackets.
Returns
string —
setCopyright() Line 103
Sets the copyright string for this template.
publicsetCopyright(string $copyright) : void
Parameters
Free-form copyright notice.
getCopyright() Line 111
Returns the copyright string for this template.
publicgetCopyright() : string
Returns
string —
setVersion() Line 123
Sets the version number for this template.
publicsetVersion(string $version) : void
Parameters
Semantic version number in this format: 1.0.0
Throws
- \InvalidArgumentException
If the version number is invalid.
files() Line 148
FlySystem filesystem / MountManager containing the template files, base templates files and destination filesystem.
publicfiles() : MountManager
This MountManager has three mounts:
- template://, the files of this template
- templates://, the base folder containing phpDocumentor's global templates (i.e.
/data/templates
) - destination://, the destination where the template needs to write to
By combining this in one mount manager it is easier for writers to copy files between destinations (since MountManager's can copy between filesystems) and for writers to read and write from various locations.
Returns
MountManager —Returns
string —
setDescription() Line 167
Sets the description for this template.
publicsetDescription(string $description) : void
Parameters
An unconstrained text field where the user can provide additional information regarding details of the template.
getDescription() Line 175
Returns the description for this template.
publicgetDescription() : string
Returns
string —
offsetSet() Line 188
Sets a transformation at the given offset.
publicoffsetSet(int|string $offset, Transformation $value) : void
Parameters
The offset to place the value at.
The transformation to add to this template.
Throws
- \InvalidArgumentException
If an invalid item was received.
offsetGet() Line 205
Gets the transformation at the given offset.
publicoffsetGet(int|string $offset) : Transformation
Parameters
Index of item to unset.
Parameters
An offset to check for.
Returns
bool —Returns true on success or false on failure.
Returns
int —The count as an integer.
getParameters() Line 253
Returns the parameters associated with this template.
publicgetParameters() : \phpDocumentor\Transformer\Template\Parameter[]
Returns
\phpDocumentor\Transformer\Template\Parameter[] —
setParameter() Line 263
Sets a new parameter in the collection.
publicsetParameter(string|int $key, Parameter $value) : void
propagateParameters() Line 271
Pushes the parameters of this template into the transformations.
publicpropagateParameters() : void