DotLibrary
[ class tree: DotLibrary ] [ index: DotLibrary ] [ all elements ]

Source for file Sessions.php

Documentation is available at Sessions.php

  1. <?php
  2. /**
  3. * DotBoost Technologies Inc.
  4. * DotKernel Application Framework
  5. *
  6. @category   DotKernel
  7. @package    DotLibrary
  8. @copyright  Copyright (c) 2009 DotBoost  Technologies (http://www.dotboost.com)
  9. @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  10. @version    $Id: Sessions.php 152 2010-06-18 07:39:40Z teo $
  11. */
  12.  
  13. /**
  14. * Session management
  15. @category   DotKernel
  16. @package    DotLibrary
  17. @author     DotKernel Team <team@dotkernel.com>
  18. */
  19.  
  20. {    
  21.     /**
  22.      * Constructor is private, because this class is static, can't be instantiated
  23.      * @access private
  24.      * @return Dot_Sessions 
  25.      */
  26.     private function __construct ()
  27.     {        
  28.     }
  29.     /**
  30.      * Start the session
  31.      * @access public
  32.      * @static
  33.      * @return void 
  34.      */
  35.     public static function start($module)
  36.     {
  37.         $resource Zend_Registry::get('resource');
  38.         $namespaceName $resource->session->$module->name;
  39.         $rememberMe $resource->session->$module->rememberMeSeconds;
  40.         //if session is not registered, create it
  41.         if(!(Zend_Registry::isRegistered('session')))
  42.         {
  43.             $session new Zend_Session_Namespace($namespaceName);
  44.             if(!isset($session->initialized))
  45.             {
  46.                 Zend_Session::regenerateId();
  47.                 $session->initialized TRUE;
  48.                 Zend_Session::rememberMe($rememberMe);
  49.             }
  50.             Zend_Registry::set('session',$session);
  51.         }
  52.     }
  53. }

Documentation generated on Wed, 21 Jul 2010 07:34:42 +0000 by phpDocumentor 1.4.3