How to use session in Phalcon?
To initiate new session,
- $session = new Session();
- $session->start();
setting data into session
- $this->session->set("key", "value");
retrieve session data
- $this->session->get(“key”);
removing session
- $this->session->remove(“key”'); //remove particular variable
- $this->session->destroy(); //remove the session
BY Best Interview Question ON 03 Apr 2019