mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
more tidy docs and examples
#can somebody check my english in tidy_get_status please? git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@153298 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
a0a74a4542
commit
358ebcd020
2 changed files with 63 additions and 8 deletions
|
@ -1,6 +1,5 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<refentry id="function.tidy-get-output">
|
||||
<refnamediv>
|
||||
<refname>tidy_get_output</refname>
|
||||
|
@ -12,11 +11,46 @@
|
|||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>tidy_get_output</methodname>
|
||||
<void/>
|
||||
<methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>tidy_get_output</function> returns a string with the repaired
|
||||
html.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>tidy_get_output</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
&warn.undocumented.func;
|
||||
$html = '<p>paragraph</i>';
|
||||
$tidy = tidy_parse_string($html);
|
||||
|
||||
$tidy->CleanRepair();
|
||||
|
||||
echo tidy_get_output($tidy);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
The above example will output:
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<p>paragraph</p>
|
||||
</body>
|
||||
</html>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry id="function.tidy-get-status">
|
||||
<refnamediv>
|
||||
<refname>tidy_get_status</refname>
|
||||
|
@ -12,11 +11,33 @@
|
|||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>tidy_get_status</methodname>
|
||||
<void/>
|
||||
<methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>tidy_get_status</function> returns the status for the specified
|
||||
<parameter>tidy</parameter> resource. It returns 0 if no error/warning
|
||||
was raised, 1 for warnings or accessibilities errors, and 2 for errors.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>tidy_get_status</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$html = '<p>paragraph</i>';
|
||||
$tidy = tidy_parse_string($html);
|
||||
|
||||
&warn.undocumented.func;
|
||||
$html2 = '<bogus>test</bogus>';
|
||||
$tidy2 = tidy_parse_string($html2);
|
||||
|
||||
echo tidy_get_status($tidy); //1
|
||||
|
||||
echo tidy_get_status($tidy2); //2
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
|
Loading…
Reference in a new issue