PHP Class Phpro\SoapClient\Console\Command\GenerateTypesCommand

Inheritance: extends Symfony\Component\Console\Command\Command
Show file Open project: phpro/soap-client

Public Methods

Method Description
__construct ( Filesystem $filesystem )

Protected Methods

Method Description
askForOverwrite ( ) : boolean
configure ( ) Configure the command.
execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
generateType ( Zend\Code\Generator\FileGenerator $file, TypeGenerator $generator, Type $type, string $path ) Generates one type class
handleExistingFile ( TypeGenerator $generator, Type $type, string $path ) : boolean An existing file was found. Try to patch or ask if it can be overwritten.
handleType ( TypeGenerator $generator, Type $type, $path ) : boolean Try to create a class for a type.
patchExistingFile ( TypeGenerator $generator, Type $type, string $path ) : boolean This method tries to patch an existing type class.

Method Details

__construct() public method

public __construct ( Filesystem $filesystem )
$filesystem Phpro\SoapClient\Util\Filesystem

askForOverwrite() protected method

protected askForOverwrite ( ) : boolean
return boolean

configure() protected method

Configure the command.
protected configure ( )

execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface

generateType() protected method

Generates one type class
protected generateType ( Zend\Code\Generator\FileGenerator $file, TypeGenerator $generator, Type $type, string $path )
$file Zend\Code\Generator\FileGenerator
$generator Phpro\SoapClient\CodeGenerator\TypeGenerator
$type Phpro\SoapClient\CodeGenerator\Model\Type
$path string

handleExistingFile() protected method

An existing file was found. Try to patch or ask if it can be overwritten.
protected handleExistingFile ( TypeGenerator $generator, Type $type, string $path ) : boolean
$generator Phpro\SoapClient\CodeGenerator\TypeGenerator
$type Phpro\SoapClient\CodeGenerator\Model\Type
$path string
return boolean

handleType() protected method

When a class exists: try to patch If patching the old class does not wor: ask for an overwrite Create a class from an empty file
protected handleType ( TypeGenerator $generator, Type $type, $path ) : boolean
$generator Phpro\SoapClient\CodeGenerator\TypeGenerator
$type Phpro\SoapClient\CodeGenerator\Model\Type
$path
return boolean

patchExistingFile() protected method

This method tries to patch an existing type class.
protected patchExistingFile ( TypeGenerator $generator, Type $type, string $path ) : boolean
$generator Phpro\SoapClient\CodeGenerator\TypeGenerator
$type Phpro\SoapClient\CodeGenerator\Model\Type
$path string
return boolean