Skip to content

Commit

Permalink
Sync language/predefined section with EN
Browse files Browse the repository at this point in the history
  • Loading branch information
Girgias committed Jan 7, 2024
1 parent 06b5fb7 commit 0e248a7
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 92 deletions.
58 changes: 28 additions & 30 deletions language/predefined/closure.xml
Original file line number Diff line number Diff line change
@@ -1,69 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: b9b08699c16dbe69ede44020ba7678327557edc7 Maintainer: khelaz Status: ready -->
<!-- EN-Revision: 14767af0f05dffa6fdb9b49e1a1f4e9ca7022a60 Maintainer: khelaz Status: ready -->
<!-- Reviewed: no Maintainer: cucinato -->

<phpdoc:classref xml:id="class.closure" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">

<title>La classe Closure</title>
<titleabbrev>Closure</titleabbrev>

<partintro>
<!-- {{{ Closure intro -->

<!-- {{{ Closure intro -->
<section xml:id="closure.intro">
&reftitle.intro;
<para>
Classe usata per rappresentare <link linkend="functions.anonymous">funzioni anonime</link>.
</para>

<para>
Le funzioni anonime, implementate in PHP 5.3, producono oggetti di questo tipo.
Questo fattore era considerato un dettaglio dell'implementazione, ma ora questo dettaglio lo si può sfruttare.
A partire da PHP 5.4, questa classe contiene dei metodi che consentono
Le funzioni anonime producono oggetti di questo tipo.
Questa classe contiene dei metodi che consentono
un ulteriore controllo della funzione anonima dopo che è stata creata.
</para>

<para>
Oltre ai metodi qui elencati, questa classe ha anche un metodo <literal>__invoke</literal>.
Questo è stato implementato per dare coerenza con le altre classi che implementano le
<link linkend="language.oop5.magic.invoke">chiamate magiche</link>, dato che questo metodo
non viene usato per chiamare la funzione.
</para>

</section>
<!-- }}} -->

<section xml:id="closure.synopsis">
&reftitle.classsynopsis;

<!-- {{{ Synopsis -->
<classsynopsis>
<ooclass><classname>Closure</classname></ooclass>

<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<classname>Closure</classname>
</ooclass>
</classsynopsisinfo>
<!-- }}} -->

<classsynopsis class="class">
<ooclass>
<modifier>final</modifier>
<classname>Closure</classname>
</ooclass>

<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.closure')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.closure')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role='Closure'])">
<xi:fallback/>
</xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.closure')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='Closure'])">
<xi:fallback/>
</xi:include>
</classsynopsis>
<!-- }}} -->

</section>

</partintro>

&language.predefined.closure.construct;
&language.predefined.closure.bind;
&language.predefined.closure.bindto;
&language.predefined.closure.call;

</phpdoc:classref>
&language.predefined.closure.fromcallable;

</phpdoc:classref>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
52 changes: 13 additions & 39 deletions language/predefined/closure/bindto.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 57348daadc443b9b529ef2739e995d6852110f85 Maintainer: pastore Status: ready -->
<!-- EN-Revision: 9c74079f12d67cabb52c124d761f48275417d7eb Maintainer: pastore Status: ready -->
<!-- CREDITS: khelaz,cucinato -->
<refentry xml:id="closure.bindto" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand All @@ -11,11 +11,10 @@

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>Closure</type><methodname>Closure::bindTo</methodname>
<methodparam><type>object</type><parameter>newthis</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>newscope</parameter>
<initializer>"static"</initializer></methodparam>
<methodsynopsis role="Closure">
<modifier>public</modifier> <type class="union"><type>Closure</type><type>null</type></type><methodname>Closure::bindTo</methodname>
<methodparam><type class="union"><type>object</type><type>null</type></type><parameter>newThis</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>object</type><type>string</type><type>null</type></type><parameter>newScope</parameter><initializer>"static"</initializer></methodparam>
</methodsynopsis>
<para>
Crea e restituisce una nuova <link linkend="functions.anonymous">funzione
Expand All @@ -30,12 +29,12 @@
sarà in grado di accedere. Ossia, i membri che saranno
visibili sono gli stessi che sarebbero se la funzione anonima fosse un metodo della
classe data come valore dal parametro
<parameter>newscope</parameter>.
<parameter>newScope</parameter>.
</para>

<para>
Le closure statiche non possono avere nessun oggetto associato (il valore del parametro
<parameter>newthis</parameter> deve essere &null;), ma questa funzione può
<parameter>newThis</parameter> deve essere &null;), ma questa funzione può
comunque essere utilizzata per cambiare la loro visibilità.
</para>

Expand All @@ -60,7 +59,7 @@
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>newthis</parameter></term>
<term><parameter>newThis</parameter></term>
<listitem>
<para>
L'oggetto al quale la funzione anonima data dovrebbe essere associata, o
Expand All @@ -69,10 +68,10 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>newscope</parameter></term>
<term><parameter>newScope</parameter></term>
<listitem>
<para>
La visibilità della classe al quale associare la closure deve essere associata, o
L'ambito della classe a cui deve essere associata la closure, o
'static' per mantenere il corrente. Se invece viene dato un oggetto, verrà usato
il tipo dell'oggetto. Questo determina la visibilità dei metodi
protected e private dell'oggetto associato.
Expand All @@ -86,33 +85,8 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Restituisce un nuovo oggetto <classname>Closure</classname> creato.
&return.falseforfailure;
</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>7.0.0</entry>
<entry>
<parameter>newscope</parameter> non può più essere (un oggetto di) una classe
interna, cosa che era possibile prima di questa versione.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
Restituisce un nuovo oggetto <classname>Closure</classname> creato
o &null; in caso di fallimento.
</para>
</refsect1>

Expand All @@ -125,6 +99,7 @@
<?php
class A {
private $val;
function __construct($val) {
$this->val = $val;
}
Expand Down Expand Up @@ -164,7 +139,6 @@ echo $cl(), "\n";
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
18 changes: 4 additions & 14 deletions language/predefined/closure/construct.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 632e5f04e25e5f4ecb51aed9dc5bfd2c6d8d52b2 Maintainer: pastore Status: ready -->
<!-- EN-Revision: 9c74079f12d67cabb52c124d761f48275417d7eb Maintainer: pastore Status: ready -->
<!-- CREDITS: khelaz,cucinato -->
<refentry xml:id="closure.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand All @@ -9,10 +9,10 @@

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<constructorsynopsis role="Closure">
<modifier>private</modifier> <methodname>Closure::__construct</methodname>
<void />
</methodsynopsis>
<void/>
</constructorsynopsis>
<para>
Questo metodo esiste solo per non consentire l'istanziazione della
classe <classname>Closure</classname>. Gli oggetti di questa classe sono creati
Expand All @@ -27,15 +27,6 @@
&no.function.parameters;
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Questo metodo non ha un valore di ritorno; esso semplicemente emette un errore
(di tipo <constant>E_RECOVERABLE_ERROR</constant>).
</para>
</refsect1>


<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
Expand All @@ -46,7 +37,6 @@
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
9 changes: 3 additions & 6 deletions language/predefined/exception/getmessage.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 4eefb1e936f416333e05635b0ca2ac10166fdcec Maintainer: cucinato Status: ready -->

<!-- EN-Revision: 09c49da6f0167fcdfe53a76e3ea28ecfc0eb337b Maintainer: cucinato Status: ready -->
<refentry xml:id="exception.getmessage" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Exception::getMessage</refname>
Expand All @@ -9,9 +8,9 @@

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<methodsynopsis role="Exception">
<modifier>final</modifier> <modifier>public</modifier> <type>string</type><methodname>Exception::getMessage</methodname>
<void />
<void/>
</methodsynopsis>
<para>
Restituisce il messaggio di Exception.
Expand Down Expand Up @@ -65,7 +64,6 @@ Some error message
</para>
</refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand All @@ -86,4 +84,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

2 changes: 2 additions & 0 deletions language/predefined/exceptions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

&language.predefined.exception;
&language.predefined.errorexception;
&language.predefined.closedgeneratorexception;

<!-- If this is updated, you should also update the hierarchy in
language/errors/php7.xml. -->
Expand All @@ -25,6 +26,7 @@
&language.predefined.typeerror;
&language.predefined.valueerror;
&language.predefined.unhandledmatcherror;
&language.predefined.fibererror;
</part>

<!-- Keep this comment at the end of the file
Expand Down
8 changes: 7 additions & 1 deletion language/predefined/interfaces.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: bf28a4ce4f994b3f9c792bd35955f5388af46fcb Maintainer: pastore Status: ready -->
<!-- EN-Revision: ce78d59569fcae6286c46abe1b781a0b6fc594c0 Maintainer: pastore Status: ready -->
<!-- Reviewed: no Maintainer: cucinato -->
<!-- CREDITS: khelaz,cucinato -->
<part xml:id="reserved.interfaces" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
Expand All @@ -15,14 +15,20 @@
&language.predefined.traversable;
&language.predefined.iterator;
&language.predefined.iteratoraggregate;
&language.predefined.internaliterator;
&language.predefined.throwable;
&language.predefined.arrayaccess;
&language.predefined.serializable;
&language.predefined.closure;
&language.predefined.stdclass;
&language.predefined.generator;
&language.predefined.fiber;
&language.predefined.weakreference;
&language.predefined.weakmap;
&language.predefined.stringable;
&language.predefined.unitenum;
&language.predefined.backedenum;
&language.predefined.sensitiveparametervalue;

</part>

Expand Down
22 changes: 20 additions & 2 deletions language/predefined/variables/argc.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: cb0630b14901459c0bf1556e7d68f1b4c0d3796e Maintainer: MatteoGazzeri Status: ready -->
<!-- EN-Revision: a6d209f4ff71ccba3f1255902827f5df3e092ff9 Maintainer: MatteoGazzeri Status: ready -->

<refentry role="variable" xml:id="reserved.variables.argc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand Down Expand Up @@ -51,7 +51,25 @@ int(4)
</example>
</para>
</refsect1>

<refsect1 role="notes">
&reftitle.notes;
<note>
<para>
È disponibile anche come <varname>$_SERVER['argc']</varname>.
</para>
</note>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>getopt</function></member>
<member><link linkend="reserved.variables.argv"><varname>$argv</varname></link></member>
</simplelist>
</para>
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Expand Down

0 comments on commit 0e248a7

Please sign in to comment.