/**
* @param PhpAnnotationBlock $annotationBlock
* @param StructAttributeModel $attribute
* @return Struct
*/
protected function addStructMethodsGetAnnotationBlockFromXmlAttribute(PhpAnnotationBlock $annotationBlock, StructAttributeModel $attribute)
{
if ($attribute->isXml()) {
$annotationBlock->addChild(new PhpAnnotation(self::ANNOTATION_USES, '\\DOMDocument::loadXML()'))->addChild(new PhpAnnotation(self::ANNOTATION_USES, '\\DOMDocument::hasChildNodes()'))->addChild(new PhpAnnotation(self::ANNOTATION_USES, '\\DOMDocument::saveXML()'))->addChild(new PhpAnnotation(self::ANNOTATION_USES, '\\DOMNode::item()'))->addChild(new PhpAnnotation(self::ANNOTATION_USES, sprintf('%s::%s()', $this->getModel()->getPackagedName(true), $attribute->getSetterName())))->addChild(new PhpAnnotation(self::ANNOTATION_PARAM, 'bool $asString true: returns XML string, false: returns \\DOMDocument'));
}
return $this;
}