示例#1
0
文件: Class.php 项目: hjr3/Docblox
 /**
  * Returns the XML representation of this object or false if an error occurred.
  *
  * @param SimpleXMLElement $xml If not null, expands the given SimpleXML Node instead of instantiating a new one.
  *
  * @return string|boolean
  */
 public function __toXml(SimpleXMLElement $xml = null)
 {
     if ($xml === null) {
         $xml = new SimpleXMLElement('<class></class>');
     }
     $xml['final'] = $this->isFinal() ? 'true' : 'false';
     $xml['abstract'] = $this->isAbstract() ? 'true' : 'false';
     $xml['line'] = $this->getLineNumber();
     return parent::__toXml($xml);
 }
示例#2
0
文件: Class.php 项目: namesco/Docblox
  public function __toXml(SimpleXMLElement $xml = null)
  {
    $xml = new SimpleXMLElement('<class></class>');
    $xml['final']      = $this->isFinal() ? 'true' : 'false';
    $xml['abstract']   = $this->isAbstract() ? 'true' : 'false';
    $xml['line']       = $this->getLineNumber();
    $xml->full_name    = $this->expandType($this->getName());  

    return parent::__toXml($xml);
  }