Skip to content

Instantly share code, notes, and snippets.

@jsor
Created July 5, 2012 14:18
Show Gist options
  • Save jsor/3053938 to your computer and use it in GitHub Desktop.
Save jsor/3053938 to your computer and use it in GitHub Desktop.
<?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