opmlService = $opmlService; } /** * Configure command * * @return void */ protected function configure() { $this->setName('news:opml:export') ->setDescription('Print OPML file') ->addArgument('user-id', InputArgument::REQUIRED, 'User data to export'); } /** * Execute command * * @param InputInterface $input * @param OutputInterface $output * * @return int */ protected function execute(InputInterface $input, OutputInterface $output): int { $user = $input->getArgument('user-id'); $output->write($this->opmlService->export($user)); return 0; } }