/** * Sets the current context to something else * * @param string $name The name of the context to switch to * */ public static function switchTo($name) { if (!isset(self::$instances[$name])) { $currentConfiguration = sfContext::getInstance()->getConfiguration(); sfContext::createInstance(ProjectConfiguration::getApplicationConfiguration($name, $currentConfiguration->getEnvironment(), $currentConfiguration->isDebug())); } self::$current = $name; sfContext::getInstance()->getConfiguration()->activate(); }