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 : array<mixed,\phpDocumentor\Transformer\Transformation>

Type

array<mixed,\phpDocumentor\Transformer\Transformation> — A series of transformations to execute in sequence during transformation.

Methods

__construct()

__construct(string  $name) 

Initializes this object with a name and optionally with contents.

Parameters

string $name

Name for this template.

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

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(integer|string  $offset, \phpDocumentor\Transformer\Transformation  $value) : void

Sets a transformation at the given offset.

Parameters

integer|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(integer|string  $offset) : \phpDocumentor\Transformer\Transformation

Gets the transformation at the given offset.

Parameters

integer|string $offset

The offset to retrieve from.

Returns

\phpDocumentor\Transformer\Transformation

offsetUnset()

offsetUnset(integer|string  $offset) : void

Offset to unset.

Parameters

integer|string $offset

Index of item to unset.

offsetExists()

offsetExists(mixed  $offset) : boolean

Whether a offset exists.

Parameters

mixed $offset

An offset to check for.

Returns

boolean —

Returns true on success or false on failure.

count()

count() : integer

Count the number of transformations.

Returns

integer —

The count as an integer.

rewind()

rewind() : void

Rewind the Iterator to the first element

valid()

valid() : boolean

Checks if current position is valid.

Returns

boolean —

Returns true on success or false on failure.

key()

key() : integer|string

Return the key of the current element.

Returns

integer|string —

scalar on success, integer 0 on failure.

next()

next() : void

Move forward to next element.

setParameter()

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

Sets a new parameter in the collection.

Parameters

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

propagateParameters()

propagateParameters() : void

Pushes the parameters of this template into the transformations.