23 public function register($name, &$ref) {
24 if (isset($this->_storage[$name])) {
25 trigger_error(
"Name $name produces collision, cannot re-register",
29 $this->_storage[$name] =& $ref;
37 public function &
get($name, $ignore_error =
false) {
38 if (!isset($this->_storage[$name])) {
40 trigger_error(
"Attempted to retrieve non-existent variable $name",
46 return $this->_storage[$name];
54 if (!isset($this->_storage[$name])) {
55 trigger_error(
"Attempted to destroy non-existent variable $name",
59 unset($this->_storage[$name]);
67 return isset($this->_storage[$name]);
75 foreach ($context_array as $key => $discard) {
76 $this->
register($key, $context_array[$key]);