/**
  * Check if custom sfConfig params are loaded. If not, load them.
  * @param PropelPDO $con
  */
 public static function check($con = null)
 {
     if (!self::is_set() && self::is_ready()) {
         if (!$con && !sfProjectConfiguration::hasActive()) {
             throw new Exception('The Project configuration is not loaded.');
         } elseif (!$con) {
             $configuration = sfProjectConfiguration::getActive();
             $databaseManager = new sfDatabaseManager($configuration);
             $con = $databaseManager->getDatabase(sfConfig::get('sf_orm'))->getConnection();
             $init = $databaseManager->initialize($configuration);
         }
         try {
             $config = sfPlopConfigPeer::retrieveAll($con);
             foreach ($config as $obj) {
                 sfConfig::set(self::prefix() . $obj->getName(), sfPlopConfigPeer::load($obj->getValue()));
             }
             sfConfig::set(self::prefix(''), true);
         } catch (Exception $e) {
             return false;
         }
     }
 }
 /**
  * Post save to attempt to clear the menu cache.
  *
  * If using different cache driver between multiple applications, this
  * will only clear the cache for the current application.
  *
  * @return void
  */
 public function postSave($event)
 {
     if (sfProjectConfiguration::hasActive()) {
         sfProjectConfiguration::getActive()->getPluginConfiguration('ioDoctrineMenuPlugin')->getMenuManager()->clearCache($this);
     }
 }