cvs: phpdoc-fr /reference/datetime/datetimezone construct.xml

From: Date: Tue, 10 Feb 2009 12:52:00 +0000
Subject: cvs: phpdoc-fr /reference/datetime/datetimezone construct.xml
Groups: php.doc.fr 
Request: Send a blank email to doc-fr+get-6610@lists.php.net to get a copy of this message
dams Tue Feb 10 12:52:00 2009 UTC Modified files: /phpdoc-fr/reference/datetime/datetimezone construct.xml Log: synch with en http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/datetime/datetimezone/construct.xml?r1=1.1&r2=1.2&diff_format=u Index: phpdoc-fr/reference/datetime/datetimezone/construct.xml diff -u phpdoc-fr/reference/datetime/datetimezone/construct.xml:1.1 phpdoc-fr/reference/datetime/datetimezone/construct.xml:1.2 --- phpdoc-fr/reference/datetime/datetimezone/construct.xml:1.1 Fri Jan 23 16:54:21 2009 +++ phpdoc-fr/reference/datetime/datetimezone/construct.xml Tue Feb 10 12:52:00 2009 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.1 $ --> -<!-- EN-Revision: 1.1 Maintainer: dams Status: ready --> -<!-- Reviewed: no --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.2 Maintainer: dams Status: ready --> +<!-- Reviewed: yes --> <refentry xml:id="datetimezone.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> @@ -16,7 +16,7 @@ <methodparam><type>string</type><parameter>timezone</parameter></methodparam> </methodsynopsis> <para> - Crée un nouvel objet DateTimeZone. + Crée un nouvel objet <classname>DateTimeZone</classname>. </para> </refsect1> @@ -36,6 +36,53 @@ </para> </refsect1> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Retourne un objet <classname>DateTimeZone</classname>, en cas de succès. + </para> + </refsect1> + + <refsect1 role="errors"> + &reftitle.errors; + <para> + Cette méthode émet une exception <classname>Exception</classname>, si le fuseau horaire + fourni n'est pas reconnu. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Interception des erreurs avec <classname>DateTimeZone</classname></title> + <programlisting role="php"> +<![CDATA[ +<?php +// Gestion des erreurs par interception des exceptions +$timezones = array('Europe/London', 'Mars/Phobos', 'Jupiter/Europa'); + +foreach ($timezones as $tz) { + try { + $mars = new DateTimeZone($tz); + } catch(Exception $e) { + echo $e->getMessage() . '<br />'; + } +} +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +DateTimeZone::__construct() [datetimezone.--construct]: Unknown or bad timezone (Mars/Phobos) +DateTimeZone::__construct() [datetimezone.--construct]: Unknown or bad timezone (Jupiter/Europa) +]]> + </screen> + </example> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file

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