yes, it's basically a "named property bucket", but you can specialize it into a "specifical properties bucket" by getting rid of more general Get/Set in favour of more specific getters/setters, like GetDatabase/SetDatabase, GetUser/SetUser ...
Also, you can put more specialization to it, like denying writing to properties that were already set (allow first write only).
But you must store them in such manner that you can read them afterwards, so using uniq_id() is not the way to go. You'd be better off storing them in a hash with their name as the index, this way the reading would work, too.
Code: Select all
function get($name)
{
if (isset($this->FRegistry[$name]))
return $this->FRegistry[$name];
else
return null;
}
function set($name, $value)
{
$this->FRegistry[$name] = $value;
}
edit + offtopic: i see you use pascal (delphi) naming conventions, noticed the T for class and F for private member preffix.
