Exemplo n.º 1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $inputArgs = new XsdGeneratePhpArgs($input);
     $namingFactory = new Factory();
     $namingStrategy = $namingFactory->getNamingStrategy($inputArgs->getNamingStrategy());
     $converter = new PhpConverter($namingStrategy);
     $processor = $this->createPhpProcessor($inputArgs, $converter, new SchemaReader(), $output);
     $processor->execute($this);
     return 0;
 }
Exemplo n.º 2
0
 public static function getDefinitions()
 {
     return array(new InputArgument(self::ARGUMENT_SOURCE, InputArgument::REQUIRED | InputArgument::IS_ARRAY, 'Where is located your XSD definitions'), new InputOption(self::OPTION_NAMESPACE, self::OPTION_NAMESPACE_SHORT, InputOption::VALUE_OPTIONAL, 'What the namespace for generated files? Syntax: <info>NFe/</info>', 'NFe/'), new InputOption(self::OPTION_DESTINATION, self::OPTION_DESTIONATION_SHORT, InputOption::VALUE_OPTIONAL, 'Where place the generated files? Syntax: <info>destination-directory</info>', './src'), new InputOption(self::OPTION_NAMING_STRATEGY, null, InputOption::VALUE_REQUIRED, 'The naming strategy for classes. (' . implode(', ', NamingFactory::getAvailableNamingStrategies()) . ')', NamingFactory::NAMING_SPED), new InputOption(self::OPTION_EXTENDS, self::OPTION_EXTENDS_SHORT, InputOption::VALUE_OPTIONAL, 'all classes will extend this super class'));
 }