Created
July 5, 2012 14:18
-
-
Save jsor/3053938 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ConnectionEventSubscriber implements EventSubscriber | |
{ | |
public function getSubscribedEvents() | |
{ | |
return array( | |
Events::postConnect | |
); | |
} | |
public function postConnect(ConnectionEventArgs $args) | |
{ | |
$connection = $args->getConnection(); | |
$connection->getEventManager()->addEventSubscriber(new SchemaEventSubscriber($connection)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment