CampSite::initSession PHP Méthode

initSession() public méthode

Initialises the session.
public initSession ( )
    public function initSession()
    {
        $session = CampSession::singleton();
    }

Usage Example

 public function indexAction()
 {
     global $controller;
     $controller = $this;
     require_once $GLOBALS['g_campsiteDir'] . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'campsite_constants.php';
     require_once CS_PATH_CONFIG . DIR_SEP . 'install_conf.php';
     $local_path = dirname(__FILE__) . '/include';
     set_include_path($local_path . PATH_SEPARATOR . get_include_path());
     require_once CS_PATH_INCLUDES . DIR_SEP . 'campsite_init.php';
     // initializes the campsite object
     $campsite = new CampSite();
     // loads site configuration settings
     $campsite->loadConfiguration(CS_PATH_CONFIG . DIR_SEP . 'configuration.php');
     // starts the session
     $campsite->initSession();
     // initiates the context
     $campsite->init();
     // dispatches campsite
     $campsite->dispatch();
     if (APPLICATION_ENV !== 'development' || APPLICATION_ENV !== 'dev') {
         set_error_handler(create_function('', 'return true;'));
     }
     // renders the site
     $campsite->render();
     // triggers an event after displaying
     $campsite->event('afterRender');
 }
All Usage Examples Of CampSite::initSession