(dev/core#174) CRM_Utils_Cache_Interface::get() should match PSR-16
[civicrm-core.git] / CRM / Utils / Cache / APCcache.php
index e696aa19c3d2cd884fe2f69fab52070918f9caf0..64c1de94b685ee5454e064502c543e3e0aa6af66 100644 (file)
@@ -84,10 +84,14 @@ class CRM_Utils_Cache_APCcache implements CRM_Utils_Cache_Interface {
 
   /**
    * @param $key
+   * @param mixed $default
    *
    * @return mixed
    */
-  public function get($key) {
+  public function get($key, $default = NULL) {
+    if ($default !== NULL) {
+      throw new \RuntimeException("FIXME: " . __CLASS__ . "::get() only supports NULL default");
+    }
     return apc_fetch($this->_prefix . $key);
   }