You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Cookie.php
+23-40Lines changed: 23 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -1,52 +1,39 @@
1
1
<?php
2
2
3
-
/**
4
-
* This file is part of the Force Components.
5
-
*
6
-
* (c) Romanenko Sergey / Awilum <awilum@msn.com>
7
-
*
8
-
* For the full copyright and license information, please view the LICENSE
9
-
* file that was distributed with this source code.
10
-
*/
3
+
/**
4
+
* @package Flextype Components
5
+
*
6
+
* @author Sergey Romanenko <awilum@yandex.ru>
7
+
* @link http://components.flextype.org
8
+
*
9
+
* For the full copyright and license information, please view the LICENSE
10
+
* file that was distributed with this source code.
11
+
*/
12
+
13
+
namespaceFlextype\Component\Cookie;
11
14
12
15
class Cookie
13
16
{
14
-
/**
15
-
* Protected constructor since this is a static class.
16
-
*
17
-
* @access protected
18
-
*/
19
-
protectedfunction__construct()
20
-
{
21
-
// Nothing here
22
-
}
23
17
24
18
/**
25
-
* Send a cookie
19
+
* Set a cookie
26
20
*
27
-
* <code>
28
-
* Cookie::set('limit', 10);
29
-
* </code>
21
+
* Cookie::set('username', 'Awilum');
30
22
*
31
23
* @param string $key A name for the cookie.
32
24
* @param mixed $value The value to be stored. Keep in mind that they will be serialized.
33
-
* @param integer $expire The number of seconds that this cookie will be available.
25
+
* @param int $expire The number of seconds that this cookie will be available.
34
26
* @param string $path The path on the server in which the cookie will be availabe. Use / for the entire domain, /foo if you just want it to be available in /foo.
35
27
* @param string $domain The domain that the cookie is available on. Use .example.com to make it available on all subdomains of example.com.
36
-
* @param boolean $secure Should the cookie be transmitted over a HTTPS-connection? If true, make sure you use a secure connection, otherwise the cookie won't be set.
37
-
* @param boolean $httpOnly Should the cookie only be available through HTTP-protocol? If true, the cookie can't be accessed by Javascript, ...
38
-
* @return boolean
28
+
* @param bool $secure Should the cookie be transmitted over a HTTPS-connection? If true, make sure you use a secure connection, otherwise the cookie won't be set.
29
+
* @param bool $httpOnly Should the cookie only be available through HTTP-protocol? If true, the cookie can't be accessed by Javascript, ...
0 commit comments