예제 #1
0
 /**
  * Return instance of first active driver
  * 
  * @return GeoIp_Driver
  */
 public static function getInstance() {
     if (self::$instance === null) {
         $fileDb = new GeoIp_Driver_File();
         if ($fileDb->isActive()) {
             self::$instance = $fileDb;
             return self::$instance;
         }
         
         throw new Gpf_Exception('No GeoIp driver available');
     }
     return self::$instance;
 }