/** * Return the model on which the method will be called * @param Tag $tag * @return Struct|Method */ protected function getModel(Tag $tag) { switch ($tag->getName()) { case WsdlDocument::TAG_OPERATION: $model = $this->getMethodByName($tag->getAttributeName()); break; default: $model = $this->getStructByName($tag->getAttributeName()); break; } return $model; }
/** * @param Tag $parent * @param Struct $struct * @param AttributeHandler $attribute */ private function parseRestrictionAttribute(Tag $parent, Struct $struct, AttributeHandler $attribute) { if ($attribute->getName() === 'base' && $attribute->getValue() !== $parent->getAttributeName()) { $struct->setInheritance($attribute->getValue()); } else { $struct->addMeta($attribute->getName(), $attribute->getValue(true)); } }
/** * @param Tag $tag */ public function parseTag(Tag $tag) { $parent = $tag->getSuitableParent(); if ($parent instanceof Tag) { $model = $this->getModel($parent); if ($model instanceof Struct) { if ($tag->hasAttributeName() && ($modelAttribute = $model->getAttribute($tag->getAttributeName())) instanceof StructAttribute) { return $this->parseTagAttributes($tag, $model, $modelAttribute); } $this->parseTagAttributes($tag, $model); } } $this->parseTagAttributes($tag); }