/** * Gets a new DB objects if none exists, and connects * @return <type> */ protected function _connect() { // TODO move this to an execute function if (!$this->_dbh instanceof Database) { $this->_db = Database::factory(); $this->_dbh = $this->_db->lazyConnect(); } return $this->_dbh; }