README.markdown

Doctrine MongoDB ODM SoftDelete Functionality

This library gives you some additional classes and API for managing the soft deleted state of Doctrine
MongoDB ODM documents. To get started you just need to configure a few objects and get a SoftDeleteManager
instance:

Setup

use Doctrine\ODM\MongoDB\SoftDelete\Configuration;
use Doctrine\ODM\MongoDB\SoftDelete\UnitOfWork;
use Doctrine\ODM\MongoDB\SoftDelete\SoftDeleteManager;
use Doctrine\Common\EventManager;
// $dm is a DocumentManager instance we should already have
$config = new Configuration();
$evm = new EventManager();
$sdm = new SoftDeleteManager($dm, $config, $evm);

SoftDelete Documents

In order for your documents to work with the SoftDelete functionality they must implement the
SoftDeleteable interface: