Пример #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;
 }
Пример #2
0
 /**
  * Returns whether connection to database server was already established.
  *
  * @return bool
  */
 public function isConnected()
 {
     return $this->_driver->isConnected();
 }