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

isXml() public method

public isXml ( ) : boolean
return boolean
    public function isXml()
    {
        return stripos($this->getType(), '\\DOM') === 0;
    }

Usage Example

Example #1
0
 /**
  * @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;
 }