*/ class Registry { /** * @var array */ private $registry = []; /** * @param $key * @param null $default * @return null */ public function get($key, $default = null) { if (isset($this->registry[$key])) { return $this->registry[$key]; } return $default; } /** * @param $key * @param $value */ public function set($key, $value) { $this->registry[$key] = $value; } }