Merge pull request #6170 from colemanw/CRM-16354
[civicrm-core.git] / CRM / Utils / Recent.php
index ec8378798b700316e3ada794eb3ee38316908061..a64c3f2580bd94d9a516d311edf1feb8d9ab2fba 100644 (file)
@@ -1,10 +1,9 @@
 <?php
-
 /*
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
 class CRM_Utils_Recent {
 
   /**
-   * Max number of items in queue
+   * Max number of items in queue.
    *
    * @int
    */
   const MAX_ITEMS = 10, STORE_NAME = 'CRM_Utils_Recent';
 
   /**
-   * The list of recently viewed items
+   * The list of recently viewed items.
    *
    * @var array
-   * @static
    */
   static private $_recent = NULL;
 
   /**
-   * Initialize this class and set the static variables
+   * Initialize this class and set the static variables.
    *
    * @return void
-   * @static
    */
   public static function initialize() {
     if (!self::$_recent) {
@@ -71,11 +68,10 @@ class CRM_Utils_Recent {
   }
 
   /**
-   * Return the recently viewed array
+   * Return the recently viewed array.
    *
    * @return array
    *   the recently viewed array
-   * @static
    */
   public static function &get() {
     self::initialize();
@@ -83,7 +79,7 @@ class CRM_Utils_Recent {
   }
 
   /**
-   * Add an item to the recent stack
+   * Add an item to the recent stack.
    *
    * @param string $title
    *   The title to display.
@@ -97,9 +93,8 @@ class CRM_Utils_Recent {
    * @param array $others
    *
    * @return void
-   * @static
    */
-  static function add(
+  public static function add(
     $title,
     $url,
     $id,
@@ -149,13 +144,12 @@ class CRM_Utils_Recent {
   }
 
   /**
-   * Delete an item from the recent stack
+   * Delete an item from the recent stack.
    *
    * @param array $recentItem
    *   Array of the recent Item to be removed.
    *
    * @return void
-   * @static
    */
   public static function del($recentItem) {
     self::initialize();
@@ -178,13 +172,12 @@ class CRM_Utils_Recent {
   }
 
   /**
-   * Delete an item from the recent stack
+   * Delete an item from the recent stack.
    *
    * @param string $id
    *   Contact id that had to be removed.
    *
    * @return void
-   * @static
    */
   public static function delContact($id) {
     self::initialize();
@@ -205,4 +198,5 @@ class CRM_Utils_Recent {
     $session = CRM_Core_Session::singleton();
     $session->set(self::STORE_NAME, self::$_recent);
   }
+
 }