コード例 #1
0
 /**
  * Retrieve a generator configuration built from command input.
  *
  * @param array $input An array of input options in the format array('--option' => 'value', '-alias' => true).
  * @return ConfigInterface The configuration corresponding to the input.
  */
 protected function getConfigFromInput(array $input = array())
 {
     $generator = MockGenerator::instance();
     $command = new GenerateCommand();
     $command->setGenerator($generator);
     $tester = new CommandTester($command);
     $tester->execute($input);
     return $generator->getConfig();
 }
コード例 #2
0
<?php

/**
 * @package Wsdl2PhpGenerator
 */
use Wsdl2PhpGenerator\Console\Application;
use Wsdl2PhpGenerator\Console\GenerateCommand;
use Wsdl2PhpGenerator\Generator;
require 'vendor/autoload.php';
$app = new Application('wsdl2php', '2.4.0');
$command = new GenerateCommand();
$command->setGenerator(Generator::getInstance());
$app->add($command);
$app->run();
コード例 #3
0
 protected function getCommandName(InputInterface $input)
 {
     $command = new GenerateCommand();
     return $command->getName();
 }