You are viewing an offline version of MongoDB documentation. Some page features might be unavailable. To view the latest version of the page or use interactive features, visit the live page.
MongoDB\Client Class
Definition
MongoDB\ClientThis class serves as an entry point for the MongoDB PHP Library. It is the preferred class for connecting to a MongoDB server or cluster of servers and acts as a gateway for accessing individual databases and collections.
MongoDB\Clientis analogous to the extension's MongoDB\Driver\Manager class, which it composes.