php-doc-en/reference/tidy/functions/tidy-get-status.xml

70 lines
1.8 KiB
XML
Raw Normal View History

<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.5 $ -->
<refentry id="function.tidy-get-status">
<refnamediv>
<refname>tidy_get_status</refname>
<refpurpose>
Get status of specified document.
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>Procedural style:</para>
<methodsynopsis>
<type>int</type><methodname>tidy_get_status</methodname>
<methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
</methodsynopsis>
<para>Object oriented style:</para>
<methodsynopsis>
<type>int</type><methodname>tidy->getStatus</methodname>
<void />
</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 accessibility errors, or 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);
$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>
<!-- 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
-->