WsdlToPhp\PackageGenerator\Tests\TestCase::getInstance PHP Метод

getInstance() публичный статический Метод

public static getInstance ( string $wsdlPath, $reset = false ) : Generator
$wsdlPath string
Результат WsdlToPhp\PackageGenerator\Generator\Generator
    public static function getInstance($wsdlPath, $reset = false)
    {
        if (!isset(self::$instances[$wsdlPath]) || $reset === true) {
            self::$instances[$wsdlPath] = self::getGeneratorInstance($wsdlPath);
        }
        return self::$instances[$wsdlPath];
    }

Usage Example

Пример #1
0
 /**
  * @param string $wsdl
  * @return Generator
  */
 public static function getInstance($wsdl, $reset = true, $gatherMethods = GeneratorOptions::VALUE_START)
 {
     AbstractModel::purgeUniqueNames();
     AbstractModel::purgeReservedKeywords();
     $g = parent::getInstance($wsdl, $reset);
     $g->setOptionPrefix('Api')->setOptionAddComments(array('release' => '1.1.0'))->setOptionCategory(GeneratorOptions::VALUE_CAT)->setOptionGatherMethods($gatherMethods);
     self::applyParsers($g, $wsdl);
     return $g;
 }