*/ class PHPCRPurger implements PurgerInterface { /** * @var DocumentManagerInterface */ private $dm; public function __construct(DocumentManagerInterface $dm = null) { $this->dm = $dm; } public function setDocumentManager(DocumentManager $dm) { $this->dm = $dm; } public function getObjectManager() { return $this->dm; } /** * @inheritDoc */ public function purge() { $session = $this->dm->getPhpcrSession(); NodeHelper::purgeWorkspace($session); $session->save(); } }