Template

Implements \ArrayAccess, \Countable, \Iterator

Model representing a template.

Serializer\XmlRoot

("template")

package

Default

Methods

Initializes this object with a name and optionally with contents.

__construct(string $name) 

Arguments

$name

string

Name for this template.

Count the number of transformations.

count() : integer
link

http://php.net/manual/en/countable.count.php

Response

integer

The count as an integer.

Return the current element.

current() : \phpDocumentor\Transformer\Transformation

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

getAuthor() : string

Response

string

Returns the copyright string for this template.

getCopyright() : string

Response

string

Returns the description for this template.

getDescription() : string

Response

string

Name for this template.

getName() : string

Response

string

Returns the parameters associated with this template.

getParameters() : array<mixed,\phpDocumentor\Transformer\Template\Parameter>

Returns the version number for this template.

getVersion() : string

Response

string

Return the key of the current element.

key() : integer|string
link

http://php.net/manual/en/iterator.key.php

Response

integer|string

scalar on success, integer 0 on failure.

Move forward to next element.

next() : void

Whether a offset exists.

offsetExists(mixed $offset) : boolean
link

http://php.net/manual/en/arrayaccess.offsetexists.php

Arguments

$offset

mixed

An offset to check for.

Response

boolean

Returns true on success or false on failure.

Gets the transformation at the given offset.

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

Arguments

$offset

integer|string

The offset to retrieve from.

Response

\phpDocumentor\Transformer\Transformation

Sets a transformation at the given offset.

offsetSet(integer|string $offset, \phpDocumentor\Transformer\Transformation $value) : void
Throws
\InvalidArgumentException

if an invalid item was received

Arguments

$offset

integer|string

The offset to place the value at.

$value

\phpDocumentor\Transformer\Transformation

The transformation to add to this template.

Offset to unset.

offsetUnset(integer|string $offset) : void
link

http://php.net/manual/en/arrayaccess.offsetunset.php

Arguments

$offset

integer|string

Index of item to unset.

Pushes the parameters of this template into the transformations.

propagateParameters() : void

Rewind the Iterator to the first element

rewind() : void

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

setAuthor(string $author) : void

Arguments

$author

string

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

Sets the copyright string for this template.

setCopyright(string $copyright) : void

Arguments

$copyright

string

Free-form copyright notice.

Sets the description for this template.

setDescription(string $description) : void

Arguments

$description

string

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

Sets a new parameter in the collection.

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

Arguments

$key

string|integer

Sets the version number for this template.

setVersion(string $version) : void
Throws
\InvalidArgumentException

if the version number is invalid

Arguments

$version

string

Semantic version number in this format: 1.0.0

Checks if current position is valid.

valid() : boolean
link

http://php.net/manual/en/iterator.valid.php

Response

boolean

Returns true on success or false on failure.

Properties

Name for this template

name : string
Serializer\Type

("string")

var

Name for this template

Type(s)

string

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

author : string
Serializer\Type

("string")

var

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

Type(s)

string

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

version : string
Serializer\Type

("string")

var

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

Type(s)

string

a text providing more information on this template.

description : string
Serializer\Type

("string")

var

a text providing more information on this template.

Type(s)

string

A series of transformations to execute in sequence during transformation.

transformations : array<mixed,\phpDocumentor\Transformer\Transformation>
Serializer\XmlList

(entry = "transformation")

Serializer\Type

("array<phpDocumentor\Transformer\Transformation>")

var

A series of transformations to execute in sequence during transformation.

Type(s)

array<mixed,\phpDocumentor\Transformer\Transformation>

Global parameters that are passed to each transformation.

parameters : array<mixed,\phpDocumentor\Transformer\Template\Parameter>
Serializer\XmlList

(entry = "parameter")

Serializer\Type

("array<phpDocumentor\Transformer\Template\Parameter>")

var

Global parameters that are passed to each transformation.

Type(s)

array<mixed,\phpDocumentor\Transformer\Template\Parameter>