Skip to content

Commit 15a8683

Browse files
committed
sync with en revision
1 parent 5cd031d commit 15a8683

File tree

9 files changed

+45
-57
lines changed

9 files changed

+45
-57
lines changed

reference/random/book.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: 550b9c3c31a66c18c9303794c12260bf5c684fed Maintainer: leonardolara Status: ready --><!-- CREDITS: fernandowobeto, leonardolara -->
2-
<book xml:id="book.random" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
1+
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: 1bcc40f8134305cbebf6c8378ee7e5fc8c569674 Maintainer: leonardolara Status: ready --><!-- CREDITS: fernandowobeto, leonardolara -->
2+
<book xml:id="book.random" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" annotations="interactive">
33
<?phpdoc extension-membership="core" ?>
44
<title>Geradores de números aleatórios e funções relacionadas à aleatoriedade</title>
55
<titleabbrev>Random</titleabbrev>

reference/random/examples.xml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,43 @@
1-
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: 2166824858a40ea664c558f2930b63b8f4fd89c6 Maintainer: fernandowobeto Status: ready --><!-- CREDITS: fernandowobeto -->
1+
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: 1bcc40f8134305cbebf6c8378ee7e5fc8c569674 Maintainer: leonardolara Status: ready --><!-- CREDITS: fernandowobeto, leonardolara -->
22
<chapter xml:id="random.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
33
&reftitle.examples;
44
<example>
55
<title>Exemplo de Random</title>
66
<programlisting role="php">
77
<![CDATA[
88
<?php
9+
$r = new \Random\Randomizer();
910
10-
/* ... */
11+
// Gerando um nome de domínio aleatório
12+
printf(
13+
"%s.example.com\n",
14+
$r->getBytesFromString('abcdefghijklmnopqrstuvwxyz0123456789', 16)
15+
);
1116
17+
// Embaralhando um array:
18+
$fruits = [ 'vermelho' => '🍎', 'verde' => '🥝', 'amarelo' => '🍌', 'rosa' => '🍑', 'roxo' => '🍇' ];
19+
echo "Salada: ", implode(', ', $r->shuffleArray($fruits)), "\n";
20+
21+
// Embaralhando chaves de array
22+
$fruits = [ 'vermelho' => '🍎', 'verde' => '🥝', 'amarelo' => '🍌', 'rosa' => '🍑', 'roxo' => '🍇' ];
23+
24+
$keys = $r->pickArrayKeys($fruits, 2);
25+
// Procurando os valores para as chaves escolhidas.
26+
$selection = array_map(
27+
static fn ($key) => $fruits[$key],
28+
$keys
29+
);
30+
31+
echo "Valores: ", implode(', ', $selection), "\n";
1232
?>
1333
]]>
1434
</programlisting>
1535
&example.outputs.similar;
1636
<screen>
1737
<![CDATA[
18-
...
38+
j87fzv1p0daiwmlo.example.com
39+
Salada: 🥝, 🍇, 🍎, 🍌, 🍑
40+
Valores: 🍌, 🍑
1941
]]>
2042
</screen>
2143
</example>

reference/random/random/engine/mt19937/construct.xml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: c4f24e2eef1a3c970c491c0ee8cbc1f290ff023a Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
1+
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: 1bcc40f8134305cbebf6c8378ee7e5fc8c569674 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
22
<refentry xml:id="random-engine-mt19937.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
33
<refnamediv>
44
<refname>Random\Engine\Mt19937::__construct</refname>
@@ -17,9 +17,6 @@
1717
</para>
1818

1919
&caution.mt19937-tiny-seed;
20-
21-
&warn.undocumented.func;
22-
2320
</refsect1>
2421

2522
<refsect1 role="parameters">
@@ -77,7 +74,7 @@
7774

7875
<refsect1 role="examples">
7976
&reftitle.examples;
80-
<example>
77+
<example annotations="non-interactive">
8178
<title>Exemplo de <function>Random\Engine\Mt19937::__construct</function></title>
8279
<programlisting role="php">
8380
<![CDATA[

reference/random/random/engine/pcgoneseq128xslrr64/construct.xml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: 826073522514072830b63bee2b6135dc675ea45d Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
1+
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: 1bcc40f8134305cbebf6c8378ee7e5fc8c569674 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
22
<refentry xml:id="random-engine-pcgoneseq128xslrr64.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
33
<refnamediv>
44
<refname>Random\Engine\PcgOneseq128XslRr64::__construct</refname>
@@ -14,9 +14,6 @@
1414
<para>
1515

1616
</para>
17-
18-
&warn.undocumented.func;
19-
2017
</refsect1>
2118

2219
<refsect1 role="parameters">
@@ -92,7 +89,7 @@
9289

9390
<refsect1 role="examples">
9491
&reftitle.examples;
95-
<example>
92+
<example annotations="non-interactive">
9693
<title>Exemplo de <function>Random\Engine\PcgOneseq128XslRr64::__construct</function></title>
9794
<programlisting role="php">
9895
<![CDATA[

reference/random/random/engine/xoshiro256starstar/construct.xml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: 826073522514072830b63bee2b6135dc675ea45d Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
1+
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: 1bcc40f8134305cbebf6c8378ee7e5fc8c569674 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
22
<refentry xml:id="random-engine-xoshiro256starstar.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
33
<refnamediv>
44
<refname>Random\Engine\Xoshiro256StarStar::__construct</refname>
@@ -14,9 +14,6 @@
1414
<para>
1515

1616
</para>
17-
18-
&warn.undocumented.func;
19-
2017
</refsect1>
2118

2219
<refsect1 role="parameters">
@@ -98,7 +95,7 @@
9895

9996
<refsect1 role="examples">
10097
&reftitle.examples;
101-
<example>
98+
<example annotations="non-interactive">
10299
<title>Exemplo de <function>Random\Engine\Xoshiro256StarStar::__construct</function></title>
103100
<programlisting role="php">
104101
<![CDATA[

reference/random/random/randomizer/construct.xml

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: 5e2031dc70157464c05c1c1e00b3201604a025f1 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
1+
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: 1bcc40f8134305cbebf6c8378ee7e5fc8c569674 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
22
<refentry xml:id="random-randomizer.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
33
<refnamediv>
44
<refname>Random\Randomizer::__construct</refname>
@@ -37,37 +37,18 @@
3737
</variablelist>
3838
</refsect1>
3939

40-
<!-- Return values commented out, as constructors generally don't return a
41-
value. Uncomment this if you do need a return values section (for
42-
example, because there's also a procedural version of the method).
43-
<refsect1 role="returnvalues">
44-
&reftitle.returnvalues;
45-
<para>
46-
47-
</para>
48-
</refsect1>
49-
-->
50-
51-
5240
<refsect1 role="examples">
5341
&reftitle.examples;
54-
<example>
42+
<example annotations="non-interactive">
5543
<title>Exemplo de <function>Random\Randomizer::__construct</function></title>
5644
<programlisting role="php">
5745
<![CDATA[
5846
<?php
59-
60-
/* ... */
61-
47+
$r = new \Random\Randomizer();
48+
$r = new \Random\Randomizer(new \Random\Engine\Mt19937());
6249
?>
6350
]]>
6451
</programlisting>
65-
&example.outputs.similar;
66-
<screen>
67-
<![CDATA[
68-
...
69-
]]>
70-
</screen>
7152
</example>
7253
</refsect1>
7354

reference/random/random/randomizer/getint.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: 0ec8e36e0f649354b20c714080a903d32df4dbfb Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
1+
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: 1bcc40f8134305cbebf6c8378ee7e5fc8c569674 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
22
<refentry xml:id="random-randomizer.getint" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
33
<refnamediv>
44
<refname>Random\Randomizer::getInt</refname>
@@ -15,9 +15,6 @@
1515
<para>
1616

1717
</para>
18-
19-
&warn.undocumented.func;
20-
2118
</refsect1>
2219

2320
<refsect1 role="parameters">

reference/random/random/randomizer/nextint.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: 788ec8e5e7bdadd182e52d4820959e21765d7ff3 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
1+
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: 1bcc40f8134305cbebf6c8378ee7e5fc8c569674 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
22
<refentry xml:id="random-randomizer.nextint" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
33
<refnamediv>
44
<refname>Random\Randomizer::nextInt</refname>
@@ -14,9 +14,6 @@
1414
<para>
1515

1616
</para>
17-
18-
&warn.undocumented.func;
19-
2017
</refsect1>
2118

2219
<refsect1 role="parameters">

reference/reflection/book.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- EN-Revision: e0e74c05cb704b614ff6925552884fbffb26bb53 Maintainer: leonardolara Status: ready --><!-- CREDITS: adiel,fernandowobeto,leonardolara -->
2+
<!-- EN-Revision: 1bcc40f8134305cbebf6c8378ee7e5fc8c569674 Maintainer: leonardolara Status: ready --><!-- CREDITS: adiel,fernandowobeto,leonardolara -->
33

4-
<book xml:id="book.reflection" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
4+
<book xml:id="book.reflection" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" annotations="interactive">
55
<?phpdoc extension-membership="core" ?>
66
<title>Reflexão</title>
77
<titleabbrev>Reflexão</titleabbrev>
@@ -15,10 +15,10 @@
1515
recuperar comentários de documentação para as funções, classes e métodos.
1616
</para>
1717
<para>
18-
Por favor note que algumas partes da <acronym>API</acronym>
19-
está faltando o código necessário para executar a extensão de reflexão.
20-
Por exemplo, uma classe PHP interna pode estar faltando dados de reflexão para as
21-
propriedades. Estes são poucos casos que são considerados bugs, não entando, devem
18+
Favor observar que em algumas partes da <acronym>API</acronym> interna
19+
falta o código necessário para funcionar com a extensão de reflexão.
20+
Por exemplo, uma classe interna do PHP pode estar com dados de reflexão faltando para
21+
propriedades. Porém, estes poucos casos são considerados bugs e devem, portanto,
2222
ser descobertos e corrigidos.
2323
</para>
2424
</preface>

0 commit comments

Comments
 (0)