<?php
/*
 * @version			$Id: index.php 10381 2008-06-01 03:35:53Z $
 * @package			Carteasy
 * @copyright		Copyright (C) 2005 - 2011 Wlanium
 * @license			proprietary
 * @author			Thomas Bartelt
 * Carteasy is a web shop system
 * 
 * File Description:
 * Configuration and datastorage is currently muddled, ultimatly the registry
 * should fix this. The function of config.class.php and base.class.php need to be
 * reexamined and changes to those two classes and the registry decided afterwards.
 * I just added three new functions to config.class.php.
 * has_key($key)
 * get_value($key)
 * and
 * set_key
 * one posibility is to use the registry for object storage and config storage and remove
 * base and config totaly.
 */

class Registry {

	private static $values = array();

	protected function __construct() {
	}

	private function __clone() {}

	public static function set($key, $value) {
		self::$values[$key] = $value;
	}

	public static function get($key) {
		if (isset(self::$values[$key])) {
			return self::$values[$key];
		}

		return null;
	}
}