(dev/core#174) CRM_Utils_Cache_Interface::get() should match PSR-16
[civicrm-core.git] / CRM / Utils / Cache / APCcache.php
index 0f2ed74255f5caf59b18e7e0942251d8bdeb44fe..64c1de94b685ee5454e064502c543e3e0aa6af66 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.7                                                |
+ | CiviCRM version 5                                                  |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2018                                |
  +--------------------------------------------------------------------+
@@ -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);
   }