ManagerEventArgs.php 591 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace Doctrine\Persistence\Event;
  3. use Doctrine\Common\EventArgs;
  4. use Doctrine\Persistence\ObjectManager;
  5. /**
  6. * Provides event arguments for the preFlush event.
  7. */
  8. class ManagerEventArgs extends EventArgs
  9. {
  10. /** @var ObjectManager */
  11. private $objectManager;
  12. public function __construct(ObjectManager $objectManager)
  13. {
  14. $this->objectManager = $objectManager;
  15. }
  16. /**
  17. * Retrieves the associated ObjectManager.
  18. *
  19. * @return ObjectManager
  20. */
  21. public function getObjectManager()
  22. {
  23. return $this->objectManager;
  24. }
  25. }