class DOMImplementation (View source)

The DOMImplementation interface provides a number of methods for performing operations that are independent of any particular instance of the document object model.

Methods

never
getFeature(string $feature, string $version)

No description

bool
hasFeature(string $feature, string $version)

Test if the DOM implementation implements a specific feature

createDocumentType(string $qualifiedName, string $publicId = '', string $systemId = '')

Creates an empty DOMDocumentType object

DOMDocument|false
createDocument(string|null $namespace = null, string $qualifiedName = '', DOMDocumentType|null $doctype = null)

Creates a DOMDocument object of the specified type with its document element

Details

never getFeature(string $feature, string $version)

No description

Parameters

string $feature
string $version

Return Value

never

bool hasFeature(string $feature, string $version)

Test if the DOM implementation implements a specific feature

Parameters

string $feature

The feature to test.

string $version

The version number of the feature to test. In level 2, this can be either 2.0 or 1.0.

Return Value

bool

true on success or false on failure.

DOMDocumentType|false createDocumentType(string $qualifiedName, string $publicId = '', string $systemId = '')

Creates an empty DOMDocumentType object

Parameters

string $qualifiedName

The qualified name of the document type to create.

string $publicId

The external subset public identifier.

string $systemId

The external subset system identifier.

Return Value

DOMDocumentType|false

A new DOMDocumentType node with its ownerDocument set to null.

Exceptions

DOMException

DOMDocument|false createDocument(string|null $namespace = null, string $qualifiedName = '', DOMDocumentType|null $doctype = null)

Creates a DOMDocument object of the specified type with its document element

Parameters

string|null $namespace

The namespace URI of the document element to create.

string $qualifiedName

The qualified name of the document element to create.

DOMDocumentType|null $doctype

The type of document to create or null.

Return Value

DOMDocument|false

A new DOMDocument object. If namespaceURI, qualifiedName, and doctype are null, the returned DOMDocument is empty with no document element.

Exceptions

DOMException