cvs: phpdoc-fr /reference/net_gopher/functions gopher-parsedir.xml

From: Date: Sun, 07 Jan 2007 17:06:21 +0000
Subject: cvs: phpdoc-fr /reference/net_gopher/functions gopher-parsedir.xml
Groups: php.doc.fr 
Request: Send a blank email to doc-fr+get-5144@lists.php.net to get a copy of this message
yannick Sun Jan 7 17:06:21 2007 UTC Modified files: /phpdoc-fr/reference/net_gopher/functions gopher-parsedir.xml Log: sync with EN http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/net_gopher/functions/gopher-parsedir.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc-fr/reference/net_gopher/functions/gopher-parsedir.xml diff -u phpdoc-fr/reference/net_gopher/functions/gopher-parsedir.xml:1.4 phpdoc-fr/reference/net_gopher/functions/gopher-parsedir.xml:1.5 --- phpdoc-fr/reference/net_gopher/functions/gopher-parsedir.xml:1.4 Sun Jan 7 12:41:33 2007 +++ phpdoc-fr/reference/net_gopher/functions/gopher-parsedir.xml Sun Jan 7 17:06:21 2007 @@ -1,11 +1,12 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> -<!-- EN-Revision: 1.4 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.5 $ --> +<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> + <refentry id="function.gopher-parsedir"> <refnamediv> <refname>gopher_parsedir</refname> - <refpurpose>Transpose une entrée d'un dossier formaté gopher dans un tableau associatif</refpurpose> + <refpurpose>Transpose une entrée d'un dossier formaté gopher dans un tableau associatif</refpurpose> </refnamediv> <refsect1 role="description"> @@ -14,19 +15,80 @@ <type>array</type><methodname>gopher_parsedir</methodname> <methodparam><type>string</type><parameter>dirent</parameter></methodparam> </methodsynopsis> - <simpara> + <para> + <function>gopher_parsedir</function> transpose une entrée d'un dossier formaté gopher + dans un tableau associatif. + </para> + <para> Gopher retourne des documents <literal>text/plain</literal> - pour les documents demandés. Une requête vers un dossier (comme /) - retournera des séries de lignes encodées où chaque ligne est une entrée + pour les documents demandés. Une requête vers un dossier (comme /) + retournera des séries de lignes encodées où chaque ligne est une entrée du dossier ou une ligne d'informations. - </simpara> + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>dirent</parameter></term> + <listitem> + <para> + L'entrée du dossier. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Retourne un tableau associatif dont les composants sont : + <itemizedlist> + <listitem> + <simpara> + <structfield>type</structfield> - Une constante + <literal>GOPHER_XXX</literal>. + </simpara> + </listitem> + <listitem> + <simpara> + <structfield>title</structfield> - Le nom de la &resource;. + </simpara> + </listitem> + <listitem> + <simpara> + <structfield>path</structfield> - Le chemin vers la &resource;. + </simpara> + </listitem> + <listitem> + <simpara> + <structfield>host</structfield> - Le nom du domaine de l'hôte qui possède + ce document (ou dossier). + </simpara> + </listitem> + <listitem> + <simpara> + <structfield>port</structfield> - Le port de connexion sur l'hôte + <structfield>host</structfield>. + </simpara> + </listitem> + </itemizedlist> + </para> + <para> + En cas d'échec, l'entrée additionnelle <structfield>data</structfield> du + tableau retournée contiendra la ligne analysée. + </para> </refsect1> <refsect1 role="examples"> &reftitle.examples; <para> <example> - <title>Affichage hypothétique depuis <literal>gopher://gopher.example.com/</literal></title> + <title>Affichage hypothétique depuis <literal>gopher://gopher.example.com/</literal></title> <screen> <![CDATA[ 0All about my gopher site. /allabout.txt gopher.example.com 70 @@ -42,38 +104,39 @@ </screen> </example> </para> - <simpara> - Dans l'exemple précédent, le dossier racine de gopher.example.com reconnaît un - <literal>DOCUMENT</literal> identifié par &zero; et se trouvant à l'adresse - <literal>gopher://gopher.example.com:70/allabout.txt</literal>. - Il reconnaît également deux autres dossiers (qui ont leur propre liste de fichiers) à l'adresse - <literal>gopher://gopher.exmaple.com:70/stories</literal> et à l'adresse + <para> + Dans l'exemple précédent, le dossier racine de gopher.example.com reconnaît un + <literal>DOCUMENT</literal> identifié par &zero; et se trouvant à l'adresse + <literal>gopher://gopher.example.com:70/allabout.txt</literal>. + Il reconnaît également deux autres dossiers (qui ont leur propre liste de fichiers) à l'adresse + <literal>gopher://gopher.exmaple.com:70/stories</literal> et à l'adresse <literal>gopher://gopher.ejemplo.co.es:70/</literal>. - Il y a également un fichier binaire, un lien vers une url HTTP et plusieurs + Il y a également un fichier binaire, un lien vers une url HTTP et plusieurs lignes d'informations. - </simpara> - <simpara> - En passant chaque ligne du listing de ce dossier à la fonction - <function>gopher_parsedir</function>, un tableau associatif est formé, - contenant une version analysée des données. - </simpara> + </para> + <para> + En passant chaque ligne du listing de ce dossier à la fonction + <function>gopher_parsedir</function>, un tableau associatif est formé + contenant une version analysée des données. + </para> <para> <example> <title>Exemple avec <function>gopher_parsedir</function></title> <programlisting role="php"> <![CDATA[ <?php -dl("gopher.so"); $directory = file("gopher://gopher.example.com"); foreach($directory as $dirent) { print_r(gopher_parsedir($dirent)); } - -/* Affichage espéré - --------------- - +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ Array ( [type] => 0 [title] => All about my gopher site. @@ -137,68 +200,10 @@ [host] => error.host [port] => 1 ) -*/ -?> ]]> - </programlisting> + </screen> </example> </para> - <simpara> - Les valeurs données par <parameter>type</parameter> sont associées - avec les constantes suivantes : - </simpara> - <table> - <title>Constantes Gopher</title> - <tgroup cols="2"> - <thead> - <row> - <entry>Constante</entry> - <entry>Définition</entry> - </row> - </thead> - <tbody> - <row> - <entry><constant>GOPHER_DOCUMENT</constant></entry> - <entry>Document standard <literal>text/plain</literal>.</entry> - </row> - <row> - <entry><constant>GOPHER_DIRECTORY</constant></entry> - <entry>Une ressource contenant un listing de dossier formaté gopher.</entry> - </row> - <row> - <entry><constant>GOPHER_BINHEX</constant></entry> - <entry>Un fichier binaire encodé BinHex.</entry> - </row> - <row> - <entry><constant>GOPHER_DOSBINARY</constant></entry> - <entry>Une archive binaire formatée DOS.</entry> - </row> - <row> - <entry><constant>GOPHER_UUENCODED</constant></entry> - <entry>Un fichier UUEncodé.</entry> - </row> - <row> - <entry><constant>GOPHER_BINARY</constant></entry> - <entry>Un fichier générique binaire.</entry> - </row> - <row> - <entry><constant>GOPHER_INFO</constant></entry> - <entry>Une entrée d'information.</entry> - </row> - <row> - <entry><constant>GOPHER_HTTP</constant></entry> - <entry>Une référence à une ressource HTTP.</entry> - </row> - <row> - <entry><constant>GOPHER_UNKNOWN</constant></entry> - <entry> - Une entrée non-reconnue, la ligne sera retournée dans le paramètre - <parameter>data</parameter>. - </entry> - </row> - </tbody> - </tgroup> - </table> </refsect1> </refentry> @@ -221,4 +226,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> +--> \ No newline at end of file

« previous php.doc.fr (#5144) next »