fromSoapClient() public static méthode

public static fromSoapClient ( string $namespace, SoapClient $client ) : TypeMap
$namespace string
$client Phpro\SoapClient\Soap\SoapClient
Résultat TypeMap
 /**
  * {@inheritdoc}
  * @throws \Phpro\SoapClient\Exception\InvalidArgumentException
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $configFile = $input->getOption('config');
     if (!$configFile || !$this->filesystem->fileExists($configFile)) {
         throw InvalidArgumentException::invalidConfigFile();
     }
     $config = (include $configFile);
     if (!$config instanceof ConfigInterface) {
         throw InvalidArgumentException::invalidConfigFile();
     }
     $soapClient = new SoapClient($config->getWsdl(), $config->getSoapOptions());
     $typeMap = TypeMap::fromSoapClient($config->getNamespace(), $soapClient);
     $file = new FileGenerator();
     $generator = new ClassMapGenerator($config->getRuleSet());
     $output->write($generator->generate($file, $typeMap));
 }
 /**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $this->input = $input;
     $this->output = $output;
     $configFile = $this->input->getOption('config');
     if (!$configFile || !$this->filesystem->fileExists($configFile)) {
         throw InvalidArgumentException::invalidConfigFile();
     }
     $config = (include $configFile);
     if (!$config instanceof ConfigInterface) {
         throw InvalidArgumentException::invalidConfigFile();
     }
     $soapClient = new SoapClient($config->getWsdl(), $config->getSoapOptions());
     $typeMap = TypeMap::fromSoapClient($config->getNamespace(), $soapClient);
     $generator = new TypeGenerator($config->getRuleSet());
     foreach ($typeMap->getTypes() as $type) {
         $path = $type->getPathname($config->getDestination());
         if ($this->handleType($generator, $type, $path)) {
             $this->output->writeln(sprintf('Generated class %s to %s', $type->getFullName(), $path));
         }
     }
     $this->output->writeln('Done');
 }