I can't seem to get my head around sessions in phalcon (even though it all seem so simple at first glance).
I do this in my public/index.php:
$di->setShared('session', function() {
$session = new Phalcon\Session\Adapter\Files();
$session->start();
return $session;
});
and this in my controller
$this->session->set( "session_var", "TESTING");
I then var_dump the session in my view:
var_dump( $this->session );
And all I get is:
object(Phalcon\Session\Adapter\Files)#41 (3) { ["_uniqueId":protected]=> NULL ["_started":protected]=> bool(false) ["_options":protected]=> NULL }
no matter how I try to get stuff into the session.
What am I missing here?