1: <?php
2: /**
3: * This file is part of the Autarky package.
4: *
5: * (c) Andreas Lutro <anlutro@gmail.com>
6: *
7: * For the full copyright and license information, please view the LICENSE
8: * file that was distributed with this source code.
9: */
10:
11: namespace Autarky\Http;
12:
13: use Autarky\Providers\AbstractProvider;
14:
15: class CookieProvider extends AbstractProvider
16: {
17: /**
18: * {@inheritdoc}
19: */
20: public function register()
21: {
22: $cookieQueue = new CookieQueue;
23: $this->app->getContainer()->instance('Autarky\Http\CookieQueue', $cookieQueue);
24: $this->app->addMiddleware(['Autarky\Http\CookieMiddleware', $cookieQueue]);
25: }
26: }
27: