cvs: phpdoc-pl /reference/tidy/functions tidy-access-count.xml tidy-config-count.xml tidy-error-count.xml tidy-get-error-buffer.xml tidy-get-root.xml
tidy-get-status.xml
| From: | Jaroslaw Glowacki | Date: | Sat, 17 Mar 2007 15:36:55 +0000 |
| Subject: | cvs: phpdoc-pl /reference/tidy/functions tidy-access-count.xml tidy-config-count.xml tidy-error-count.xml tidy-get-error-buffer.xml tidy-get-root.xml tidy-get-status.xml |
||
| Groups: | php.doc.pl | ||
| Request: | Send a blank email to doc-pl+get-1057@lists.php.net to get a copy of this message | ||
joeaccord Sat Mar 17 15:36:55 2007 UTC
Added files:
/phpdoc-pl/reference/tidy/functions tidy-access-count.xml
tidy-config-count.xml
tidy-error-count.xml
tidy-get-error-buffer.xml
tidy-get-root.xml
tidy-get-status.xml
Log:
new files
http://cvs.php.net/viewvc.cgi/phpdoc-pl/reference/tidy/functions/tidy-access-count.xml?view=markup&rev=1.1 Index: phpdoc-pl/reference/tidy/functions/tidy-access-count.xml +++ phpdoc-pl/reference/tidy/functions/tidy-access-count.xml <?xml version='1.0' encoding='iso-8859-2'?> <!-- EN-Revision: 1.5 Maintainer: joeaccord Status: ready --> <!-- $Revision: 1.1 $ --> <refentry id="function.tidy-access-count"> <refnamediv> <refname>tidy_access_count</refname> <refpurpose> Zwraca liczbê dostêpnych ostrze¿eñ napotkanych w okre¶lonym dokumencie </refpurpose> </refnamediv> <refsect1> <title>Opis</title> <methodsynopsis> <type>int</type><methodname>tidy_access_count</methodname> <methodparam><type>tidy</type><parameter>obiekt</parameter></methodparam> </methodsynopsis> <para> <function>tidy_access_count</function> zwraca liczbê dostêpnych ostrze¿eñ znalezionych w okre¶lonym dokumencie. </para> <note> <para> Poniewa¿ TidyLib zosta³a zaprojektowana w taki sposób, musisz wywo³aæ <function>tidy_diagnose</function> przed <function>tidy_access_count</function> bo inaczej zawsze bêdzie zwraca³a <literal>0</literal>. Musisz tak¿e aktywowaæ opcjê <literal>accessibility-check</literal>. </para> </note> <para> <example> <title>Przyk³ad <function>tidy_access_count</function></title> <programlisting role="php"> <![CDATA[ <?php $html ='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html><head><title>Tytu³</title></head> <body> <p><img src="img.png"></p> </body></html>'; // wybierz poziom sprawdzania dostêpno¶ci: 1, 2 lub 3 $config = array('accessibility-check' => 3); $tidy = new tidy(); $tidy->parseString($html, $config); $tidy->CleanRepair(); /* Nigdy nie zapomnij wywo³aæ tego! */ $tidy->diagnose(); echo tidy_access_count($tidy); //5 ?> ]]> </programlisting> </example> </para> <para> Patrz tak¿e: <function>tidy_error_count</function> i <function>tidy_warning_count</function>. </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 --> http://cvs.php.net/viewvc.cgi/phpdoc-pl/reference/tidy/functions/tidy-config-count.xml?view=markup&rev=1.1 Index: phpdoc-pl/reference/tidy/functions/tidy-config-count.xml +++ phpdoc-pl/reference/tidy/functions/tidy-config-count.xml <?xml version='1.0' encoding='iso-8859-2'?> <!-- EN-Revision: 1.5 Maintainer: joeaccord Status: ready --> <!-- $Revision: 1.1 $ --> <refentry id="function.tidy-config-count"> <refnamediv> <refname>tidy_config_count</refname> <refpurpose> Zwraca liczbê b³êdów konfiguracji Tidy napotkanych w okre¶lonym dokumencie </refpurpose> </refnamediv> <refsect1> <title>Opis</title> <methodsynopsis> <type>int</type><methodname>tidy_config_count</methodname> <methodparam><type>tidy</type><parameter>obiekt</parameter></methodparam> </methodsynopsis> <para> <function>tidy_config_count</function> zwraca liczbê b³êdów napotkanych w konfiguracji okre¶lonego <parameter>obiektu</parameter> tidy. </para> <para> <example> <title>Przyk³ad <function>tidy_config_count</function></title> <programlisting role="php"> <![CDATA[ <?php $html = '<p>test</I>'; $config = array('doctype' => 'bogus'); $tidy = tidy_parse_string($html, $config); /* This outputs 1, because 'bogus' isn't a valid doctype */ echo tidy_config_count($tidy); ?> ]]> </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 --> http://cvs.php.net/viewvc.cgi/phpdoc-pl/reference/tidy/functions/tidy-error-count.xml?view=markup&rev=1.1 Index: phpdoc-pl/reference/tidy/functions/tidy-error-count.xml +++ phpdoc-pl/reference/tidy/functions/tidy-error-count.xml <?xml version='1.0' encoding='iso-8859-2'?> <!-- EN-Revision: 1.7 Maintainer: joeaccord Status: ready --> <!-- $Revision: 1.1 $ --> <refentry id="function.tidy-error-count"> <refnamediv> <refname>tidy_error_count</refname> <refpurpose> Zwraca liczbê b³êdów Tidy napotkanych w okre¶lonym dokumencie </refpurpose> </refnamediv> <refsect1> <title>Opis</title> <methodsynopsis> <type>int</type><methodname>tidy_error_count</methodname> <methodparam><type>tidy</type><parameter>obiekt</parameter></methodparam> </methodsynopsis> <para> <function>tidy_error_count</function> zwraca liczbê b³êdów Tidy napotkanych w okre¶lonym dokumencie. </para> <para> <example> <title>Przyk³ad <function>tidy_error_count</function></title> <programlisting role="php"> <![CDATA[ <?php $html = '<p>test</i> <bogustag>bogus</bogustag>'; $tidy = tidy_parse_string($html); echo tidy_error_count($tidy) . "\n"; //1 echo $tidy->errorBuffer; ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ 1 line 1 column 1 - Warning: missing <!DOCTYPE> declaration line 1 column 8 - Warning: discarding unexpected </i> line 2 column 1 - Error: <bogustag> is not recognized! line 2 column 1 - Warning: discarding unexpected <bogustag> line 2 column 16 - Warning: discarding unexpected </bogustag> line 1 column 1 - Warning: inserting missing 'title' element ]]> </screen> </example> </para> <para> Patrz tak¿e: <function>tidy_access_count</function> i <function>tidy_warning_count</function>. </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 --> http://cvs.php.net/viewvc.cgi/phpdoc-pl/reference/tidy/functions/tidy-get-error-buffer.xml?view=markup&rev=1.1 Index: phpdoc-pl/reference/tidy/functions/tidy-get-error-buffer.xml +++ phpdoc-pl/reference/tidy/functions/tidy-get-error-buffer.xml <?xml version='1.0' encoding='iso-8859-2'?> <!-- EN-Revision: 1.7 Maintainer: joeaccord Status: ready --> <!-- $Revision: 1.1 $ --> <refentry id="function.tidy-get-error-buffer"> <refnamediv> <refname>tidy_get_error_buffer</refname> <refpurpose> Zwraca ostrze¿enia i b³êdy jakie wyst±pi³y podczas parsowania okre¶lonego dokumentu </refpurpose> </refnamediv> <refsect1> <title>Opis</title> <para>Styl proceduralny:</para> <methodsynopsis> <type>string</type><methodname>tidy_get_error_buffer</methodname> <methodparam><type>tidy</type><parameter>obiekt</parameter></methodparam> </methodsynopsis> <para>Styl zorientowany obiektowo (w³a¶ciwo¶æ):</para> <classsynopsis> <ooclass><classname>tidy</classname></ooclass> <fieldsynopsis><type>string</type><varname>errorBuffer</varname></fieldsynopsis> </classsynopsis> <para> <function>tidy_get_error_buffer</function> zwraca ostrze¿enia i b³êdy jakie wyst±pi³y podczas parsowania okre¶lonego dokumentu. </para> <para> <example> <title>Przyk³ad <function>tidy_get_error_buffer</function></title> <programlisting role="php"> <![CDATA[ <?php $html = '<p>paragraph</p>'; $tidy = tidy_parse_string($html); echo tidy_get_error_buffer($tidy); /* or in OO: */ echo $tidy->errorBuffer; ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ line 1 column 1 - Warning: missing <!DOCTYPE> declaration line 1 column 1 - Warning: inserting missing 'title' element ]]> </screen> </example> </para> <para> Patrz tak¿e: <function>tidy_access_count</function>, <function>tidy_error_count</function> i <function>tidy_warning_count</function>. </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 --> http://cvs.php.net/viewvc.cgi/phpdoc-pl/reference/tidy/functions/tidy-get-root.xml?view=markup&rev=1.1 Index: phpdoc-pl/reference/tidy/functions/tidy-get-root.xml +++ phpdoc-pl/reference/tidy/functions/tidy-get-root.xml <?xml version='1.0' encoding='iso-8859-2'?> <!-- EN-Revision: 1.6 Maintainer: joeaccord Status: ready --> <!-- $Revision: 1.1 $ --> <refentry id="function.tidy-get-root"> <refnamediv> <refname>tidy_get_root</refname> <refpurpose> Zwraca obiekt tidyNode reprezentuj±cy korzeñ parsowanego drzewa tidy </refpurpose> </refnamediv> <refsect1> <title>Opis</title> <para>Styl proceduralny:</para> <methodsynopsis> <type>tidyNode</type><methodname>tidy_get_root</methodname> <methodparam><type>tidy</type><parameter>obiekt</parameter></methodparam> </methodsynopsis> <para>Styl zorientowany obiektowo:</para> <methodsynopsis> <type>tidyNode</type><methodname>tidy->root</methodname> <void /> </methodsynopsis> <para> Zwraca obiekt tidyNode reprezentuj±cy korzeñ parsowanego drzewa tidy. </para> <para> <example> <title>zrzut wêz³ów</title> <programlisting role="php"> <![CDATA[ <?php $html = <<< HTML <html><body> <p>paragraph</p> <br/> </body></html> HTML; $tidy = tidy_parse_string($html); dump_nodes($tidy->root(), 1); function dump_nodes($node, $indent) { if($node->hasChildren()) { foreach($node->child as $child) { echo str_repeat('.', $indent*2) . ($child->name ? $child->name : '"'.$child->value.'"'). "\n"; dump_nodes($child, $indent+1); } } } ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[...html.....head.......title.....body.......p........."paragraph".......br ]]> </screen> </example> </para> ¬e.tidy.ze2; </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 --> http://cvs.php.net/viewvc.cgi/phpdoc-pl/reference/tidy/functions/tidy-get-status.xml?view=markup&rev=1.1 Index: phpdoc-pl/reference/tidy/functions/tidy-get-status.xml +++ phpdoc-pl/reference/tidy/functions/tidy-get-status.xml <?xml version='1.0' encoding='iso-8859-2'?> <!-- EN-Revision: 1.7 Maintainer: joeaccord Status: ready --> <!-- $Revision: 1.1 $ --> <refentry id="function.tidy-get-status"> <refnamediv> <refname>tidy_get_status</refname> <refpurpose> Zwraca status okre¶lonego dokumentu </refpurpose> </refnamediv> <refsect1> <title>Opis</title> <para>Styl proceduralny:</para> <methodsynopsis> <type>int</type><methodname>tidy_get_status</methodname> <methodparam><type>tidy</type><parameter>obiekt</parameter></methodparam> </methodsynopsis> <para>Styl zorientowany obiektowo:</para> <methodsynopsis> <type>int</type><methodname>tidy->getStatus</methodname> <void /> </methodsynopsis> <para> <function>tidy_get_status</function> zwraca status okre¶lonego <parameter>obiektu</parameter> tidy. Zwraca 0 je¶li nie zosta³ zg³oszony ¿aden b³±d/ostrze¿enie, 1 dla ostrze¿eñ lub dostêpnych b³êdów, lub 2 dla b³êdów. </para> <para> <example> <title>Przyk³ad <function>tidy_get_status</function></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 -->
http://cvs.php.net/viewvc.cgi/phpdoc-pl/reference/tidy/functions/tidy-access-count.xml?view=markup&rev=1.1 Index: phpdoc-pl/reference/tidy/functions/tidy-access-count.xml +++ phpdoc-pl/reference/tidy/functions/tidy-access-count.xml <?xml version='1.0' encoding='iso-8859-2'?> <!-- EN-Revision: 1.5 Maintainer: joeaccord Status: ready --> <!-- $Revision: 1.1 $ --> <refentry id="function.tidy-access-count"> <refnamediv> <refname>tidy_access_count</refname> <refpurpose> Zwraca liczbê dostêpnych ostrze¿eñ napotkanych w okre¶lonym dokumencie </refpurpose> </refnamediv> <refsect1> <title>Opis</title> <methodsynopsis> <type>int</type><methodname>tidy_access_count</methodname> <methodparam><type>tidy</type><parameter>obiekt</parameter></methodparam> </methodsynopsis> <para> <function>tidy_access_count</function> zwraca liczbê dostêpnych ostrze¿eñ znalezionych w okre¶lonym dokumencie. </para> <note> <para> Poniewa¿ TidyLib zosta³a zaprojektowana w taki sposób, musisz wywo³aæ <function>tidy_diagnose</function> przed <function>tidy_access_count</function> bo inaczej zawsze bêdzie zwraca³a <literal>0</literal>. Musisz tak¿e aktywowaæ opcjê <literal>accessibility-check</literal>. </para> </note> <para> <example> <title>Przyk³ad <function>tidy_access_count</function></title> <programlisting role="php"> <![CDATA[ <?php $html ='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html><head><title>Tytu³</title></head> <body> <p><img src="img.png"></p> </body></html>'; // wybierz poziom sprawdzania dostêpno¶ci: 1, 2 lub 3 $config = array('accessibility-check' => 3); $tidy = new tidy(); $tidy->parseString($html, $config); $tidy->CleanRepair(); /* Nigdy nie zapomnij wywo³aæ tego! */ $tidy->diagnose(); echo tidy_access_count($tidy); //5 ?> ]]> </programlisting> </example> </para> <para> Patrz tak¿e: <function>tidy_error_count</function> i <function>tidy_warning_count</function>. </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 --> http://cvs.php.net/viewvc.cgi/phpdoc-pl/reference/tidy/functions/tidy-config-count.xml?view=markup&rev=1.1 Index: phpdoc-pl/reference/tidy/functions/tidy-config-count.xml +++ phpdoc-pl/reference/tidy/functions/tidy-config-count.xml <?xml version='1.0' encoding='iso-8859-2'?> <!-- EN-Revision: 1.5 Maintainer: joeaccord Status: ready --> <!-- $Revision: 1.1 $ --> <refentry id="function.tidy-config-count"> <refnamediv> <refname>tidy_config_count</refname> <refpurpose> Zwraca liczbê b³êdów konfiguracji Tidy napotkanych w okre¶lonym dokumencie </refpurpose> </refnamediv> <refsect1> <title>Opis</title> <methodsynopsis> <type>int</type><methodname>tidy_config_count</methodname> <methodparam><type>tidy</type><parameter>obiekt</parameter></methodparam> </methodsynopsis> <para> <function>tidy_config_count</function> zwraca liczbê b³êdów napotkanych w konfiguracji okre¶lonego <parameter>obiektu</parameter> tidy. </para> <para> <example> <title>Przyk³ad <function>tidy_config_count</function></title> <programlisting role="php"> <![CDATA[ <?php $html = '<p>test</I>'; $config = array('doctype' => 'bogus'); $tidy = tidy_parse_string($html, $config); /* This outputs 1, because 'bogus' isn't a valid doctype */ echo tidy_config_count($tidy); ?> ]]> </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 --> http://cvs.php.net/viewvc.cgi/phpdoc-pl/reference/tidy/functions/tidy-error-count.xml?view=markup&rev=1.1 Index: phpdoc-pl/reference/tidy/functions/tidy-error-count.xml +++ phpdoc-pl/reference/tidy/functions/tidy-error-count.xml <?xml version='1.0' encoding='iso-8859-2'?> <!-- EN-Revision: 1.7 Maintainer: joeaccord Status: ready --> <!-- $Revision: 1.1 $ --> <refentry id="function.tidy-error-count"> <refnamediv> <refname>tidy_error_count</refname> <refpurpose> Zwraca liczbê b³êdów Tidy napotkanych w okre¶lonym dokumencie </refpurpose> </refnamediv> <refsect1> <title>Opis</title> <methodsynopsis> <type>int</type><methodname>tidy_error_count</methodname> <methodparam><type>tidy</type><parameter>obiekt</parameter></methodparam> </methodsynopsis> <para> <function>tidy_error_count</function> zwraca liczbê b³êdów Tidy napotkanych w okre¶lonym dokumencie. </para> <para> <example> <title>Przyk³ad <function>tidy_error_count</function></title> <programlisting role="php"> <![CDATA[ <?php $html = '<p>test</i> <bogustag>bogus</bogustag>'; $tidy = tidy_parse_string($html); echo tidy_error_count($tidy) . "\n"; //1 echo $tidy->errorBuffer; ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ 1 line 1 column 1 - Warning: missing <!DOCTYPE> declaration line 1 column 8 - Warning: discarding unexpected </i> line 2 column 1 - Error: <bogustag> is not recognized! line 2 column 1 - Warning: discarding unexpected <bogustag> line 2 column 16 - Warning: discarding unexpected </bogustag> line 1 column 1 - Warning: inserting missing 'title' element ]]> </screen> </example> </para> <para> Patrz tak¿e: <function>tidy_access_count</function> i <function>tidy_warning_count</function>. </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 --> http://cvs.php.net/viewvc.cgi/phpdoc-pl/reference/tidy/functions/tidy-get-error-buffer.xml?view=markup&rev=1.1 Index: phpdoc-pl/reference/tidy/functions/tidy-get-error-buffer.xml +++ phpdoc-pl/reference/tidy/functions/tidy-get-error-buffer.xml <?xml version='1.0' encoding='iso-8859-2'?> <!-- EN-Revision: 1.7 Maintainer: joeaccord Status: ready --> <!-- $Revision: 1.1 $ --> <refentry id="function.tidy-get-error-buffer"> <refnamediv> <refname>tidy_get_error_buffer</refname> <refpurpose> Zwraca ostrze¿enia i b³êdy jakie wyst±pi³y podczas parsowania okre¶lonego dokumentu </refpurpose> </refnamediv> <refsect1> <title>Opis</title> <para>Styl proceduralny:</para> <methodsynopsis> <type>string</type><methodname>tidy_get_error_buffer</methodname> <methodparam><type>tidy</type><parameter>obiekt</parameter></methodparam> </methodsynopsis> <para>Styl zorientowany obiektowo (w³a¶ciwo¶æ):</para> <classsynopsis> <ooclass><classname>tidy</classname></ooclass> <fieldsynopsis><type>string</type><varname>errorBuffer</varname></fieldsynopsis> </classsynopsis> <para> <function>tidy_get_error_buffer</function> zwraca ostrze¿enia i b³êdy jakie wyst±pi³y podczas parsowania okre¶lonego dokumentu. </para> <para> <example> <title>Przyk³ad <function>tidy_get_error_buffer</function></title> <programlisting role="php"> <![CDATA[ <?php $html = '<p>paragraph</p>'; $tidy = tidy_parse_string($html); echo tidy_get_error_buffer($tidy); /* or in OO: */ echo $tidy->errorBuffer; ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ line 1 column 1 - Warning: missing <!DOCTYPE> declaration line 1 column 1 - Warning: inserting missing 'title' element ]]> </screen> </example> </para> <para> Patrz tak¿e: <function>tidy_access_count</function>, <function>tidy_error_count</function> i <function>tidy_warning_count</function>. </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 --> http://cvs.php.net/viewvc.cgi/phpdoc-pl/reference/tidy/functions/tidy-get-root.xml?view=markup&rev=1.1 Index: phpdoc-pl/reference/tidy/functions/tidy-get-root.xml +++ phpdoc-pl/reference/tidy/functions/tidy-get-root.xml <?xml version='1.0' encoding='iso-8859-2'?> <!-- EN-Revision: 1.6 Maintainer: joeaccord Status: ready --> <!-- $Revision: 1.1 $ --> <refentry id="function.tidy-get-root"> <refnamediv> <refname>tidy_get_root</refname> <refpurpose> Zwraca obiekt tidyNode reprezentuj±cy korzeñ parsowanego drzewa tidy </refpurpose> </refnamediv> <refsect1> <title>Opis</title> <para>Styl proceduralny:</para> <methodsynopsis> <type>tidyNode</type><methodname>tidy_get_root</methodname> <methodparam><type>tidy</type><parameter>obiekt</parameter></methodparam> </methodsynopsis> <para>Styl zorientowany obiektowo:</para> <methodsynopsis> <type>tidyNode</type><methodname>tidy->root</methodname> <void /> </methodsynopsis> <para> Zwraca obiekt tidyNode reprezentuj±cy korzeñ parsowanego drzewa tidy. </para> <para> <example> <title>zrzut wêz³ów</title> <programlisting role="php"> <![CDATA[ <?php $html = <<< HTML <html><body> <p>paragraph</p> <br/> </body></html> HTML; $tidy = tidy_parse_string($html); dump_nodes($tidy->root(), 1); function dump_nodes($node, $indent) { if($node->hasChildren()) { foreach($node->child as $child) { echo str_repeat('.', $indent*2) . ($child->name ? $child->name : '"'.$child->value.'"'). "\n"; dump_nodes($child, $indent+1); } } } ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[...html.....head.......title.....body.......p........."paragraph".......br ]]> </screen> </example> </para> ¬e.tidy.ze2; </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 --> http://cvs.php.net/viewvc.cgi/phpdoc-pl/reference/tidy/functions/tidy-get-status.xml?view=markup&rev=1.1 Index: phpdoc-pl/reference/tidy/functions/tidy-get-status.xml +++ phpdoc-pl/reference/tidy/functions/tidy-get-status.xml <?xml version='1.0' encoding='iso-8859-2'?> <!-- EN-Revision: 1.7 Maintainer: joeaccord Status: ready --> <!-- $Revision: 1.1 $ --> <refentry id="function.tidy-get-status"> <refnamediv> <refname>tidy_get_status</refname> <refpurpose> Zwraca status okre¶lonego dokumentu </refpurpose> </refnamediv> <refsect1> <title>Opis</title> <para>Styl proceduralny:</para> <methodsynopsis> <type>int</type><methodname>tidy_get_status</methodname> <methodparam><type>tidy</type><parameter>obiekt</parameter></methodparam> </methodsynopsis> <para>Styl zorientowany obiektowo:</para> <methodsynopsis> <type>int</type><methodname>tidy->getStatus</methodname> <void /> </methodsynopsis> <para> <function>tidy_get_status</function> zwraca status okre¶lonego <parameter>obiektu</parameter> tidy. Zwraca 0 je¶li nie zosta³ zg³oszony ¿aden b³±d/ostrze¿enie, 1 dla ostrze¿eñ lub dostêpnych b³êdów, lub 2 dla b³êdów. </para> <para> <example> <title>Przyk³ad <function>tidy_get_status</function></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 -->