public function convert(\DOMElement $parent, MethodDescriptor $method)
    {
        $fullyQualifiedNamespaceName = $method->getNamespace() instanceof NamespaceDescriptor
            ? $method->getNamespace()->getFullyQualifiedStructuralElementName()
            : $parent->getAttribute('namespace');

        $child = new \DOMElement('method');
        $parent->appendChild($child);

        $child->setAttribute('final', var_export($method->isFinal(), true));
        $child->setAttribute('abstract', var_export($method->isAbstract(), true));
        $child->setAttribute('static', var_export($method->isStatic(), true));
        $child->setAttribute('visibility', $method->getVisibility());
        $child->setAttribute('namespace', $fullyQualifiedNamespaceName);
        $child->setAttribute('line', (string) $method->getLine());

        $child->appendChild(new \DOMElement('name', $method->getName()));
        $child->appendChild(new \DOMElement('full_name', $method->getFullyQualifiedStructuralElementName()));

        $this->docBlockConverter->convert($child, $method);

        foreach ($method->getArguments() as $argument) {
            $this->argumentConverter->convert($child, $argument);
        }

        return $child;
    }
public function convert(\DOMElement $parent, MethodDescriptor $method)
    {
        $fullyQualifiedNamespaceName = $method->getNamespace() instanceof NamespaceDescriptor
            ? $method->getNamespace()->getFullyQualifiedStructuralElementName()
            : $parent->getAttribute('namespace');

        $child = new \DOMElement('method');
        $parent->appendChild($child);

        $child->setAttribute('final', var_export($method->isFinal(), true));
        $child->setAttribute('abstract', var_export($method->isAbstract(), true));
        $child->setAttribute('static', var_export($method->isStatic(), true));
        $child->setAttribute('visibility', $method->getVisibility());
        $child->setAttribute('namespace', $fullyQualifiedNamespaceName);
        $child->setAttribute('line', (string) $method->getLine());

        $child->appendChild(new \DOMElement('name', $method->getName()));
        $child->appendChild(new \DOMElement('full_name', $method->getFullyQualifiedStructuralElementName()));

        $this->docBlockConverter->convert($child, $method);

        foreach ($method->getArguments() as $argument) {
            $this->argumentConverter->convert($child, $argument);
        }

        return $child;
    }
public function convert ( \ DOMElement $ parent , MethodDescriptor $ method ) { $ fullyQualifiedNamespaceName = $ method -> getNamespace ( ) instanceof NamespaceDescriptor ? $ method -> getNamespace ( ) -> getFullyQualifiedStructuralElementName ( ) : $ parent -> getAttribute ( 'namespace' ) ; $ child = new \ DOMElement ( 'method' ) ; $ parent -> appendChild ( $ child ) ; $ child -> setAttribute ( 'final' , var_export ( $ method -> isFinal ( ) , true ) ) ; $ child -> setAttribute ( 'abstract' , var_export ( $ method -> isAbstract ( ) , true ) ) ; $ child -> setAttribute ( 'static' , var_export ( $ method -> isStatic ( ) , true ) ) ; $ child -> setAttribute ( 'visibility' , $ method -> getVisibility ( ) ) ; $ child -> setAttribute ( 'namespace' , $ fullyQualifiedNamespaceName ) ; $ child -> setAttribute ( 'line' , ( string ) $ method -> getLine ( ) ) ; $ child -> appendChild ( new \ DOMElement ( 'name' , $ method -> getName ( ) ) ) ; $ child -> appendChild ( new \ DOMElement ( 'full_name' , $ method -> getFullyQualifiedStructuralElementName ( ) ) ) ; $ this -> docBlockConverter -> convert ( $ child , $ method ) ; foreach ( $ method -> getArguments ( ) as $ argument ) { $ this -> argumentConverter -> convert ( $ child , $ argument ) ; } return $ child ; }
Export the given reflected method definition to the provided parent element.

@param \DOMElement      $parent Element to augment.
@param MethodDescriptor $method Element to export.

@return \DOMElement
Export the given reflected method definition to the provided parent element .