コード例 #1
0
 /**
  * Set the strategy that handles functions and classes that are added AFTER this call.
  *
  * @param  boolean|string|\Zend\Soap\Wsdl\Strategy $strategy
  * @return \Zend\Soap\AutoDiscover
  */
 public function setComplexTypeStrategy($strategy)
 {
     $this->_strategy = $strategy;
     if ($this->_wsdl instanceof Wsdl) {
         $this->_wsdl->setComplexTypeStrategy($strategy);
     }
     return $this;
 }
コード例 #2
0
ファイル: WsdlTest.php プロジェクト: heiglandreas/zf2
 /**
  * @group ZF-5430
  */
 public function testMultipleSequenceDefinitionsOfSameTypeWillBeRecognizedOnceBySequenceStrategy()
 {
     $wsdl = new Wsdl("MyService", "http://localhost/MyService.php");
     $wsdl->setComplexTypeStrategy(new Strategy\ArrayOfTypeSequence());
     $wsdl->addComplexType("string[]");
     $wsdl->addComplexType("int[]");
     $wsdl->addComplexType("string[]");
     $xml = $wsdl->toXml();
     $this->assertEquals(1, substr_count($xml, "ArrayOfString"), "ArrayOfString should appear only once.");
     $this->assertEquals(1, substr_count($xml, "ArrayOfInt"), "ArrayOfInt should appear only once.");
 }