Skip to content

Commit 4dad89e

Browse files
committed
Sync with EN
1 parent 5d6a407 commit 4dad89e

File tree

6 files changed

+79
-17
lines changed

6 files changed

+79
-17
lines changed

appendices/tokens.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- EN-Revision: 8a6397d39aefd23c61d64aa4e9af919772541e2a Maintainer: sobak Status: ready -->
2+
<!-- EN-Revision: 9418ae19ae6ab1d3f1536db986830362b207b1d6 Maintainer: sobak Status: ready -->
33
<!-- $Revision$ -->
44

55
<appendix xml:id="tokens" xmlns="http://docbook.org/ns/docbook">
@@ -712,6 +712,13 @@ defined('T_FN') || define('T_FN', 10001);
712712
property hooks (dostępne od PHP 8.4.0)
713713
</entry>
714714
</row>
715+
<row xml:id="constant.t-property-c">
716+
<entry><constant>T_PROPERTY_C</constant></entry>
717+
<entry>__PROPERTY__</entry>
718+
<entry>
719+
<link linkend="language.constants.predefined">stałe magiczne</link>
720+
</entry>
721+
</row>
715722
<row xml:id="constant.t-protected">
716723
<entry><constant>T_PROTECTED</constant></entry>
717724
<entry>protected</entry>

language/errors/php7.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- EN-Revision: 1f7a0e4af85d1b74595626afa1ca774c896e8388 Maintainer: sobak Status: ready -->
2+
<!-- EN-Revision: 4bf789e981af0836c41daa16e57ef86c21497faa Maintainer: sobak Status: ready -->
33
<!-- $Revision$ -->
44

55
<sect1 xml:id="language.errors.php7" xmlns="http://docbook.org/ns/docbook">
@@ -76,6 +76,9 @@
7676
<listitem>
7777
<simpara><classname>FiberError</classname></simpara>
7878
</listitem>
79+
<listitem>
80+
<simpara><classname>RequestParseBodyException</classname></simpara>
81+
</listitem>
7982
</itemizedlist>
8083
</listitem>
8184
<listitem>

language/oop5/anonymous.xml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- EN-Revision: a9edd62d087ab1eb6292c795b7256e14ff9f1234 Maintainer: sobak Status: ready -->
2+
<!-- EN-Revision: a058684525563674d49fcfce7ce22d1183ee0a31 Maintainer: sobak Status: ready -->
33
<sect1 xml:id="language.oop5.anonymous" xmlns="http://docbook.org/ns/docbook">
44
<title>Klasy anonimowe</title>
55

@@ -174,6 +174,34 @@ class@anonymous/in/oNi1A0x7f8636ad2021
174174
</screen>
175175
</informalexample>
176176
</note>
177+
178+
<sect2 xml:id="language.oop5.anonymous.readonly">
179+
<title>Klasy anonimowe readonly</title>
180+
<simpara>
181+
Od PHP 8.3.0 modyfikator <literal>readonly</literal> można
182+
stosować z klasami anonimowymi.
183+
</simpara>
184+
<example xml:id="language.oop5.anonymous.readonly.example">
185+
<title>Deklarowanie klasy anonimowej jako readonly</title>
186+
<programlisting role="php">
187+
<![CDATA[
188+
<?php
189+
190+
// Użycie klasy anonimowej
191+
$util->setLogger(new readonly class('[DEBUG]') {
192+
public function __construct(private string $prefix)
193+
{
194+
}
195+
196+
public function log($msg)
197+
{
198+
echo $this->prefix . ' ' . $msg;
199+
}
200+
});
201+
]]>
202+
</programlisting>
203+
</example>
204+
</sect2>
177205
</sect1>
178206
<!-- Keep this comment at the end of the file
179207
Local variables:

language/oop5/autoload.xml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- EN-Revision: ce3a2d381693ccbc10cc4a808c3eb853f3c85c9e Maintainer: sobak Status: ready -->
2+
<!-- EN-Revision: 7befd9af043386158ef9080723eb18e03f0625c7 Maintainer: sobak Status: ready -->
33
<sect1 xml:id="language.oop5.autoload" xmlns="http://docbook.org/ns/docbook">
44
<title>Autoloading klas</title>
55
<para>
@@ -79,6 +79,26 @@ string(5) "ITest"
7979
Fatal error: Interface 'ITest' not found in ...
8080
*/
8181
?>
82+
]]>
83+
</programlisting>
84+
</example>
85+
<example>
86+
<title>Używanie autoloadingu Composera</title>
87+
<simpara>
88+
&link.composer; generuje <literal>vendor/autoload.php</literal>,
89+
który automatycznie ładuje paczki zarządzane przez
90+
Composera. Dołączając ten plik można używać tych paczek bez
91+
żadnych dodatkowych wymagań.
92+
</simpara>
93+
<programlisting role="php">
94+
<![CDATA[
95+
<?php
96+
require __DIR__ . '/vendor/autoload.php';
97+
98+
$uuid = new Ramsey\Uuid\Uuid::uuid7();
99+
100+
echo "Wygenerowano nowy UUID -> ", $uuid->toString(), "\n";
101+
?>
82102
]]>
83103
</programlisting>
84104
</example>

language/oop5/interfaces.xml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- EN-Revision: 2e7c00fd314a708ecbd495ef7cc9ae8c8462c33c Maintainer: sobak Status: ready -->
2+
<!-- EN-Revision: 0c2a0d736df56dd0f3a1b88bd6ce7c975c38285a Maintainer: sobak Status: ready -->
33
<sect1 xml:id="language.oop5.interfaces" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
44
<title>Interfejsy obiektów</title>
55
<para>
66
Interfejsy obiektów pozwalają na stworzenie kodu, który określa jakie metody i właściwości
77
musi implementować klasa, bez konieczności określenia jak te metody lub właściwości mają być
8-
zaimplementowane. Interfejsy współdzielą przestrzeń nazw z klasami i traitami, więc nie
8+
zaimplementowane. Interfejsy współdzielą przestrzeń nazw z klasami, traitami i enumami, więc nie
99
mogą używać takich samych nazw.
1010
</para>
1111
<para>
@@ -153,15 +153,19 @@ class C2 implements I
153153
// Ten przykład tworzy właściwość wirtualną, co jest poprawne.
154154
public string $writeable {
155155
get => $this->written;
156-
set => $value;
156+
set {
157+
$this->written = $value;
158+
}
157159
}
158160
159161
// Ta właściwość wymaga, aby możliwy był odczyt i zapis,
160162
// więc musimy zaimplementować obie operacje lub pozwolić jej
161163
// na domyślne zachowanie.
162164
public string $both {
163165
get => $this->all;
164-
set => strtoupper($value);
166+
set {
167+
$this->all = strtoupper($value);
168+
}
165169
}
166170
}
167171
?>

language/operators/arithmetic.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- EN-Revision: 43d07782b514d0c7a8487f2c74063739f302df8d Maintainer: sobak Status: ready -->
2+
<!-- EN-Revision: c35ad60a7f790d735bbdca01c6baaf65d4867330 Maintainer: sobak Status: ready -->
33
<sect1 xml:id="language.operators.arithmetic">
44
<title>Operatory arytmetyczne</title>
55
<titleabbrev>Arytmetyczne</titleabbrev>
@@ -19,45 +19,45 @@
1919
</thead>
2020
<tbody>
2121
<row>
22-
<entry>+$a</entry>
22+
<entry><code>+$a</code></entry>
2323
<entry>Identity</entry>
2424
<entry>
2525
Conversion of <varname>$a</varname> to <type>int</type> or
2626
<type>float</type> as appropriate.
2727
</entry>
2828
</row>
2929
<row>
30-
<entry>-$a</entry>
30+
<entry><code>-$a</code></entry>
3131
<entry>Negacja</entry>
3232
<entry>Odwrotność <varname>$a</varname>.</entry>
3333
</row>
3434
<row>
35-
<entry>$a + $b</entry>
35+
<entry><code>$a + $b</code></entry>
3636
<entry>Dodawanie</entry>
3737
<entry>Suma <varname>$a</varname> i <varname>$b</varname>.</entry>
3838
</row>
3939
<row>
40-
<entry>$a - $b</entry>
40+
<entry><code>$a - $b</code></entry>
4141
<entry>Odejmowanie</entry>
4242
<entry>Difference of <varname>$a</varname> i <varname>$b</varname>.</entry>
4343
</row>
4444
<row>
45-
<entry>$a * $b</entry>
45+
<entry><code>$a * $b</code></entry>
4646
<entry>Mnożenie</entry>
4747
<entry>Iloczyn <varname>$a</varname> i <varname>$b</varname>.</entry>
4848
</row>
4949
<row>
50-
<entry>$a / $b</entry>
50+
<entry><code>$a / $b</code></entry>
5151
<entry>Dzielenie</entry>
5252
<entry>Iloraz <varname>$a</varname> i <varname>$b</varname>.</entry>
5353
</row>
5454
<row>
55-
<entry>$a % $b</entry>
55+
<entry><code>$a % $b</code></entry>
5656
<entry>Modulo</entry>
5757
<entry>Reszta z <varname>$a</varname> podzielonego przez <varname>$b</varname>.</entry>
5858
</row>
5959
<row>
60-
<entry>$a ** $b</entry>
60+
<entry><code>$a ** $b</code></entry>
6161
<entry>Potęgowanie</entry>
6262
<entry>Wynik podniesienia <varname>$a</varname> do potęgi <varname>$b</varname>.</entry>
6363
</row>

0 commit comments

Comments
 (0)