Limitations of extending classes

  • Scope!
   $dom = new books();
   $dom->load("books.xml");
   $e = $dom->documentElement;
   unset ($dom);
   $dom = $e->ownerDocument; // DomDocument, not book...
   
  • Appending ..
   //Works somehow in this case, but is not the standard way
   class myelement extends DOMElement {};
   $domdoc = new DomDocument();
   $element = new myelement("fon");
   
   $domdoc->appendChild($element); 
   
 
Exceptions © copyright 2004  Bitflux GmbH