dm = $dm; if ($purger === null) { return; } $purger->setDocumentManager($dm); $this->setPurger($purger); } /** @return DocumentManagerInterface */ public function getObjectManager() { return $this->dm; } /** @inheritDoc */ public function execute(array $fixtures, $append = false) { $that = $this; $function = static function ($dm) use ($append, $that, $fixtures) { if ($append === false) { $that->purge(); } foreach ($fixtures as $fixture) { $that->load($dm, $fixture); } }; if (method_exists($this->dm, 'transactional')) { $this->dm->transactional($function); } else { $function($this->dm); } } }