note 110718 added to class.mongoclient
| From: | jazz at funkynerd dot com | Date: | Wed, 28 Nov 2012 01:36:48 +0000 |
| Subject: | note 110718 added to class.mongoclient | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-192166@lists.php.net to get a copy of this message | ||
Seeing as the Mongo class has been deprecated, I'm using the following code to allow
compatibility with the pre 1.3.0 driver successfully.
<?php
$class = 'MongoClient';
if(!class_exists($class)){
$class = 'Mongo';
}
$conn = new $class($hosts), $args);
?>
----
Server IP: 113.20.13.217
Probable Submitter: 122.49.201.131
----
Manual Page -- http://www.php.net/manual/en/class.mongoclient.php
Edit -- https://master.php.net/note/edit/110718
Del: integrated -- https://master.php.net/note/delete/110718/integrated
Del: useless -- https://master.php.net/note/delete/110718/useless
Del: bad code -- https://master.php.net/note/delete/110718/bad+code
Del: spam -- https://master.php.net/note/delete/110718/spam
Del: non-english -- https://master.php.net/note/delete/110718/non-english
Del: in docs -- https://master.php.net/note/delete/110718/in+docs
Del: other reasons-- https://master.php.net/note/delete/110718
Reject -- https://master.php.net/note/reject/110718
Search -- https://master.php.net/manage/user-notes.php