WellCommerce\Bundle\DoctrineBundle\Command\GenerateEntityExtraCommand::execute PHP Method

execute() protected method

Executes the command
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
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $traits = $this->collection->keys();
        $output->write('Enhancers: <info>' . $this->collection->count() . '</info>', true);
        foreach ($traits as $traitName) {
            $reflectionClass = new ReflectionClass($traitName);
            $output->write('Extending <info>' . $traitName . '</info> finished', true);
            $code = $this->generateTrait($reflectionClass);
            $this->filesystem->dumpFile($reflectionClass->getFileName(), $code);
        }
        $this->executeMetadataCacheClear($output);
        $this->executeSchemaUpdate($output);
    }