AllowedObjectsListener
class AllowedObjectsListener (View source)
An onFlush listener for Flow's Doctrine PersistenceManager, that validates to be persisted entities against the list of allowed objects.
This listener is outsourced from the PersistenceManager to avoid recursive dependencies when building the EntityManager.
Properties
protected LoggerInterface | $logger | ||
protected ThrowableStorageInterface | $throwableStorage | ||
protected AllowedObjectsContainer | $allowedObjects | ||
protected PersistenceManagerInterface | $persistenceManager |
Methods
Doctrine onFlush listener that checks for only allowed objects and reconnects if the database connection was closed.
Execute a dummy query on the given connection and return false if the connection is not open
Checks if the given object is allowed and if not, throws an exception
Details
void
onFlush(OnFlushEventArgs $args)
Doctrine onFlush listener that checks for only allowed objects and reconnects if the database connection was closed.
protected bool
ping(Connection $connection)
Execute a dummy query on the given connection and return false if the connection is not open
protected void
throwExceptionIfObjectIsNotAllowed(object $object)
Checks if the given object is allowed and if not, throws an exception