I think anything that has a potential for being extended, should
probably most of it's properties set to protected, the MVC components
are a great example.
Others, like Zend_Search and Zend_Json aren't likely to be extended,
they're pretty much standalone, which entirely encapsulate what they
do, so these might have
a number of private properties.
- Davey
On Dec 7, 2006, at 1:15 PM, David Koblas wrote:
I'm working on making an custom View class and have noticed that
the private/protected is a little too strict (this possibly applies
in other places).
The specific case is that I went to override render -- after a bit
of poking figured out I should override _run() instead. But, in
the process found that I had no access to the 'scriptPath' aka
$this->_path['script'] variable to do my own implementation of the
$this->_script() method. Now that I'm back to my own render
rountine have no access to the $this->_vars . While I can go and
write my own implementation on __set() it doesn't really make sense.
There probably is a more "framework friendly" approach to what I'm
doing, but at the same time, extending the classes is a little bit
of a bear.
--koblas