PHPExiftool\Tool\Command\ClassesBuilder::execute PHP Метод

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

См. также: Console\Command\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)
    {
        $start = microtime(true);
        $this->output = $output;
        $this->output->write('Extracting datas... ');
        $logger = new Logger('Builder');
        $logger->pushHandler(new NullHandler());
        if ($input->getOption('verbose')) {
            $logger->pushHandler(new StreamHandler('php://stdout'));
        }
        $dumper = new InformationDumper(new Exiftool($logger));
        $dump = $dumper->listDatas(InformationDumper::LISTTYPE_SUPPORTED_XML);
        $this->output->writeln('Done !');
        $this->output->writeln('Generating classes... ');
        $this->extractDump($dump);
        if (!$input->getOption('write')) {
            $this->output->writeln('These classes were not written. Use --write to write on disk');
        } else {
            $this->output->writeln('Erasing previous files... ');
            system('rm -R ' . __DIR__ . '/../../Driver/Tag/*');
            system('rm -R ' . __DIR__ . '/../../Driver/Type/*');
            $this->output->writeln('Writing files... ');
            $this->writeClasses($input->getOption('force'));
        }
        $this->output->writeln(sprintf('%d classes generated in %d seconds (%d Mb)', count($this->classes), microtime(true) - $start, memory_get_peak_usage() >> 20));
    }