/** * Returns an XSD Type for the given PHP type * * @param string $type PHP Type to get the XSD type for * @return string */ public function getType($type) { if (!$this->_wsdl instanceof WSDL\WSDL) { /** @todo Exception throwing may be more correct */ // WSDL is not defined yet, so we can't recognize type in context of current service return ''; } else { return $this->_wsdl->getType($type); } }
/** * @group ZF-3910 */ function testCaseOfDocBlockParamsDosNotMatterForSoapTypeDetectionZf3910() { $wsdl = new WSDL\WSDL('MyService', 'http://localhost/MyService.php'); $this->assertEquals("xsd:string", $wsdl->getType("StrIng")); $this->assertEquals("xsd:string", $wsdl->getType("sTr")); $this->assertEquals("xsd:int", $wsdl->getType("iNt")); $this->assertEquals("xsd:int", $wsdl->getType("INTEGER")); $this->assertEquals("xsd:float", $wsdl->getType("FLOAT")); $this->assertEquals("xsd:float", $wsdl->getType("douBLE")); }