TransformCommand

Extends \phpDocumentor\Command\Command

Transforms the structure file into the specified output format

This task will execute the transformation rules described in the given template (defaults to 'responsive') with the given source (defaults to output/structure.xml) and writes these to the target location (defaults to 'output').

It is possible for the user to receive additional information using the verbose option or stop additional information using the quiet option. Please take note that the quiet option also disables logging to file.

package

Default

Methods

Initializes the command with all necessary dependencies to construct human-suitable output from the AST.

__construct(\phpDocumentor\Descriptor\ProjectDescriptorBuilder $builder, \phpDocumentor\Transformer\Transformer $transformer, \phpDocumentor\Compiler\Compiler $compiler) 

Append received transformations.

appendReceivedTransformations(\phpDocumentor\Transformer\Transformer $transformer, array $received) : void

Arguments

$received

array

Initializes this command and sets the name, description, options and arguments.

configure() : void

Connect a series of output messages to various events to display progress.

connectOutputToEvents(\Symfony\Component\Console\Output\OutputInterface $output) : void

Arguments

$output

\Symfony\Component\Console\Output\OutputInterface

Create Transformation instance.

createTransformation(array $transformations) : \phpDocumentor\Transformer\Transformation

Arguments

$transformations

array

Response

\phpDocumentor\Transformer\Transformation

Executes the business logic involved with this command.

execute(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output) : integer
Throws
\Exception

if the provided source is not an existing file or a folder.

Arguments

$input

\Symfony\Component\Console\Input\InputInterface

$output

\Symfony\Component\Console\Output\OutputInterface

Response

integer

Returns the builder object containing the AST and other meta-data.

getBuilder() : \phpDocumentor\Descriptor\ProjectDescriptorBuilder

Returns the Cache.

getCache() : \Zend\Cache\Storage\StorageInterface

Response

\Zend\Cache\Storage\StorageInterface

Returns the Progress bar helper.

getProgressBar(\Symfony\Component\Console\Input\InputInterface $input) : \Symfony\Component\Console\Helper\ProgressHelper
inherited

With this helper it is possible to display a progress bar and make it fill.

Arguments

$input

\Symfony\Component\Console\Input\InputInterface

Response

\Symfony\Component\Console\Helper\ProgressHelper

Retrieves the templates to be used by analyzing the options and the configuration.

getTemplates(\Symfony\Component\Console\Input\InputInterface $input) : array<mixed,string>

Arguments

$input

\Symfony\Component\Console\Input\InputInterface

Response

array<mixed,string>

Returns the transformer used to guide the transformation process from AST to output.

getTransformer() : \phpDocumentor\Transformer\Transformer

Load custom defined transformations.

loadTransformations(\phpDocumentor\Transformer\Transformer $transformer) : void
todo

this is an ugly implementation done for speed of development, should be refactored

Arguments

Registers the current command.

setHelperSet(\Symfony\Component\Console\Helper\HelperSet $helperSet) 
inherited

Arguments

$helperSet

\Symfony\Component\Console\Helper\HelperSet

Properties

Object containing the project meta-data and AST

builder : \phpDocumentor\Descriptor\ProjectDescriptorBuilder
var

Object containing the project meta-data and AST

Type(s)

\phpDocumentor\Descriptor\ProjectDescriptorBuilder

Principal object for guiding the transformation process

transformer : \phpDocumentor\Transformer\Transformer
var

Principal object for guiding the transformation process

Type(s)

\phpDocumentor\Transformer\Transformer

Collection of pre-transformation actions (Compiler Passes)

compiler : \phpDocumentor\Compiler\Compiler
var

Collection of pre-transformation actions (Compiler Passes)

Type(s)

\phpDocumentor\Compiler\Compiler