downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

MongoDB::getDBRef> <MongoDB::forceError
[edit] Last updated: Fri, 25 May 2012

view this page in

MongoDB::__get

(PECL mongo >=1.0.2)

MongoDB::__getコレクションを取得する

説明

public MongoCollection MongoDB::__get ( string $name )

データベースオブジェクトからコレクションを取得するための最も簡単な方法です。 コレクション名に特殊な文字が含まれている場合は、かわりに MongoDB::selectCollection() を使います。

<?php

$mongo 
= new Mongo();

// 次の 2 行はどちらも同じ意味です。
$collection $mongo->selectDB("foo")->selectCollection("bar");
$collection $mongo->foo->bar;

?>

パラメータ

name

コレクションの名前。

返り値

コレクションを返します。



add a note add a note User Contributed Notes MongoDB::__get
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites