phalcon/cphalcon — pull request #875 by sjinks (2013-07-18 14:44:17+00:00)
Title: [NFR] Make Phalcon\Http\Cookie less depend on session

This can be useful for cases where the application does not need sessions (ie, WordPress does not use sessions):

```php
$di = new \Phalcon\DI();
$di->set('cookies', function () {
$cookies = new Phalcon\Http\Response\Cookies();
$cookies->useEncryption(false);
return $cookies;
});

$di->set('response', function() { return new \Phalcon\Http\Response(); });
$di->getShared('cookies')->set('gift_order', '2221dddd', time()+86400, '/');
$di->getShared('response')->send();
```

If `session` is not added to DI, it won't be used — this can be useful in some cases, especially if sessions are stored in the database: if we don't need session, we can save some CPU ticks by not connecting to the database etc.