Add missing constructors

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@182625 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Rob Richards 2005-03-22 10:56:34 +00:00
parent f59f87c095
commit e306d2a550
7 changed files with 636 additions and 3 deletions

View file

@ -0,0 +1,99 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id='function.dom-domattr-construct'>
<refnamediv>
<refname>DOMAttr->__construct()</refname>
<refpurpose>
Creates a new DOMAttr object
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>DOMAttr</classname></ooclass>
<constructorsynopsis>
<methodname>__construct</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam choice='opt'><type>string</type><parameter>value</parameter></methodparam>
</constructorsynopsis>
</classsynopsis>
<para>
Creates a new <classname>DOMAttr</classname> object. This object is read only.
It may be appended to a document, but additional nodes may not be appended to this node until
the node is associated with a document. To create a writeable node, use
<xref linkend="function.dom-domdocument-createattribute" />.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>name</parameter></term>
<listitem>
<para>
The tag name of the attribute.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>value</parameter></term>
<listitem>
<para>
The value of the attribute.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Creating a new DOMAttr</title>
<programlisting role="php">
<![CDATA[
<?php
$dom = new DOMDocument('1.0', 'iso-8859-1');
$element = $dom->appendChild(new DOMElement('root'));
$attr = $element->setAttributeNode(new DOMAttr('attr', 'attrvalue'));
echo $dom->saveXML(); /* <?xml version="1.0" encoding="iso-8859-1"?><root attr="attrvalue" /> */
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><xref linkend="function.dom-domdocument-createattribute" /></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id='function.dom-domcomment-construct'>
<refnamediv>
<refname>DOMComment->__construct()</refname>
<refpurpose>
Creates a new DOMComment object
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>DOMComment</classname></ooclass>
<constructorsynopsis>
<methodname>__construct</methodname>
<methodparam choice='opt'><type>string</type><parameter>value</parameter></methodparam>
</constructorsynopsis>
</classsynopsis>
<para>
Creates a new <classname>DOMComment</classname> object. This object is read only.
It may be appended to a document, but additional nodes may not be appended to this node until
the node is associated with a document. To create a writeable node, use
<xref linkend="function.dom-domdocument-createcomment" />.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>value</parameter></term>
<listitem>
<para>
The value of the comment.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Creating a new DOMComment</title>
<programlisting role="php">
<![CDATA[
<?php
$dom = new DOMDocument('1.0', 'iso-8859-1');
$element = $dom->appendChild(new DOMElement('root'));
$comment = $element->appendChild(new DOMComment('root comment'));
echo $dom->saveXML(); /* <?xml version="1.0" encoding="iso-8859-1"?><root><!--root comment--></root> */
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><xref linkend="function.dom-domdocument-createcomment" /></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id='function.dom-domelement-construct'>
<refnamediv>
<refname>DOMElement->__construct()</refname>
<refpurpose>
Creates a new DOMElement object
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>DOMElement</classname></ooclass>
<constructorsynopsis>
<methodname>__construct</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam choice='opt'><type>string</type><parameter>value</parameter></methodparam>
<methodparam choice='opt'><type>string</type><parameter>namespaceURI</parameter></methodparam>
</constructorsynopsis>
</classsynopsis>
<para>
Creates a new <classname>DOMElement</classname> object. This object is read only.
It may be appended to a document, but additional nodes may not be appended to this node until
the node is associated with a document. To create a writeable node, use
<xref linkend="function.dom-domdocument-createelement" /> or
<xref linkend="function.dom-domdocument-createelementns" />.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>name</parameter></term>
<listitem>
<para>
The tag name of the element. When also passing in namespaceURI, the element name
may take a prefix to be asociated with the uri.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>value</parameter></term>
<listitem>
<para>
The value of the element.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>namespaceURI</parameter></term>
<listitem>
<para>
A namespace uri to create the element within a specific namespace.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Creating a new DOMElement</title>
<programlisting role="php">
<![CDATA[
<?php
$dom = new DOMDocument('1.0', 'iso-8859-1');
$element = $dom->appendChild(new DOMElement('root'));
$element_ns = new DOMElement('pr:node1', 'thisvalue', 'http://xyz');
$element->appendChild($element_ns);
echo $dom->saveXML(); /* <?xml version="1.0" encoding="iso-8859-1"?>
<root><pr:node1 xmlns:pr="http://xyz">thisvalue</pr:node1></root> */
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><xref linkend="function.dom-domdocument-createelement" /></member>
<member><xref linkend="function.dom-domdocument-createelementns" /></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id='function.dom-domentityreference-construct'>
<refnamediv>
<refname>DOMAttr->__construct()</refname>
<refpurpose>
Creates a new DOMEntityReference object
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>DOMEntityReference</classname></ooclass>
<constructorsynopsis>
<methodname>__construct</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</constructorsynopsis>
</classsynopsis>
<para>
Creates a new <classname>DOMEntityReference</classname> object.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>name</parameter></term>
<listitem>
<para>
The name of the entity reference.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Creating a new DOMEntityReference</title>
<programlisting role="php">
<![CDATA[
<?php
$dom = new DOMDocument('1.0', 'iso-8859-1');
$element = $dom->appendChild(new DOMElement('root'));
$entity = $element->appendChild(new DOMEntityReference('nbsp'));
echo $dom->saveXML(); /* <?xml version="1.0" encoding="iso-8859-1"?><root>&nbsp;</root> */
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><xref linkend="function.dom-domdocument-createentityreference" /></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id='function.dom-domprocessinginstruction-construct'>
<refnamediv>
<refname>DOMProcessingInstruction->__construct()</refname>
<refpurpose>
Creates a new DOMProcessingInstruction object
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>DOMProcessingInstruction</classname></ooclass>
<constructorsynopsis>
<methodname>__construct</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam choice='opt'><type>string</type><parameter>value</parameter></methodparam>
</constructorsynopsis>
</classsynopsis>
<para>
Creates a new <classname>DOMProcessingInstruction</classname> object. This object is read only.
It may be appended to a document, but additional nodes may not be appended to this node until
the node is associated with a document. To create a writeable node, use
<xref linkend="function.dom-domdocument-createprocessinginstruction" />.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>name</parameter></term>
<listitem>
<para>
The tag name of the processing instruction.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>value</parameter></term>
<listitem>
<para>
The value of the processing instruction.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Creating a new DOMProcessingInstruction</title>
<programlisting role="php">
<![CDATA[
<?php
$dom = new DOMDocument('1.0', 'UTF-8');
$html = $dom->appendChild(new DOMElement('html'));
$body = $html->appendChild(new DOMElement('body'));
$pinode = new DOMProcessingInstruction('php', 'echo "Hello World"; ');
$body->appendChild($pinode);
echo $dom->saveXML(); /* <?xml version="1.0" encoding="iso-8859-1"?>
<html><body><?php echo "Hello World"; ?></body></html> */
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><xref linkend="function.dom-domdocument-createprocessinginstruction" /></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id='function.dom-domtext-construct'>
<refnamediv>
<refname>DOMText->__construct()</refname>
<refpurpose>
Creates a new DOMText object
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>DOMText</classname></ooclass>
<constructorsynopsis>
<methodname>__construct</methodname>
<methodparam choice='opt'><type>string</type><parameter>value</parameter></methodparam>
</constructorsynopsis>
</classsynopsis>
<para>
Creates a new <classname>DOMText</classname> object.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>value</parameter></term>
<listitem>
<para>
The value of the text node. If not supplied an empty text node is created.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Creating a new DOMText</title>
<programlisting role="php">
<![CDATA[
<?php
$dom = new DOMDocument('1.0', 'iso-8859-1');
$element = $dom->appendChild(new DOMElement('root'));
$text = $element->appendChild(new DOMText('root value'));
echo $dom->saveXML(); /* <?xml version="1.0" encoding="iso-8859-1"?><root>root value</root> */
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><xref linkend="function.dom-domdocument-createtextnode" /></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.17 $ -->
<!-- $Revision: 1.18 $ -->
<reference id="ref.dom">
<title>DOM Functions</title>
<titleabbrev>DOM</titleabbrev>
@ -44,6 +44,14 @@
<para>
Extends <classname>DOMNode</classname>.
</para>
<section id='dom.class.domattr.constructor'>
&reftitle.constructor;
<itemizedlist>
<listitem>
<para><xref linkend='function.dom-domattr-construct' /> - construct a new DOMAttr object</para>
</listitem>
</itemizedlist>
</section>
<section id='dom.class.domattr.methods'>
&reftitle.methods;
<itemizedlist>
@ -158,7 +166,22 @@
</table>
</section>
</section>
<section id='dom.class.domcomment'>
<title><classname>DOMComment</classname></title>
<para>
Extends <classname>DOMCharacterData</classname>.
</para>
<section id='dom.class.domcomment.constructor'>
&reftitle.constructor;
<itemizedlist>
<listitem>
<para><xref linkend='function.dom-domcomment-construct' /> - construct a new DOMComment object</para>
</listitem>
</itemizedlist>
</section>
</section>
<section id='dom.class.domdocument'>
<title><classname>DOMDocument</classname></title>
<para>
@ -505,6 +528,14 @@
<para>
Extends <classname>DOMNode</classname>.
</para>
<section id='dom.class.domelement.constructor'>
&reftitle.constructor;
<itemizedlist>
<listitem>
<para><xref linkend='function.dom-domelement-construct' /> - construct a new DOMElement object</para>
</listitem>
</itemizedlist>
</section>
<section id='dom.class.domelement.methods'>
&reftitle.methods;
<itemizedlist>
@ -679,6 +710,14 @@
<para>
Extends <classname>DOMNode</classname>.
</para>
<section id='dom.class.domentityreference.constructor'>
&reftitle.constructor;
<itemizedlist>
<listitem>
<para><xref linkend='function.dom-domentityreference-construct' /> - construct a new DOMEntityReference object</para>
</listitem>
</itemizedlist>
</section>
</section>
<section id='dom.class.domexception'>
@ -1022,6 +1061,14 @@
<para>
Extends <classname>DOMNode</classname>.
</para>
<section id='dom.class.domprocessinginstruction.constructor'>
&reftitle.constructor;
<itemizedlist>
<listitem>
<para><xref linkend='function.dom-domprocessinginstruction-construct' /> - construct a new DOMProcessingInstruction object</para>
</listitem>
</itemizedlist>
</section>
<section id='dom.class.domprocessinginstruction.properties'>
&reftitle.properties;
<table>
@ -1057,8 +1104,16 @@
<section id='dom.class.domtext'>
<title><classname>DOMText</classname></title>
<para>
Extends <classname>DOMCharacterData</classname>.
</para>
<section id='dom.class.domtext.constructor'>
&reftitle.constructor;
<itemizedlist>
<listitem>
<para><xref linkend='function.dom-domtext-construct' /> - construct a new DOMText object</para>
</listitem>
</itemizedlist>
</section>
<section id='dom.class.domtext.methods'>
&reftitle.methods;
<itemizedlist>