/** * 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); }
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); }
/** * Parses an interface definition and adds it to the interfaces array. * * @param DocBlox_Reflection_TokenIterator $tokens Tokens to interpret with the * pointer at the token to be processed. * * @return void */ protected function processInterface(DocBlox_Reflection_TokenIterator $tokens) { $this->resetTimer('interface'); $interface = new DocBlox_Reflection_Interface(); $interface->setNamespace($this->active_namespace); $interface->setNamespaceAliases($this->namespace_aliases); $interface->setDefaultPackageName($this->getDefaultPackageName()); $interface->parseTokenizer($tokens); $this->debugTimer('>> Processed interface ' . $interface->getName(), 'interface'); $this->interfaces[$interface->getName()] = $interface; }