(root)/trunk/Registry.php - Rev 45
Rev 27 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
1
<?php
/**
* Basic registry class
*
* @author Thomas Lahn
*/
abstract class Registry
{
/**
* Data storage
* @var array
*/
protected static
$_data = array();
/**
* Puts data in storage
*
* @param string $key
* @param mixed $value
* @return mixed The stored value
*/
public static
function set
($key, $value)
{
self::$_data[$key] = $value;
return self::get($key);
}
/**
* Gets data from storage
*
* @param string $key
* @return mixed
*/
public static
function get
($key)
{
return self::$_data[$key];
}
}