mirror of
https://github.com/php/doc-es.git
synced 2026-03-23 23:12:09 +01:00
Remove files not in EN
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1fc853737aff47054e81741af5ebba3c492ff09a Maintainer: seros Status: ready -->
|
||||
<!-- EN-Revision: 2e39b215fe0d147c5dce83c0e4216552747eb5ff Maintainer: seros Status: ready -->
|
||||
<!-- Reviewed: yes Maintainer: seros -->
|
||||
|
||||
<reference xml:id="context" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
@@ -20,10 +19,10 @@
|
||||
&language.context.http;
|
||||
&language.context.ftp;
|
||||
&language.context.ssl;
|
||||
&language.context.curl;
|
||||
&language.context.phar;
|
||||
&language.context.parameters;
|
||||
&language.context.zip;
|
||||
&language.context.zlib;
|
||||
|
||||
</reference>
|
||||
|
||||
|
||||
@@ -1,217 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 18d401358cecafe2b9ef893e4a559a71e346f08c Maintainer: jpberdejo Status: ready -->
|
||||
<!-- Reviewed: no Maintainer: andresdzphp -->
|
||||
|
||||
<refentry xml:id="context.curl" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" annotations="verify_info:false">
|
||||
<refnamediv>
|
||||
<refname>Opciones de contexto para CURL</refname>
|
||||
<refpurpose>Listado de opciones de contexto para CURL</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>
|
||||
Las opciones de contexto para CURL están disponibles cuando la
|
||||
extensión <link linkend="intro.curl">CURL</link> fue compilada usando la
|
||||
opción de configuración <option>--with-curlwrappers</option>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="options"><!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry xml:id="context.curl.method">
|
||||
<term>
|
||||
<parameter>method</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
<constant>GET</constant>, <constant>POST</constant>, o
|
||||
cualquier otro método HTTP soportado por el servidor remoto.
|
||||
</para>
|
||||
<para>
|
||||
Por defecto es <constant>GET</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="context.curl.header">
|
||||
<term>
|
||||
<parameter>header</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Cabeceras adicionales a ser enviadas durante la petición. Los valores
|
||||
de esta opción sobrescribirán otros valores (como por ejemplo
|
||||
<literal>User-agent:</literal>, <literal>Host:</literal>,
|
||||
y <literal>Authentication:</literal>).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="context.curl.user-agent">
|
||||
<term>
|
||||
<parameter>user_agent</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Valor a ser enviado con la cabecera User-Agent:.
|
||||
</para>
|
||||
<para>
|
||||
Por defecto se usa la configuración
|
||||
<link linkend="ini.user-agent">user_agent</link>
|
||||
de &php.ini;.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="context.curl.content">
|
||||
<term>
|
||||
<parameter>content</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Datos adicionales para ser enviados después de las cabeceras. Esta opción no se utiliza
|
||||
para peticiones <constant>GET</constant> o <constant>HEAD</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="context.curl.proxy">
|
||||
<term>
|
||||
<parameter>proxy</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
URI que especifica la dirección del servidor proxy. (Por ejemplo
|
||||
<literal>tcp://proxy.example.com:5100</literal>).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="context.curl.max-redirects">
|
||||
<term>
|
||||
<parameter>max_redirects</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
El número máximo de redirecciones a seguir. Un valor de <literal>1</literal> o
|
||||
menos significa que no se siguen la redirecciones.
|
||||
</para>
|
||||
<para>
|
||||
Por defecto es <literal>20</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="context.curl.curl-verify-ssl-host">
|
||||
<term>
|
||||
<parameter>curl_verify_ssl_host</parameter>
|
||||
<type>boolean</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Verifica el host.
|
||||
</para>
|
||||
<para>
|
||||
Por defecto es &false;
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Esta opción está disponible tanto para envolturas del protocolo http como del ftp.
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="context.curl.curl-verify-ssl-peer">
|
||||
<term>
|
||||
<parameter>curl_verify_ssl_peer</parameter>
|
||||
<type>boolean</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Requiere verificación del certificado SSL utilizado.
|
||||
</para>
|
||||
<para>
|
||||
Por defecto es &false;
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Esta opción está disponible tanto para envolturas del protocolo http como del ftp.
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="examples"><!-- {{{ -->
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example xml:id="context.curl.example-post"><!-- {{{ -->
|
||||
<title>Obtener una página y enviar datos POST</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$postdata = http_build_query(
|
||||
array(
|
||||
'var1' => 'some content',
|
||||
'var2' => 'doh'
|
||||
)
|
||||
);
|
||||
|
||||
$opts = array('http' =>
|
||||
array(
|
||||
'method' => 'POST',
|
||||
'header' => 'Content-type: application/x-www-form-urlencoded',
|
||||
'content' => $postdata
|
||||
)
|
||||
);
|
||||
|
||||
$context = stream_context_create($opts);
|
||||
|
||||
$result = file_get_contents('http://example.com/submit.php', false, $context);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example><!-- }}} -->
|
||||
</para>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="context.socket" /></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:"~/.phpdoc/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
|
||||
-->
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 4f23caf682c8abcf05594e57aecf8c45a5186401 Maintainer: seros Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<book xml:id="book.csprng" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<?phpdoc extension-membership="core" ?>
|
||||
<title>CSPRNG</title>
|
||||
|
||||
<preface xml:id="intro.csprng">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
La API <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="&url.csprng.wiki;">generador de números
|
||||
seudoaleatorios criptográficamente seguros</link> (CSPRNG por sus siglas en ingés) proporciona una manera sencilla y fiable de generar
|
||||
enteros y bytes aleatorios criptográficamente fuertes para emplearlos dentro de contextos criptográficos.
|
||||
</para>
|
||||
<para>
|
||||
&version.exists.asof; 7.0.0, aunque también existe una
|
||||
<link xlink:href="&url.csprng.compat;">implementación del espacio de usuario</link>
|
||||
para PHP >= 5.2.0.
|
||||
</para>
|
||||
</preface>
|
||||
|
||||
&reference.csprng.setup;
|
||||
&reference.csprng.constants;
|
||||
&reference.csprng.reference;
|
||||
|
||||
</book>
|
||||
|
||||
<!-- 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:"~/.phpdoc/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
|
||||
-->
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 8e70d616196fd5c7f94d6cbe23489db43c9ce6a1 Maintainer: seros Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<appendix xml:id="csprng.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.constants;
|
||||
&no.constants;
|
||||
</appendix>
|
||||
|
||||
<!-- 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:"~/.phpdoc/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
|
||||
-->
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 07311e42d0fa713874bb2284021982c8a2e66037 Maintainer: seros Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<refentry xml:id="function.random-bytes" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>random_bytes</refname>
|
||||
<refpurpose>Genera bytes seudoaleatorios criptográficamente seguros</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description"><!-- {{{ -->
|
||||
&reftitle.description;
|
||||
<methodsynopsis role="procedural">
|
||||
<type>string</type><methodname>random_bytes</methodname>
|
||||
<methodparam><type>int</type><parameter>length</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Genera una cadena de longitud arbitraria de bytes aleatorios criptográficos
|
||||
aptos para usos criptográficos, como la generación de sales, claves o
|
||||
inicialización de vectores.
|
||||
</para>
|
||||
&csprng.sources;
|
||||
&csprng.function.backport;
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="parameters"><!-- {{{ -->
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>length</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
La longitud de la cadena aleatoria que debería ser devuelta en bytes.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="returnvalues"><!-- {{{ -->
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Devuelve un string que contiene el número solicitado de bytes aleatorios
|
||||
criptográficamente seguros.
|
||||
</para>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="errors"><!-- {{{ -->
|
||||
&reftitle.errors;
|
||||
<itemizedlist>
|
||||
&csprng.errors;
|
||||
<listitem>
|
||||
<simpara>
|
||||
Si se proporciona un número de bytes para <parameter>length</parameter> inválidos, se
|
||||
lanzará un <classname>Error</classname>.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="examples"><!-- {{{ -->
|
||||
&reftitle.examples;
|
||||
<example xml:id="random-bytes.example.basic"><!-- {{{ -->
|
||||
<title>Ejemplo de <function>random_bytes</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$bytes = random_bytes(5);
|
||||
var_dump(bin2hex($bytes));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
string(10) "385e33f741"
|
||||
]]>
|
||||
</screen>
|
||||
</example><!-- }}} -->
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="seealso"><!-- {{{ -->
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>random_int</function></member>
|
||||
<member><function>openssl_random_pseudo_bytes</function></member>
|
||||
<member><function>bin2hex</function></member>
|
||||
</simplelist>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
||||
@@ -1,123 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 07311e42d0fa713874bb2284021982c8a2e66037 Maintainer: seros Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<refentry xml:id="function.random-int" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>random_int</refname>
|
||||
<refpurpose>Genera números enteros seudoaleatorios criptográficamente seguros</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description"><!-- {{{ -->
|
||||
&reftitle.description;
|
||||
<methodsynopsis role="procedural">
|
||||
<type>int</type><methodname>random_int</methodname>
|
||||
<methodparam><type>int</type><parameter>min</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>max</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Genera números enteros aleatorios criptográficos aptos para resultados
|
||||
imparciales críticos, tales como barajar una baraja de cartas de
|
||||
póquer.
|
||||
</para>
|
||||
&csprng.sources;
|
||||
&csprng.function.backport;
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="parameters"><!-- {{{ -->
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>min</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
El valor mínimo a devolver, el cual debe ser
|
||||
<constant>PHP_INT_MIN</constant> o mayor.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>max</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
El valor máximo a devolver, el cual debe ser menor o igual que
|
||||
<constant>PHP_INT_MAX</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="returnvalues"><!-- {{{ -->
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Devuelve un número entero aleatorio criptográficamente seguro en el rango
|
||||
<parameter>min</parameter> a <parameter>max</parameter>, inclusive.
|
||||
</para>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="errors"><!-- {{{ -->
|
||||
&reftitle.errors;
|
||||
<itemizedlist>
|
||||
&csprng.errors;
|
||||
<listitem>
|
||||
<simpara>
|
||||
Si <parameter>max</parameter> es menor que <parameter>min</parameter>, se
|
||||
lanzará un <classname>Error</classname>.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="examples"><!-- {{{ -->
|
||||
&reftitle.examples;
|
||||
<example xml:id="random-int.example.basic"><!-- {{{ -->
|
||||
<title>Ejmplo de <function>random_int</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
var_dump(random_int(100, 999));
|
||||
var_dump(random_int(-1000, 0));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
int(248)
|
||||
int(-898)
|
||||
]]>
|
||||
</screen>
|
||||
</example><!-- }}} -->
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="seealso"><!-- {{{ -->
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>random_bytes</function></member>
|
||||
</simplelist>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
||||
@@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 8e70d616196fd5c7f94d6cbe23489db43c9ce6a1 Maintainer: seros Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<reference xml:id="ref.csprng" xmlns="http://docbook.org/ns/docbook">
|
||||
<title>&Functions; de CSPRNG</title>
|
||||
|
||||
&reference.csprng.entities.functions;
|
||||
|
||||
</reference>
|
||||
|
||||
<!-- 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:"~/.phpdoc/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
|
||||
-->
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 8e70d616196fd5c7f94d6cbe23489db43c9ce6a1 Maintainer: seros Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<chapter xml:id="csprng.setup">
|
||||
&reftitle.setup;
|
||||
|
||||
<section xml:id="csprng.requirements">
|
||||
&reftitle.required;
|
||||
&no.requirement;
|
||||
</section>
|
||||
|
||||
<section xml:id="csprng.installation">
|
||||
&reftitle.install;
|
||||
&no.install;
|
||||
</section>
|
||||
|
||||
<section xml:id="csprng.configuration">
|
||||
&reftitle.runtime;
|
||||
&no.config;
|
||||
</section>
|
||||
|
||||
<section xml:id="csprng.resources">
|
||||
&reftitle.resources;
|
||||
&no.resource;
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
|
||||
<!-- 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:"~/.phpdoc/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
|
||||
-->
|
||||
@@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: d7bf877330e2990c705e01930e5c1366df8348b0 Maintainer: regiemix Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<refentry xml:id="function.curl-file-create" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>curl_file_create</refname>
|
||||
<refpurpose>Crea un objeto CURLFile</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>
|
||||
&info.function.alias; <methodname>CURLFile::__construct</methodname>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
||||
@@ -1,58 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: lboshell Status: ready -->
|
||||
<refentry xml:id="function.getrandmax" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>getrandmax</refname>
|
||||
<refpurpose>Mostrar el mayor valor aleatorio posible</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>getrandmax</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
Devuelve el valor máximo que puede ser devuelto por una llamada a
|
||||
<function>rand</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
El valor aleatorio más grande posible devuelto por
|
||||
<function>rand</function>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>rand</function></member>
|
||||
<member><function>srand</function></member>
|
||||
<member><function>mt_getrandmax</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:"~/.phpdoc/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
|
||||
-->
|
||||
@@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: fb0122dd8b1bf1516421ee3b119ed77aeef7a0a7 Maintainer: seros Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
<refentry xml:id="function.lcg-value" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>lcg_value</refname>
|
||||
<refpurpose>Generador lineal congruente combinado</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>lcg_value</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>lcg_value</function> devuelve un número pseudo-aleatorio en el
|
||||
rango (0, 1). La función combina dos generadores congruentes con periodos
|
||||
de 2^31 - 85 y 2^31 - 249. El periodo de esta función es igual al
|
||||
producto de ambos primos.
|
||||
</para>
|
||||
&caution.cryptographically-insecure;
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Un valor flotante pseudo-aleatorio en el rango de (0, 1)
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>rand</function></member>
|
||||
<member><function>mt_rand</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:"~/.phpdoc/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
|
||||
-->
|
||||
@@ -1,87 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 247d016f43921ad243636c5e31e0583917c55a5d Maintainer: seros Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
<refentry xml:id="function.mt-getrandmax" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>mt_getrandmax</refname>
|
||||
<refpurpose>Mostrar el mayor valor aleatorio posible</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>mt_getrandmax</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
Devuelve el valor máximo que puede ser devuelto por una llamada a
|
||||
<function>mt_rand</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Devuelve el valor aleatorio máximo devuelto por una llamada a
|
||||
<function>mt_rand</function> sin argumentos, el cual es el valor máximo
|
||||
que se puede emplear para su parámetro <parameter>max</parameter> sin que sea
|
||||
ampliado el resultado (y por lo tanto menos aleatorio).
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example><title>Calcular un número de coma flotante aleatorio</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
function randomFloat($min = 0, $max = 1) {
|
||||
return $min + mt_rand() / mt_getrandmax() * ($max - $min);
|
||||
}
|
||||
|
||||
var_dump(randomFloat());
|
||||
var_dump(randomFloat(2, 20));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
float(0.91601131712832)
|
||||
float(16.511210331931)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>mt_rand</function></member>
|
||||
<member><function>mt_srand</function></member>
|
||||
<member><function>getrandmax</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:"~/.phpdoc/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
|
||||
-->
|
||||
@@ -1,168 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 5ab1ebc578342befda024f2e875dfdf968d4d748 Maintainer: seros Status: ready -->
|
||||
<!-- Reviewed: yes Maintainer: seros -->
|
||||
<refentry xml:id="function.mt-rand" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>mt_rand</refname>
|
||||
<refpurpose>Genera un mejor número entero aleatorio</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>mt_rand</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>mt_rand</methodname>
|
||||
<methodparam><type>int</type><parameter>min</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>max</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
Muchos generadores de números aleatorios de libcs antiguas tienen características
|
||||
dudosas o desconocidas y son lentas. De manera predeterminada, PHP usa la
|
||||
libc generadora de números aleatorios con la función <function>rand</function>.
|
||||
La función <function>mt_rand</function> es un sustituto de dicha función.
|
||||
Utiliza un generador de números aleatorios con
|
||||
características conocidas usando <link xlink:href="&url.mersenne;">
|
||||
Mersenne Twister</link>, que produce números aleatorios cuatro veces
|
||||
más rápido que el promedio proporcionado por la libc rand().
|
||||
</simpara>
|
||||
<simpara>
|
||||
Si se emplea sin los argumentos opcionales <parameter>min</parameter> y
|
||||
<parameter>max</parameter>, <function>mt_rand</function>
|
||||
devuelve un valor pseudoaleatorio entre 0 y
|
||||
<function>mt_getrandmax</function>. Para obtener un número aleatorio
|
||||
entre 5 y 15 (incluidos), por ejemplo, use <literal>mt_rand(5,
|
||||
15)</literal>.
|
||||
</simpara>
|
||||
&caution.cryptographically-insecure;
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>min</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Opcionalmente, el menor valor a devolver (por defecto: 0)
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>max</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Opcionalmente, el mayor valor a devolver (por defecto: <function>mt_getrandmax</function>)
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Un valor entero aleatorio entre <parameter>min</parameter> (o 0)
|
||||
y <parameter>max</parameter> (o <function>mt_getrandmax</function>, incluidos),
|
||||
o &false; si <parameter>max</parameter> es menor que <parameter>min</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>5.3.4</entry>
|
||||
<entry>
|
||||
Emite un error de nivel <constant>E_WARNING</constant> y devuelve &false; si
|
||||
<parameter>max</parameter> < <parameter>min</parameter>.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Ejemplo de <function>mt_rand</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
echo mt_rand() . "\n";
|
||||
echo mt_rand() . "\n";
|
||||
|
||||
echo mt_rand(5, 15);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
1604716014
|
||||
1478613278
|
||||
6
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
<warning>
|
||||
<para>
|
||||
El rango <parameter>min</parameter>-<parameter>max</parameter> debe
|
||||
estar entre el rango <function>mt_getrandmax</function>. Esto es, (<parameter>max</parameter> -
|
||||
<parameter>min</parameter>) <= <function>mt_getrandmax</function>
|
||||
De lo contrario, <function>mt_rand</function> podría devolver números
|
||||
aleatorios pobres.
|
||||
</para>
|
||||
</warning>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>mt_srand</function></member>
|
||||
<member><function>mt_getrandmax</function></member>
|
||||
<member><function>random_int</function></member>
|
||||
<member><function>random_bytes</function></member>
|
||||
<member><function>openssl_random_pseudo_bytes</function></member>
|
||||
<member><function>rand</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:"~/.phpdoc/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
|
||||
-->
|
||||
@@ -1,128 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 8b5940cadeb4f1c8492f4a7f70743a2be807cf39 Maintainer: gerardocdc Status: ready -->
|
||||
<!-- Reviewed: yes Maintainer: seros -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.mt-srand">
|
||||
<refnamediv>
|
||||
<refname>mt_srand</refname>
|
||||
<refpurpose>Genera el mejor número aleatorio a partir de una semilla</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>mt_srand</methodname>
|
||||
<methodparam choice="opt"><type>int</type><parameter>seed</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Incorpora la semilla <parameter>seed</parameter> al generador
|
||||
de números aleatorios, o con un valor aleatorio si no se
|
||||
proporciona <parameter>seed</parameter>.
|
||||
</para>
|
||||
|
||||
¬e.randomseed;
|
||||
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>seed</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Valor de la semilla opcional
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>5.2.1</entry>
|
||||
<entry>
|
||||
La implementación de Mersenne Twister en PHP ahora usa un nuevo
|
||||
algoritmo para la semilla de Richard Wagner. La misma semilla ahora ya
|
||||
no produce la misma secuencia de valores como sucedía en anteriores versiones.
|
||||
No se espera que se vuelva a cambiar de nuevo este comportamiento,
|
||||
aunque, no obstante, se considera inseguro confiar en él.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Ejemplo de <function>mt_srand</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// semilla de microsegundos
|
||||
function make_seed()
|
||||
{
|
||||
list($usec, $sec) = explode(' ', microtime());
|
||||
return (float) $sec + ((float) $usec * 100000);
|
||||
}
|
||||
mt_srand(make_seed());
|
||||
$randval = mt_rand();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>mt_rand</function></member>
|
||||
<member><function>mt_getrandmax</function></member>
|
||||
<member><function>srand</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:"~/.phpdoc/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
|
||||
-->
|
||||
@@ -1,144 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 5ab1ebc578342befda024f2e875dfdf968d4d748 Maintainer: seros Status: ready -->
|
||||
<!-- Reviewed: yes Maintainer: seros -->
|
||||
<refentry xml:id="function.rand" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>rand</refname>
|
||||
<refpurpose>Genera un número entero aleatorio</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>rand</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>rand</methodname>
|
||||
<methodparam><type>int</type><parameter>min</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>max</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
Si se invoca sin los argumentos opcionales <parameter>min</parameter> y
|
||||
<parameter>max</parameter>, <function>rand</function>
|
||||
devuelve un entero pseudoaleatorio entre 0 y
|
||||
<function>getrandmax</function>. Para obtener un número aleatorio
|
||||
entre 5 y 15 (incluidos), por ejemplo, use <literal>rand(5,
|
||||
15)</literal>.
|
||||
</simpara>
|
||||
&caution.cryptographically-insecure;
|
||||
<note>
|
||||
<simpara>
|
||||
En algunas plataformas (como en Windows), <function>getrandmax</function>
|
||||
sólo alcanza hasta 32767. En caso de necesitar un valor mayor de 32767, se
|
||||
deberá especificar <parameter>min</parameter> y <parameter>max</parameter> para
|
||||
crear un valor mayor que este, o considere emplear
|
||||
<function>mt_rand</function> en su lugar.
|
||||
</simpara>
|
||||
</note>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>min</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
El menor valor a devolver (por defecto: 0)
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>max</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
El mayor valor a devolver (por defecto: <function>getrandmax</function>)
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Un valor pseudoaleatorio entre <parameter>min</parameter>
|
||||
(o 0) y <parameter>max</parameter> (o <function>getrandmax</function>, incluidos).
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Ejemplo de <function>rand</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
echo rand() . "\n";
|
||||
echo rand() . "\n";
|
||||
|
||||
echo rand(5, 15);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
7771
|
||||
22264
|
||||
11
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
<warning>
|
||||
<para>
|
||||
El rango <parameter>min</parameter>-<parameter>max</parameter> debe
|
||||
estar entre el rango <function>getrandmax</function>. Esto es, (<parameter>max</parameter> -
|
||||
<parameter>min</parameter>) <= <function>getrandmax</function>
|
||||
De lo contrario, <function>rand</function> podría devolver números
|
||||
aleatorios pobres.
|
||||
</para>
|
||||
</warning>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>srand</function></member>
|
||||
<member><function>getrandmax</function></member>
|
||||
<member><function>mt_rand</function></member>
|
||||
<member><function>random_int</function></member>
|
||||
<member><function>random_bytes</function></member>
|
||||
<member><function>openssl_random_pseudo_bytes</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:"~/.phpdoc/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
|
||||
-->
|
||||
@@ -1,100 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 8b5940cadeb4f1c8492f4a7f70743a2be807cf39 Maintainer: gerardocdc Status: ready -->
|
||||
<!-- Reviewed: yes Maintainer: seros -->
|
||||
<refentry xml:id="function.srand" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>srand</refname>
|
||||
<refpurpose>Genera un número aleatorio a partir de una semilla</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>srand</methodname>
|
||||
<methodparam choice="opt"><type>int</type><parameter>seed</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Incorpora la semilla <parameter>seed</parameter> al generador de números aleatorios,
|
||||
o con un valor aleatorio si no se proporciona <parameter>seed</parameter>.
|
||||
</para>
|
||||
|
||||
¬e.randomseed;
|
||||
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>seed</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Valor de la semilla opcional
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Ejemplo de <function>srand</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// semilla de microsegundos
|
||||
function make_seed()
|
||||
{
|
||||
list($usec, $sec) = explode(' ', microtime());
|
||||
return (float) $sec + ((float) $usec * 100000);
|
||||
}
|
||||
srand(make_seed());
|
||||
$randval = rand();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>rand</function></member>
|
||||
<member><function>getrandmax</function></member>
|
||||
<member><function>mt_srand</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:"~/.phpdoc/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
|
||||
-->
|
||||
@@ -1,95 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 14af302c9c0e561fa6f9cdd956268758ba9a89c5 Maintainer: andresdzphp Status: ready -->
|
||||
<!-- Reviewed: no Maintainer: andresdzphp -->
|
||||
<refentry xml:id="simplexmliterator.getchildren" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>SimpleXMLIterator::getChildren</refname>
|
||||
<refpurpose>Devuelve los sub elementos de el elemento actual</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>SimpleXMLIterator</type><methodname>SimpleXMLIterator::getChildren</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Este método devuelve un objeto <classname>SimpleXMLIterator</classname>
|
||||
que contiene sub elementos de el elemento <classname>SimpleXMLIterator</classname>
|
||||
actual.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Devuelve un objeto <classname>SimpleXMLIterator</classname> que contiene
|
||||
los sub elementos de el elemento actual.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Devuelve los sub elementos de el elemento actual</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$xml = <<<XML
|
||||
<books>
|
||||
<book>
|
||||
<title>PHP Básico</title>
|
||||
<author>Jim Smith</author>
|
||||
</book>
|
||||
<book>XML básico</book>
|
||||
</books>
|
||||
XML;
|
||||
|
||||
$xmlIterator = new SimpleXMLIterator($xml);
|
||||
for( $xmlIterator->rewind(); $xmlIterator->valid(); $xmlIterator->next() ) {
|
||||
foreach($xmlIterator->getChildren() as $name => $data) {
|
||||
echo "El $name es '$data' de la clase " . get_class($data) . "\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
El título es 'PHP Básico' de la clase SimpleXMLIterator
|
||||
El autor es 'Jim Smith' de la clase SimpleXMLIterator
|
||||
]]>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
||||
@@ -1,97 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: dd07341fae2c414adc1f700be0890ff32e8daab4 Maintainer: andresdzphp Status: ready -->
|
||||
<!-- Reviewed: no Maintainer: andresdzphp -->
|
||||
|
||||
<refentry xml:id="simplexmliterator.haschildren" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>SimpleXMLIterator::hasChildren</refname>
|
||||
<refpurpose>Comprueba si el elemento actual tiene sub elementos</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>bool</type><methodname>SimpleXMLIterator::hasChildren</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Este método comprueba si el elemento <classname>SimpleXMLIterator</classname> actual tiene sub elementos.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&true; si el elemento actual tiene sub elementos, en caso contrario &false;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Comprobar si el elemento actual tiene sub elementos</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$xml = <<<XML
|
||||
<books>
|
||||
<book>
|
||||
<title>PHP Básico</title>
|
||||
<author>Jim Smith</author>
|
||||
</book>
|
||||
<book>XML básico</book>
|
||||
</books>
|
||||
XML;
|
||||
|
||||
$xmlIterator = new SimpleXMLIterator( $xml );
|
||||
for( $xmlIterator->rewind(); $xmlIterator->valid(); $xmlIterator->next() ) {
|
||||
if($xmlIterator->hasChildren()) {
|
||||
var_dump($xmlIterator->current());
|
||||
}
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
object(SimpleXMLIterator)#2 (2) {
|
||||
["title"]=>
|
||||
string(10) "PHP Básico"
|
||||
["author"]=>
|
||||
string(9) "Jim Smith"
|
||||
}
|
||||
]]>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
||||
@@ -1,83 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 14af302c9c0e561fa6f9cdd956268758ba9a89c5 Maintainer: andresdzphp Status: ready -->
|
||||
<!-- Reviewed: no Maintainer: andresdzphp -->
|
||||
<refentry xml:id="simplexmliterator.key" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>SimpleXMLIterator::key</refname>
|
||||
<refpurpose>Devuelve la clave actual</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>mixed</type><methodname>SimpleXMLIterator::key</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Este método obtiene el nombre de la etiqueta XML del elemento actual.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Devuelve el nombre de la etiqueta XML del elemento referenciado por el objeto <classname>SimpleXMLIterator</classname> actual o &false;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Obtener la clave actual de etiquetas XML</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$xmlIterator = new SimpleXMLIterator('<books><book>PHP básico</book><book>XML básico</book></books>');
|
||||
|
||||
echo var_dump($xmlIterator->key());
|
||||
$xmlIterator->rewind(); // rebobinar hasta el primer elemento
|
||||
echo var_dump($xmlIterator->key());
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
bool(false)
|
||||
string(4) "book"
|
||||
]]>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
||||
@@ -1,83 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 14af302c9c0e561fa6f9cdd956268758ba9a89c5 Maintainer: andresdzphp Status: ready -->
|
||||
<!-- Reviewed: no Maintainer: andresdzphp -->
|
||||
<refentry xml:id="simplexmliterator.next" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>SimpleXMLIterator::next</refname>
|
||||
<refpurpose>Mueve al siguiente elemento</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>SimpleXMLIterator::next</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Este método mueve el <classname>SimpleXMLIterator</classname> a el siguiente elemento.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Mover a el siguiente elemento</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$xmlIterator = new SimpleXMLIterator('<books><book>PHP Básico</book><book>XML básico</book></books>');
|
||||
$xmlIterator->rewind(); // rebobinar hasta el primer elemento
|
||||
$xmlIterator->next();
|
||||
|
||||
var_dump($xmlIterator->current());
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
object(SimpleXMLIterator)#2 (1) {
|
||||
[0]=>
|
||||
string(10) "XML básico"
|
||||
}
|
||||
]]>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
||||
@@ -1,82 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 14af302c9c0e561fa6f9cdd956268758ba9a89c5 Maintainer: andresdzphp Status: ready -->
|
||||
<!-- Reviewed: no Maintainer: andresdzphp -->
|
||||
<refentry xml:id="simplexmliterator.rewind" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>SimpleXMLIterator::rewind</refname>
|
||||
<refpurpose>Rebobina hasta el primer elemento</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>SimpleXMLIterator::rewind</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Este método rebobina el <classname>SimpleXMLIterator</classname> a el primer elemento.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Rebobinar hasta el primer elemento</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$xmlIterator = new SimpleXMLIterator('<books><book>PHP Básico</book><book>XML Básico</book></books>');
|
||||
$xmlIterator->rewind();
|
||||
|
||||
var_dump($xmlIterator->current());
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
object(SimpleXMLIterator)#2 (1) {
|
||||
[0]=>
|
||||
string(10) "PHP Básico"
|
||||
}
|
||||
]]>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
||||
@@ -1,78 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 14af302c9c0e561fa6f9cdd956268758ba9a89c5 Maintainer: andresdzphp Status: ready -->
|
||||
<!-- Reviewed: no Maintainer: andresdzphp -->
|
||||
<refentry xml:id="simplexmliterator.valid" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>SimpleXMLIterator::valid</refname>
|
||||
<refpurpose>Comprueba si el elemento actual es válido</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>bool</type><methodname>SimpleXMLIterator::valid</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Este mñetodo comprueba si el elemento actual es válido después de llamar a
|
||||
<methodname>SimpleXMLIterator::rewind</methodname> o
|
||||
<methodname>SimpleXMLIterator::next</methodname>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Devuelve &true; si el elemento actual es válido, en caso contrario &false;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Comprobar si el elemento actual es válido</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$xmlIterator = new SimpleXMLIterator('<books><book>SQL Básico</book></books>');
|
||||
|
||||
$xmlIterator->rewind(); // rebobinar hasta el primer elemento
|
||||
echo var_dump($xmlIterator->valid()); // bool(true)
|
||||
|
||||
$xmlIterator->next(); // avanzar al siguiente elemento
|
||||
echo var_dump($xmlIterator->valid()); // bool(false) porque sólo hay un elemento
|
||||
?>
|
||||
]]>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
||||
Reference in New Issue
Block a user