\phpDocumentor\TransformerTransformation

Class representing a single Transformation.

Summary

Methods
Properties
Constants
__construct()
getQuery()
getWriter()
getSource()
template()
getArtifact()
setParameters()
getParameters()
getParameter()
getParametersWithKey()
setTransformer()
getTransformer()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$writer
$artifact
$source
$query
$transformer
$parameters
$template
N/A

Properties

$writer

$writer : string

Type

string — Reference to an object containing the business logic used to execute this transformation.

$artifact

$artifact : string

Type

string — the location where the output should be sent to; the exact function differs per writer.

$source

$source : string

Type

string — the location where input for a writer should come from; the exact function differs per writer.

$query

$query : string

Type

string — a filter or other form of limitation on what information of the AST is used; the exact function differs per writer.

$transformer

$transformer : \phpDocumentor\Transformer\Transformer

Type

Transformer — The object guiding the transformation process and having meta-data of it.

$parameters

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

Type

Parameter[] — A series of parameters that can influence what the writer does; the exact function differs per writer.

$template

$template : \phpDocumentor\Transformer\Template

Type

Template

Methods

__construct()

__construct(\phpDocumentor\Transformer\Template  $template, string  $query, string  $writer, string  $source, string  $artifact) : mixed

Constructs a new Transformation object and populates the required parameters.

Parameters

\phpDocumentor\Transformer\Template $template
string $query

What information to use as datasource for the writer's source.

string $writer

What type of transformation to apply (PDF, Twig etc).

string $source

Which template or type of source to use.

string $artifact

What is the filename of the result (relative to the generated root)

Returns

mixed —

getQuery()

getQuery() : string

Returns the set query.

Returns

string —

getWriter()

getWriter() : string

Returns the class name of the associated writer.

Returns

string —

getSource()

getSource() : string

Returns the name of the source / type used in the transformation process.

Returns

string —

template()

template() : \phpDocumentor\Transformer\Template

Returns

\phpDocumentor\Transformer\Template —

getArtifact()

getArtifact() : string

Returns the name of the artifact.

Returns

string —

setParameters()

setParameters(\phpDocumentor\Transformer\Template\Parameter[]  $parameters) : void

Sets an array of parameters (key => value).

Parameters

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

Associative multidimensional array containing parameters for the Writer.

getParameters()

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

Returns all parameters for this transformation.

Returns

\phpDocumentor\Transformer\Template\Parameter[] —

getParameter()

getParameter(string  $name) : ?\phpDocumentor\Transformer\Template\Parameter

Returns a specific parameter, or $default if none exists.

Parameters

string $name

Name of the parameter to return.

Returns

?\phpDocumentor\Transformer\Template\Parameter —

getParametersWithKey()

getParametersWithKey(string  $name) : \phpDocumentor\Transformer\Template\Parameter[]

Returns a specific parameter, or $default if none exists.

Parameters

string $name

Name of the parameter to return.

Returns

\phpDocumentor\Transformer\Template\Parameter[] —

setTransformer()

setTransformer(\phpDocumentor\Transformer\Transformer  $transformer) : void

Sets the transformer on this transformation.

Parameters

\phpDocumentor\Transformer\Transformer $transformer

getTransformer()

getTransformer() : ?\phpDocumentor\Transformer\Transformer

Returns the transformer for this transformation.

Returns

?\phpDocumentor\Transformer\Transformer —