Skip to content

Instantly share code, notes, and snippets.

@kriswallsmith
Created September 5, 2009 02:55
Show Gist options
  • Save kriswallsmith/181271 to your computer and use it in GitHub Desktop.
Save kriswallsmith/181271 to your computer and use it in GitHub Desktop.
<?php
// config/ProjectConfiguration.class.php
class ProjectConfiguration extends sfProjectConfiguration
{
// ...
public function configureDoctrineConnection(Doctrine_Connection $conn)
{
$listener = new ConnectionListener(
$this->getMasterConnection()->getDbh(),
$this->getSlaveConnection()->getDbh()
);
$conn->addListener($listener);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment