<?php
/**
* Scrubs is an Object Relational Mapper for PHP. It is not a port
* of Hibernate.
*
* @version $Id: version .1$
* @copyright 2003
**/
require_once('QueryEngine.php');
require_once('DataStore.php');
class Scrubs extends QueryEngine{
function Scrubs() {
QueryEngine::QueryEngine();
$this->connect();
}
function connect() {
$db = new DataStore();
$this->dbc = $db->connect();
if ($this->dbc) {
$logString = "Connected to ".$this->dbc->database." as ".$this->dbc->user;
$logString .= " identified by ".$this->dbc->password.".";
$this->logger->info($logString);
} else {
$logString = "Could not connect to ".$this->dbc->database." as ".$this->dbc->user;
$logString .= " identified by ".$this->dbc->password.".";
$this->logger->fatal($logString);
}
}
function shutdown() {
$this->dbc->Close();
$this->logger->info("Scrubs shutdown.");
$this->logger->execute();
}
}
?>