phpDocumentor

Transformation
in package

Class representing a single Transformation.

Table of Contents

Properties

$artifact  : string
$parameters  : array<string|int, Parameter>
$query  : string
$source  : string
$template  : Template
$transformer  : Transformer|null
$writer  : string

Methods

__construct()  : mixed
Constructs a new Transformation object and populates the required parameters.
getArtifact()  : string
Returns the name of the artifact.
getParameter()  : Parameter|null
Returns a specific parameter, or $default if none exists.
getParameters()  : array<string|int, Parameter>
Returns all parameters for this transformation.
getParametersWithKey()  : array<string|int, Parameter>
Returns a specific parameter, or $default if none exists.
getQuery()  : string
Returns the set query.
getSource()  : string
Returns the name of the source / type used in the transformation process.
getTransformer()  : Transformer|null
Returns the transformer for this transformation.
getWriter()  : string
Returns the class name of the associated writer.
setParameters()  : void
Sets an array of parameters (key => value).
setTransformer()  : void
Sets the transformer on this transformation.
template()  : Template

Properties

$parameters

private array<string|int, Parameter> $parameters = []

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

Methods

__construct()

Constructs a new Transformation object and populates the required parameters.

public __construct(Template $template, string $query, string $writer, string $source, string $artifact) : mixed
Parameters
$template : Template
$query : string

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

$writer : string

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

$source : string

Which template or type of source to use.

$artifact : string

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

getArtifact()

Returns the name of the artifact.

public getArtifact() : string
Return values
string

getParameter()

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

public getParameter(string $name) : Parameter|null
Parameters
$name : string

Name of the parameter to return.

Return values
Parameter|null

getParameters()

Returns all parameters for this transformation.

public getParameters() : array<string|int, Parameter>
Return values
array<string|int, Parameter>

getParametersWithKey()

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

public getParametersWithKey(string $name) : array<string|int, Parameter>
Parameters
$name : string

Name of the parameter to return.

Return values
array<string|int, Parameter>

getQuery()

Returns the set query.

public getQuery() : string
Return values
string

getSource()

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

public getSource() : string
Return values
string

getWriter()

Returns the class name of the associated writer.

public getWriter() : string
Return values
string

setParameters()

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

public setParameters(array<string|int, Parameter$parameters) : void
Parameters
$parameters : array<string|int, Parameter>

Associative multidimensional array containing parameters for the Writer.


        
On this page

Search results