/**
  * Constructor
  *
  * @param string $adminPath The path to admin folder of gitolite.
  *                          Default is $sys_data_dir . "/gitolite/admin"
  */
 public function __construct(Logger $logger, Git_SystemEventManager $git_system_event_manager, Git_GitRepositoryUrlManager $url_manager, GitDao $git_dao, Git_Mirror_MirrorDao $git_mirror_dao, GitPlugin $git_plugin, Git_Exec $gitExec = null, GitRepositoryFactory $repository_factory = null, Git_Gitolite_ConfigPermissionsSerializer $permissions_serializer = null, Git_Gitolite_GitoliteConfWriter $gitolite_conf_writer = null, ProjectManager $project_manager = null, Git_Mirror_MirrorDataMapper $mirror_data_mapper = null)
 {
     $this->git_dao = $git_dao;
     $this->logger = $logger;
     $this->git_system_event_manager = $git_system_event_manager;
     $adminPath = $GLOBALS['sys_data_dir'] . '/gitolite/admin';
     $this->setAdminPath($adminPath);
     $this->gitExec = $gitExec ? $gitExec : new Git_Exec($adminPath);
     $this->repository_factory = $repository_factory ? $repository_factory : new GitRepositoryFactory($this->getDao(), ProjectManager::instance());
     $this->project_manager = $project_manager ? $project_manager : ProjectManager::instance();
     $this->url_manager = $url_manager;
     if (empty($mirror_data_mapper)) {
         $this->mirror_data_mapper = new Git_Mirror_MirrorDataMapper($git_mirror_dao, UserManager::instance(), new GitRepositoryFactory($this->getDao(), ProjectManager::instance()), $this->project_manager, $this->git_system_event_manager, new Git_Gitolite_GitoliteRCReader());
     } else {
         $this->mirror_data_mapper = $mirror_data_mapper;
     }
     if (empty($permissions_serializer)) {
         $this->permissions_serializer = new Git_Gitolite_ConfigPermissionsSerializer($this->mirror_data_mapper, $git_plugin->getEtcTemplatesPath());
     } else {
         $this->permissions_serializer = $permissions_serializer;
     }
     $this->project_serializer = new Git_Gitolite_ProjectSerializer($this->logger, $this->repository_factory, $this->permissions_serializer, $this->url_manager);
     $this->gitolite_conf_writer = $gitolite_conf_writer ? $gitolite_conf_writer : new Git_Gitolite_GitoliteConfWriter($this->permissions_serializer, $this->project_serializer, new Git_Gitolite_GitoliteRCReader(), $this->mirror_data_mapper, $this->logger, $this->project_manager, $adminPath);
 }