Login +

Reference Guide / SLS_Cookie

SLS_Cookie1 is a class that allows you to manipulate data stored in cookies.


At Controller level, you can instantiate a new class:

$cookie = new SLS_Cookie();

Data recovery

- If you want to retrieve all the parameters, you can use the getParams() function:


- If you want to retrieve a particular parameter, you can use the __get() function:


Data updates

- If you want to change the value of a key, use the __set() function:

$this->_cookie->__set($key, $value);

- If you want to delete a key, use the flush() function:


- To reflect data in the cookie, use the save() function:


- To delete the whole cookie, use the delete() function:



  1. SLS_Cookie - SLS_Cookie class - Manage cookie