Phpro\SoapClient\Console\Command\GenerateTypesCommand::handleType PHP Метод

handleType() защищенный Метод

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
Результат boolean
    protected function handleType(TypeGenerator $generator, Type $type, $path)
    {
        // Handle existing class:
        if ($this->filesystem->fileExists($path)) {
            if ($this->handleExistingFile($generator, $type, $path)) {
                return true;
            }
            // Ask if a class can be overwritten if it contains errors
            if (!$this->askForOverwrite()) {
                $this->output->writeln(sprintf('Skipping %s', $type->getName()));
                return false;
            }
        }
        // Try to create a blanco class:
        try {
            $file = new FileGenerator();
            $this->generateType($file, $generator, $type, $path);
        } catch (\Exception $e) {
            $this->output->writeln('<fg=red>' . $e->getMessage() . '</fg=red>');
            return false;
        }
        return true;
    }