Issues

ZF-8430: Cache_Backend_TwoLevels: Add protected getters for used backends

Issue Type: Improvement Created: 2009-12-01T06:52:57.000+0000 Last Updated: 2009-12-19T08:42:11.000+0000 Status: Resolved Fix version(s): - 1.9.7 (11/Jan/10)

Reporter: Niko Sams (nikosams) Assignee: Alexander Veremyev (alexander) Tags: - Zend_Cache

Related issues: Attachments:

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.

<pre class="highlight">
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').

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts