protected function generateXmlForClassName($className, \SimpleXMLElement $xmlRootNode)
    {
        $reflectionClass = new \ReflectionClass($className);
        $tagName = $this->getTagNameForClass($className);
        $xsdElement = $xmlRootNode->addChild('xsd:element');
        $xsdElement['name'] = $tagName;
        $this->docCommentParser->parseDocComment($reflectionClass->getDocComment());
        $this->addDocumentation($this->docCommentParser->getDescription(), $xsdElement);

        $xsdComplexType = $xsdElement->addChild('xsd:complexType');
        $xsdComplexType['mixed'] = 'true';
        $xsdSequence = $xsdComplexType->addChild('xsd:sequence');
        $xsdAny = $xsdSequence->addChild('xsd:any');
        $xsdAny['minOccurs'] = '0';
        $xsdAny['maxOccurs'] = 'unbounded';

        $this->addAttributes($className, $xsdComplexType);
    }
protected function generateXmlForClassName($className, \SimpleXMLElement $xmlRootNode)
    {
        $reflectionClass = new \ReflectionClass($className);
        $tagName = $this->getTagNameForClass($className);
        $xsdElement = $xmlRootNode->addChild('xsd:element');
        $xsdElement['name'] = $tagName;
        $this->docCommentParser->parseDocComment($reflectionClass->getDocComment());
        $this->addDocumentation($this->docCommentParser->getDescription(), $xsdElement);

        $xsdComplexType = $xsdElement->addChild('xsd:complexType');
        $xsdComplexType['mixed'] = 'true';
        $xsdSequence = $xsdComplexType->addChild('xsd:sequence');
        $xsdAny = $xsdSequence->addChild('xsd:any');
        $xsdAny['minOccurs'] = '0';
        $xsdAny['maxOccurs'] = 'unbounded';

        $this->addAttributes($className, $xsdComplexType);
    }
protected function generateXmlForClassName ( $ className , \ SimpleXMLElement $ xmlRootNode ) { $ reflectionClass = new \ ReflectionClass ( $ className ) ; $ tagName = $ this -> getTagNameForClass ( $ className ) ; $ xsdElement = $ xmlRootNode -> addChild ( 'xsd:element' ) ; $ xsdElement [ 'name' ] = $ tagName ; $ this -> docCommentParser -> parseDocComment ( $ reflectionClass -> getDocComment ( ) ) ; $ this -> addDocumentation ( $ this -> docCommentParser -> getDescription ( ) , $ xsdElement ) ; $ xsdComplexType = $ xsdElement -> addChild ( 'xsd:complexType' ) ; $ xsdComplexType [ 'mixed' ] = 'true' ; $ xsdSequence = $ xsdComplexType -> addChild ( 'xsd:sequence' ) ; $ xsdAny = $ xsdSequence -> addChild ( 'xsd:any' ) ; $ xsdAny [ 'minOccurs' ] = '0' ; $ xsdAny [ 'maxOccurs' ] = 'unbounded' ; $ this -> addAttributes ( $ className , $ xsdComplexType ) ; }
Generate the XML Schema for a given class name.

@param string $className Class name to generate the schema for.
@param \SimpleXMLElement $xmlRootNode XML root node where the xsd:element is appended.
@return void
Generate the XML Schema for a given class name .