<?php
/////////////////////////////////////////////////////////////////
/////////////////// Garry`s MySQL Class /////////////////////////
/////////////////////////////////////////////////////////////////
////////////////// 14/12/07 /////////////////////////
// THIS CLASS WRITTEN BY GARRY LACHMAN -> hide@address.com //
/////////////////////////////////////////////////////////////////
class Settings {
var $mysql;
var $security;
function Settings ($directCall=true)
{
if ($directCall) {
trigger_error("This Class is singleton!", E_USER_ERROR);
}
}
function &getInstance()
{
static $instance;
if (!is_object($instance)) {
$instance = new Settings(false);
$instance->fillValues();
}
return $instance;
}
// GETTERS
function getMySQLSettings($node) { return $this->mysql[$node]; }
function getSecuritySettings($node) { return $this->security[$node]; }
// PRIVATE FUNCTIONS
function fillValues() {
// MYSQL
$this->mysql['hostname'] = 'localhost';
$this->mysql['username'] = 'root';
$this->mysql['password'] = 'password';
$this->mysql['database'] = 'db';
$this->mysql['prefix'] = 'prefix_';
// SECURITY - we don`t use this in mySQL Layer class
$this->security['hash'] = 'sdfijh2p348y7yxd487*&%^ygog(&^9togI%R$(50))';
}
}
?>