LifecycleEventArgs.php
9 months ago
ListenersInvoker.php
9 months ago
LoadClassMetadataEventArgs.php
9 months ago
OnClassMetadataNotFoundEventArgs.php
9 months ago
OnClearEventArgs.php
9 months ago
OnFlushEventArgs.php
9 months ago
PostFlushEventArgs.php
9 months ago
PostLoadEventArgs.php
9 months ago
PostPersistEventArgs.php
9 months ago
PostRemoveEventArgs.php
9 months ago
PostUpdateEventArgs.php
9 months ago
PreFlushEventArgs.php
9 months ago
PrePersistEventArgs.php
9 months ago
PreRemoveEventArgs.php
9 months ago
PreUpdateEventArgs.php
9 months ago
index.php
9 months ago
OnClassMetadataNotFoundEventArgs.php
36 lines
| 1 | <?php |
| 2 | declare (strict_types=1); |
| 3 | namespace MailPoetVendor\Doctrine\ORM\Event; |
| 4 | if (!defined('ABSPATH')) exit; |
| 5 | use MailPoetVendor\Doctrine\Deprecations\Deprecation; |
| 6 | use MailPoetVendor\Doctrine\ORM\EntityManagerInterface; |
| 7 | use MailPoetVendor\Doctrine\Persistence\Event\ManagerEventArgs; |
| 8 | use MailPoetVendor\Doctrine\Persistence\Mapping\ClassMetadata; |
| 9 | use MailPoetVendor\Doctrine\Persistence\ObjectManager; |
| 10 | use function func_num_args; |
| 11 | class OnClassMetadataNotFoundEventArgs extends ManagerEventArgs |
| 12 | { |
| 13 | private $className; |
| 14 | private $foundMetadata; |
| 15 | public function __construct($className, ObjectManager $objectManager) |
| 16 | { |
| 17 | $this->className = (string) $className; |
| 18 | parent::__construct($objectManager); |
| 19 | } |
| 20 | public function setFoundMetadata(?ClassMetadata $classMetadata = null) |
| 21 | { |
| 22 | if (func_num_args() < 1) { |
| 23 | Deprecation::trigger('doctrine/orm', 'https://github.com/doctrine/orm/pull/9791', 'Calling %s without arguments is deprecated, pass null instead.', __METHOD__); |
| 24 | } |
| 25 | $this->foundMetadata = $classMetadata; |
| 26 | } |
| 27 | public function getFoundMetadata() |
| 28 | { |
| 29 | return $this->foundMetadata; |
| 30 | } |
| 31 | public function getClassName() |
| 32 | { |
| 33 | return $this->className; |
| 34 | } |
| 35 | } |
| 36 |