WsdlToPhp\PackageGenerator\Model\StructAttribute::getType PHP Method

getType() public method

Returns the type value
public getType ( ) : string
return string
    public function getType()
    {
        return $this->type;
    }

Usage Example

 /**
  * @param AttributeHandler $tagAttribute
  * @param AbstractModel $model
  * @param StructAttribute $structAttribute
  */
 protected function parseTagAttributeType(AttributeHandler $tagAttribute, AbstractModel $model, StructAttribute $structAttribute = null)
 {
     if ($structAttribute instanceof StructAttribute) {
         $type = $tagAttribute->getValue();
         if ($type !== null) {
             $typeModel = $this->generator->getStruct($type);
             $modelAttributeType = $structAttribute->getType();
             if ($typeModel instanceof Struct && (empty($modelAttributeType) || strtolower($modelAttributeType) === 'unknown')) {
                 if ($typeModel->getIsRestriction()) {
                     $structAttribute->setType($typeModel->getName());
                 } elseif (!$typeModel->getIsStruct() && $typeModel->getInheritance()) {
                     $structAttribute->setType($typeModel->getInheritance());
                 }
             }
         }
     } else {
         $model->addMeta($tagAttribute->getName(), $tagAttribute->getValue(true));
     }
 }