| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
require_once "PEAR.php";
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
* Singleton function used to manage this object
*
* @return CRM_Core_Session
- * @static
*/
public static function &singleton() {
if (self::$_singleton === NULL) {
- self::$_singleton = new CRM_Core_Session;
+ self::$_singleton = new CRM_Core_Session();
}
return self::$_singleton;
}
// FIXME: This belongs in CRM_Utils_System_*
if ($config->userSystem->is_drupal && function_exists('drupal_session_start')) {
// https://issues.civicrm.org/jira/browse/CRM-14356
- if (! (isset($GLOBALS['lazy_session']) && $GLOBALS['lazy_session'] == TRUE)) {
+ if (!(isset($GLOBALS['lazy_session']) && $GLOBALS['lazy_session'] == TRUE)) {
drupal_session_start();
}
$_SESSION = array();
) {
$this->_session[$this->_key] = array();
}
- return;
+ return NULL;
}
/**
$this->_session = array();
}
- return;
+ return NULL;
}
/**
*
*
* @param string $name
- * : name of the variable.
+ * name of the variable.
* @param string $prefix
- * : adds another level of scope to the session.
+ * adds another level of scope to the session.
*
* @return mixed
*/
*
*
* @param string $name
- * : name of the timer.
+ * name of the timer.
* @param int $expire
- * : expiry time (in seconds).
+ * expiry time (in seconds).
*
* @return mixed
*/
* defaults to 10 seconds for most messages, 5 if it has a title but no body,
* or 0 for errors or messages containing links
*
- * @static
*
* @return void
*/
/**
* Retrieve contact id of the logged in user
- * @return integer|NULL contact ID of logged in user
+ * @return int|NULL
+ * contact ID of logged in user
*/
public static function getLoggedInContactID() {
$session = CRM_Core_Session::singleton();
// helps proxies like varnish
return empty($_SESSION);
}
+
}