/** * @param MethodModel $method * @return string */ protected function getMethodParameters(MethodModel $method) { $parameters = array(); if (is_array($method->getParameterType())) { foreach ($method->getParameterType() as $parameterName => $parameterType) { $parameters[] = $this->getMethodParameter($parameterType, $parameterName); } } else { $parameters[] = $this->getMethodParameter($method->getParameterType()); } return implode(', ', $parameters); }
/** * @param MethodModel $method * @return string */ public static function getOperationMethodReturnType(MethodModel $method, Generator $generator) { $returnType = $method->getReturnType(); if (($struct = $generator->getStruct($returnType)) instanceof StructModel && $struct->getIsStruct() && !$struct->getIsRestriction()) { $returnType = $struct->getPackagedName(true); } return $returnType; }
/** * @see \WsdlToPhp\PackageGenerator\Parser\Wsdl\AbstractTagInputOutputParser::setKnownType() * @return TagInput */ protected function setKnownType(Method $method, $knownType) { $method->setParameterType($knownType); return $this; }
/** * @param MethodModel $method * @return string */ public static function getOperationMethodReturnType(MethodModel $method, Generator $generator) { $returnType = $method->getReturnType(); if (($struct = $generator->getStruct($returnType)) instanceof StructModel && !$struct->getIsRestriction()) { if ($struct->getIsStruct()) { $returnType = $struct->getPackagedName(true); } elseif ($struct->isArray()) { if (($structInheritance = $struct->getInheritanceStruct()) instanceof StructModel) { $returnType = sprintf('%s[]', $structInheritance->getPackagedName(true)); } else { $returnType = $struct->getInheritance(); } } } return $returnType; }
/** * @param Method $method * @param string $soapHeaderName * @return bool */ protected function isSoapHeaderAlreadyDefined(Method $method, $soapHeaderName) { $methodSoapHeaders = $method->getMetaValue(self::META_SOAP_HEADER_NAMES, array()); return in_array($soapHeaderName, $methodSoapHeaders, true); }