/** * Ensures that the site record has been created */ protected function _getOrCreateSite($arguments, $options) { $site = Doctrine_Core::getTable('sfSympalSite')->createQuery('s')->where('s.slug = ?', $arguments['site'])->fetchOne(); if (!$site) { $this->logSection('sympal', 'Creating new site record in database...'); $site = new sfSympalSite(); $site->title = sfInflector::humanize($arguments['site']); $site->slug = $arguments['site']; } $site->save(); return $site; }