Ejemplo n.º 1
0
 /**
  * Constructor
  *
  * This constructor will connect the driver so that methods like columnSql() and others
  * will fail when the driver has not been connected.
  *
  * @param AbstractDriver $driver The driver to use.
  */
 public function __construct(AbstractDriver $driver)
 {
     if (!$driver->isConnected()) {
         $driver->connect();
     }
     $this->_driver = $driver;
 }
Ejemplo n.º 2
0
 /**
  * Connects to the configured database.
  *
  * @return bool true on success or false if already connected.
  */
 public function connect()
 {
     $this->_driver->connect();
     return true;
 }