Properties

$name

$name : string

Type

string — Name for this template

$author

$author : string

Type

string — The name and optionally mail address of the author, i.e. `Mike van Riel <[email protected]>`.

$version

$version : string

Type

string — The version of the template according to semantic versioning, i.e. 1.2.0

$copyright

$copyright : string

Type

string — A free-form copyright notice.

$description

$description : string

Type

string — a text providing more information on this template.

$transformations

$transformations : \phpDocumentor\Transformer\Transformation[]

Type

Transformation[] — A series of transformations to execute in sequence during transformation.

$parameters

$parameters : \phpDocumentor\Transformer\Template\Parameter[]

Type

Parameter[] — Global parameters that are passed to each transformation.

$files

$files : \League\Flysystem\MountManager

Type

\League\Flysystem\MountManager —

Methods

__construct()

__construct(string  $name, \League\Flysystem\MountManager  $files) : mixed

Initializes this object with a name and optionally with contents.

Parameters

string $name

Name for this template.

\League\Flysystem\MountManager $files

Returns

mixed —

getName()

getName() : string

Name for this template.

Returns

string —

setAuthor()

setAuthor(string  $author) : void

The name of the author of this template (optionally including mail address).

Parameters

string $author

Name of the author optionally including mail address between angle brackets.

getAuthor()

getAuthor() : string

Returns the name and/or mail address of the author.

Returns

string —

setCopyright()

setCopyright(string  $copyright) : void

Sets the copyright string for this template.

Parameters

string $copyright

Free-form copyright notice.

getCopyright()

getCopyright() : string

Returns the copyright string for this template.

Returns

string —

setVersion()

setVersion(string  $version) : void

Sets the version number for this template.

Parameters

string $version

Semantic version number in this format: 1.0.0

Throws

\InvalidArgumentException

If the version number is invalid.

files()

files() : \League\Flysystem\MountManager

FlySystem filesystem / MountManager containing the template files, base templates files and destination filesystem.

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

\League\Flysystem\MountManager —

getVersion()

getVersion() : string

Returns the version number for this template.

Returns

string —

setDescription()

setDescription(string  $description) : void

Sets the description for this template.

Parameters

string $description

An unconstrained text field where the user can provide additional information regarding details of the template.

getDescription()

getDescription() : string

Returns the description for this template.

Returns

string —

offsetSet()

offsetSet(int|string  $offset, \phpDocumentor\Transformer\Transformation  $value) : void

Sets a transformation at the given offset.

Parameters

int|string $offset

The offset to place the value at.

\phpDocumentor\Transformer\Transformation $value

The transformation to add to this template.

Throws

\InvalidArgumentException

If an invalid item was received.

offsetGet()

offsetGet(int|string  $offset) : \phpDocumentor\Transformer\Transformation

Gets the transformation at the given offset.

Parameters

int|string $offset

The offset to retrieve from.

Returns

\phpDocumentor\Transformer\Transformation —

offsetUnset()

offsetUnset(int|string  $offset) : void

Offset to unset.

Parameters

int|string $offset

Index of item to unset.

offsetExists()

offsetExists(int|string  $offset) : bool

Whether a offset exists.

Parameters

int|string $offset

An offset to check for.

Returns

bool —

Returns true on success or false on failure.

count()

count() : int

Count the number of transformations.

Returns

int —

The count as an integer.

getParameters()

getParameters() : \phpDocumentor\Transformer\Template\Parameter[]

Returns the parameters associated with this template.

Returns

\phpDocumentor\Transformer\Template\Parameter[] —

setParameter()

setParameter(string|int  $key, \phpDocumentor\Transformer\Template\Parameter  $value) : void

Sets a new parameter in the collection.

Parameters

string|int $key
\phpDocumentor\Transformer\Template\Parameter $value

propagateParameters()

propagateParameters() : void

Pushes the parameters of this template into the transformations.

getIterator()

getIterator() : \ArrayIterator<int|string,\phpDocumentor\Transformer\Transformation>

Returns

\ArrayIterator