You are browsing a version that is no longer maintained.
Doctrine\DBAL\Connection accept an instance of
Doctrine\Common\EventManager. The EventManager has a couple of
events inside the DBAL layer that are triggered for the user to
Doctrine\DBAL\Events::postConnect is triggered right after the
connection to the database is established. It allows to specify any
relevant connection specific options and gives access to the
Doctrine\DBAL\Connection instance that is responsible for the
connection management via an instance of
Doctrine\DBAL\Event\ConnectionEventArgs event arguments
Doctrine ships with one implementation for the "PostConnect" event:
Doctrine\DBAL\Event\Listeners\OracleSessionInitallows to specify any number of Oracle Session related enviroment variables that are set right after the connection is established.
You can register events by subscribing them to the
instance passed to the Connection factory: