Merge branch 'phpunit-ob-fix' of https://github.com/giant-rabbit/civicrm-core into...
[civicrm-core.git] / CRM / Core / Session.php
index 964d42331537a2b877f549f0f31be3fc06ae5e1c..3ef9a7436a5d316dae77d270f8a450dbebd490e9 100644 (file)
 
 
 require_once "PEAR.php";
+
+/**
+ * Class CRM_Core_Session
+ */
 class CRM_Core_Session {
 
   /**
@@ -35,7 +39,7 @@ class CRM_Core_Session {
   static $_managedNames = NULL;
 
   /**
-   * key is used to allow the application to have multiple top
+   * Key is used to allow the application to have multiple top
    * level scopes rather than a single scope. (avoids naming
    * conflicts). We also extend this idea further and have local
    * scopes within a global scope. Allows us to do cool things
@@ -86,7 +90,7 @@ class CRM_Core_Session {
   }
 
   /**
-   * singleton function used to manage this object
+   * Singleton function used to manage this object
    *
    * @return CRM_Core_Session
    * @static
@@ -169,7 +173,7 @@ class CRM_Core_Session {
   }
 
   /**
-   * creates a session local scope
+   * Creates a session local scope
    *
    * @param string  prefix local scope name
    * @param boolean isRead is this a read operation, in this case, the session will not be touched
@@ -191,7 +195,7 @@ class CRM_Core_Session {
   }
 
   /**
-   * resets the session local scope
+   * Resets the session local scope
    *
    * @param string local scope name
    * @access public
@@ -337,7 +341,7 @@ class CRM_Core_Session {
   }
 
   /**
-   * adds a userContext to the stack
+   * Adds a userContext to the stack
    *
    * @param string  $userContext the url to return to when done
    * @param boolean $check       should we do a dupe checking with the top element
@@ -377,7 +381,7 @@ class CRM_Core_Session {
   }
 
   /**
-   * replace the userContext of the stack with the passed one
+   * Replace the userContext of the stack with the passed one
    *
    * @param string the url to return to when done
    *
@@ -398,7 +402,7 @@ class CRM_Core_Session {
   }
 
   /**
-   * pops the top userContext stack
+   * Pops the top userContext stack
    *
    * @param void
    *
@@ -412,7 +416,7 @@ class CRM_Core_Session {
   }
 
   /**
-   * reads the top userContext stack
+   * Reads the top userContext stack
    *
    * @param void
    *
@@ -428,7 +432,7 @@ class CRM_Core_Session {
   }
 
   /**
-   * dumps the session to the log
+   * Dumps the session to the log
    */
   function debug($all = 1) {
     $this->initialize();
@@ -520,6 +524,9 @@ class CRM_Core_Session {
     }
   }
 
+  /**
+   * @param string $names
+   */
   static function registerAndRetrieveSessionObjects($names) {
     if (!is_array($names)) {
       $names = array($names);
@@ -535,6 +542,9 @@ class CRM_Core_Session {
     CRM_Core_BAO_Cache::restoreSessionFromCache($names);
   }
 
+  /**
+   * @param bool $reset
+   */
   static function storeSessionObjects($reset = TRUE) {
     if (empty(self::$_managedNames)) {
       return;
@@ -559,6 +569,9 @@ class CRM_Core_Session {
     return $session->get('userID');
   }
 
+  /**
+   * @return bool
+   */
   function isEmpty() {
     // check if session is empty, if so we dont cache
     // stuff that we can get away with