generate()
generate(
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
\phpDocumentor\Descriptor\Descriptor $descriptor,
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
\phpDocumentor\Transformer\Transformation $transformation)
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
: string
Uses the currently selected node and transformation to assemble the destination path for the file.
Writers accept the use of a Query to be able to generate output for multiple objects using the same
template.
The given node is the result of such a query, or if no query given the selected element, and the transformation
contains the destination file.
Since it is important to be able to generate a unique name per element can the user provide a template variable
in the name of the file.
Such a template variable always resides between double braces and tries to take the node value of a given
query string.
Example:
An artifact stating classes/{{name}}.html
will try to find the
node 'name' as a child of the given $node and use that value instead.
Parameters
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
\phpDocumentor\Descriptor\Descriptor |
$descriptor |
|
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
\phpDocumentor\Transformer\Transformation |
$transformation |
|
Throws
-
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
\InvalidArgumentException
If no artifact is provided and no routing rule matches.
-
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
\UnexpectedValueException
If the provided node does not contain anything.
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
Returns
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
string
— returns the destination location or false if generation should be aborted.