Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPL sync with EN #1940

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 9eb4a46bba05da229be4c8f7a3cb64702e1a2f95 Maintainer: dams Status: ready -->
<!-- EN-Revision: 267a3d4e60d8a6da941e72d195386b5841052cca Maintainer: dams Status: ready -->
<!-- Reviewed: yes -->
<reference xml:id="class.countable" role="class" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">

Expand Down Expand Up @@ -39,7 +39,7 @@

</partintro>

&reference.spl.entities.countable;
&language.predefined.countable.count;

</reference>
<!-- Keep this comment at the end of the file
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: d51166ca16fda8e766849505b84f9306ef443f71 Maintainer: yannick Status: ready -->
<!-- EN-Revision: 267a3d4e60d8a6da941e72d195386b5841052cca Maintainer: yannick Status: ready -->
<!-- Reviewed: yes -->
<refentry xml:id="countable.count" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refentry xml:id="countable.count" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Countable::count</refname>
<refpurpose>Compte le nombre d'éléments d'un objet</refpurpose>
Expand All @@ -14,12 +14,11 @@
<modifier>public</modifier> <type>int</type><methodname>Countable::count</methodname>
<void/>
</methodsynopsis>
<para>
<function>Countable::count</function> est exécutée lorsque
la fonction <function>count</function> est appelée
sur un objet qui implémente l'interface
<simpara>
Cette méthode est exécutée lorsque le <parameter>value</parameter> pour
<function>count</function> est un objet implémentant
<classname>Countable</classname>.
</para>
</simpara>
</refsect1>

<refsect1 role="parameters">
Expand All @@ -29,41 +28,36 @@

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
Le nombre compté, sous forme <type>int</type>.
</para>
<note>
<para>
La valeur retournée est forcée en <type>int</type>.
</para>
</note>
</simpara>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Exemple avec <function>Countable::count</function></title>
<programlisting role="php">
<example>
<title>Exemple avec <function>Countable::count</function></title>
<programlisting role="php">
<![CDATA[
<?php
class myCounter implements Countable {
class Counter implements Countable {
private $count = 0;

public function count() {
return ++$this->count;
}
}

$counter = new myCounter;

for($i=0; $i<10; ++$i) {
for ($i = 0; $i < 10; ++$i) {
echo "J'ai été compté " . count($counter) . " fois\n";
}
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
J'ai été compté 1 fois
J'ai été compté 2 fois
Expand All @@ -76,9 +70,8 @@ J'ai été compté 8 fois
J'ai été compté 9 fois
J'ai été compté 10 fois
]]>
</screen>
</example>
</para>
</screen>
</example>
</refsect1>

</refentry>
Expand Down
3 changes: 2 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: 26e26a95fdc3aac9b464068953ea3105dee00f14 Maintainer: girgias Status: ready -->
<!-- EN-Revision: 267a3d4e60d8a6da941e72d195386b5841052cca Maintainer: girgias Status: ready -->
<!-- Reviewed: yes -->

<part xml:id="reserved.interfaces" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
Expand All @@ -17,6 +17,7 @@
&language.predefined.iteratoraggregate;
&language.predefined.internaliterator;
&language.predefined.throwable;
&language.predefined.countable;
&language.predefined.arrayaccess;
&language.predefined.serializable;
&language.predefined.closure;
Expand Down
4 changes: 1 addition & 3 deletions reference/spl/interfaces.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 14af302c9c0e561fa6f9cdd956268758ba9a89c5 Maintainer: dams Status: ready -->
<!-- EN-Revision: 267a3d4e60d8a6da941e72d195386b5841052cca Maintainer: dams Status: ready -->
<!-- Reviewed: yes -->

<part xml:id="spl.interfaces" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
Expand All @@ -13,7 +13,6 @@
<section xml:id="spl.interfaces.list">
&spl.interfaces.list;
<simplelist>
<member><classname>Countable</classname></member>
<member><classname>OuterIterator</classname></member>
<member><classname>RecursiveIterator</classname></member>
<member><classname>SeekableIterator</classname></member>
Expand All @@ -24,7 +23,6 @@

</partintro>

&reference.spl.countable;
&reference.spl.outeriterator;
&reference.spl.recursiveiterator;
&reference.spl.seekableiterator;
Expand Down