/** * @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); }