public function xml(SimpleXMLElement $parent)
    {
        $option = $parent->addChild('argument');
        $option->addAttribute('name', $this->_name);
        $option->addAttribute('help', $this->_help);
        $option->addAttribute('required', (int)$this->isRequired());
        $choices = $option->addChild('choices');
        foreach ($this->_choices as $valid) {
            $choices->addChild('choice', $valid);
        }

        return $parent;
    }
public function xml(SimpleXMLElement $parent)
    {
        $option = $parent->addChild('argument');
        $option->addAttribute('name', $this->_name);
        $option->addAttribute('help', $this->_help);
        $option->addAttribute('required', (int)$this->isRequired());
        $choices = $option->addChild('choices');
        foreach ($this->_choices as $valid) {
            $choices->addChild('choice', $valid);
        }

        return $parent;
    }
public function xml ( SimpleXMLElement $ parent ) { $ option = $ parent -> addChild ( 'argument' ) ; $ option -> addAttribute ( 'name' , $ this -> _name ) ; $ option -> addAttribute ( 'help' , $ this -> _help ) ; $ option -> addAttribute ( 'required' , ( int ) $ this -> isRequired ( ) ) ; $ choices = $ option -> addChild ( 'choices' ) ; foreach ( $ this -> _choices as $ valid ) { $ choices -> addChild ( 'choice' , $ valid ) ; } return $ parent ; }
Append this arguments XML representation to the passed in SimpleXml object.

@param \SimpleXMLElement $parent The parent element.
@return \SimpleXMLElement The parent with this argument appended.
Append this arguments XML representation to the passed in SimpleXml object .