LoadClassMetadataEventArgs.php 983 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace Doctrine\Persistence\Event;
  3. use Doctrine\Common\EventArgs;
  4. use Doctrine\Persistence\Mapping\ClassMetadata;
  5. use Doctrine\Persistence\ObjectManager;
  6. /**
  7. * Class that holds event arguments for a loadMetadata event.
  8. */
  9. class LoadClassMetadataEventArgs extends EventArgs
  10. {
  11. /** @var ClassMetadata */
  12. private $classMetadata;
  13. /** @var ObjectManager */
  14. private $objectManager;
  15. public function __construct(ClassMetadata $classMetadata, ObjectManager $objectManager)
  16. {
  17. $this->classMetadata = $classMetadata;
  18. $this->objectManager = $objectManager;
  19. }
  20. /**
  21. * Retrieves the associated ClassMetadata.
  22. *
  23. * @return ClassMetadata
  24. */
  25. public function getClassMetadata()
  26. {
  27. return $this->classMetadata;
  28. }
  29. /**
  30. * Retrieves the associated ObjectManager.
  31. *
  32. * @return ObjectManager
  33. */
  34. public function getObjectManager()
  35. {
  36. return $this->objectManager;
  37. }
  38. }