PHP

PHP jest obiektowym, skryptowym jezykiem programowania zaprojektowanym do tworzenia dynamicznych stron www.


Funkcje PHP

Oficjalna strona PHP

Dodatkowe aplikacje PHP

Dodatkowe modu³y PHP

Wortal PHP
Stal nierdzewna - fryzury - Ślub i wesele - Petardy - lodówki - Mieszkania Warszawa


DOMDocument->registerNodeClass()

DOMDocument->registerNodeClass()

(no version information, might be only in CVS)

DOMDocument->registerNodeClass() -- Register extended class used to create base node type

Opis

class DOMDocument {

bool registerNodeClass ( string baseclass, string extendedclass )

}

This method allows you to register your own extended DOM class to be used afterward by the PHP DOM extension.

This method is not part of the DOM standard.

Parametry

baseclass

The DOM class that you want to extend. You can find a list of these classes in the chapter introduction.

Of course, you won't be able to register a class extending DOMDocument but you can always start your document by instanciating your own extending class.

extendedclass

Your extended class name. If NULL is provided, any previously registered class extending baseclass will be removed.

Zwracane wartości

Zwraca TRUE w przypadku sukcesu, FALSE w przypadku porażki.

Przykłady

Przykład 1. Adding a new method to DOMElement to ease our code

<?php

class myElement extends DOMElement {
   function
appendElement($name) {
      return
$this->appendChild(new myElement($name));
   }
}

class
myDocument extends DOMDocument {
   function
setRoot($name) {
      return
$this->appendChild(new myElement($name));
   }
}

$doc = new myDocument();
$doc->registerNodeClass('DOMElement', 'myElement');

// From now on, adding an element to another costs only one method call !
$root = $doc->setRoot('root');
$child = $root->appendElement('child');
$child->setAttribute('foo', 'bar');

echo
$doc->saveXML();

?>

Powyższy przykład wyświetli:

<?xml version="1.0"?>
<root><child foo="bar"/></root>

Limo and Car services Airport chicago limo service 773-649-9630 - Limo and Car services Airport chicago limousine service 773-649-9630 - Firma Procreate oferuje skuteczne pozycjonowanie z gwarancja TOP10 - wyszukiwarka mp3 - galeria zdjęć - opisy na gg - Bardzo smutne gg - Najlepsze miłosne opisy gg do Twojego komunikatora - darmowe forum - pozycjonowanie Pozycjonowanie pozycjonowanie - zdjęcia sportowe - pozycjonowanie bielsko-biała - Webcam kamerki internetowe online - pozycjonowanie - ourage

G:2,M:0,Y:5