|
| 1 | +<?php |
| 2 | + |
| 3 | +namespace BasicHttpClient\Request\Message\Base; |
| 4 | + |
| 5 | +use BasicHttpClient\Request\Base\CurlConfiguratorInterface; |
| 6 | +use BasicHttpClient\Request\Message\Body\Base\BodyInterface; |
| 7 | +use BasicHttpClient\Request\Message\Cookie\Base\CookieInterface; |
| 8 | +use BasicHttpClient\Request\Message\Header\Base\HeaderInterface; |
| 9 | + |
| 10 | +/** |
| 11 | + * Interface MessageInterface |
| 12 | + * |
| 13 | + * @package BasicHttpClient\Request\Message\Base |
| 14 | + */ |
| 15 | +interface MessageInterface extends CurlConfiguratorInterface |
| 16 | +{ |
| 17 | + |
| 18 | + /** |
| 19 | + * @return HeaderInterface[] |
| 20 | + */ |
| 21 | + public function getHeaders(); |
| 22 | + |
| 23 | + /** |
| 24 | + * @param string $name |
| 25 | + * @return HeaderInterface[] |
| 26 | + */ |
| 27 | + public function getHeadersByName($name); |
| 28 | + |
| 29 | + /** |
| 30 | + * @param string $name |
| 31 | + * @return HeaderInterface |
| 32 | + */ |
| 33 | + public function getHeaderByName($name); |
| 34 | + |
| 35 | + /** |
| 36 | + * @return $this |
| 37 | + */ |
| 38 | + public function clearHeaders(); |
| 39 | + |
| 40 | + /** |
| 41 | + * @param HeaderInterface[] $headers |
| 42 | + * @return $this |
| 43 | + */ |
| 44 | + public function setHeaders(array $headers); |
| 45 | + |
| 46 | + /** |
| 47 | + * @param HeaderInterface $header |
| 48 | + * @return $this |
| 49 | + */ |
| 50 | + public function addAdditionalHeader(HeaderInterface $header); |
| 51 | + |
| 52 | + /** |
| 53 | + * @param HeaderInterface $header |
| 54 | + * @return $this |
| 55 | + */ |
| 56 | + public function addHeader(HeaderInterface $header); |
| 57 | + |
| 58 | + /** |
| 59 | + * @param string $name |
| 60 | + * @return $this |
| 61 | + */ |
| 62 | + public function removeHeadersByName($name); |
| 63 | + |
| 64 | + /** |
| 65 | + * @param HeaderInterface $header |
| 66 | + * @return $this |
| 67 | + */ |
| 68 | + public function removeHeader(HeaderInterface $header); |
| 69 | + |
| 70 | + /** |
| 71 | + * @param $name |
| 72 | + * @return bool |
| 73 | + */ |
| 74 | + public function hasHeaderWithName($name); |
| 75 | + |
| 76 | + /** |
| 77 | + * @param HeaderInterface $header |
| 78 | + * @return bool |
| 79 | + */ |
| 80 | + public function hasHeader(HeaderInterface $header); |
| 81 | + |
| 82 | + /** |
| 83 | + * @return bool |
| 84 | + */ |
| 85 | + public function hasHeaders(); |
| 86 | + |
| 87 | + /** |
| 88 | + * @return int |
| 89 | + */ |
| 90 | + public function getHeaderCount(); |
| 91 | + |
| 92 | + /** |
| 93 | + * @return CookieInterface[] |
| 94 | + */ |
| 95 | + public function getCookies(); |
| 96 | + |
| 97 | + /** |
| 98 | + * @param $name |
| 99 | + * @return CookieInterface |
| 100 | + */ |
| 101 | + public function getCookieByName($name); |
| 102 | + |
| 103 | + /** |
| 104 | + * @return $this |
| 105 | + */ |
| 106 | + public function clearCookies(); |
| 107 | + |
| 108 | + /** |
| 109 | + * @param CookieInterface[] $cookies |
| 110 | + * @return $this |
| 111 | + */ |
| 112 | + public function setCookies($cookies); |
| 113 | + |
| 114 | + /** |
| 115 | + * @param CookieInterface $cookie |
| 116 | + * @return $this |
| 117 | + */ |
| 118 | + public function addCookie(CookieInterface $cookie); |
| 119 | + |
| 120 | + /** |
| 121 | + * @param string $name |
| 122 | + * @return $this |
| 123 | + */ |
| 124 | + public function removeCookieByName($name); |
| 125 | + |
| 126 | + /** |
| 127 | + * @param CookieInterface $cookie |
| 128 | + * @return $this |
| 129 | + */ |
| 130 | + public function removeCookie(CookieInterface $cookie); |
| 131 | + |
| 132 | + /** |
| 133 | + * @param $name |
| 134 | + * @return bool |
| 135 | + */ |
| 136 | + public function hasCookieWithName($name); |
| 137 | + |
| 138 | + /** |
| 139 | + * @param CookieInterface $cookie |
| 140 | + * @return bool |
| 141 | + */ |
| 142 | + public function hasCookie(CookieInterface $cookie); |
| 143 | + |
| 144 | + /** |
| 145 | + * @return bool |
| 146 | + */ |
| 147 | + public function hasCookies(); |
| 148 | + |
| 149 | + /** |
| 150 | + * @return int |
| 151 | + */ |
| 152 | + public function getCookieCount(); |
| 153 | + |
| 154 | + /** |
| 155 | + * @return BodyInterface |
| 156 | + */ |
| 157 | + public function getBody(); |
| 158 | + |
| 159 | + /** |
| 160 | + * @param BodyInterface $body |
| 161 | + * @return $this |
| 162 | + */ |
| 163 | + public function setBody(BodyInterface $body); |
| 164 | + |
| 165 | + /** |
| 166 | + * @return bool |
| 167 | + */ |
| 168 | + public function hasBody(); |
| 169 | + |
| 170 | + /** |
| 171 | + * @return $this |
| 172 | + */ |
| 173 | + public function removeBody(); |
| 174 | + |
| 175 | +} |
0 commit comments