/**
  * Retrieve a reference to the specified DAO.
  * @param $name string the class name of the requested DAO
  * @param $dbconn ADONewConnection optional
  * @return DAO
  */
 function &getDAO($name, $dbconn = null)
 {
     $daos =& DAORegistry::getDAOs();
     if (!isset($daos[$name])) {
         // Import the required DAO class.
         import(DAORegistry::getQualifiedDAOName($name));
         // Only instantiate each class of DAO a single time
         $daos[$name] =& new $name();
         if ($dbconn != null) {
             // FIXME Needed by installer but shouldn't access member variable directly
             $daos[$name]->_dataSource = $dbconn;
         }
     }
     return $daos[$name];
 }