conf->getVal('scm', 'git'); // CASE: git if ($scm === 'git') { return new IDF_Git($request->project->getGitRepository()); } // CASE: svn if ($scm === 'svn') { return new IDF_Svn($request->conf->getVal('svn_repository'), $request->conf->getVal('svn_username'), $request->conf->getVal('svn_password')); } } }