CookieInterface
last analyzed

Size/Duplication

Total Lines 155
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 155
ccs 0
cts 0
cp 0
c 0
b 0
f 0

27 Methods

Rating   Name   Duplication   Size   Complexity  
hasName() 0 1 ?
getName() 0 1 ?
setName() 0 1 ?
hasValue() 0 1 ?
getValue() 0 1 ?
setValue() 0 1 ?
clearAttributes() 0 1 ?
hasAttributes() 0 1 ?
getAttributes() 0 1 ?
setAttributes() 0 1 ?
addAttributes() 0 1 ?
removeAttributes() 0 1 ?
hasAttribute() 0 1 ?
getAttribute() 0 1 ?
setAttribute() 0 1 ?
removeAttribute() 0 1 ?
getCreatedAt() 0 1 ?
setCreatedAt() 0 1 ?
getExpires() 0 1 ?
isExpired() 0 1 ?
compare() 0 1 ?
match() 0 1 ?
matchDomain() 0 1 ?
matchPath() 0 1 ?
matchScheme() 0 1 ?
toArray() 0 1 ?
__toString() 0 1 ?
1
<?php
2
3
/*
4
 * This file is part of the Ivory Http Adapter package.
5
 *
6
 * (c) Eric GELOEN <[email protected]>
7
 *
8
 * For the full copyright and license information, please read the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Ivory\HttpAdapter\Event\Cookie;
13
14
use Ivory\HttpAdapter\Message\InternalRequestInterface;
15
16
/**
17
 * @author GeLo <[email protected]>
18
 */
19
interface CookieInterface
20
{
21
    const ATTR_DOMAIN = 'domain';
22
    const ATTR_PATH = 'path';
23
    const ATTR_SECURE = 'secure';
24
    const ATTR_MAX_AGE = 'max-age';
25
    const ATTR_EXPIRES = 'expires';
26
27
    /**
28
     * @return bool
29
     */
30
    public function hasName();
31
32
    /**
33
     * @return string|null
34
     */
35
    public function getName();
36
37
    /**
38
     * @param string|null
39
     */
40
    public function setName($name);
41
42
    /**
43
     * @return bool
44
     */
45
    public function hasValue();
46
47
    /**
48
     * @return string|null
49
     */
50
    public function getValue();
51
52
    /**
53
     * @param string|null $value
54
     */
55
    public function setValue($value);
56
57
    public function clearAttributes();
58
59
    /**
60
     * @return bool
61
     */
62
    public function hasAttributes();
63
64
    /**
65
     * @return array
66
     */
67
    public function getAttributes();
68
69
    /**
70
     * @param array $attributes
71
     */
72
    public function setAttributes(array $attributes);
73
74
    /**
75
     * @param array $attributes
76
     */
77
    public function addAttributes(array $attributes);
78
79
    /**
80
     * @param array $names
81
     */
82
    public function removeAttributes(array $names);
83
84
    /**
85
     * @param string $name
86
     *
87
     * @return bool
88
     */
89
    public function hasAttribute($name);
90
91
    /**
92
     * @param string $name
93
     *
94
     * @return string
95
     */
96
    public function getAttribute($name);
97
98
    /**
99
     * @param string $name
100
     * @param mixed  $value
101
     */
102
    public function setAttribute($name, $value);
103
104
    /**
105
     * @param string $name
106
     */
107
    public function removeAttribute($name);
108
109
    /**
110
     * @return int
111
     */
112
    public function getCreatedAt();
113
114
    /**
115
     * @param int $createdAt
116
     */
117
    public function setCreatedAt($createdAt);
118
119
    /**
120
     * @return int|bool
121
     */
122
    public function getExpires();
123
124
    /**
125
     * @return bool
126
     */
127
    public function isExpired();
128
129
    /**
130
     * @param CookieInterface $cookie
131
     *
132
     * @return bool
133
     */
134
    public function compare(CookieInterface $cookie);
135
136
    /**
137
     * @param InternalRequestInterface $request
138
     *
139
     * @return bool
140
     */
141
    public function match(InternalRequestInterface $request);
142
143
    /**
144
     * @param string|null $domain
145
     *
146
     * @return bool
147
     */
148
    public function matchDomain($domain);
149
150
    /**
151
     * @param string|null $path
152
     *
153
     * @return bool
154
     */
155
    public function matchPath($path);
156
157
    /**
158
     * @param string|null $scheme
159
     *
160
     * @return bool
161
     */
162
    public function matchScheme($scheme);
163
164
    /**
165
     * @return array
166
     */
167
    public function toArray();
168
169
    /**
170
     * @return string
171
     */
172
    public function __toString();
173
}
174