Location: PHPKode > scripts > Internationalization and Localization > internationalization-and-localization/DatabaseConnectionManager.class.php
<?php

/**
 * Project:     CWF: Cricava Web Framework
 * File:        DatabaseConnectionManager.class.php
 *
 * @link http://www.cricava.com/
 * @copyright 2005-2009 Cricava Technologies, Inc.
 * @author Mariano Iglesias <hide@address.com>
 * @package com.cricava.cwf
 * @version 1.0
 */

/**
 * This class implements an abstract parser. NOTE: this class must be extended and its
 * methods implemented.
 *
 * @abstract
 * @author  Mariano Iglesias
 * @package com.cricava.cwf
 * @subpackage i18n
 * @since   1.0
 */

class DatabaseConnectionManager
{
	/**
	 * It will escape a string using escape characters particular to the
	 * current database driver.
	 *
	 * @param string	The string to escape
	 *
	 * @return string	The escaped string
	 *
	 * @access public
	 * @since 1.0
	 */
	function escape($string)
	{
		die("DatabaseConnectionManager::escape() - This method must be implemented!");
	}

	/**
	 * Execute the SQL sentence and return result.
	 *
	 * @param string	The SQL sentence to execute
	 *
	 * @return ResultSet	The result
	 *
	 * @access public
	 * @since 1.0
	 */
	function execute($sql)
	{
		die("DatabaseConnectionManager::execute() - This method must be implemented!");
	}

	/**
	 * Returns the next row available in the.result set as an indexed array
	 *
	 * @param ResultSet	The ResultSet of executing the SQL sentence
	 *
	 * @return array	Indexed by column names
	 *
	 * @access public
	 * @since 1.0
	 */
	function fetch_array($resultSet)
	{
		die("DatabaseConnectionManager::fetch_array() - This method must be implemented!");
	}

	/**
	 * Based on a table's proposed name, it returns its real name. Useful
	 * for using table prefixes.
	 *
	 * @param string	The proposed table name
	 *
	 * @return string	The real table name
	 *
	 * @access public
	 * @since 1.0
	 */
	function getTableName($tableName)
	{
		die("DatabaseConnectionManager::getTableName() - This method must be implemented!");
	}
}

?>
Return current item: Internationalization and Localization