cvs: phpdoc-es / translation.xml /reference/funchand/functions call-user-func.xml func-get-arg.xml func-get-args.xml func-num-args.xml
function-exists.xml register-shutdown-function.xml /reference/gettext configure.xml reference.xml /reference/gettext/functions bindtextdomain.xml
dgettext.xml gettext.xml textdomain.xml

From: Date: Mon, 04 Jul 2005 23:37:57 +0000
Subject: cvs: phpdoc-es / translation.xml /reference/funchand/functions call-user-func.xml func-get-arg.xml func-get-args.xml func-num-args.xml
function-exists.xml register-shutdown-function.xml /reference/gettext configure.xml reference.xml /reference/gettext/functions bindtextdomain.xml
dgettext.xml gettext.xml textdomain.xml
Groups: php.doc.es 
Request: Send a blank email to doc-es+get-1070@lists.php.net to get a copy of this message
lboshell Mon Jul 4 19:37:57 2005 EDT Modified files: /phpdoc-es translation.xml /phpdoc-es/reference/funchand/functions call-user-func.xml func-get-arg.xml func-get-args.xml func-num-args.xml function-exists.xml register-shutdown-function.xml /phpdoc-es/reference/gettext configure.xml reference.xml /phpdoc-es/reference/gettext/functions bindtextdomain.xml dgettext.xml gettext.xml textdomain.xml Log: - Adopcion de documentos - Correcciones - Asignacion de nuevo trabajo

http://cvs.php.net/diff.php/phpdoc-es/translation.xml?r1=1.198&r2=1.199&ty=u Index: phpdoc-es/translation.xml diff -u phpdoc-es/translation.xml:1.198 phpdoc-es/translation.xml:1.199 --- phpdoc-es/translation.xml:1.198 Mon Jul 4 07:40:16 2005 +++ phpdoc-es/translation.xml Mon Jul 4 19:37:55 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.198 $ --> +<!-- $Revision: 1.199 $ --> <!DOCTYPE translation SYSTEM "../dtds/translation.dtd"> <translation> @@ -89,27 +89,42 @@ <file name="reference/pcntl/functions/pcntl-wtermsig.xml" person="jtacon" type="translation" date="17.12.2004"/> - - <file name="reference/funchand/functions/call-user-func.xml" - person="lboshell" type="revision" date="02.07.2005"/> - <file name="reference/funchand/functions/func-get-arg.xml" - person="lboshell" type="revision" date="02.07.2005"/> - <file name="reference/funchand/functions/func-get-args.xml" - person="lboshell" type="revision" date="02.07.2005"/> - <file name="reference/funchand/functions/func-num-args.xml" - person="lboshell" type="revision" date="02.07.2005"/> - <file name="reference/funchand/functions/function-exists.xml" - person="lboshell" type="revision" date="02.07.2005"/> - <file name="reference/funchand/functions/register-shutdown-function.xml" - person="lboshell" type="revision" date="02.07.2005"/> - <file name="reference/gettext/functions/bindtextdomain.xml" - person="lboshell" type="revision" date="02.07.2005"/> - <file name="reference/gettext/functions/dgettext.xml" - person="lboshell" type="revision" date="02.07.2005"/> - <file name="reference/gettext/functions/gettext.xml" - person="lboshell" type="revision" date="02.07.2005"/> - <file name="reference/gettext/functions/textdomain.xml" - person="lboshell" type="revision" date="02.07.2005"/> + <file name="reference/http/functions/setcookie.xml" + person="lboshell" type="revision" date="04.07.2005"/> + <file name="reference/info/functions/extension-loaded.xml" + person="lboshell" type="revision" date="04.07.2005"/> + <file name="reference/info/functions/get-current-user.xml" + person="lboshell" type="revision" date="04.07.2005"/> + <file name="reference/info/functions/get-magic-quotes-gpc.xml" + person="lboshell" type="revision" date="04.07.2005"/> + <file name="reference/info/functions/get-magic-quotes-runtime.xml" + person="lboshell" type="revision" date="04.07.2005"/> + <file name="reference/info/functions/getenv.xml" + person="lboshell" type="revision" date="04.07.2005"/> + <file name="reference/info/functions/getlastmod.xml" + person="lboshell" type="revision" date="04.07.2005"/> + <file name="reference/info/functions/getmyinode.xml" + person="lboshell" type="revision" date="04.07.2005"/> + <file name="reference/info/functions/getmypid.xml" + person="lboshell" type="revision" date="04.07.2005"/> + <file name="reference/info/functions/getmyuid.xml" + person="lboshell" type="revision" date="04.07.2005"/> + <file name="reference/info/functions/getrusage.xml" + person="lboshell" type="revision" date="04.07.2005"/> + <file name="reference/info/functions/php-logo-guid.xml" + person="lboshell" type="revision" date="04.07.2005"/> + <file name="reference/info/functions/phpinfo.xml" + person="lboshell" type="revision" date="04.07.2005"/> + <file name="reference/info/functions/phpversion.xml" + person="lboshell" type="revision" date="04.07.2005"/> + <file name="reference/info/functions/putenv.xml" + person="lboshell" type="revision" date="04.07.2005"/> + <file name="reference/info/functions/set-magic-quotes-runtime.xml" + person="lboshell" type="revision" date="04.07.2005"/> + <file name="reference/info/functions/set-time-limit.xml" + person="lboshell" type="revision" date="04.07.2005"/> + <file name="reference/info/functions/zend-logo-guid.xml" + person="lboshell" type="revision" date="04.07.2005"/> </work-in-progress> </translation> http://cvs.php.net/diff.php/phpdoc-es/reference/funchand/functions/call-user-func.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/funchand/functions/call-user-func.xml diff -u phpdoc-es/reference/funchand/functions/call-user-func.xml:1.1 phpdoc-es/reference/funchand/functions/call-user-func.xml:1.2 --- phpdoc-es/reference/funchand/functions/call-user-func.xml:1.1 Sun Apr 14 20:14:07 2002 +++ phpdoc-es/reference/funchand/functions/call-user-func.xml Mon Jul 4 19:37:56 2005 @@ -1,35 +1,99 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/funchand.xml, last change in rev 1.1 --> -<!-- last change to 'call-user-func' in en/ tree in rev 1.1 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.13 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/funchand.xml, last change in rev 1.1 --> <refentry id="function.call-user-func"> <refnamediv> <refname>call_user_func</refname> <refpurpose> - Call a user function given by the first parameter + Llamar una funci&oacute;n de usuario dada por el primer + par&aacute;metro </refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Descripci&oacute;n</title> <methodsynopsis> <type>mixed</type><methodname>call_user_func</methodname> - <methodparam><type>string</type><parameter>function_name</parameter></methodparam> - <methodparam choice="opt"><type>mixed</type><parameter>parameter</parameter></methodparam> + <methodparam><type>callback</type><parameter>funcion</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>parametro</parameter></methodparam> <methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam> </methodsynopsis> <para> - Call a user defined function given by the - <parameter>function_name</parameter> parameter. Take the - following: + Llamar una funci&oacute;n definida por el usuario dada por el + par&aacute;metro <parameter>funcion</parameter>. Considere el + siguiente caso: + </para> + <para> + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php +function peluquero($tipo) +{ + echo "Usted queria un corte $tipo, no hay problema"; +} +call_user_func('peluquero', "hongo"); +call_user_func('peluquero', "afeitado"); +?> +]]> + </programlisting> + </informalexample> + </para> + <para> + Los m&eacute;todos de objetos pueden ser invocados + est&aacute;ticamente tambi&eacute;n usando esta funci&oacute;n, + pasando <literal>array($nombre_objeto, $nombre_metodo)</literal> + al par&aacute;metro <parameter>funcion</parameter>. <informalexample> <programlisting role="php"> -function barber ($type) { - print "You wanted a $type haircut, no problem"; +<![CDATA[ +<?php +class miclase { + function decir_hola() + { + echo "Hola!\n"; + } } -call_user_func ('barber', "mushroom"); -call_user_func ('barber', "shave"); + +$nombre_clase = "miclase"; + +call_user_func(array($nombre_clase, 'decir_hola')); +?> +]]> </programlisting> </informalexample> </para> + <note> + <para> + Note que los par&aacute;metros para + <function>call_user_func</function> no son pasados por + referencia. + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php +function incremento(&$var) +{ + $var++; +} + +$a = 0; +call_user_func('incremento', $a); +echo $a; // 0 + +call_user_func_array('incremento', array(&$a)); // Es posible usar esto en su lugar +echo $a; // 1 +?> +]]> + </programlisting> + </informalexample> + </para> + </note> + <para> + Vea tambi&eacute;n: <function>is_callable</function>, + <function>call_user_func_array</function>, &listendand; + &seealso.callback;. + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/funchand/functions/func-get-arg.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/funchand/functions/func-get-arg.xml diff -u phpdoc-es/reference/funchand/functions/func-get-arg.xml:1.1 phpdoc-es/reference/funchand/functions/func-get-arg.xml:1.2 --- phpdoc-es/reference/funchand/functions/func-get-arg.xml:1.1 Sun Apr 14 20:14:07 2002 +++ phpdoc-es/reference/funchand/functions/func-get-arg.xml Mon Jul 4 19:37:56 2005 @@ -1,65 +1,64 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/funchand.xml, last change in rev 1.1 --> -<!-- last change to 'func-get-arg' in en/ tree in rev 1.1 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.7 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/funchand.xml, last change in rev 1.1 --> <refentry id="function.func-get-arg"> <refnamediv> <refname>func_get_arg</refname> - <refpurpose>Devuelve un elemento de la lista de argumentos.</refpurpose> + <refpurpose>Devolver un elemento desde la lista de + argumentos</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> - <type>int</type><methodname>func_get_arg</methodname> - <methodparam><type>int</type><parameter>arg_num</parameter></methodparam> + <type>mixed</type><methodname>func_get_arg</methodname> + <methodparam><type>int</type><parameter>num_arg</parameter></methodparam> </methodsynopsis> <simpara> - Devuelve el argumento que est&aacute; en la posici&oacute;n - <parameter>arg_num</parameter> en la lista de argumentos de - una funci&oacute;n definida por el usuario. Los argumentos de la - funci&oacute;n se cuentan comenzando por la posici&oacute;n cero. - <function>func_get_arg</function> - generar&aacute; un aviso si se llama desde fuera de la definici&oacute;n - de la funci&oacute;n. + Devuelve el argumento en la posici&oacute;n + <parameter>num_arg</parameter> en la lista de argumentos de una + funci&oacute;n definida por el usuario. Los argumentos de + funci&oacute;n son contados comenzando desde + cero. <function>func_get_arg</function> generar&aacute; una + advertencia si es llamada desde afuera de una definici&oacute;n + de funci&oacute;n. Esta funci&oacute;n no puede ser usada + directamente como un par&aacute;metro de funci&oacute;n. En su + lugar, su resultado puede ser asignado a una variable, la cual + puede ser pasada entonces a la funci&oacute;n. </simpara> - - <simpara> - Si <parameter>arg_num</parameter> es mayor que el n&uacute;mero de - argumentos pasados realmente, se generar&aacute; un aviso y - <function>func_get_arg</function> devolver&aacute; &false;. - </simpara> - - <para> - <informalexample> - <programlisting> -&lt;?php -function foo() { - $numargs = func_num_args(); - echo "Number of arguments: $numargs&lt;br&gt;\n"; - if ( $numargs &gt;= 2 ) { - echo "Second argument is: " . func_get_arg( 1 ) . "&lt;br&gt;\n"; - } + <simpara> + Si <parameter>num_arg</parameter> es mayor que el n&uacute;mero + de argumentos pasados en el contexto actual, se generar&aacute; + una advertencia y <function>func_get_arg</function> + devolver&aacute; &false;. + </simpara> + <para> + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php +function foo() +{ + $num_args = func_num_args(); + echo "Numero de argumentos: $num_args<br />\n"; + if ($num_args >= 2) { + echo "El segundo argumento es: " . func_get_arg(1) . "<br />\n"; + } } -foo( 1, 2, 3 ); -?&gt; - </programlisting> - </informalexample> - </para> - - <simpara> - <function>func_get_arg</function> puede utilizarse conjuntamente - con <function>func_num_args</function> y - <function>func_get_args</function> para permitir a las funciones - definidas por el usuario que acepten listas de argumentos de - longitud variable. - </simpara> - - <note> - <simpara> - Esta funci&oacute;n fue a&ntilde;adida en PHP 4. - </simpara> - </note> - +foo (1, 2, 3); +?> +]]> + </programlisting> + </informalexample> + </para> + <simpara> + <function>func_get_arg</function> puede ser usada en conjunto con + <function>func_num_args</function> y + <function>func_get_args</function> para permitir que funciones + definidas por el usuario acepten listas de argmuntos de longitud + variable. + </simpara> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/funchand/functions/func-get-args.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/funchand/functions/func-get-args.xml diff -u phpdoc-es/reference/funchand/functions/func-get-args.xml:1.1 phpdoc-es/reference/funchand/functions/func-get-args.xml:1.2 --- phpdoc-es/reference/funchand/functions/func-get-args.xml:1.1 Sun Apr 14 20:14:07 2002 +++ phpdoc-es/reference/funchand/functions/func-get-args.xml Mon Jul 4 19:37:56 2005 @@ -1,60 +1,70 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/funchand.xml, last change in rev 1.1 --> -<!-- last change to 'func-get-args' in en/ tree in rev 1.1 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.9 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/funchand.xml, last change in rev 1.1 --> <refentry id="function.func-get-args"> <refnamediv> <refname>func_get_args</refname> - <refpurpose>Devuelve un array que contiene la lista de argumentos de - una funci&oacute;n.</refpurpose> + <refpurpose> + Devuelve una matriz que comprende la lista de argumentos de una + funci&oacute;n + </refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> - <type>int</type><methodname>func_get_args</methodname> - <methodparam><type>void</type><parameter/></methodparam> + <type>array</type><methodname>func_get_args</methodname> + <void/> </methodsynopsis> <simpara> - Devuelve un array en el que cada elemento es el miembro correspondiente - de la lista de argumentos de la funci&oacute;n definida por el usuario actual. - <function>func_get_args</function> generar&aacute; un aviso si es llamada desde - fuera de la definici&oacute;n de la funci&oacute;n. + Devuelve una matriz en la cual cada elemento es una copia del + miembro correspondiente de la lista de argumentos de la + funci&oacute;n definida por el usuario + actual. <function>func_get_args</function> generar&aacute; una + advertencia si es llamada desde afuera de una definici&oacute;n + de funci&oacute;n. Esta funci&oacute;n no puede ser usada + directamente como un par&aacute;metro de funci&oacute;n. En su + lugar, su resultado puede ser asignado a una variable, la cual + puede ser pasada a la funci&oacute;n. </simpara> - + <note> + <simpara> + Esta funci&oacute;n devuelve una copia de los argumentos pasados + &uacute;nicamente, y no toma en cuenta las argumentas + predeterminados (no pasados). + </simpara> + </note> <para> <informalexample> - <programlisting> -&lt;?php -function foo() { - $numargs = func_num_args(); - echo "Number of arguments: $numargs&lt;br&gt;\n"; - if ( $numargs &gt;= 2 ) { - echo "Second argument is: " . func_get_arg( 1 ) . "&lt;br&gt;\n"; - } - $arg_list = func_get_args(); - for ( $i = 0; $i &lt; $numargs; $i++ ) { - echo "Argument $i is: " . $arg_list[$i] . "&lt;br&gt;\n"; - } -} - -foo( 1, 2, 3 ); -?&gt; - </programlisting> - </informalexample> - </para> - - <simpara> - <function>func_get_args</function> puede utilizarse conjuntamente con - <function>func_num_args</function> y - <function>func_get_arg</function> para permitir a las funciones definidas - por el usuario que acepten listas de argumentos de longitud variable. - </simpara> - - <note> - <simpara> - Esta funci&oacute;n fue a&ntilde;adida en PHP 4. - </simpara> - </note> - + <programlisting role="php"> +<![CDATA[ +<?php +function foo() +{ + $num_args = func_num_args(); + echo "Numero de argumentos: $num_args<br />\n"; + if ($num_args >= 2) { + echo "El segundo argumento es: " . func_get_arg(1) . "<br />\n"; + } + $lista_args = func_get_args(); + for ($i = 0; $i < $num_args; $i++) { + echo "El argumento $i es: " . $lista_args[$i] . "<br />\n"; + } +} + +foo(1, 2, 3); +?> +]]> + </programlisting> + </informalexample> + </para> + <simpara> + Es posible usar <function>func_get_args</function> en conjunto + con <function>func_num_args</function> y + <function>func_get_arg</function> para permitir que funciones + definidas por el usuario acepten listas de argumentos de longitud + variable. + </simpara> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/funchand/functions/func-num-args.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/funchand/functions/func-num-args.xml diff -u phpdoc-es/reference/funchand/functions/func-num-args.xml:1.1 phpdoc-es/reference/funchand/functions/func-num-args.xml:1.2 --- phpdoc-es/reference/funchand/functions/func-num-args.xml:1.1 Sun Apr 14 20:14:07 2002 +++ phpdoc-es/reference/funchand/functions/func-num-args.xml Mon Jul 4 19:37:56 2005 @@ -1,51 +1,55 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/funchand.xml, last change in rev 1.1 --> -<!-- last change to 'func-num-args' in en/ tree in rev 1.1 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.6 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/funchand.xml, last change in rev 1.1 --> <refentry id="function.func-num-args"> <refnamediv> <refname>func_num_args</refname> - <refpurpose>Devuelve el n&uacute;mero de argumentos pasados a la funci&oacute;n.</refpurpose> + <refpurpose> + Devuelve el n&uacute;mero de argumentos pasados a la + funci&oacute;n + </refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> - <type>int</type><methodname>func_num_args</methodname> - <methodparam><type>void</type><parameter/></methodparam> + <type>int</type><methodname>func_num_args</methodname> + <void/> </methodsynopsis> <simpara> - Devuelve el n&uacute;mero de argumentos pasados a la funci&oacute;n actual definida por el usuario. - <function>func_num_args</function> generar&aacute; un aviso si es llamada desde fuera de - la definici&oacute;n de la funci&oacute;n. + Devuelve el n&uacute;mero de argumentos pasados a la + funci&oacute;n actual definida por el + usuario. <function>func_num_args</function> generar&aacute; una + advertencia si es llamada desde afuera de una funci&oacute;n + definida por el usuario. Esta funci&oacute;n no puede ser usada + directamente como un par&aacute;metro de funci&oacute;n. En su + lugar, su resultado puede ser asignado a una variable, la cual + puede ser pasada entonces a la funci&oacute;n. </simpara> - - <para> - <informalexample> - <programlisting> -&lt;?php -function foo() { - $numargs = func_num_args(); - echo "Number of arguments: $numargs\n"; + <para> + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php +function foo() +{ + $num_args = func_num_args(); + echo "Numero de argumentos: $num_args\n"; } -foo( 1, 2, 3 ); // Prints 'Number of arguments: 3' -?&gt; - </programlisting> - </informalexample> - </para> - - <simpara> - <function>func_num_args</function> puede utilizarse conjuntamente con - <function>func_get_arg</function> y - <function>func_get_args</function> para permitir a las funciones definidas - por el usuario que acepten listas de argumentos de longitud variable. - </simpara> - - <note> - <simpara> - Esta funci&oacute;n fue a&ntilde;adida en PHP 4. - </simpara> - </note> - +foo(1, 2, 3); // Imprime 'Numero de argumentos: 3' +?> +]]> + </programlisting> + </informalexample> + </para> + <simpara> + Es posible usar <function>func_num_args</function> en conjunto + con <function>func_get_arg</function> y + <function>func_get_args</function> para permitir que funciones + definidas por el usuario acepten listas de argumentos de longitud + variable. + </simpara> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/funchand/functions/function-exists.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/funchand/functions/function-exists.xml diff -u phpdoc-es/reference/funchand/functions/function-exists.xml:1.1 phpdoc-es/reference/funchand/functions/function-exists.xml:1.2 --- phpdoc-es/reference/funchand/functions/function-exists.xml:1.1 Sun Apr 14 20:14:07 2002 +++ phpdoc-es/reference/funchand/functions/function-exists.xml Mon Jul 4 19:37:56 2005 @@ -1,22 +1,54 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/funchand.xml, last change in rev 1.1 --> -<!-- last change to 'function-exists' in en/ tree in rev 1.1 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/funchand.xml, last change in rev 1.1 --> <refentry id="function.function-exists"> <refnamediv> <refname>function_exists</refname> - <refpurpose>Devuelve &true; si la funci&oacute;n dada ha sido definida</refpurpose> + <refpurpose> + Devolver &true; si la funci&oacute;n dada ha sido definida + </refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> - <type>int</type><methodname>function_exists</methodname> - <methodparam><type>string</type><parameter>function_name</parameter></methodparam> + <type>bool</type><methodname>function_exists</methodname> + <methodparam><type>string</type><parameter>nombre_funcion</parameter></methodparam> </methodsynopsis> - <simpara> - Consulta la lista de funciones definidas buscando <parameter>function_name</parameter> - (nombre de funci&oacute;n). Devuelve &true; si encuentra el nombre de funci&oacute;n dado, - &false; en otro caso. - </simpara> + <para> + Chequea la lista de funciones definidas, tanto incorporadas + (internas) como definidas por el usuario, en busca de + <parameter>nombre_funcion</parameter>. &return.success; + </para> + <para> + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php +if (function_exists('imap_open')) { + echo "Las funciones IMAP estan disponibles.<br />\n"; +} else { + echo "Las funciones IMAP no estan disponibles.<br />\n"; +} +?> +]]> + </programlisting> + </informalexample> + </para> + <para> + Note que un nombre de funci&oacute;n puede existir incluso si la + funci&oacute;n misma es inutilizable debido a la + configuraci&oacute;n o las opciones de compilaci&oacute;n (por + ejemplo puede ocurrir con las funciones <link + linkend="ref.image">image</link>). Tambi&eacute;n note que + <function>function_exists</function> devolver&aacute; &false; + para las construcciones, tales como + <function>include_once</function> y <function>echo</function>. + </para> + <para> + Vea tambi&eacute;n <function>method_exists</function> y + <function>get_defined_functions</function>. + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/funchand/functions/register-shutdown-function.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/funchand/functions/register-shutdown-function.xml diff -u phpdoc-es/reference/funchand/functions/register-shutdown-function.xml:1.1 phpdoc-es/reference/funchand/functions/register-shutdown-function.xml:1.2 --- phpdoc-es/reference/funchand/functions/register-shutdown-function.xml:1.1 Sun Apr 14 20:14:07 2002 +++ phpdoc-es/reference/funchand/functions/register-shutdown-function.xml Mon Jul 4 19:37:56 2005 @@ -1,27 +1,95 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/funchand.xml, last change in rev 1.2 --> -<!-- last change to 'register-shutdown-function' in en/ tree in rev 1.1 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.12 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/funchand.xml, last change in rev 1.1 --> <refentry id="function.register-shutdown-function"> - <refnamediv> - <refname>register_shutdown_function</refname> - <refpurpose>Registra una funci&oacute;n para su ejecuci&oacute;n en el cierre.</refpurpose> - </refnamediv> - <refsect1> - <title>Descripci&oacute;n</title> + <refnamediv> + <refname>register_shutdown_function</refname> + <refpurpose> + Registrar una funci&oacute;n para su ejecuci&oacute;n al + finalizar + </refpurpose> + </refnamediv> + <refsect1> + <title>Descripci&oacute;n</title> <methodsynopsis> - <type>int</type><methodname>register_shutdown_function</methodname> - <methodparam><type>string</type><parameter>func</parameter></methodparam> + <type>void</type><methodname>register_shutdown_function</methodname> + <methodparam><type>callback</type><parameter>funcion</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>parametro</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam> </methodsynopsis> - <simpara> - Registra la funci&oacute;n nombrada en <parameter>func</parameter> - para que se ejecute cuando el script procese su finalizaci&oacute;n.</simpara> - <para> - Aviso:</para> - <simpara> - Debido a que no se permite ning&uacute;n tipo de salida en el navegador en esta - funci&oacute;n, no ser&aacute; capaz de depurarla utilizando sentencias como print o echo.</simpara> - </refsect1> - </refentry> + <simpara> + Registra la funci&oacute;n de nombre + <parameter>funcion</parameter> para ser ejecutada cuando el + procesamiento del script se haya completado. + </simpara> + <para> + Es posible realizar m&uacute;ltiples llamadas a + <function>register_shutdown_function</function>, y cada + funci&oacute;n ser&aacute; llamada en el mismo orden en el que + son registradas. Si llama <function>exit</function> al interior + de una de las funciones de finalizaci&oacute;n registradas, el + procesamiento se detendr&aacute; por completo y ninguna otra + funci&oacute;n de finalizaci&oacute;n ser&aacute; llamada. + </para> + <para> + En PHP 4.0.6 y versiones anteriores, bajo Apache, las funciones + de finalizaci&oacute;n registradas son llamadas despu&eacute;s de + que la petici&oacute;n se ha completado (incluyendo el + env&iacute;o de todos los b&uacute;feres de salida), as&iacute; + que es imposible enviar salida al navegador usando + <function>echo</function> o <function>print</function>, o + recuperar los contenidos de cualquiera de los b&uacute;feres de + salida usando <function>ob_get_contents</function>. A partir de + PHP 4.1, las funciones de finalizaci&oacute;n son llamadas como + parte de la petici&oacute;n, as&iacute; que es posible enviar la + salida de ellas. Actualmente no hay forma de procesar los datos + con las funciones de b&uacute;feres de salida en la + funci&oacute;n de finalizaci&oacute;n. La funci&oacute;n de + finalizaci&oacute;n es llamada despu&eacute;s de cerrar todos los + b&uacute;feres de salida abiertos, por lo tanto, por ejemplo, su + salida no ser&aacute; comprimida si se habilita <link + linkend="ini.zlib.output-compression">zlib.output_compression</link>. + </para> + <para> + A partir de PHP 4, es posible pasar par&aacute;metros a la + funci&oacute;n de finalizaci&oacute;n pasando par&aacute;metros + adicionales a <function>register_shutdown_function</function>. + </para> + <note> + <para> + Usualmente las funciones indefinidas causan errores fatales en + PHP, pero cuando la <parameter>funcion</parameter> llamada con + <function>register_shutdown_function</function> es indefinida, + un error de nivel <constant>E_WARNING</constant> es generado en + su lugar. Asimismo, por razones internas de PHP, este error + har&aacute; referencia a <function>Unknown</function> en la + l&iacute;nea #0. + </para> + </note> + <note> + <para> + El directorio de trabajo del script puede cambiarse al interior + de la funci&oacute;n de finalizaci&oacute;n bajo ciertos + servidores web, p.ej. Apache. + </para> + </note> + <note> + <para> + La funci&oacute;n de finalizaci&oacute;n es llamada durante el + cierre del script, as&iacute; que las cabeceras siempre + habr&aacute;n sido enviadas para entonces. + </para> + </note> + <para> + Vea tambi&eacute;n <link + linkend="ini.auto-append-file">auto_append_file</link>, + <function>exit</function>, y la secci&oacute;n sobre <link + linkend="features.connection-handling">manejo de + conexiones</link>. + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-es/reference/gettext/configure.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-es/reference/gettext/configure.xml diff -u phpdoc-es/reference/gettext/configure.xml:1.5 phpdoc-es/reference/gettext/configure.xml:1.6 --- phpdoc-es/reference/gettext/configure.xml:1.5 Tue Apr 19 21:51:25 2005 +++ phpdoc-es/reference/gettext/configure.xml Mon Jul 4 19:37:56 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- EN-Revision: 1.8 Maintainer: lboshell Status: ready --> <section id="gettext.installation"> &reftitle.install; @@ -7,7 +7,7 @@ Para incluir soporte para GNU gettext en su instalaci&oacute;n de PHP, debe agregar la opci&oacute;n <option role="configure">--with-gettext[=DIR]</option> donde DIR es el - directorio de instalaci&oacute;n de gettext, por defecto + directorio de instalaci&oacute;n de gettext, por omisi&oacute;n <filename>/usr/local</filename>. </para> </section> http://cvs.php.net/diff.php/phpdoc-es/reference/gettext/reference.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-es/reference/gettext/reference.xml diff -u phpdoc-es/reference/gettext/reference.xml:1.4 phpdoc-es/reference/gettext/reference.xml:1.5 --- phpdoc-es/reference/gettext/reference.xml:1.4 Fri Jan 16 17:59:16 2004 +++ phpdoc-es/reference/gettext/reference.xml Mon Jul 4 19:37:56 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- EN-Revision: 1.7 Maintainer: lboshell Status: ready --> <reference id="ref.gettext"> <title>Gettext</title> @@ -14,17 +14,17 @@ siglas en Ingl&eacute;s) que puede ser usada para internacionalizar sus aplicaciones PHP. Por favor refi&eacute;rase a la documentaci&oacute;n de gettext en su - sistema para una explicaci&oacute;n detallada de &eacute;stas - funciones, o consulte los documentos en - <ulink url="&url.gettext.docs;">&url.gettext.docs;</ulink>. + sistema para una explicaci&oacute;n detallada de estas funciones, + o consulte los documentos en <ulink + url="&url.gettext.docs;">&url.gettext.docs;</ulink>. </simpara> </section> <section id="gettext.requirements"> &reftitle.required; <para> - Para usar &eacute;stas funciones, debe descargar e instalar el - paquete GNU gettext desde <ulink + Para usar estas funciones, debe descargar e instalar el paquete + GNU gettext desde <ulink url="&url.gettext;">&url.gettext;</ulink>. </para> </section> http://cvs.php.net/diff.php/phpdoc-es/reference/gettext/functions/bindtextdomain.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-es/reference/gettext/functions/bindtextdomain.xml diff -u phpdoc-es/reference/gettext/functions/bindtextdomain.xml:1.2 phpdoc-es/reference/gettext/functions/bindtextdomain.xml:1.3 --- phpdoc-es/reference/gettext/functions/bindtextdomain.xml:1.2 Fri Aug 16 16:47:14 2002 +++ phpdoc-es/reference/gettext/functions/bindtextdomain.xml Mon Jul 4 19:37:56 2005 @@ -1,21 +1,46 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/gettext.xml, last change in rev 1.1 --> -<!-- last change to 'bindtextdomain' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/gettext.xml, last change in rev 1.2 --> <refentry id="function.bindtextdomain"> <refnamediv> <refname>bindtextdomain</refname> - <refpurpose>Establece la ruta para un dominio</refpurpose> + <refpurpose>Defina la ruta para un dominio</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>string</type><methodname>bindtextdomain</methodname> - <methodparam><type>string</type><parameter>domain</parameter></methodparam> - <methodparam><type>string</type><parameter>directory</parameter></methodparam> + <methodparam><type>string</type><parameter>dominio</parameter></methodparam> + <methodparam><type>string</type><parameter>directorio</parameter></methodparam> </methodsynopsis> <para> - La funci&oacute;n <function>bindtextdomain</function> establece la ruta para - el dominio. + La funci&oacute;n <function>bindtextdomain</function> define la + ruta para un dominio. Devuelve la ruta completa para el dominio + defini&eacute;ndose actualmente. + </para> + <para> + <example> + <title>Ejemplo de <function>bindtextdomain</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + +$dominio = 'mi_aplicacion'; +echo bindtextdomain($dominio, '/usr/share/mi_aplicacion/locale'); + +?> +]]> + </programlisting> + <para> + Esto imprimir&aacute;: + </para> + <screen> +<![CDATA[ +/usr/share/mi_aplicacion/locale +]]> + </screen> + </example> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/gettext/functions/dgettext.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-es/reference/gettext/functions/dgettext.xml diff -u phpdoc-es/reference/gettext/functions/dgettext.xml:1.2 phpdoc-es/reference/gettext/functions/dgettext.xml:1.3 --- phpdoc-es/reference/gettext/functions/dgettext.xml:1.2 Fri Aug 16 16:47:14 2002 +++ phpdoc-es/reference/gettext/functions/dgettext.xml Mon Jul 4 19:37:56 2005 @@ -1,21 +1,26 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/gettext.xml, last change in rev 1.1 --> -<!-- last change to 'dgettext' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/gettext.xml, last change in rev 1.2 --> <refentry id="function.dgettext"> <refnamediv> <refname>dgettext</refname> - <refpurpose>Omite el dominio actual</refpurpose> + <refpurpose>Sobrescribir el dominio actual</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>string</type><methodname>dgettext</methodname> - <methodparam><type>string</type><parameter>domain</parameter></methodparam> - <methodparam><type>string</type><parameter>message</parameter></methodparam> + <methodparam><type>string</type><parameter>dominio</parameter></methodparam> + <methodparam><type>string</type><parameter>mensaje</parameter></methodparam> </methodsynopsis> <para> - La funci&oacute;n <function>dgettext</function> permite omitir el dominio - actual para una &uacute;nica busqueda. + La funci&oacute;n <function>dgettext</function> le permite + sobrescribir el dominio actual para una consulta de mensaje + sencilla. + </para> + <para> + Vea tambi&eacute;n <function>gettext</function>. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/gettext/functions/gettext.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-es/reference/gettext/functions/gettext.xml diff -u phpdoc-es/reference/gettext/functions/gettext.xml:1.2 phpdoc-es/reference/gettext/functions/gettext.xml:1.3 --- phpdoc-es/reference/gettext/functions/gettext.xml:1.2 Fri Aug 16 16:47:14 2002 +++ phpdoc-es/reference/gettext/functions/gettext.xml Mon Jul 4 19:37:56 2005 @@ -1,41 +1,52 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/gettext.xml, last change in rev 1.1 --> -<!-- last change to 'gettext' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.8 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/gettext.xml, last change in rev 1.2 --> <refentry id="function.gettext"> <refnamediv> <refname>gettext</refname> - <refpurpose>Realiza una busqueda del mensaje en el dominio actual</refpurpose> + <refpurpose>Consultar un mensaje en el dominio actual</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>string</type><methodname>gettext</methodname> - <methodparam><type>string</type><parameter>message</parameter></methodparam> + <methodparam><type>string</type><parameter>mensaje</parameter></methodparam> </methodsynopsis> <para> - Esta funci&oacute;n devuelve la traducci&oacute;n de la cadena si encuentra una - en la tabla de traducciones, o el mensaje enviado si no se encuentra - ninguna. Puede usar un car&aacute;cter de subrayado como un alias para esta - funci&oacute;n. + Esta funci&oacute;n devuelve una cadena traducida si una es + encontrada en la trabla de traducci&oacute;n, o el mensaje + enviado si no se encuentra traducci&oacute;n. Es posible usar el + caracter de subrayado '_' como un alias de esta funci&oacute;n. </para> <example> - <title><function>gettext</function>-check</title> - <programlisting> -&lt;?php -// Establece el idioma en alem&aacute;n -putenv ("LANG=de"); + <title>Uso de <function>gettext</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +// Definir idioma a Aleman +setlocale(LC_ALL, 'de_DE'); -// Especifica la localizaci&oacute;n de las tablas de traducci&oacute;n -bindtextdomain ("myPHPApp", "./locale"); +// Especificar la ubicacion de las tablas de traduccion +bindtextdomain("miAplicacionPHP", "./locale"); -// Elige un dominio -textdomain ("myPHPApp"); +// Elegir dominio +textdomain("miAplicacionPHP"); -// Imprime un mensaje de prueba -print (gettext ("Welcome to My PHP Application")); +// La traduccion busca en ./locale/de_DE/LC_MESSAGES/miAplicacionPHP.mo ahora + +// Imprimir un mensaje de prueba +echo gettext("Bienvenido a Mi Aplicacion PHP"); + +// O use el alias _() para gettext() +echo _("Tenga un buen dia"); ?> +]]> </programlisting> </example> + <para> + Vea tambi&eacute;n <function>setlocale</function>. + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/gettext/functions/textdomain.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-es/reference/gettext/functions/textdomain.xml diff -u phpdoc-es/reference/gettext/functions/textdomain.xml:1.2 phpdoc-es/reference/gettext/functions/textdomain.xml:1.3 --- phpdoc-es/reference/gettext/functions/textdomain.xml:1.2 Fri Aug 16 16:47:14 2002 +++ phpdoc-es/reference/gettext/functions/textdomain.xml Mon Jul 4 19:37:56 2005 @@ -1,26 +1,52 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/gettext.xml, last change in rev 1.1 --> -<!-- last change to 'textdomain' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/gettext.xml, last change in rev 1.2 --> <refentry id="function.textdomain"> <refnamediv> <refname>textdomain</refname> - <refpurpose>Establece el dominio actual</refpurpose> + <refpurpose>Establece el dominio predeterminado</refpurpose> </refnamediv> - <refsect1> - <title>Descripci&oacute;n</title> + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> - <type>int</type><methodname>textdomain</methodname> - <methodparam choice="opt"><type>string</type><parameter>library</parameter></methodparam> + <type>string</type><methodname>textdomain</methodname> + <methodparam><type>string</type><parameter>dominio_de_texto</parameter></methodparam> </methodsynopsis> <para> - Esta funci&oacute;n establece el dominio en el que se realizar&aacute;n las - busquedas provocadas por las llamadas a <function>gettext</function>, - normalmente el nombre dado a la aplicaci&oacute;n. Se devuelve el dominio - anterior. Puede llamar a la funci&oacute;n sin par&aacute;metros para obtener el - dominio actual sin necesidad de cambiarlo. + Esta funci&oacute;n establece el dominio para las + b&uacute;squedas realizadas mediante + <function>gettext</function>, usualmente este dominio es llamado + en base al nombre de la aplicaci&oacute;n. </para> </refsect1> - </refentry> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>dominio_de_texto</parameter></term> + <listitem> + <para> + El nuevo dominio de mensajes, o &null; para obtener el valor + actual sin cambiarlo + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Si tiene &eacute;xito, esta funci&oacute;n devuelve el dominio de + mensajes actual, despu&eacute;s de tal vez haberlo cambiado. + </para> + </refsect1> + +</refentry> <!-- Keep this comment at the end of the file Local variables:
« previous php.doc.es (#1070) next »