diff options
Diffstat (limited to 'vendor/doctrine/orm/src/Events.php')
| -rw-r--r-- | vendor/doctrine/orm/src/Events.php | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/vendor/doctrine/orm/src/Events.php b/vendor/doctrine/orm/src/Events.php new file mode 100644 index 0000000..517917c --- /dev/null +++ b/vendor/doctrine/orm/src/Events.php | |||
| @@ -0,0 +1,125 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | declare(strict_types=1); | ||
| 4 | |||
| 5 | namespace Doctrine\ORM; | ||
| 6 | |||
| 7 | /** | ||
| 8 | * Container for all ORM events. | ||
| 9 | * | ||
| 10 | * This class cannot be instantiated. | ||
| 11 | */ | ||
| 12 | final class Events | ||
| 13 | { | ||
| 14 | /** | ||
| 15 | * Private constructor. This class is not meant to be instantiated. | ||
| 16 | */ | ||
| 17 | private function __construct() | ||
| 18 | { | ||
| 19 | } | ||
| 20 | |||
| 21 | /** | ||
| 22 | * The preRemove event occurs for a given entity before the respective | ||
| 23 | * EntityManager remove operation for that entity is executed. | ||
| 24 | * | ||
| 25 | * This is an entity lifecycle event. | ||
| 26 | */ | ||
| 27 | public const preRemove = 'preRemove'; | ||
| 28 | |||
| 29 | /** | ||
| 30 | * The postRemove event occurs for an entity after the entity has | ||
| 31 | * been deleted. It will be invoked after the database delete operations. | ||
| 32 | * | ||
| 33 | * This is an entity lifecycle event. | ||
| 34 | */ | ||
| 35 | public const postRemove = 'postRemove'; | ||
| 36 | |||
| 37 | /** | ||
| 38 | * The prePersist event occurs for a given entity before the respective | ||
| 39 | * EntityManager persist operation for that entity is executed. | ||
| 40 | * | ||
| 41 | * This is an entity lifecycle event. | ||
| 42 | */ | ||
| 43 | public const prePersist = 'prePersist'; | ||
| 44 | |||
| 45 | /** | ||
| 46 | * The postPersist event occurs for an entity after the entity has | ||
| 47 | * been made persistent. It will be invoked after the database insert operations. | ||
| 48 | * Generated primary key values are available in the postPersist event. | ||
| 49 | * | ||
| 50 | * This is an entity lifecycle event. | ||
| 51 | */ | ||
| 52 | public const postPersist = 'postPersist'; | ||
| 53 | |||
| 54 | /** | ||
| 55 | * The preUpdate event occurs before the database update operations to | ||
| 56 | * entity data. | ||
| 57 | * | ||
| 58 | * This is an entity lifecycle event. | ||
| 59 | */ | ||
| 60 | public const preUpdate = 'preUpdate'; | ||
| 61 | |||
| 62 | /** | ||
| 63 | * The postUpdate event occurs after the database update operations to | ||
| 64 | * entity data. | ||
| 65 | * | ||
| 66 | * This is an entity lifecycle event. | ||
| 67 | */ | ||
| 68 | public const postUpdate = 'postUpdate'; | ||
| 69 | |||
| 70 | /** | ||
| 71 | * The postLoad event occurs for an entity after the entity has been loaded | ||
| 72 | * into the current EntityManager from the database or after the refresh operation | ||
| 73 | * has been applied to it. | ||
| 74 | * | ||
| 75 | * Note that the postLoad event occurs for an entity before any associations have been | ||
| 76 | * initialized. Therefore, it is not safe to access associations in a postLoad callback | ||
| 77 | * or event handler. | ||
| 78 | * | ||
| 79 | * This is an entity lifecycle event. | ||
| 80 | */ | ||
| 81 | public const postLoad = 'postLoad'; | ||
| 82 | |||
| 83 | /** | ||
| 84 | * The loadClassMetadata event occurs after the mapping metadata for a class | ||
| 85 | * has been loaded from a mapping source (attributes/xml). | ||
| 86 | */ | ||
| 87 | public const loadClassMetadata = 'loadClassMetadata'; | ||
| 88 | |||
| 89 | /** | ||
| 90 | * The onClassMetadataNotFound event occurs whenever loading metadata for a class | ||
| 91 | * failed. | ||
| 92 | */ | ||
| 93 | public const onClassMetadataNotFound = 'onClassMetadataNotFound'; | ||
| 94 | |||
| 95 | /** | ||
| 96 | * The preFlush event occurs when the EntityManager#flush() operation is invoked, | ||
| 97 | * but before any changes to managed entities have been calculated. This event is | ||
| 98 | * always raised right after EntityManager#flush() call. | ||
| 99 | */ | ||
| 100 | public const preFlush = 'preFlush'; | ||
| 101 | |||
| 102 | /** | ||
| 103 | * The onFlush event occurs when the EntityManager#flush() operation is invoked, | ||
| 104 | * after any changes to managed entities have been determined but before any | ||
| 105 | * actual database operations are executed. The event is only raised if there is | ||
| 106 | * actually something to do for the underlying UnitOfWork. If nothing needs to be done, | ||
| 107 | * the onFlush event is not raised. | ||
| 108 | */ | ||
| 109 | public const onFlush = 'onFlush'; | ||
| 110 | |||
| 111 | /** | ||
| 112 | * The postFlush event occurs when the EntityManager#flush() operation is invoked and | ||
| 113 | * after all actual database operations are executed successfully. The event is only raised if there is | ||
| 114 | * actually something to do for the underlying UnitOfWork. If nothing needs to be done, | ||
| 115 | * the postFlush event is not raised. The event won't be raised if an error occurs during the | ||
| 116 | * flush operation. | ||
| 117 | */ | ||
| 118 | public const postFlush = 'postFlush'; | ||
| 119 | |||
| 120 | /** | ||
| 121 | * The onClear event occurs when the EntityManager#clear() operation is invoked, | ||
| 122 | * after all references to entities have been removed from the unit of work. | ||
| 123 | */ | ||
| 124 | public const onClear = 'onClear'; | ||
| 125 | } | ||
