Issues

ZF-6309: Zend_Cache_Backend_File : Change "private" methods to "protected"

Description

Methods in {{Zend_Cache_Backend_File}} are either {{public}} or {{private}}. Using {{protected}} instead of {{private}} would allow ZF users to augment {{Zend_Cache_Backend_File}} without modifying the original code.

Behold the horror we had to do :

if (!class_exists('Zend_Cache_Backend_File_X')) {
    $path = 'Zend/Cache/Backend/File.php';
    $data = file_get_contents($path);
    $data = str_replace('Zend_Cache_Backend_File', 'Zend_Cache_Backend_File_X', $data);
    $data  = str_replace('private', 'protected', $data);
    eval(substr($data, 5)); // Remove PHP tag
}

Please save us from ourselves!

Comments

Absolutely agree, am running into the the same issue on the backend file cache and was going to just copy the backend_file code, rename it, change private to protected and then extend it. Messy!

just fixed into SVN trunk

Thanks - I wanted this too!