File: tests/Parser/Wsdl/WsdlParser.php

Recommend this page to a friend!
  Classes of WsdlToPhp  >  PHP SOAP Package Generator  >  tests/Parser/Wsdl/WsdlParser.php  >  Download  
File: tests/Parser/Wsdl/WsdlParser.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: PHP SOAP Package Generator
Generate package to call SOAP services using WSDL
Author: By
Last change: issue-32 - #32: allows to not parse Structs and Functions
Date: 5 years ago
Size: 1,239 bytes
 

Contents

Class file image Download
<?php

namespace WsdlToPhp\PackageGenerator\Tests\Parser\Wsdl;

use
WsdlToPhp\PackageGenerator\Generator\Generator;
use
WsdlToPhp\PackageGenerator\Parser\Wsdl\TagImport;
use
WsdlToPhp\PackageGenerator\Parser\Wsdl\TagInclude;
use
WsdlToPhp\PackageGenerator\Tests\TestCase;
use
WsdlToPhp\PackageGenerator\Parser\SoapClient\Structs;
use
WsdlToPhp\PackageGenerator\Parser\SoapClient\Functions;

abstract class
WsdlParser extends TestCase
{
   
/**
     * @param string $wsdlPath
     * @param bool $reset
     * @param bool $parseSoapStructs
     * @param bool $parseSoapFunctions
     * @return Generator
     */
   
public static function generatorInstance($wsdlPath, $reset = true, $parseSoapStructs = true, $parseSoapFunctions = true)
    {
       
$generator = self::getInstance($wsdlPath, $reset);
       
$parsers = array(
            new
TagInclude($generator),
            new
TagImport($generator),
        );
        if (
$parseSoapStructs === true) {
           
$parsers[] = new Structs($generator);
        }
        if (
$parseSoapFunctions === true) {
           
$parsers[] = new Functions($generator);
        }
        foreach (
$parsers as $parser) {
           
$parser->parse();
        }
        return
$generator;
    }
}


For more information send a message to info at phpclasses dot org.