2009-07-16 00:18:40 +04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Doctrine\ORM\Event;
|
|
|
|
|
|
|
|
use Doctrine\Common\EventArgs;
|
|
|
|
|
2010-11-06 00:13:19 +03:00
|
|
|
use Doctrine\ORM\Mapping\ClassMetadata;
|
|
|
|
use Doctrine\ORM\EntityManager;
|
|
|
|
|
2009-07-16 00:18:40 +04:00
|
|
|
/**
|
|
|
|
* Class that holds event arguments for a loadMetadata event.
|
|
|
|
*
|
|
|
|
* @author Jonathan H. Wage <jonwage@gmail.com>
|
|
|
|
* @since 2.0
|
|
|
|
*/
|
|
|
|
class LoadClassMetadataEventArgs extends EventArgs
|
|
|
|
{
|
2010-11-06 00:13:19 +03:00
|
|
|
/**
|
|
|
|
* @var ClassMetadata
|
|
|
|
*/
|
|
|
|
private $classMetadata;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var EntityManager
|
|
|
|
*/
|
|
|
|
private $em;
|
2009-07-16 00:18:40 +04:00
|
|
|
|
2010-11-06 00:13:19 +03:00
|
|
|
/**
|
|
|
|
* @param ClassMetadata $classMetadata
|
|
|
|
* @param EntityManager $em
|
|
|
|
*/
|
|
|
|
public function __construct(ClassMetadata $classMetadata, EntityManager $em)
|
2009-07-16 00:18:40 +04:00
|
|
|
{
|
2010-11-06 00:13:19 +03:00
|
|
|
$this->classMetadata = $classMetadata;
|
|
|
|
$this->em = $em;
|
2009-07-16 00:18:40 +04:00
|
|
|
}
|
|
|
|
|
2010-11-06 00:13:19 +03:00
|
|
|
/**
|
|
|
|
* @return ClassMetadata
|
|
|
|
*/
|
2009-07-16 00:18:40 +04:00
|
|
|
public function getClassMetadata()
|
|
|
|
{
|
2010-11-06 00:13:19 +03:00
|
|
|
return $this->classMetadata;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return EntityManager
|
|
|
|
*/
|
|
|
|
public function getEntityManager()
|
|
|
|
{
|
|
|
|
return $this->em;
|
2009-07-16 00:18:40 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|