ZF-8430: Cache_Backend_TwoLevels: Add protected getters for used backends
Description
Currently it's impossible to change the behaviour of the TwoLevels backend, as the used backends are private.
Adding those two getters allows users to subclass the TwoLevels backend and access them.
Index: library/Zend/Cache/Backend/TwoLevels.php
===================================================================
--- library/Zend/Cache/Backend/TwoLevels.php (Revision 19324)
+++ library/Zend/Cache/Backend/TwoLevels.php (Arbeitskopie)
@@ -140,6 +140,26 @@
}
/**
+ * Returns the used slow backend
+ *
+ * @return Zend_Cache_Backend_ExtendedInterface
+ */
+ protected function _getSlowBackend()
+ {
+ return $this->_slowBackend;
+ }
+
+ /**
+ * Returns the used fast backend
+ *
+ * @return Zend_Cache_Backend_ExtendedInterface
+ */
+ protected function _getFastBackend()
+ {
+ return $this->_fastBackend;
+ }
+
+ /**
* Test if a cache is available or not (for the given id)
*
* @param string $id cache id
Comments
Posted by Alexander Veremyev (alexander) on 2009-12-19T08:42:11.000+0000
Fixed (corresponding properties visibility is changed to 'protected').