[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] [doc-en] master: Update transformToDoc description (#2810)
From: Niels Dossche via GitHub <noreply () php ! net>
Date: 2023-09-29 23:17:19
Message-ID: Br7KFRULqD4vCN09dJvQWlrDJLeRQEgCBdxwimsXfs () main ! php ! net
[Download RAW message or body]
Author: Niels Dossche (nielsdos)
Committer: GitHub (web-flow)
Pusher: Girgias
Date: 2023-09-30T00:03:47+01:00
Commit: https://github.com/php/doc-en/commit/960d50e1dafc7e385fdf1d2d5d2152fc564fb905
Raw diff: https://github.com/php/doc-en/commit/960d50e1dafc7e385fdf1d2d5d2152fc564fb905.diff
Update transformToDoc description (#2810)
Mainly, this is to fix https://bugs.php.net/bug.php?id=53693, which is
about the undocumented returnClass argument.
However, I found that the description on this page was in general
suboptimal, so this patch fixes that.
Changed paths:
M reference/xsl/xsltprocessor/transformtodoc.xml
Diff:
diff --git a/reference/xsl/xsltprocessor/transformtodoc.xml \
b/reference/xsl/xsltprocessor/transformtodoc.xml index 3fc8f8cd12c..1e0893cb64e \
100644
--- a/reference/xsl/xsltprocessor/transformtodoc.xml
+++ b/reference/xsl/xsltprocessor/transformtodoc.xml
@@ -3,17 +3,17 @@
<refentry xml:id="xsltprocessor.transformtodoc" \
xmlns="http://docbook.org/ns/docbook"> <refnamediv>
<refname>XSLTProcessor::transformToDoc</refname>
- <refpurpose>Transform to a DOMDocument</refpurpose>
+ <refpurpose>Transform to a document</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="XSLTProcessor">
- <modifier>public</modifier> <type \
class="union"><type>DOMDocument</type><type>false</type></type><methodname>XSLTProcessor::transformToDoc</methodname>
+ <modifier>public</modifier> <type \
class="union"><type>object</type><type>false</type></type><methodname>XSLTProcessor::transformToDoc</methodname>
<methodparam><type>object</type><parameter>document</parameter></methodparam>
<methodparam choice="opt"><type \
class="union"><type>string</type><type>null</type></type><parameter>returnClass</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
- Transforms the source node to a <classname>DOMDocument</classname> applying
+ Transforms the source node to a document (e.g. \
<classname>DOMDocument</classname>) applying the stylesheet given by the
<function>XSLTProcessor::importStylesheet</function> method.
</para>
@@ -26,8 +26,19 @@
<term><parameter>document</parameter></term>
<listitem>
<para>
- The <classname>DOMDocument</classname> or \
<classname>SimpleXMLElement</classname> object to
- be transformed.
+ The <classname>DOMDocument</classname> or \
<classname>SimpleXMLElement</classname> or libxml-compatible + object to be \
transformed. + </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>returnClass</parameter></term>
+ <listitem>
+ <para>
+ This optional parameter may be used so that
+ <methodname>XSLTProcessor::transformToDoc</methodname>
+ will return an object of the specified class.
+ That class should either extend or be the same class as \
<parameter>document</parameter>'s class. </para>
</listitem>
</varlistentry>
@@ -37,7 +48,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
- The resulting <classname>DOMDocument</classname> or &false; on error.
+ The resulting document or &false; on error.
</para>
</refsect1>
<refsect1 role="examples">
--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic