Ojs\ApiBundle\Command\ApiDocsDumpCommand::execute PHP 메소드

execute() 보호된 메소드

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer | null | void
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
리턴 integer | null | void
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->io->title($this->getDescription());
        foreach ($this->apiViews as $apiView) {
            $bufferOutput = new BufferedOutput();
            $this->application->run(new StringInput(sprintf('api:doc:dump --view=%s', $apiView)), $bufferOutput);
            $viewDump = $bufferOutput->fetch();
            $viewDumpFile = __DIR__ . '/../Resources/doc/' . $apiView . '-api-doc.md';
            file_put_contents($viewDumpFile, $viewDump);
            $this->io->writeln(sprintf("%s -> view dumped to %s", $apiView, $viewDumpFile));
        }
    }