ZF-5980: Zend_Cache_Core method visibility



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()


fixed in SVN trunk (thanks)

Hello, in what verion has this fix been released?

Hi Adrian, this was fixed with 1.8.0(b1) (r15.521).