protected function execute(InputInterface $input, OutputInterface $output) { $path = $input->getArgument('initPath'); $type = $input->getArgument('publisherType'); /** * @var IPublisherHandler $handler */ $handler = $this->publisherScanner->setPath($path)->scan(true, $type); $this->publisherScanner->mergeComposerPackages($handler); $handler->write(); }
protected function execute(InputInterface $input, OutputInterface $output) { $model = new PublishModel($input); // setting path to scan for .publisher.* config file $this->publisherScanner->setPath($model->getConfigPath()); /** * @var IPublisherHandler $handler */ $handler = $this->publisherScanner->scan(false); // if handler is null, throwing an exception // with message if (!$handler) { // retrieving available extensions // and making mask-like string $extensions = implode('|', $this->publisherScanner->getSupportedExtensions()); throw new \Exception('You have to create .publisher.(' . $extensions . ') file first.'); } $publisherHandler = new PublisherHandler($model, $handler, $this->fileSystem); $publisherHandler->setOutput($output)->process(); }