mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Add Map::putAll to ds extension docs
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@339746 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
845661fc07
commit
c913d5934d
2 changed files with 127 additions and 0 deletions
126
reference/ds/ds/map/putAll.xml
Normal file
126
reference/ds/ds/map/putAll.xml
Normal file
|
@ -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
|
||||
-->
|
|
@ -179,6 +179,7 @@
|
|||
<function name='ds\map::merge' from='PECL ds >= 1.0.0'/>
|
||||
<function name='ds\map::pairs' from='PECL ds >= 1.0.0'/>
|
||||
<function name='ds\map::put' from='PECL ds >= 1.0.0'/>
|
||||
<function name='ds\map::putAll' from='PECL ds >= 1.0.2'/>
|
||||
<function name='ds\map::reduce' from='PECL ds >= 1.0.0'/>
|
||||
<function name='ds\map::remove' from='PECL ds >= 1.0.0'/>
|
||||
<function name='ds\map::reverse' from='PECL ds >= 1.0.0'/>
|
||||
|
|
Loading…
Reference in a new issue