1 | <?php namespace Comodojo\Cookies; |
||
23 | class CookieManager { |
||
24 | |||
25 | /* |
||
26 | * Cookie storage :) |
||
27 | * |
||
28 | * @var array |
||
29 | */ |
||
30 | private $cookies = array(); |
||
31 | |||
32 | /** |
||
33 | * Add a cookie to the stack |
||
34 | * |
||
35 | * @param CookieInterface $cookie |
||
36 | * |
||
37 | * @return static |
||
38 | */ |
||
39 | 6 | public function add(CookieInterface $cookie) { |
|
46 | |||
47 | /** |
||
48 | * @deprecated 2.1.0 |
||
49 | * @see CookieManager::add() |
||
50 | */ |
||
51 | public function register(CookieInterface $cookie) { |
||
54 | |||
55 | /** |
||
56 | * Delete a cookie from the stack |
||
57 | * |
||
58 | * @param CookieInterface|string $cookie |
||
59 | * |
||
60 | * @return static |
||
61 | */ |
||
62 | 3 | public function del($cookie) { |
|
75 | |||
76 | /** |
||
77 | * @deprecated 2.1.0 |
||
78 | * @see CookieManager::del() |
||
79 | */ |
||
80 | public function unregister($cookie) { |
||
83 | |||
84 | /** |
||
85 | * Check if cookie is into the stack |
||
86 | * |
||
87 | * @param CookieInterface|string $cookie |
||
88 | * |
||
89 | * @return static |
||
90 | */ |
||
91 | 3 | public function has($cookie) { |
|
100 | |||
101 | /** |
||
102 | * @deprecated 2.1.0 |
||
103 | * @see CookieManager::has() |
||
104 | */ |
||
105 | 1 | public function isRegistered($cookie) { |
|
108 | |||
109 | /** |
||
110 | * Get cookie from $cookie_name |
||
111 | * |
||
112 | * @param string $cookie_name |
||
113 | * |
||
114 | * @return CookieInterface |
||
115 | */ |
||
116 | 3 | public function get($cookie_name) { |
|
123 | |||
124 | /** |
||
125 | * Get the whole cookies' archive |
||
126 | * |
||
127 | * @return array |
||
128 | */ |
||
129 | public function getAll() { |
||
134 | |||
135 | /** |
||
136 | * Get values from all registered cookies and dump as an associative array |
||
137 | * |
||
138 | * @return array |
||
139 | */ |
||
140 | 3 | public function getValues() { |
|
161 | |||
162 | /** |
||
163 | * Save all registered cookies |
||
164 | * |
||
165 | * @return static |
||
166 | */ |
||
167 | public function save() { |
||
186 | |||
187 | /** |
||
188 | * Load all registered cookies |
||
189 | * |
||
190 | * @return static |
||
191 | */ |
||
192 | public function load() { |
||
211 | |||
212 | } |
||
213 |
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.