Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Call to undefined method Cookies::setEncryption()

I'm getting Call to undefined method when calling setEncryption method on Phalcon\Http\Respone\Cookies(). Why is this happening?

E_ERROR: Call to undefined method Phalcon\Http\Response\Cookies::setEncryption()

$di->set('cookies', function() { 
$cookies = new Phalcon\Http\Response\Cookies();
return $cookies; 

Thanks in advance.

edited Jul '15


I noticed this typo in the documentatiom the other day and haven't got round to updating it. The method is actually called useEncryption(). You can also check if the class is already using encryption using the isUsingEncryption() method.