Documentation

Previous topic

< Class Phalcon\Security\Exception

Next topic

Class Phalcon\Session\Adapter >

This Page

Class Phalcon\Session

Session client-server persistent state data management. This component allows you to separate your session data between application or modules. With this, it’s possible to use the same index to refer a variable but it can be in different applications.

<?php

 $session = new Phalcon\Session\Adapter\Files(array(
    'uniqueId' => 'my-private-app'
 ));

 $session->start();

 $session->set('var', 'some-value');

 echo $session->get('var');