more missing code comment blocks
[civicrm-core.git] / CRM / ACL / BAO / Cache.php
index 4543474a1f31532243ee8252d931e688a1d5f03f..e34265969bb48b3c4f13472fa544567217e1ceab 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -40,6 +40,11 @@ class CRM_ACL_BAO_Cache extends CRM_ACL_DAO_Cache {
 
   static $_cache = NULL;
 
+  /**
+   * @param $id
+   *
+   * @return mixed
+   */
   static function &build($id) {
     if (!self::$_cache) {
       self::$_cache = array();
@@ -61,6 +66,11 @@ class CRM_ACL_BAO_Cache extends CRM_ACL_DAO_Cache {
     return self::$_cache[$id];
   }
 
+  /**
+   * @param $id
+   *
+   * @return array
+   */
   static function retrieve($id) {
     $query = "
 SELECT acl_id
@@ -82,6 +92,10 @@ SELECT acl_id
     return $cache;
   }
 
+  /**
+   * @param $id
+   * @param $cache
+   */
   static function store($id, &$cache) {
     foreach ($cache as $aclID => $data) {
       $dao = new CRM_ACL_DAO_Cache();
@@ -96,6 +110,9 @@ SELECT acl_id
     }
   }
 
+  /**
+   * @param $id
+   */
   static function deleteEntry($id) {
     if (self::$_cache &&
       array_key_exists($id, self::$_cache)
@@ -108,9 +125,12 @@ DELETE FROM civicrm_acl_cache
 WHERE contact_id = %1
 ";
     $params = array(1 => array($id, 'Integer'));
-    $dao = CRM_Core_DAO::executeQuery($query, $params);
+    CRM_Core_DAO::executeQuery($query, $params);
   }
 
+  /**
+   * @param $id
+   */
   static function updateEntry($id) {
     // rebuilds civicrm_acl_cache
     self::deleteEntry($id);