PHP Doku:: Gets a collection - mongocollection.get.html

Verlauf / Chronik / History: (2) anzeigen

Sie sind hier:
Doku-Startseite ≥ PHP-Handbuch ≥ Funktionsreferenz ≥ Datenbankerweiterungen ≥ Anbieterspezifische Datenbankerweiterungen ≥ MongoDB Native Driver ≥ Core Classes ≥ The MongoCollection class ≥ MongoCollection::__get

Ein Service von Reinhard Neidl - Webprogrammierung.

The MongoCollection class

<<MongoCollection::findOne

MongoCollection::getDBRef>>

MongoCollection::__get

(PECL mongo >=1.0.2)

MongoCollection::__get — Gets a collection

Beschreibung

public MongoCollection MongoCollection::__get ( string $name )

A concise syntax for getting a collection with a dot-separated name. If a collection name contains strange characters, you may have to use MongoDB::selectCollection() instead.

<?php

$mongo 
= new Mongo();

// the following two lines are equivalent
$collection = $mongo->selectDB("foo")->selectCollection("bar.baz");
$collection = $mongo->foo->bar->baz;

?>

Parameter-Liste

name

The next string in the collection name.

Rückgabewerte

Returns the collection.


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",...)