1 | <?php |
||
25 | final class LocaleCookieService |
||
26 | { |
||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $name; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | private $domain; |
||
36 | |||
37 | /** |
||
38 | * @var bool |
||
39 | */ |
||
40 | private $secure; |
||
41 | |||
42 | /** |
||
43 | * @var bool |
||
44 | */ |
||
45 | private $httpOnly; |
||
46 | |||
47 | /** |
||
48 | * @param string $name |
||
49 | * @param string $domain |
||
50 | * @param bool $secure |
||
51 | * @param bool $httpOnly |
||
52 | */ |
||
53 | public function __construct($name, $domain, $secure, $httpOnly) |
||
85 | |||
86 | /** |
||
87 | * Set the given locale as a cookie on the given HTTP Response. |
||
88 | * |
||
89 | * @param string $locale |
||
90 | * Locale to set as cookie value. |
||
91 | * @param Response $response |
||
92 | * HTTP response to add the cookie to. |
||
93 | * |
||
94 | * @return Response |
||
95 | * Augmented Response. |
||
96 | */ |
||
97 | public function set($locale, Response $response) |
||
103 | } |
||
104 |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.