ZF-5980: Zend_Cache_Core method visibility
Description
Hi,
Zend_Cache_Core doesn't permit to add custom functionality due to all it's private method/property declarations.
Say I want to create my own Zend_Cache_Core:
class Test_Cache_Core extends Zend_Cache_Core
{
public function add($data, $id, ....)
{
$id = $this->_id($id); // This call will fail because Zend_Cache_Core::_id is declared as private
[....]
}
}
Here I can't use Zend_Cache_Core::_id(). Is there any reason for these methods to be private? If you want these methods not to be overridden you could just declare them as 'protected final'
Here is a list of methods I want to use but that are declared as private:
- Zend_Cache_Core::_id()
- Zend_Cache_Core::_validateIdOrTag()
- Zend_Cache_Core::_validateTagsArray()
Comments
Posted by Fabien MARTY (fab) on 2009-03-28T10:34:56.000+0000
fixed in SVN trunk (thanks)
Posted by Adrian Caragea (adrianc) on 2012-12-07T10:00:42.000+0000
Hello, in what verion has this fix been released?
Posted by Frank Brückner (frosch) on 2012-12-07T10:29:19.000+0000
Hi Adrian, this was fixed with 1.8.0(b1) (r15.521).