diff --git a/reference/ds/ds/map/putAll.xml b/reference/ds/ds/map/putAll.xml new file mode 100644 index 0000000000..851329f66b --- /dev/null +++ b/reference/ds/ds/map/putAll.xml @@ -0,0 +1,126 @@ + + + + + + Ds\Map::putAll + Associates all key-value pairs of a traversable object or array. + + + + &reftitle.description; + + public voidDs\Map::putAll + mixedpairs + + + Associates all key-value pairs of a traversable object or &array;. + + + + + Keys of type object are supported. + + If an object implements Ds\Hashable, + equality will be determined by the object's equals function. + + If an object does not implement Ds\Hashable, + objects must be references to the same instance to be considered equal. + + + + + + + &reftitle.parameters; + + + pairs + + + traversable object or &array;. + + + + + + + + &reftitle.returnvalues; + + &return.void; + + + + + &reftitle.examples; + + <function>Ds\Map::putAll</function> example + +putAll([ + "a" => 1, + "b" => 2, + "c" => 3, +]); + +print_r($map); +?> +]]> + + &example.outputs.similar; + + Ds\Pair Object + ( + [key] => a + [value] => 1 + ) + + [1] => Ds\Pair Object + ( + [key] => b + [value] => 2 + ) + + [2] => Ds\Pair Object + ( + [key] => c + [value] => 3 + ) + +) +]]> + + + + + + + + + diff --git a/reference/ds/versions.xml b/reference/ds/versions.xml index 9919b7d4f2..f01f1bdd1a 100644 --- a/reference/ds/versions.xml +++ b/reference/ds/versions.xml @@ -179,6 +179,7 @@ +