Skip to content

Instantly share code, notes, and snippets.

@bakura10
Created September 27, 2012 09:18
Show Gist options
  • Save bakura10/3793064 to your computer and use it in GitHub Desktop.
Save bakura10/3793064 to your computer and use it in GitHub Desktop.
<?php
namespace Common\Registry;
class Registry
{
/**
* @var array
*/
protected static $container = array();
/**
* Set a value in the registry
*
* @static
* @param mixed $key
* @param mixed $value
*/
public static function set($key, $value)
{
self::$container[$key] = $value;
}
/**
* @static
* @param mixed $key
* @return mixed
*/
public static function get($key)
{
return self::$container[$key];
}
/**
* @static
* @param mixed $key
*/
public static function remove($key)
{
unset(self::$container[$key]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment