home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 June / ENTER.ISO / files / xampp-win32-1.4.5-installer.exe / xampp / DBContainer.php < prev    next >
Encoding:
PHP Script  |  2004-03-24  |  1.1 KB  |  40 lines

  1. <?php
  2.  
  3. include_once('TestAuthContainer.php');
  4. include_once("Auth/Container/DB.php");
  5.  
  6.  
  7. class DBContainer extends TestAuthContainer {
  8.  
  9.     function DBContainer($name){
  10.         $this->TestAuthContainer($name);
  11.     }
  12.     
  13.     function &getContainer() {
  14.         static $container;
  15.         #print "In DBContainer::getContainer {$this->skip_tests}\n";
  16.         if(!isset($container)){
  17.             include('./auth_container_db_options.php');
  18.             $container = new Auth_Container_DB($options);
  19.             // Catch if DB connection cannot be made
  20.             $res = $container->_prepare();
  21.         }
  22.         
  23.         if(!DB::isConnection($container->db)){
  24.             #print "In DBContainer::getContainer container->db is error \n";
  25.             $this->skip_tests = true;
  26.             $this->skip_tests_message = "SKIP TEST:DB is not a connection object, check dsn !!!";
  27.         }
  28.         return($container);
  29.     }
  30.     
  31.     function &getExtraOptions() {
  32.         include('./auth_container_db_options.php');
  33.         return($extra_options);
  34.     }
  35. }
  36.  
  37.  
  38.  
  39.  
  40. ?>