__construct()
createFromArray()
debug()
dispatch()
execute()
getArtifact()
getParameter()
getParameters()
getQuery()
getSource()
getSourceAsPath()
getTransformer()
getWriter()
importParameters()
log()
setArtifact()
setParameters()
setQuery()
setSource()
setTransformer()
setWriter()
convertSimpleXmlToArray()
$event_dispatcher
$artifact
$parameters
$query
$source
$transformer
$writer
Class representing a single Transformation.
| category | phpDocumentor |
|---|---|
| package | Transformer |
| author | Mike van Riel |
| license | MIT |
| link | http://phpdoc.org |
__construct(phpDocumentor_Transformer $transformer, string $query, string $writer, string $source, string $artifact)
stringWhat information to use as datasource for the writer's source.
stringWhat type of transformation to apply (XSLT, PDF, Checkstyle etc).
stringWhich template or type of source to use.
stringWhat is the filename of the result (relative to the generated root)
createFromArray(phpDocumentor_Transformer $transformer, array $transformation) : \phpDocumentor_Transformer_Transformation
The array format is:
array(
'query' => 'Query string',
'writer' => 'WriterName',
'source' => 'source location',
'artifact' => 'path',
'parameters' => array()
)
The parameter array is optional.
\mixed[]Transformation array, see long description for the format.
\InvalidArgumentException |
|---|
debug(string $message) : void
| inherited_from | \phpDocumentor_Transformer_Abstract::debug() |
|---|
stringThe message to log.
dispatch(string $name, \string[] $arguments) : mixed | null
This method tries to dispatch an event; if no Event Dispatcher has been set than this method will explicitly not fail and return null. By not failing we make the Event Dispatcher optional and is it easier for people to re-use this component in their own application.
| inherited_from | \phpDocumentor_Transformer_Abstract::dispatch() |
|---|
stringName of the event to dispatch.
\string[]Arguments for this event.
\phpDocumentor_Parser_Exception |
if there is a dispatcher but it is not of type sfEventDispatcher |
|---|
mixednull
execute(string $structure_file) : void
stringThe location of the structure file.
getArtifact() : string
stringgetParameter(string $name, mixed $default) : string
stringName of the parameter to return.
mixedDefault value is parameter does not exist.
stringgetParameters() : \string[]
\string[]getQuery() : string
stringgetSource() : string
stringgetSourceAsPath() : string
This method applies the following rules to the value of $source: 1. if the template_path parameter is set and that combined with the source gives an existing file; return that. 2. if the value exists as a file (either relative to the current working directory or absolute), do a realpath and return it. 3. Otherwise prepend it with the phpDocumentor data folder, if that does not exist: throw an exception
\Exception |
if no valid file could be found. |
|---|
stringgetTransformer() : \phpDocumentor_Transformer
getWriter() : \phpDocumentor_Transformer_Writer_Abstract | null
importParameters(SimpleXMLElement $parameters) : void
log(string $message, int $priority) : void
| inherited_from | \phpDocumentor_Transformer_Abstract::log() |
|---|
stringThe message to log.
intThe logging priority, the lower, the more important. Ranges from 1 to 7
setArtifact(string $artifact) : void
If the query results in a set of artifacts (multiple nodes / array); then this string must contain an identifying variable as returned by the writer.
stringName of artifact to generate; usually a filepath.
setParameters(array $parameters) : void
\string[]Associative multidimensional array containing parameters for the Writer.
setQuery(string $query) : void
stringFree-form string with writer-specific values.
setSource(string $source) : void
stringFree-form string with writer-specific meaning.
setTransformer(phpDocumentor_Transformer $transformer) : void
setWriter(string $writer) : void
stringName of writer to instantiate.
convertSimpleXmlToArray(SimpleXMLElement $sxml) : \(string | \string[])[]
$event_dispatcher : \sfEventDispatcher | null
| inherited_from | \phpDocumentor_Transformer_Abstract::$$event_dispatcher |
|---|
$artifact : string
$parameters : \string[]
$query : string
$source : string