Skip to content
This repository was archived by the owner on Nov 11, 2020. It is now read-only.

Latest commit

 

History

History
65 lines (40 loc) · 1.47 KB

index.rst

File metadata and controls

65 lines (40 loc) · 1.47 KB

Introduction

The Doctrine MongoDB project is an abstraction layer on top of the legacy PHP driver that the Doctrine MongoDB ODM project is built on top of.

Caution!

This project has been deprecated and the MongoDB ODM project will soon no longer depend on it. The project is also in bug-fixes-only mode.

Connecting

Creating new connections is easy using the Doctrine\MongoDB\Connection class:

Databases

With the connection you can start selecting databases using the selectDatabase method:

Collections

Now you are ready to select a collection and insert some data using the insert method:

Reading

Reading data is easy using the find and findOne methods:

Updating

Updating a record is simple using the update method:

Deleting

Delete data from the collection using the remove method: