Пример #1
0
 /**
  * Returns the $_SESSION data wrapped in an Inspekt_Cage object
  *
  * This utilizes a singleton pattern to get around scoping issues
  *
  * @param string  $config_file
  * @param boolean $strict whether or not to nullify the superglobal array
  * @return Inspekt_Cage
  * @static
  * @deprecated
  */
 public static function makeSessionCage($config_file = NULL, $strict = TRUE)
 {
     trigger_error('makeSessionCage is disabled in this version', E_USER_ERROR);
     /**
      * @staticvar $_instance
      */
     static $_instance;
     if (!isset($_SESSION)) {
         return NULL;
     }
     if (!isset($_instance)) {
         $_instance = Inspekt_Cage_Session::Factory($_SESSION, $config_file, '_SESSION', $strict);
     }
     $GLOBALS['HTTP_SESSION_VARS'] = NULL;
     return $_instance;
 }
Пример #2
0
    /**
     * Returns the $_SESSION data wrapped in an Inspekt_Cage object
     *
     * This utilizes a singleton pattern to get around scoping issues
     *
     * @param string  $config_file
     * @param boolean $strict whether or not to nullify the superglobal array
     * @return Inspekt_Cage
     * @deprecated
     */
    static public function makeSessionCage($config_file = null, $strict = true)
    {
        Inspekt_Error::raiseError('makeSessionCage is disabled in this version', E_USER_ERROR);

        /**
         * @staticvar $_instance
         */
        static $_instance;

        if (!isset($_SESSION)) {
            return null;
        }

        if (!isset($_instance)) {
            $_instance = Inspekt_Cage_Session::Factory($_SESSION, $config_file, '_SESSION', $strict);
        }
        $GLOBALS['HTTP_SESSION_VARS'] = null;
        return $_instance;
    }