public function __construct() { // get a list of repositories to match with requested projects $this->projectList = Project::getRepositoryList(); if (!mysql_connect(DB_SERVER, DB_USER, DB_PASSWORD)) { throw new Exception('Error: ' . mysql_error()); } if (!mysql_select_db(DB_NAME)) { throw new Exception('Error: ' . mysql_error()); } }