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
$artifact read-only
private
string
$artifact
$parameters
private
array<string|int, Parameter>
$parameters
= []
A series of parameters that can influence what the writer does; the exact function differs per writer.
$query read-only
private
string
$query
$source read-only
private
string
$source
$template read-only
private
Template
$template
$transformer
private
Transformer|null
$transformer
= null
$writer read-only
private
string
$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
stringgetParameter()
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|nullgetParameters()
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
stringgetSource()
Returns the name of the source / type used in the transformation process.
public
getSource() : string
Return values
stringgetTransformer()
Returns the transformer for this transformation.
public
getTransformer() : Transformer|null
Return values
Transformer|nullgetWriter()
Returns the class name of the associated writer.
public
getWriter() : string
Return values
stringsetParameters()
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.
setTransformer()
Sets the transformer on this transformation.
public
setTransformer(Transformer $transformer) : void
Parameters
- $transformer : Transformer
template()
public
template() : Template