-
Notifications
You must be signed in to change notification settings - Fork 760
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
719 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<refentry xml:id="dom-htmldocument.createempty" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<refnamediv> | ||
<refname>Dom\HTMLDocument::createEmpty</refname> | ||
<refpurpose>Creates an empty <acronym>HTML</acronym> document</refpurpose> | ||
</refnamediv> | ||
|
||
<refsect1 role="description"> | ||
&reftitle.description; | ||
<methodsynopsis role="Dom\\HTMLDocument"> | ||
<modifier>public</modifier> <modifier>static</modifier> <type>Dom\HTMLDocument</type><methodname>Dom\HTMLDocument::createEmpty</methodname> | ||
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter><initializer>"UTF-8"</initializer></methodparam> | ||
</methodsynopsis> | ||
<simpara> | ||
Creates an empty <acronym>HTML</acronym> document without any elements. | ||
</simpara> | ||
</refsect1> | ||
|
||
<refsect1 role="parameters"> | ||
&reftitle.parameters; | ||
<variablelist> | ||
<varlistentry> | ||
<term><parameter>encoding</parameter></term> | ||
<listitem> | ||
<simpara> | ||
The character encoding of the document, used for serialization when | ||
calling the save methods. | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</refsect1> | ||
|
||
<refsect1 role="returnvalues"> | ||
&reftitle.returnvalues; | ||
<simpara> | ||
An empty <acronym>HTML</acronym> document. | ||
</simpara> | ||
</refsect1> | ||
|
||
<refsect1 role="examples"> | ||
&reftitle.examples; | ||
<example xml:id="dom-htmldocument.createempty.example.basic"> | ||
<title><methodname>Dom\HTMLDocument::createEmpty</methodname> example</title> | ||
<simpara> | ||
Creates an empty document and serializes it. | ||
</simpara> | ||
<programlisting role="php"> | ||
<![CDATA[ | ||
<?php | ||
$dom = Dom\HTMLDocument::createEmpty(); | ||
var_dump($dom->saveHtml()); | ||
?> | ||
]]> | ||
</programlisting> | ||
&example.outputs; | ||
<screen> | ||
<![CDATA[ | ||
string(0) "" | ||
]]> | ||
</screen> | ||
</example> | ||
</refsect1> | ||
|
||
<refsect1 role="seealso"> | ||
&reftitle.seealso; | ||
<simplelist> | ||
<member><methodname>Dom\HTMLDocument::createFromString</methodname></member> | ||
<member><methodname>Dom\HTMLDocument::createFromFile</methodname></member> | ||
</simplelist> | ||
</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:"~/.phpdoc/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 | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<refentry xml:id="dom-htmldocument.createfromfile" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<refnamediv> | ||
<refname>Dom\HTMLDocument::createFromFile</refname> | ||
<refpurpose>Parses an <acronym>HTML</acronym> document from a file</refpurpose> | ||
</refnamediv> | ||
|
||
<refsect1 role="description"> | ||
&reftitle.description; | ||
<methodsynopsis role="Dom\\HTMLDocument"> | ||
<modifier>public</modifier> <modifier>static</modifier> <type>Dom\HTMLDocument</type><methodname>Dom\HTMLDocument::createFromFile</methodname> | ||
<methodparam><type>string</type><parameter>path</parameter></methodparam> | ||
<methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>0</initializer></methodparam> | ||
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>overrideEncoding</parameter><initializer>&null;</initializer></methodparam> | ||
</methodsynopsis> | ||
<simpara> | ||
Parses an <acronym>HTML</acronym> document from a file, | ||
according to the living standard. | ||
</simpara> | ||
</refsect1> | ||
|
||
<refsect1 role="parameters"> | ||
&reftitle.parameters; | ||
<variablelist> | ||
<varlistentry> | ||
<term><parameter>path</parameter></term> | ||
<listitem> | ||
<simpara> | ||
The path to the file to parse. | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>options</parameter></term> | ||
<listitem> | ||
&dom.parameter.compliant.options; | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>overrideEncoding</parameter></term> | ||
<listitem> | ||
&dom.parameter.compliant.encoding; | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</refsect1> | ||
|
||
<refsect1 role="returnvalues"> | ||
&reftitle.returnvalues; | ||
<simpara> | ||
The parsed document as an <classname>Dom\HTMLDocument</classname> instance. | ||
</simpara> | ||
</refsect1> | ||
|
||
<refsect1 role="errors"> | ||
&reftitle.errors; | ||
<itemizedlist> | ||
<listitem> | ||
<simpara> | ||
Throws a <exceptionname>ValueError</exceptionname> if | ||
<parameter>path</parameter> contains null bytes or contains | ||
<literal>"%00"</literal>. | ||
</simpara> | ||
</listitem> | ||
&dom.errors.compliant.common; | ||
<listitem> | ||
<simpara> | ||
Throws an <exceptionname>Exception</exceptionname> if | ||
the file could not be opened. | ||
</simpara> | ||
</listitem> | ||
</itemizedlist> | ||
</refsect1> | ||
|
||
&dom.parser.compliant.note.whitespace; | ||
|
||
<refsect1 role="seealso"> | ||
&reftitle.seealso; | ||
<simplelist> | ||
<member><methodname>Dom\HTMLDocument::createEmpty</methodname></member> | ||
<member><methodname>Dom\HTMLDocument::createFromString</methodname></member> | ||
</simplelist> | ||
</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:"~/.phpdoc/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 | ||
--> |
Oops, something went wrong.