The result looks good, although calling instance methods statically
seems more like a bug than a feature to me ;)
All issues raised are addressed, except "Zend::registry()" vs.
"Zend_Registry::getInstance()".
What if "Zend_Registry::getRegistry()" was an alias of
"Zend_Registry::getInstance()"?
Then the user doesn't need to know or understand the connotations of
getInstance().
Cheers,
Gavin
Bill Karwin wrote:
-----Original Message-----
From: Stanislav Malyshev [mailto:[EMAIL PROTECTED]
We can keep the getInstance() if you wish for those who love patterns
and singletons,
So it is the name getInstance() that is so off-putting?
My first wording for the design named the method
Zend_Registry::default(), but I thought that wasn't clear enough. I
thought getInstance() would be clearer.
but this should not be the only way. What I mean is:
static public function put($key, $value) {
$me = self::getInstance();
$me[$key] = $value;
}
That sounds fine to me. As long as it's not called register() and
registry()!
I have updated the proposal page. But it has to work statically and
dynamically, so I made $me set either to $this or self::getInstance().
Regards,
Bill Karwin