# La classe DOMDocumentType

(PHP 5, PHP 7, PHP 8)

## Introduction

Chaque DOMDocument a un attribut `doctype` dont la valeur est soit `null`, soit un objet DOMDocumentType.

## Synopsis de la classe

class DOMDocumentType extends DOMNode {
/* Constantes héritées */
public const int DOMNode::DOCUMENT_POSITION_DISCONNECTED = 0x1;
public const int DOMNode::DOCUMENT_POSITION_PRECEDING = 0x2;
public const int DOMNode::DOCUMENT_POSITION_FOLLOWING = 0x4;
public const int DOMNode::DOCUMENT_POSITION_CONTAINS = 0x8;
public const int DOMNode::DOCUMENT_POSITION_CONTAINED_BY = 0x10;
public const int DOMNode::DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
/* Propriétés */
public readonly string $name;
public readonly DOMNamedNodeMap $entities;
public readonly DOMNamedNodeMap $notations;
public readonly string $publicId;
public readonly string $systemId;
public readonly ?string $internalSubset;
/* Propriétés héritées */
public readonly string $nodeName;
public ?string $nodeValue;
public readonly int $nodeType;
public readonly ?DOMNode $parentNode;
public readonly ?DOMElement $parentElement;
public readonly DOMNodeList $childNodes;
public readonly ?DOMNode $firstChild;
public readonly ?DOMNode $lastChild;
public readonly ?DOMNode $previousSibling;
public readonly ?DOMNode $nextSibling;
public readonly ?DOMNamedNodeMap $attributes;
public readonly bool $isConnected;
public readonly ?DOMDocument $ownerDocument;
public readonly ?string $namespaceURI;
public string $prefix;
public readonly ?string $localName;
public readonly ?string $baseURI;
public string $textContent;
/* Méthodes héritées */
public function DOMNode::appendChild(DOMNode `$node`): DOMNode|false
public function DOMNode::C14N(
bool `$exclusive` = `false`,
bool `$withComments` = `false`,
?array `$xpath` = `null`,
?array `$nsPrefixes` = `null`
): string|false
public function DOMNode::C14NFile(
string `$uri`,
bool `$exclusive` = `false`,
bool `$withComments` = `false`,
?array `$xpath` = `null`,
?array `$nsPrefixes` = `null`
): int|false
public function DOMNode::cloneNode(bool `$deep` = `false`): DOMNode|false
public function DOMNode::compareDocumentPosition(DOMNode `$other`): int
public function DOMNode::contains(DOMNode|DOMNameSpaceNode|null `$other`): bool
public function DOMNode::getLineNo(): int
public function DOMNode::getNodePath(): ?string
public function DOMNode::getRootNode(?array `$options` = `null`): DOMNode
public function DOMNode::hasAttributes(): bool
public function DOMNode::hasChildNodes(): bool
public function DOMNode::insertBefore(DOMNode `$node`, ?DOMNode `$child` = `null`): DOMNode|false
public function DOMNode::isDefaultNamespace(string `$namespace`): bool
public function DOMNode::isEqualNode(?DOMNode `$otherNode`): bool
public function DOMNode::isSameNode(DOMNode `$otherNode`): bool
public function DOMNode::isSupported(string `$feature`, string `$version`): bool
public function DOMNode::lookupNamespaceURI(?string `$prefix`): ?string
public function DOMNode::lookupPrefix(string `$namespace`): ?string
public function DOMNode::normalize(): void
public function DOMNode::removeChild(DOMNode `$child`): DOMNode|false
public function DOMNode::replaceChild(DOMNode `$node`, DOMNode `$child`): DOMNode|false
public function DOMNode::__sleep(): array
public function DOMNode::__wakeup(): void
}

## Propriétés

publicId

  L'identifiant public du subset externe.

systemId

  L'identifiant système du subset externe. Ce peut être une URI absolue ou non.

name

  Le nom de la DTD ; c.-à-d., le nom suivant immédiatement le mot clé `DOCTYPE`.

entities

  Un DOMNamedNodeMap contenant les entités générales, à la fois externes et internes, déclarées dans la DTD.

notations

  Un DOMNamedNodeMap contenant les notations, déclarées dans la DTD.

internalSubset

  Le subset interne, sous la forme d'une chaîne de caractères, ou `null` s'il n'y en a pas. Cette chaîne ne contient pas les crochets délimiteurs.

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open