[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-cvs
Subject:    [DOC-CVS] =?utf-8?q?svn:_/phpdoc/en/trunk/reference/ds/_ds/map/putAll.xml_versions.xml?=
From:       Rudi_Theunissen <rtheunissen () php ! net>
Date:       2016-07-30 13:25:27
Message-ID: svn-rtheunissen-1469885127-339746-752111975 () svn ! php ! net
[Download RAW message or body]

rtheunissen                              Sat, 30 Jul 2016 13:25:27 +0000

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

Log:
Add Map::putAll to ds extension docs

Changed paths:
    A   phpdoc/en/trunk/reference/ds/ds/map/putAll.xml
    U   phpdoc/en/trunk/reference/ds/versions.xml

Added: phpdoc/en/trunk/reference/ds/ds/map/putAll.xml
===================================================================
--- phpdoc/en/trunk/reference/ds/ds/map/putAll.xml	                        (rev 0)
+++ phpdoc/en/trunk/reference/ds/ds/map/putAll.xml	2016-07-30 13:25:27 UTC (rev \
339746) @@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision$ -->
+
+<refentry xml:id="ds-map.putall" xmlns="http://docbook.org/ns/docbook" \
xmlns:xlink="http://www.w3.org/1999/xlink"> + <refnamediv>
+  <refname>Ds\Map::putAll</refname>
+  <refpurpose>Associates all key-value pairs of a traversable object or \
array.</refpurpose> + </refnamediv>
+
+ <refsect1 role="description">
+  &reftitle.description;
+  <methodsynopsis>
+   <modifier>public</modifier> \
<type>void</type><methodname>Ds\Map::putAll</methodname> +   \
<methodparam><type>mixed</type><parameter>pairs</parameter></methodparam> +  \
</methodsynopsis> +  <para>
+    Associates all key-value <parameter>pairs</parameter> of a \
<classname>traversable</classname> object or &array;. +  </para>
+
+  <note>
+    <para>
+        Keys of type <type>object</type> are supported.
+
+        If an object implements <classname>Ds\Hashable</classname>,
+        equality will be determined by the object's <code>equals</code> function.
+
+        If an object does not implement <classname>Ds\Hashable</classname>,
+        objects must be references to the same instance to be considered equal.
+    </para>
+  </note>
+
+ </refsect1>
+
+ <refsect1 role="parameters">
+  &reftitle.parameters;
+  <variablelist>
+   <varlistentry>
+    <term><parameter>pairs</parameter></term>
+    <listitem>
+     <para>
+        <classname>traversable</classname> object or &array;.
+     </para>
+    </listitem>
+   </varlistentry>
+  </variablelist>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+  &reftitle.returnvalues;
+  <para>
+    &return.void;
+  </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+  &reftitle.examples;
+  <example>
+   <title><function>Ds\Map::putAll</function> example</title>
+   <programlisting role="php">
+<![CDATA[
+<?php
+$map = new \Ds\Map();
+
+$map->putAll([
+    "a" => 1,
+    "b" => 2,
+    "c" => 3,
+]);
+
+print_r($map);
+?>
+]]>
+   </programlisting>
+   &example.outputs.similar;
+   <screen>
+<![CDATA[
+Ds\Map Object
+(
+    [0] => Ds\Pair Object
+        (
+            [key] => a
+            [value] => 1
+        )
+
+    [1] => Ds\Pair Object
+        (
+            [key] => b
+            [value] => 2
+        )
+
+    [2] => Ds\Pair Object
+        (
+            [key] => c
+            [value] => 3
+        )
+
+)
+]]>
+   </screen>
+  </example>
+
+ </refsect1>
+
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->

Modified: phpdoc/en/trunk/reference/ds/versions.xml
===================================================================
--- phpdoc/en/trunk/reference/ds/versions.xml	2016-07-30 10:08:27 UTC (rev 339745)
+++ phpdoc/en/trunk/reference/ds/versions.xml	2016-07-30 13:25:27 UTC (rev 339746)
@@ -179,6 +179,7 @@
  <function name='ds\map::merge' from='PECL ds &gt;= 1.0.0'/>
  <function name='ds\map::pairs' from='PECL ds &gt;= 1.0.0'/>
  <function name='ds\map::put' from='PECL ds &gt;= 1.0.0'/>
+ <function name='ds\map::putAll' from='PECL ds &gt;= 1.0.2'/>
  <function name='ds\map::reduce' from='PECL ds &gt;= 1.0.0'/>
  <function name='ds\map::remove' from='PECL ds &gt;= 1.0.0'/>
  <function name='ds\map::reverse' from='PECL ds &gt;= 1.0.0'/>



-- 
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic