/** * The method takes care of looping among WSDLS as much time as it is needed * @see \WsdlToPhp\PackageGenerator\Generator\ParserInterface::parse() */ public final function parse() { $wsdl = $this->generator->getWsdl(); if ($wsdl instanceof Wsdl) { $content = $wsdl->getContent(); if ($content instanceof WsdlDocument) { if ($this->isWsdlParsed($wsdl) === false) { $this->setTags($content->getElementsByName($this->parsingTag())); if (count($this->getTags()) > 0) { $this->parseWsdl($wsdl); } } foreach ($content->getExternalSchemas() as $schema) { if ($this->isSchemaParsed($wsdl, $schema) === false) { $schemaContent = $schema->getContent(); if ($schemaContent instanceof SchemaDocument) { $this->setTags($schemaContent->getElementsByName($this->parsingTag())); if (count($this->getTags()) > 0) { $this->parseSchema($wsdl, $schema); } } $this->setSchemaAsParsed($wsdl, $schema); } } } $this->setWsdlAsParsed($wsdl); } }