Login   Register  
PHP Classes
elePHPant
Icontem

File: ConnectionManagerExample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Sujay Bhowmick  >  Connection Manager  >  ConnectionManagerExample.php  >  Download  
File: ConnectionManagerExample.php
Role: Example script
Content type: text/plain
Description: Example for ConnectionManager
Class: Connection Manager
Database connection abstraction
Author: By
Last change: removed unecessary $resultpage variable
Date: 2003-12-29 04:57
Size: 677 bytes
 

Contents

Class file image Download
<?php    
include_once("ConnectionManager/ConnectionManagerFactory.php");
include_once(
"DBTypes.php");

 
/**
  * Get the corresponding ConnectionManager object w.r.t to database specified in DB_TYPE constant(DBTypes.php).
  * Factory Method.
  */
$objConnectionClass ConnectionManagerFactory::getInstanceOf(DB_TYPE);

/** 
 * Invoke the doConnection object to make a connection to the specified database
 */
$objConnectionClass->doConnection();

/**
 * Get the connectionHandle (Base Class Method).
 */
$conn $objConnectionClass->getConnectionHandle();

/**
 * Select the database.
 */
$objConnectionClass->selectDatabase();
unset(
$objConnectionClass);