Example #1
0
 /**
  * Constructor. Only run once for singleton object.
  */
 protected function __construct($conn = null)
 {
     if (is_null($conn)) {
         // XXX: there should be an easier way to do this.
         $user = new Config();
         $conn = $user->getDatabaseConnection();
         $user->free();
         unset($user);
     }
     $this->conn = $conn;
 }