cvs: phpdoc-pl /reference/tidy/functions tidy-diagnose.xml tidy-get-config.xml tidy-get-opt-doc.xml tidy-getopt.xml tidy-save-config.xml

From: Date: Thu, 08 Mar 2007 08:48:37 +0000
Subject: cvs: phpdoc-pl /reference/tidy/functions tidy-diagnose.xml tidy-get-config.xml tidy-get-opt-doc.xml tidy-getopt.xml tidy-save-config.xml
Groups: php.doc.pl 
Request: Send a blank email to doc-pl+get-1053@lists.php.net to get a copy of this message
joeaccord Thu Mar 8 08:48:37 2007 UTC Added files: /phpdoc-pl/reference/tidy/functions tidy-diagnose.xml tidy-get-config.xml tidy-get-opt-doc.xml tidy-getopt.xml tidy-save-config.xml Log: new files

http://cvs.php.net/viewvc.cgi/phpdoc-pl/reference/tidy/functions/tidy-diagnose.xml?view=markup&rev=1.1 Index: phpdoc-pl/reference/tidy/functions/tidy-diagnose.xml +++ phpdoc-pl/reference/tidy/functions/tidy-diagnose.xml <?xml version='1.0' encoding='iso-8859-2'?> <!-- EN-Revision: 1.7 Maintainer: joeaccord Status: ready --> <!-- $Revision: 1.1 $ --> <refentry id="function.tidy-diagnose"> <refnamediv> <refname>tidy_diagnose</refname> <refpurpose> Uruchamia diagnostykê skonfigurowan± dla parsowanych i reperowanych znaczników </refpurpose> </refnamediv> <refsect1> <title>Opis</title> <para>Styl proceduralny:</para> <methodsynopsis> <type>bool</type><methodname>tidy_diagnose</methodname> <methodparam><type>tidy</type><parameter>obiekt</parameter></methodparam> </methodsynopsis> <para>Styl zorientowany obiektowo:</para> <methodsynopsis> <type>bool</type><methodname>tidy->diagnose</methodname> <void /> </methodsynopsis> <para> <function>tidy_diagnose</function> uruchamia testy diagnostyczne na danym <parameter>obiekcie</parameter> tidy, dodaj±c nieco wiêcej informacji o dokumencie do buforu b³êdu. </para> <para> &return.success; </para> <para> <example> <title>Przyk³ad <function>tidy_diagnose</function></title> <programlisting role="php"> <![CDATA[ <?php $html = <<< HTML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <p>paragraph</p> HTML; $tidy = tidy_parse_string($html); $tidy->CleanRepair(); // notatka: ró¿nica pomiêdzy dwoma danymi wyj¶ciowymi echo tidy_get_error_buffer($tidy) . "\n"; $tidy->diagnose(); echo tidy_get_error_buffer($tidy); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ line 5 column 1 - Warning: <p> isn't allowed in <head> elements line 5 column 1 - Warning: inserting missing 'title' element line 5 column 1 - Warning: <p> isn't allowed in <head> elements line 5 column 1 - Warning: inserting missing 'title' element Info: Doctype given is "-//W3C//DTD XHTML 1.0 Strict//EN" Info: Document content looks like XHTML 1.0 Strict 2 warnings, 0 errors were found! ]]> </screen> </example> </para> <para> Patrz tak¿e: <function>tidy_get_error_buffer</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-config.xml?view=markup&rev=1.1 Index: phpdoc-pl/reference/tidy/functions/tidy-get-config.xml +++ phpdoc-pl/reference/tidy/functions/tidy-get-config.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-config"> <refnamediv> <refname>tidy_get_config</refname> <refpurpose> Pobiera bie¿±c± konfiguracjê Tidy </refpurpose> </refnamediv> <refsect1> <title>Opis</title> <para>Styl proceduralny:</para> <methodsynopsis> <type>array</type><methodname>tidy_get_config</methodname> <methodparam><type>tidy</type><parameter>obiekt</parameter></methodparam> </methodsynopsis> <para>Styl zorientowany obiektowo:</para> <methodsynopsis> <type>array</type><methodname>tidy->getConfig</methodname> <void /> </methodsynopsis> <para> <function>tidy_get_config</function> zwraca tablicê z opcjami konfiguracyjnymi u¿ywanymi przez dany tidy <parameter>obiekt</parameter>. </para> <para> Dok³adne obja¶nienie ka¿dej z opcji znajduje siê na stronie <ulink url="&url.tidy.conf;">&url.tidy.conf;</ulink>. </para> <para> <example> <title>Przyk³ad <function>tidy_get_config</function></title> <programlisting role="php"> <![CDATA[ <?php $html = '<p>test</p>'; $config = array('indent' => TRUE, 'output-xhtml' => TRUE, 'wrap' => 200); $tidy = tidy_parse_string($html, $config); print_r(tidy_get_config($tidy)); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Array ( [indent-spaces] => 2 [wrap] => 200 [tab-size] => 8 [char-encoding] => 1 [input-encoding] => 3 [output-encoding] => 1 [newline] => 1 [doctype-mode] => 1 [doctype] => [repeated-attributes] => 1 [alt-text] => [slide-style] => [error-file] => [output-file] => [write-back] => [markup] => 1 [show-warnings] => 1 [quiet] => [indent] => 1 [hide-endtags] => [input-xml] => [output-xml] => 1 [output-xhtml] => 1 [output-html] => [add-xml-decl] => [uppercase-tags] => [uppercase-attributes] => [bare] => [clean] => [logical-emphasis] => [drop-proprietary-attributes] => [drop-font-tags] => [drop-empty-paras] => 1 [fix-bad-comments] => 1 [break-before-br] => [split] => [numeric-entities] => [quote-marks] => [quote-nbsp] => 1 [quote-ampersand] => 1 [wrap-attributes] => [wrap-script-literals] => [wrap-sections] => 1 [wrap-asp] => 1 [wrap-jste] => 1 [wrap-php] => 1 [fix-backslash] => 1 [indent-attributes] => [assume-xml-procins] => [add-xml-space] => [enclose-text] => [enclose-block-text] => [keep-time] => [word-2000] => [tidy-mark] => [gnu-emacs] => [gnu-emacs-file] => [literal-attributes] => [show-body-only] => [fix-uri] => 1 [lower-literals] => 1 [hide-comments] => [indent-cdata] => [force-output] => 1 [show-errors] => 6 [ascii-chars] => 1 [join-classes] => [join-styles] => 1 [escape-cdata] => [language] => [ncr] => 1 [output-bom] => 2 [replace-color] => [css-prefix] => [new-inline-tags] => [new-blocklevel-tags] => [new-empty-tags] => [new-pre-tags] => [accessibility-check] => 0 [vertical-space] => [punctuation-wrap] => [merge-divs] => 1 ) ]]> </screen> </example> </para> <para> Patrz tak¿e: <function>tidy_reset_config</function> i <function>tidy_save_config</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-opt-doc.xml?view=markup&rev=1.1 Index: phpdoc-pl/reference/tidy/functions/tidy-get-opt-doc.xml +++ phpdoc-pl/reference/tidy/functions/tidy-get-opt-doc.xml <?xml version="1.0" encoding="iso-8859-2"?> <!-- EN-Revision: 1.1 Maintainer: joeaccord Status: ready --> <!-- $Revision: 1.1 $ --> <refentry id="function.tidy-get-opt-doc"> <refnamediv> <refname>tidy_get_opt_doc</refname> <refpurpose> Zwraca dokumentacjê dla danej nazwy opcji </refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <para>Styl proceduralny:</para> <methodsynopsis> <type>string</type><methodname>tidy_get_opt_doc</methodname> <methodparam><type>tidy</type><parameter>obiekt</parameter></methodparam> <methodparam><type>string</type><parameter>nazwa_opcji</parameter></methodparam> </methodsynopsis> <para>Styl zorientowany obiektowo:</para> <methodsynopsis> <type>string</type><methodname>tidy->getOptDoc</methodname> <methodparam><type>string</type><parameter>nazwa_opcji</parameter></methodparam> </methodsynopsis> <para> <function>tidy_get_opt_doc</function> zwraca dokumentacjê dla danej nazwy opcji. </para> <note> <para> Aby ta funkcja by³a dostêpna, wymagana jest biblioteka libtidy w wersji od 25 April 2005. (kolejne wersje biblioteki libtidy numerowane s± za pomoc± daty ich wydania - przyp. t³um.) </para> </note> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>obiekt</parameter></term> <listitem> <para> Obiekt tidy </para> </listitem> </varlistentry> <varlistentry> <term><parameter>nazwa_opcji</parameter></term> <listitem> <para> Nazwa opcji </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> Zwraca ³añcuch je¶li opcja istnieje i jej dokumentacja jest dostêpna, w przeciwnym wypadku zwraca &false;. </para> </refsect1> <refsect1 role="examples"> &reftitle.examples; <para> <example> <title>Wy¶wietla wszystkie opcje wraz z ich dokumentacj± i warto¶ciami domy¶lnymi</title> <programlisting role="php"> <![CDATA[ <?php $tidy = new tidy; $config = $tidy->getConfig(); ksort($config); foreach ($config as $opt => $val) { if (!$doc = $tidy->getOptDoc($opt)) $doc = 'dokumentacja nie jest dostêpna!'; $val = ($tidy->getOpt($opt) === true) ? 'true' : $val; $val = ($tidy->getOpt($opt) === false) ? 'false' : $val; echo "<p><b>$opt</b> (domy¶lnie: '$val')<br />". "$doc</p><hr />\n"; } ?> ]]> </programlisting> </example> </para> </refsect1> <refsect1 role="seealso"> &reftitle.seealso; <para> <simplelist> <member><function>tidy_get_config</function></member> <member><function>tidy_getopt</function></member> </simplelist> </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-getopt.xml?view=markup&rev=1.1 Index: phpdoc-pl/reference/tidy/functions/tidy-getopt.xml +++ phpdoc-pl/reference/tidy/functions/tidy-getopt.xml <?xml version='1.0' encoding='iso-8859-2'?> <!-- EN-Revision: 1.5 Maintainer: joeaccord Status: ready --> <!-- $Revision: 1.1 $ --> <refentry id="function.tidy-getopt"> <refnamediv> <refname>tidy_getopt</refname> <refpurpose> Zwraca warto¶æ okre¶lonej opcji konfiguracyjnej dla obiektu tidy </refpurpose> </refnamediv> <refsect1> <title>Opis</title> <para>Styl proceduralny:</para> <methodsynopsis> <type>mixed</type><methodname>tidy_getopt</methodname> <methodparam><type>tidy</type><parameter>obiekt</parameter></methodparam> <methodparam><type>string</type><parameter>opcja</parameter></methodparam> </methodsynopsis> <para>Styl zorientowany obiektowo:</para> <methodsynopsis> <type>mixed</type><methodname>tidy->getOpt</methodname> <methodparam><type>string</type><parameter>opcja</parameter></methodparam> </methodsynopsis> <para> <function>tidy_getopt</function> zwraca warto¶æ okre¶lonej <parameter>opcji</parameter> dla danego <parameter>obiektu</parameter> tidy. Zwracany typ zale¿y od typu okre¶lonej <parameter>opcji</parameter>. Pe³n± listê opcji konfiguracyjnych i ich typy mo¿na znale¼æ na stronie: <ulink url="&url.tidy.conf;">&url.tidy.conf;</ulink>. </para> <para> <example> <title>Przyk³ad <function>tidy_getopt</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>'; $config = array('accessibility-check' => 3, 'alt-text' => 'some text'); $tidy = new tidy(); $tidy->parseString($html, $config); var_dump($tidy->getOpt('accessibility-check')); //integer var_dump($tidy->getOpt('lower-literals')); //boolean var_dump($tidy->getOpt('alt-text')); //string ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ int(3) bool(true) string(9) "some text" ]]> </screen> </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-save-config.xml?view=markup&rev=1.1 Index: phpdoc-pl/reference/tidy/functions/tidy-save-config.xml +++ phpdoc-pl/reference/tidy/functions/tidy-save-config.xml <?xml version='1.0' encoding='iso-8859-2'?> <!-- EN-Revision: 1.5 Maintainer: joeaccord Status: ready --> <!-- $Revision: 1.1 $ --> <refentry id="function.tidy-save-config"> <refnamediv> <refname>tidy_save_config</refname> <refpurpose> Zapisuje bie¿±ce ustawienia konfiguracyjne we wskazanym pliku </refpurpose> </refnamediv> <refsect1> <title>Opis</title> <methodsynopsis> <type>bool</type><methodname>tidy_save_config</methodname> <methodparam><type>string</type><parameter>nazwa_pliku</parameter></methodparam> </methodsynopsis> <para> <function>tidy_save_config</function> zapisuje bie¿±ce ustawienia do okre¶lonego pliku. Zapisywane s± tylko warto¶ci ró¿ne od domy¶lnych. </para> <para> Patrz tak¿e: <function>tidy_get_config</function>, <function>tidy_getopt</function>, <function>tidy_reset_config</function> i <function>tidy_setopt</function>. </para> &note.tidy.1only; </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 -->
« previous php.doc.pl (#1053) next »