Skip to content

Instantly share code, notes, and snippets.

@phalcon
Created November 30, 2012 17:21
Show Gist options
  • Save phalcon/4177147 to your computer and use it in GitHub Desktop.
Save phalcon/4177147 to your computer and use it in GitHub Desktop.
class Registry {
private $_data = array();
public function set($x, $d)
{
$this->_data[$x] = $d;
}
public function get($x)
{
return $this->_data[$x];
}
}
$di->set('registry', new Registry());
//In a controller:
$this->registry->set('myconfig', "some raw data");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment