LoadClassMetadataEventArgs.php 994B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. namespace Doctrine\ORM\Event;
  3. use Doctrine\Common\EventArgs;
  4. use Doctrine\ORM\Mapping\ClassMetadataInfo;
  5. use Doctrine\ORM\EntityManager;
  6. /**
  7. * Class that holds event arguments for a loadMetadata event.
  8. *
  9. * @author Jonathan H. Wage <jonwage@gmail.com>
  10. * @since 2.0
  11. */
  12. class LoadClassMetadataEventArgs extends EventArgs
  13. {
  14. /**
  15. * @var ClassMetadata
  16. */
  17. private $classMetadata;
  18. /**
  19. * @var EntityManager
  20. */
  21. private $em;
  22. /**
  23. * @param ClassMetadataInfo $classMetadata
  24. * @param EntityManager $em
  25. */
  26. public function __construct(ClassMetadataInfo $classMetadata, EntityManager $em)
  27. {
  28. $this->classMetadata = $classMetadata;
  29. $this->em = $em;
  30. }
  31. /**
  32. * @return ClassMetadataInfo
  33. */
  34. public function getClassMetadata()
  35. {
  36. return $this->classMetadata;
  37. }
  38. /**
  39. * @return EntityManager
  40. */
  41. public function getEntityManager()
  42. {
  43. return $this->em;
  44. }
  45. }