CookieJarInterface::populate()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
ccs 0
cts 0
cp 0
c 0
b 0
f 0
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\Jar;
13
14
use Ivory\HttpAdapter\Event\Cookie\CookieFactoryInterface;
15
use Ivory\HttpAdapter\Event\Cookie\CookieInterface;
16
use Ivory\HttpAdapter\Message\InternalRequestInterface;
17
use Ivory\HttpAdapter\Message\ResponseInterface;
18
19
/**
20
 * @author GeLo <[email protected]>
21
 */
22
interface CookieJarInterface extends \Countable, \IteratorAggregate
23
{
24
    /**
25
     * @return CookieFactoryInterface
26
     */
27
    public function getCookieFactory();
28
29
    /**
30
     * @param CookieFactoryInterface $cookieFactory
31
     */
32
    public function setCookieFactory(CookieFactoryInterface $cookieFactory);
33
34
    public function clean();
35
36
    /**
37
     * @param string|null $domain
38
     * @param string|null $path
39
     * @param string|null $name
40
     */
41
    public function clear($domain = null, $path = null, $name = null);
42
43
    /**
44
     * @return bool
45
     */
46
    public function hasCookies();
47
48
    /**
49
     * @return CookieFactoryInterface[]
50
     */
51
    public function getCookies();
52
53
    /**
54
     * @param CookieFactoryInterface[] $cookies
55
     */
56
    public function setCookies(array $cookies);
57
58
    /**
59
     * @param CookieFactoryInterface[] $cookies
60
     */
61
    public function addCookies(array $cookies);
62
63
    /**
64
     * @param CookieFactoryInterface[] $cookies
65
     */
66
    public function removeCookies(array $cookies);
67
68
    /**
69
     * @param CookieInterface $cookie
70
     *
71
     * @return bool
72
     */
73
    public function hasCookie(CookieInterface $cookie);
74
75
    /**
76
     * @param CookieInterface $cookie
77
     */
78
    public function addCookie(CookieInterface $cookie);
79
80
    /**
81
     * @param CookieInterface $cookie
82
     */
83
    public function removeCookie(CookieInterface $cookie);
84
85
    /**
86
     * @param InternalRequestInterface $request
87
     *
88
     * @return InternalRequestInterface
89
     */
90
    public function populate(InternalRequestInterface $request);
91
92
    /**
93
     * @param InternalRequestInterface $request
94
     * @param ResponseInterface        $response
95
     */
96
    public function extract(InternalRequestInterface $request, ResponseInterface $response);
97
}
98