PHP Doku:: Adds all objects from another storage - splobjectstorage.addall.html

Verlauf / Chronik / History: (3) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzSonstige GrunderweiterungenStandard PHP Library (SPL)DatenstrukturenThe SplObjectStorage classSplObjectStorage::addAll

Ein Service von Reinhard Neidl - Webprogrammierung.

The SplObjectStorage class

<<The SplObjectStorage class

SplObjectStorage::attach>>

SplObjectStorage::addAll

(PHP 5 >= 5.3.0)

SplObjectStorage::addAllAdds all objects from another storage

Beschreibung

public void SplObjectStorage::addAll ( SplObjectStorage $storage )

Adds all objects-data pairs from a different storage in the current storage.

Parameter-Liste

storage

The storage you want to import.

Rückgabewerte

Es wird kein Wert zurückgegeben.

Beispiele

Beispiel #1 SplObjectStorage::addAll() example

<?php
$o 
= new StdClass;
$a = new SplObjectStorage();
$a[$o] = "hello";

$b = new SplObjectStorage();
$b->addAll($a);
echo 
$b[$o]."\n";
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

hello

Siehe auch


Keine BenutzerBeiträge.
- Beiträge aktualisieren...



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)