1
0
mirror of synced 2025-02-03 05:49:25 +03:00

DDC-4022 minor improvements

This commit is contained in:
Maximilian Bosch 2015-11-30 17:04:12 +01:00 committed by Ma27
parent c337f8f5c7
commit 33476d8c34

View File

@ -3273,16 +3273,18 @@ class UnitOfWork implements PropertyChangedListener
$persister->afterTransactionRolledBack(); $persister->afterTransactionRolledBack();
}); });
} }
/** /**
* Performs an action after the transaction. * Performs an action after the transaction.
*
* @param callable $callback
*/ */
private function doAfterTransaction(callable $callback) private function doAfterTransaction(callable $callback)
{ {
if (!$this->hasCache) { if ( ! $this->hasCache) {
return; return;
} }
foreach (array_merge($this->persisters, $this->collectionPersisters) as $persister) { foreach (array_merge($this->persisters, $this->collectionPersisters) as $persister) {
if ($persister instanceof CachedPersister) { if ($persister instanceof CachedPersister) {
call_user_func($callback, $persister); call_user_func($callback, $persister);