Skip to content

Commit

Permalink
Document Dom\DocumentType class
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsdos committed Dec 1, 2024
1 parent 02bdbb9 commit 760e722
Showing 4 changed files with 152 additions and 4 deletions.
1 change: 1 addition & 0 deletions reference/dom/book.xml
Original file line number Diff line number Diff line change
@@ -44,6 +44,7 @@

&reference.dom.dom.dom-adjacentposition;
&reference.dom.dom.dom-attr;
&reference.dom.dom.dom-documenttype;
&reference.dom.dom.dom-implementation;
&reference.dom.dom.dom-node;

146 changes: 146 additions & 0 deletions reference/dom/dom/dom-documenttype.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<reference xml:id="class.dom-documenttype" role="class" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>The Dom\DocumentType class</title>
<titleabbrev>Dom\DocumentType</titleabbrev>

<partintro>
<section xml:id="dom-documenttype.intro">
&reftitle.intro;
<simpara>
Each <classname>Dom\Document</classname> has a <literal>doctype</literal>
attribute whose value is either &null; or a <classname>Dom\DocumentType</classname> object.
</simpara>
<simpara>
This is the modern, spec-compliant equivalent of
<classname>DOMImplementation</classname>.
</simpara>
</section>

<section xml:id="dom-documenttype.synopsis">
&reftitle.classsynopsis;
<classsynopsis class="class">
<ooclass>
<classname>Dom\DocumentType</classname>
</ooclass>

<ooclass>
<modifier>extends</modifier>
<classname>Dom\Node</classname>
</ooclass>

<oointerface>
<modifier>implements</modifier>
<interfacename>Dom\ChildNode</interfacename>
</oointerface>

<classsynopsisinfo role="comment">&InheritedConstants;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.dom-node')/db:partintro/db:section/db:classsynopsis/db:fieldsynopsis[preceding-sibling::db:classsynopsisinfo[1][@role='comment' and text()='&Constants;']]))">
<xi:fallback/>
</xi:include>

<classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type>string</type>
<varname linkend="dom-documenttype.props.name">name</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type>Dom\DtdNamedNodeMap</type>
<varname linkend="dom-documenttype.props.entities">entities</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type>Dom\DtdNamedNodeMap</type>
<varname linkend="dom-documenttype.props.notations">notations</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type>string</type>
<varname linkend="dom-documenttype.props.publicid">publicId</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type>string</type>
<varname linkend="dom-documenttype.props.systemid">systemId</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<modifier>readonly</modifier>
<type class="union"><type>string</type><type>null</type></type>
<varname linkend="dom-documenttype.props.internalsubset">internalSubset</varname>
</fieldsynopsis>

<classsynopsisinfo role="comment">&InheritedProperties;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.dom-node')/db:partintro/db:section/db:classsynopsis/db:fieldsynopsis[preceding-sibling::db:classsynopsisinfo[1][@role='comment' and text()='&Properties;']]))">
<xi:fallback/>
</xi:include>

<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.dom-documenttype')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='Dom\\DocumentType'])">
<xi:fallback/>
</xi:include>

<classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.dom-node')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='Dom\\Node'])">
<xi:fallback/>
</xi:include>
</classsynopsis>
</section>

<section xml:id="dom-documenttype.props">
&reftitle.properties;
<variablelist>
<varlistentry xml:id="dom-documenttype.props.publicid">
<term><varname>publicId</varname></term>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('domdocumenttype.props.publicid')/db:listitem)">
<xi:fallback/>
</xi:include>
</varlistentry>
<varlistentry xml:id="dom-documenttype.props.systemid">
<term><varname>systemId</varname></term>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('domdocumenttype.props.systemid')/db:listitem)">
<xi:fallback/>
</xi:include>
</varlistentry>
<varlistentry xml:id="dom-documenttype.props.name">
<term><varname>name</varname></term>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('domdocumenttype.props.name')/db:listitem)">
<xi:fallback/>
</xi:include>
</varlistentry>
<varlistentry xml:id="dom-documenttype.props.entities">
<term><varname>entities</varname></term>
<listitem>
<simpara>
A <classname>Dom\DtdNamedNodeMap</classname> containing the general
entities, both external and internal, declared in the <abbrev>DTD</abbrev>.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="dom-documenttype.props.notations">
<term><varname>notations</varname></term>
<listitem>
<simpara>
A <classname>Dom\DtdNamedNodeMap</classname> containing the notations
declared in the <abbrev>DTD</abbrev>.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="dom-documenttype.props.internalsubset">
<term><varname>internalSubset</varname></term>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('domdocumenttype.props.internalsubset')/db:listitem)">
<xi:fallback/>
</xi:include>
</varlistentry>
</variablelist>
</section>
</partintro>

</reference>
8 changes: 4 additions & 4 deletions reference/dom/domdocumenttype.xml
Original file line number Diff line number Diff line change
@@ -102,15 +102,15 @@
<listitem>
<para>
The system identifier of the external subset. This may be an
absolute URI or not.
absolute <abbrev>URI</abbrev> or not.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="domdocumenttype.props.name">
<term><varname>name</varname></term>
<listitem>
<para>
The name of DTD; i.e., the name immediately following the
The name of <abbrev>DTD</abbrev>; i.e., the name immediately following the
<literal>DOCTYPE</literal> keyword.
</para>
</listitem>
@@ -120,7 +120,7 @@
<listitem>
<para>
A <classname>DOMNamedNodeMap</classname> containing the general
entities, both external and internal, declared in the DTD.
entities, both external and internal, declared in the <abbrev>DTD</abbrev>.
</para>
</listitem>
</varlistentry>
@@ -129,7 +129,7 @@
<listitem>
<para>
A <classname>DOMNamedNodeMap</classname> containing the notations
declared in the DTD.
declared in the <abbrev>DTD</abbrev>.
</para>
</listitem>
</varlistentry>
1 change: 1 addition & 0 deletions reference/dom/versions.xml
Original file line number Diff line number Diff line change
@@ -203,6 +203,7 @@
<function name="dom\import_simplexml" from="PHP 8 &gt;= 8.4.0"/>

<function name="dom\attr" from="PHP 8 &gt;= 8.4.0"/>
<function name="dom\documenttype" from="PHP 8 &gt;= 8.4.0"/>
<function name="dom\node" from="PHP 8 &gt;= 8.4.0"/>
<function name="dom\implementation" from="PHP 8 &gt;= 8.4.0"/>
</versions>

0 comments on commit 760e722

Please sign in to comment.