for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the PostmanGeneratorBundle package.
*
* (c) Vincent Chalamon <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PostmanGeneratorBundle\CommandParser;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class CommandParserChain implements CommandParserInterface
{
/**
* @var CommandParserInterface[]
private $parsers = [];
* @param CommandParserInterface[] $parsers
public function __construct(array $parsers)
$this->parsers = $parsers;
}
* {@inheritdoc}
public function parse(InputInterface $input, OutputInterface $output)
foreach ($this->parsers as $parser) {
if ($parser->supports()) {
$parser->parse($input, $output);
public function execute(InputInterface $input, OutputInterface $output)
$parser->execute($input, $output);
public function supports()
return true;