Saturday, May 16, 2009

Setting symfony web root dynamically

class ProjectConfiguration extends sfProjectConfiguration
{
public function setup()
{
$this->setWebDir($this->getRootDir().DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.basename($_SERVER['DOCUMENT_ROOT']));

//$this->enableAllPluginsExcept(array('sfDoctrinePlugin', 'sfCompat10Plugin'));
$this->enableAllPluginsExcept(array('sfCompat10Plugin'));
}
}