protected function __construct() { parent::__construct(); $migration = new RokGallery_Doctrine_Migration(); if ($migration->getCurrentVersion() != $migration->getLatestVersion()) { $migration->migrate(); } $this->connection->addListener(new RokGallery_Listener()); }