Esempio n. 1
0
 /**
  * Collect metadata for virtual field corresponding to current method if it is a getter (used in WSDL generation).
  *
  * @param \Zend\Code\Reflection\MethodReflection $methodReflection
  * @param string $typeName
  * @return void
  */
 protected function _processMethod(\Zend\Code\Reflection\MethodReflection $methodReflection, $typeName)
 {
     $isGetter = strpos($methodReflection->getName(), 'get') === 0 || strpos($methodReflection->getName(), 'is') === 0 || strpos($methodReflection->getName(), 'has') === 0;
     /** Field will not be added to WSDL if getter has params */
     if ($isGetter && !$methodReflection->getNumberOfParameters()) {
         $returnMetadata = $this->getGetterReturnType($methodReflection);
         $fieldName = $this->dataObjectGetterNameToFieldName($methodReflection->getName());
         $this->_types[$typeName]['parameters'][$fieldName] = array('type' => $this->process($returnMetadata['type']), 'required' => $returnMetadata['isRequired'], 'documentation' => $returnMetadata['description']);
     }
 }