svn: /phpdoc/de/trunk/reference/array/functions/ array-filter.xml array-search.xml array-shift.xml

[email protected] (Oliver Albers)
Newsgroups php.doc.de
Message-ID <[email protected]>
simp                                     Mon, 24 May 2010 19:14:59 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=299711

Log:
Taking ownership, sync to EN

Changed paths:
    U   phpdoc/de/trunk/reference/array/functions/array-filter.xml
    U   phpdoc/de/trunk/reference/array/functions/array-search.xml
    U   phpdoc/de/trunk/reference/array/functions/array-shift.xml
svn-diffs-299711.txt (text/x-diff, 18.7 KB)
Modified: phpdoc/de/trunk/reference/array/functions/array-filter.xml
===================================================================
--- phpdoc/de/trunk/reference/array/functions/array-filter.xml	2010-05-24 19:12:19 UTC (rev 299710)
+++ phpdoc/de/trunk/reference/array/functions/array-filter.xml	2010-05-24 19:14:59 UTC (rev 299711)
@@ -1,30 +1,83 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
-<!-- EN-Revision: n/a Maintainer: nobody Status: ready -->
+<!-- EN-Revision: 297028 Maintainer: simp Status: ready -->
 <!-- CREDITS: tom -->
-  <refentry xml:id="function.array-filter" xmlns="http://docbook.org/ns/docbook">
-   <refnamediv>
-    <refname>array_filter</refname>
-    <refpurpose>Filtert Elemente eines Arrays mittels einer Callback-Funktion</refpurpose>
-   </refnamediv>
-   <refsect1 role="description">
-    &reftitle.description;
-     <methodsynopsis>
-      <type>array</type><methodname>array_filter</methodname>
-      <methodparam><type>array</type><parameter>input</parameter></methodparam>
-      <methodparam choice="opt"><type>callback</type><parameter>callback</parameter></methodparam>
-     </methodsynopsis>
-    <para>
-     <function>array_filter</function> übergibt nacheinander alle Werte in dem
-     Array <parameter>input</parameter> and die <parameter>callback</parameter>
-     Funktion. Gibt die <parameter>callback</parameter> Funktion true zurück,
-     wird der aktuelle Wert von <parameter>input</parameter> in das Ergebnis-Array
-     geschrieben. Die Schlüssel des Arrays bleiben erhalten.
-    </para>
-    <para>
-     <example>
-      <title><function>array_filter</function></title>
-      <programlisting role="php">
+<refentry xml:id="function.array-filter" xmlns="http://docbook.org/ns/docbook">
+ <refnamediv>
+  <refname>array_filter</refname>
+  <refpurpose>Filtert Elemente eines Arrays mittels einer Callback-Funktion</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+  &reftitle.description;
+  <methodsynopsis>
+   <type>array</type><methodname>array_filter</methodname>
+   <methodparam><type>array</type><parameter>input</parameter></methodparam>
+   <methodparam choice="opt"><type>callback</type><parameter>callback</parameter></methodparam>
+  </methodsynopsis>
+  <para>
+   Iteriert über jeden Wert im Array <parameter>input</parameter>
+   und übergibt diesen der Callbackfunktion <parameter>callback</parameter>.
+   Gibt die Funktion <parameter>callback</parameter> true zurück, so
+   wird der aktuelle Wert von <parameter>input</parameter> in das
+   Ergebnis-Array geschrieben. Die Schlüssel des Arrays bleiben erhalten.
+  </para>
+</refsect1>
+
+ <refsect1 role="parameters">
+  &reftitle.parameters;
+  <para>
+   <variablelist>
+
+    <varlistentry>
+     <term><parameter>input</parameter></term>
+     <listitem>
+      <para>
+       Das Array, über das iteriert werden soll
+      </para>
+     </listitem>
+    </varlistentry>
+
+    <varlistentry>
+     <term><parameter>callback</parameter></term>
+     <listitem>
+      <para>
+       Die zu verwendende Callbackfunktion
+      </para>
+      <para>
+       Falls die Funktion <parameter>callback</parameter> nicht angegeben wurde,
+       werden alle Einträge des Arrays entfernt, die &false; sind.
+       Schauen Sie sich <link
+       linkend="language.types.boolean.casting">Konvertierung in Booleans</link>
+       für mehr Informationen hierzu an.
+      </para>
+     </listitem>
+    </varlistentry>
+
+   </variablelist>
+  </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+  &reftitle.returnvalues;
+  <para>
+   Gibt das gefilterte Array zurück.
+  </para>
+ </refsect1>
+
+<!--
+ <refsect1 role="errors">
+  &reftitle.errors;
+  &errors.no.unusual.errors;
+ </refsect1>
+-->
+
+ <refsect1 role="examples">
+  &reftitle.examples;
+  <para>
+   <example>
+    <title><function>array_filter</function>-Beispiel</title>
+    <programlisting role="php">
 <![CDATA[
 <?php
 function ungerade($var)
@@ -46,9 +99,9 @@
 print_r(array_filter($array2, "gerade"));
 ?>
 ]]>
-      </programlisting>
-      &example.outputs;
-      <screen role="php">
+    </programlisting>
+    &example.outputs;
+    <screen role="php">
 <![CDATA[
 Ungerade :
 Array
@@ -66,28 +119,12 @@
     [6] => 12
 )
 ]]>
-      </screen>
-     </example>
-    </para>
-    <para>
-     Von der Benutzerfunktion aus darf das Array selbst nicht geändert
-     werden, wie zum Beispiel durch Hinzufügen oder Löschen eines
-     Elementes, oder auch Löschen des Arrays, auf das
-     <function>array_filter</function> angewendet wird. Ist das Array
-     geändert, so ist das Verhalten dieser Funktion undefiniert.
-    </para>
-    <para>
-     Falls die Function <parameter>callback</parameter> nicht angegeben wurde,
-     wird <function>array_filter</function> alle Einträge aus dem Array
-     entfernen, die &false; sind. Schauen Sie sich <link
-     linkend="language.types.boolean.casting">Konvertierung in Booleans</link>
-     für mehr Informationen hierzu an.
-    </para>
-    <para>
-     <example>
-      <title><function>array_filter</function> ohne
-      <parameter>callback</parameter></title>
-      <programlisting role="php">
+    </screen>
+   </example>
+   <example>
+    <title><function>array_filter</function> ohne
+    <parameter>callback</parameter></title>
+    <programlisting role="php">
 <![CDATA[
 <?php

@@ -102,9 +139,9 @@
 print_r(array_filter($entry));
 ?>
 ]]>
-      </programlisting>
-      &example.outputs;
-      <screen>
+    </programlisting>
+    &example.outputs;
+    <screen>
 <![CDATA[
 Array
 (
@@ -112,16 +149,35 @@
     [2] => -1
 )
 ]]>
-      </screen>
-     </example>
-     </para>
-    <para>
-     Siehe auch <function>array_map</function>,
-     <function>array_reduce</function> und <function>array_walk</function>.
-    </para>
-   </refsect1>
-  </refentry>
+    </screen>
+   </example>
+  </para>
+ </refsect1>

+ <refsect1 role="notes">
+  &reftitle.notes;
+  <caution>
+   <para>
+    Wird das Array durch die Callbackfunktion verändert (z.B. hinzufügen
+    oder löschen von Elementen oder ein unset-Aufruf), so ist das
+    Verhalten dieser Funktion undefiniert.
+   </para>
+  </caution>
+ </refsect1>
+
+ <refsect1 role="seealso">
+  &reftitle.seealso;
+  <para>
+   <simplelist>
+    <member><function>array_map</function></member>
+    <member><function>array_reduce</function></member>
+    <member><function>array_walk</function></member>
+   </simplelist>
+  </para>
+ </refsect1>
+
+</refentry>
+
 <!-- Keep this comment at the end of the file
 Local variables:
 mode: sgml
@@ -133,7 +189,7 @@
 sgml-indent-data:t
 indent-tabs-mode:nil
 sgml-parent-document:nil
-sgml-default-dtd-file:"../../../../manual.ced"
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
 sgml-exposed-tags:nil
 sgml-local-catalogs:nil
 sgml-local-ecat-files:nil

Modified: phpdoc/de/trunk/reference/array/functions/array-search.xml
===================================================================
--- phpdoc/de/trunk/reference/array/functions/array-search.xml	2010-05-24 19:12:19 UTC (rev 299710)
+++ phpdoc/de/trunk/reference/array/functions/array-search.xml	2010-05-24 19:14:59 UTC (rev 299711)
@@ -1,75 +1,140 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
-<!-- EN-Revision: n/a Maintainer: nobody Status: ready -->
+<!-- EN-Revision: 297786 Maintainer: simp Status: ready -->
 <!-- CREDITS: tom -->
-  <refentry xml:id="function.array-search" xmlns="http://docbook.org/ns/docbook">
-   <refnamediv>
-    <refname>array_search</refname>
-    <refpurpose>Durchsucht ein Array nach einem Wert liefert bei Erfolg den
-     Schlüssel</refpurpose>
-   </refnamediv>
-   <refsect1 role="description">
-    &reftitle.description;
-     <methodsynopsis>
-      <type>mixed</type><methodname>array_search</methodname>
-      <methodparam><type>mixed</type><parameter>needle</parameter></methodparam>
-      <methodparam><type>array</type><parameter>haystack</parameter></methodparam>
-      <methodparam choice="opt"><type>bool</type><parameter>strict</parameter></methodparam>
-     </methodsynopsis>
-    <para>
-     Diese Funktion durchsucht <parameter>haystack</parameter> nach
-     <parameter>needle</parameter> und gibt bei Erfolg den Schlüssel
-     zurück, andernfalls &false;.
-    </para>
-    <note>
-     <para>
-      Falls <parameter>needle</parameter> ein String ist, wird der Vergleich
-      unter Beachtung der Groß-/Kleinschreibung durchgeführt.
-     </para>
-    </note>
-    <note>
-     <para>
-      Vor PHP 4.2.0 gibt <function>array_search</function> im Fehlerfall
-      &null; statt &false; zurück.
-     </para>
-    </note>
-    <para>
-     Ist der optionale dritte Parameter <parameter>strict</parameter>
-     auf &true; gesetzt, prüft <function>array_search</function>
-     auch die Typen von <parameter>needle</parameter> in
-     <parameter>haystack</parameter>.
-    </para>
-    <para>
-     Falls <parameter>needle</parameter> in <parameter>haystack</parameter>
-     mehr als einmal gefunden wird, wird der erste passende Schlüssel
-     zurückgegeben. Um die Schlüssel aller passenden Werte zu erhalten,
-     verwenden Sie stattdessen <function>array_keys</function> mit dem
-     optionalen Parameter <parameter>search_value</parameter>.
-    </para>
-    <para>
-     <example>
-      <title><function>array_search</function> Beispiel</title>
-      <programlisting role="php">
+<refentry xml:id="function.array-search" xmlns="http://docbook.org/ns/docbook">
+ <refnamediv>
+  <refname>array_search</refname>
+  <refpurpose>Durchsucht ein Array nach einem Wert und liefert bei Erfolg den
+     zugehörigen Schlüssel</refpurpose>
+ </refnamediv>
+ <refsect1 role="description">
+  &reftitle.description;
+  <methodsynopsis>
+   <type>mixed</type><methodname>array_search</methodname>
+   <methodparam><type>mixed</type><parameter>needle</parameter></methodparam>
+   <methodparam><type>array</type><parameter>haystack</parameter></methodparam>
+   <methodparam choice="opt"><type>bool</type><parameter>strict</parameter></methodparam>
+  </methodsynopsis>
+  <para>
+   Durchsucht <parameter>haystack</parameter> nach
+   <parameter>needle</parameter>.
+  </para>
+ </refsect1>
+ <refsect1 role="parameters">
+  &reftitle.parameters;
+  <para>
+   <variablelist>
+    <varlistentry>
+     <term><parameter>needle</parameter></term>
+     <listitem>
+      <para>
+       Der zu suchende Wert.
+      </para>
+      <note>
+       <para>
+        Wenn <parameter>needle</parameter> ein String ist, wird der Vergleich
+        unter Berücksichtigung der Groß-/Kleinschreibung vorgenommen.
+       </para>
+      </note>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><parameter>haystack</parameter></term>
+     <listitem>
+      <para>
+       Das Array.
+      </para>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><parameter>strict</parameter></term>
+     <listitem>
+      <para>
+       Ist der dritte Parameter <parameter>strict</parameter> auf &true;
+       gesetzt, so wird <function>array_search</function> nach
+       <emphasis>identischen</emphasis> Elementen in
+       <parameter>haystack</parameter> suchen. Das bedeutet, dass
+       ebenfalls der
+       <link linkend="language.types">Typ</link> von
+       <parameter>needle</parameter> dem in
+       <parameter>haystack</parameter> entsprechen muss und
+       Objekte die selbe Instanz sind.
+      </para>
+     </listitem>
+    </varlistentry>
+   </variablelist>
+  </para>
+ </refsect1>
+ <refsect1 role="returnvalues">
+  &reftitle.returnvalues;
+  <para>
+   Gibt den Schlüssel für <parameter>needle</parameter> zurück, wenn es
+   gefunden wurde, ansonsten &false;.
+  </para>
+  <para>
+   Wenn <parameter>needle</parameter> in <parameter>haystack</parameter>
+   mehrfach gefunden wurde, so wird der erste passende Schlüssel
+   zurückgegeben. Um die Schlüssel für alle gefundenen Werte zurückzugeben,
+   können Sie stattdessen <function>array_keys</function> mit dem
+   optionalen Paremeter <parameter>search_value</parameter> verwenden.
+  </para>
+  &return.falseproblem;
+ </refsect1>
+ <refsect1 role="changelog">
+  &reftitle.changelog;
+  <para>
+   <informaltable>
+    <tgroup cols="2">
+     <thead>
+      <row>
+       <entry>&Version;</entry>
+       <entry>&Description;</entry>
+      </row>
+     </thead>
+     <tbody>
+      <row>
+       <entry>4.2.0</entry>
+       <entry>
+        Vor PHP 4.2.0 gibt <function>array_search</function> im Fehlerfall
+        &null; statt &false; zurück.
+       </entry>
+      </row>
+     </tbody>
+    </tgroup>
+   </informaltable>
+  </para>
+ </refsect1>
+ <refsect1 role="examples">
+  &reftitle.examples;
+  <para>
+   <example>
+    <title><function>array_search</function>-Beispiel</title>
+    <programlisting role="php">
 <![CDATA[
 <?php
-$array = array(0 => 'blau', 1 => 'rot', 2 => 'grün', 3 => 'rot');
+$array = array(0 => 'blau', 1 => 'rot', 2 => 'grün', 3 => 'rot');

-$key = array_search('grün', $array);  // $key = 2;
+$key = array_search('grün', $array);  // $key = 2;
 $key = array_search('rot', $array);   // $key = 1;
 ?>
 ]]>
-      </programlisting>
-     </example>
-    </para>
-    &return.falseproblem;
-    <para>
-     Siehe auch <function>array_keys</function>,
-     <function>array_values</function>,
-     <function>array_key_exists</function>, und
-     <function>in_array</function>.
-    </para>
-   </refsect1>
-  </refentry>
+    </programlisting>
+   </example>
+  </para>
+ </refsect1>
+ <refsect1 role="seealso">
+  &reftitle.seealso;
+  <para>
+   <simplelist>
+    <member><function>array_keys</function></member>
+    <member><function>array_values</function></member>
+    <member><function>array_key_exists</function></member>
+    <member><function>in_array</function></member>
+   </simplelist>
+  </para>
+ </refsect1>
+</refentry>

 <!-- Keep this comment at the end of the file
 Local variables:
@@ -82,7 +147,7 @@
 sgml-indent-data:t
 indent-tabs-mode:nil
 sgml-parent-document:nil
-sgml-default-dtd-file:"../../../../manual.ced"
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
 sgml-exposed-tags:nil
 sgml-local-catalogs:nil
 sgml-local-ecat-files:nil

Modified: phpdoc/de/trunk/reference/array/functions/array-shift.xml
===================================================================
--- phpdoc/de/trunk/reference/array/functions/array-shift.xml	2010-05-24 19:12:19 UTC (rev 299710)
+++ phpdoc/de/trunk/reference/array/functions/array-shift.xml	2010-05-24 19:14:59 UTC (rev 299711)
@@ -1,33 +1,56 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
-<!-- EN-Revision: n/a Maintainer: nobody Status: ready -->
+<!-- EN-Revision: 297028 Maintainer: simp Status: ready -->
 <!-- CREDITS: tom -->
-  <refentry xml:id="function.array-shift" xmlns="http://docbook.org/ns/docbook">
-   <refnamediv>
-    <refname>array_shift</refname>
-    <refpurpose>Liefert ein Element vom Beginn eines Arrays</refpurpose>
-   </refnamediv>
-   <refsect1 role="description">
-    &reftitle.description;
-     <methodsynopsis>
-      <type>mixed</type><methodname>array_shift</methodname>
-      <methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
-     </methodsynopsis>
-    <para>
-     <function>array_shift</function> liefert den ersten Wert von
-     <parameter>array</parameter>, verschiebt die anderen Werte
-     hinunter, und verkürzt <parameter>array</parameter> um ein
-     Element. Alle numerischen Schlüssel werden so modifiziert, dass
-     bei null zu zählen begonnen wird. Strings als Schlüssel bleiben
-     unverändert. Ist <parameter>array</parameter> leer (oder kein
-     Array), wird &null; zurückgegeben.
-    </para>
-
-    &array.resetspointer;
-
-    <example>
-     <title><function>array_shift</function></title>
-     <programlisting role="php">
+<refentry xml:id="function.array-shift" xmlns="http://docbook.org/ns/docbook">
+ <refnamediv>
+  <refname>array_shift</refname>
+  <refpurpose>Liefert ein Element vom Beginn eines Arrays</refpurpose>
+ </refnamediv>
+ <refsect1 role="description">
+  &reftitle.description;
+  <methodsynopsis>
+   <type>mixed</type><methodname>array_shift</methodname>
+   <methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
+  </methodsynopsis>
+  <para>
+   <function>array_shift</function> liefert den ersten Wert von
+   <parameter>array</parameter>, verschiebt die anderen Werte
+   hinunter, und verkürzt <parameter>array</parameter> um ein
+   Element. Alle numerischen Schlüssel werden so modifiziert, dass
+   bei null zu zählen begonnen wird. Strings als Schlüssel bleiben
+   unverändert.
+  </para>
+  &array.resetspointer;
+ </refsect1>
+ <refsect1 role="parameters">
+  &reftitle.parameters;
+  <para>
+   <variablelist>
+    <varlistentry>
+     <term><parameter>array</parameter></term>
+     <listitem>
+      <para>
+       Das zu verarbeitende Array
+      </para>
+     </listitem>
+    </varlistentry>
+   </variablelist>
+  </para>
+ </refsect1>
+ <refsect1 role="returnvalues">
+  &reftitle.returnvalues;
+  <para>
+   Gibt den ersten Wert zuück oder &null;, wenn
+   <parameter>array</parameter> leer oder kein Array ist.
+  </para>
+ </refsect1>
+ <refsect1 role="examples">
+  &reftitle.examples;
+  <para>
+   <example>
+    <title><function>array_shift</function>-Beispiel</title>
+    <programlisting role="php">
 <![CDATA[
 <?php
 $stack = array("Orange", "Banane", "Apfel", "Himbeere");
@@ -35,11 +58,9 @@
 print_r($stack);
 ?>
 ]]>
-     </programlisting>
-     <para>
-      Danach blieben in <varname>$stack</varname> 3 Elemente übrig:
-     </para>
-     <screen role="php">
+    </programlisting>
+    &example.outputs;
+    <screen role="php">
 <![CDATA[
 Array
 (
@@ -48,19 +69,25 @@
     [2] => Himbeere
 )
 ]]>
-     </screen>
-     <para>
-      und <literal>orange</literal> wird
-      <varname>$fruit</varname> zugeordnet.
-     </para>
-    </example>
+    </screen>
     <para>
-     Siehe auch <function>array_unshift</function>,
-     <function>array_push</function> und
-     <function>array_pop</function>.
+     und <literal>Orange</literal> wird der Variable
+     <varname>$fruit</varname> zugewiesen.
     </para>
-   </refsect1>
-  </refentry>
+   </example>
+  </para>
+ </refsect1>
+ <refsect1 role="seealso">
+  &reftitle.seealso;
+  <para>
+   <simplelist>
+    <member><function>array_unshift</function></member>
+    <member><function>array_push</function></member>
+    <member><function>array_pop</function></member>
+   </simplelist>
+  </para>
+ </refsect1>
+</refentry>

 <!-- Keep this comment at the end of the file
 Local variables:
@@ -73,7 +100,7 @@
 sgml-indent-data:t
 indent-tabs-mode:nil
 sgml-parent-document:nil
-sgml-default-dtd-file:"../../../../manual.ced"
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
 sgml-exposed-tags:nil
 sgml-local-catalogs:nil
 sgml-local-ecat-files:nil
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.