PHP Classes

bug

Recommend this page to a friend!

      PDO_DB  >  All threads  >  bug  >  (Un) Subscribe thread alerts  
Subject:bug
Summary:__construct
Messages:2
Author:dream fly
Date:2009-03-11 05:57:04
Update:2009-03-11 06:59:01
 

 


  1. bug   Reply   Report abuse  
Picture of dream fly dream fly - 2009-03-11 05:57:04
this may walk like a singlton,i think.
we can have many instance of the DB,but only one pdo.
when we create the second instanc of the class DB,no pdo object reffrence.
if(!self::$instance)
{
$this->connect();
}else{
$this->db=self::$instance
/*this expression may be missed if you allow antoher instance of DB ,i think.

THIS CLASS IS EXCELLENT。

*/
}

  2. Re: bug   Reply   Report abuse  
Picture of Gombos Lorand Gombos Lorand - 2009-03-11 06:59:01 - In reply to message 1 from dream fly
Hello,
In Version 1.1 i remove the $db ($this->db) attribute, and in all of the class i use the "self::$instance" instead of $db. I investigate the mistake singleton, and if is a bug correct it on the next version, in this week.

Thank you for your attention, and any other observation is welcome.