2009-07-16 00:18:40 +04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Doctrine\ORM\Event;
|
|
|
|
|
|
|
|
use Doctrine\Common\EventArgs;
|
|
|
|
|
2010-11-18 22:45:44 +03:00
|
|
|
use Doctrine\ORM\Mapping\ClassMetadataInfo;
|
2010-11-06 00:13:19 +03:00
|
|
|
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
|
|
|
/**
|
2010-11-18 22:45:44 +03:00
|
|
|
* @param ClassMetadataInfo $classMetadata
|
2010-11-06 00:13:19 +03:00
|
|
|
* @param EntityManager $em
|
|
|
|
*/
|
2010-11-18 22:45:44 +03:00
|
|
|
public function __construct(ClassMetadataInfo $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
|
|
|
/**
|
2010-11-18 22:45:44 +03:00
|
|
|
* @return ClassMetadataInfo
|
2010-11-06 00:13:19 +03:00
|
|
|
*/
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|