|
| 1 | +<?php |
| 2 | + |
| 3 | +namespace Bitrix\Main; |
| 4 | + |
| 5 | +use Bitrix\Main\Web; |
| 6 | + |
| 7 | +class HttpResponse extends Response |
| 8 | +{ |
| 9 | + const STORE_COOKIE_NAME = "STORE_COOKIES"; |
| 10 | + |
| 11 | + /** |
| 12 | + * Undocumented function |
| 13 | + * |
| 14 | + * @param string $text |
| 15 | + * @return void |
| 16 | + */ |
| 17 | + public function flush(string $text = ''): void |
| 18 | + { } |
| 19 | + |
| 20 | + /** |
| 21 | + * Adds a HTTP header field to the response. |
| 22 | + * |
| 23 | + * @param string $name Header field name |
| 24 | + * @param string $value Header field value |
| 25 | + * @return $this |
| 26 | + * @throws ArgumentNullException |
| 27 | + */ |
| 28 | + public function addHeader(string $name, string $value = ''): self |
| 29 | + { |
| 30 | + return $this; |
| 31 | + } |
| 32 | + |
| 33 | + /** |
| 34 | + * Sets a collection of HTTP headers. |
| 35 | + * |
| 36 | + * @param Web\HttpHeaders $headers Headers collection. |
| 37 | + * |
| 38 | + * @return $this |
| 39 | + */ |
| 40 | + public function setHeaders(Web\HttpHeaders $headers): self |
| 41 | + { |
| 42 | + return $this; |
| 43 | + } |
| 44 | + |
| 45 | + /** |
| 46 | + * Adds a cookie to the response. |
| 47 | + * |
| 48 | + * @param Web\Cookie $cookie The cookie. |
| 49 | + * @param boolean $replace Replace an existing cookie or not. |
| 50 | + * @param boolean $checkExpires Check expires value of the cookie or not. |
| 51 | + * @return $this |
| 52 | + */ |
| 53 | + public function addCookie(Web\Cookie $cookie, bool $replace = true, bool $checkExpires = true): self |
| 54 | + { |
| 55 | + return $this; |
| 56 | + } |
| 57 | + |
| 58 | + /** |
| 59 | + * Remembers user's choice about storing persistent cookies. |
| 60 | + * |
| 61 | + * @param boolean $mode |
| 62 | + */ |
| 63 | + public function allowPersistentCookies(bool $mode) |
| 64 | + { } |
| 65 | + |
| 66 | + /** |
| 67 | + * @return Web\Cookie |
| 68 | + */ |
| 69 | + public function getCookies(): Web\Cookie |
| 70 | + { |
| 71 | + return new Web\Cookie('', null); |
| 72 | + } |
| 73 | + |
| 74 | + /** |
| 75 | + * Undocumented function |
| 76 | + * |
| 77 | + * @return Web\HttpHeaders |
| 78 | + */ |
| 79 | + public function getHeaders(): Web\HttpHeaders |
| 80 | + { |
| 81 | + return new Web\HttpHeaders(); |
| 82 | + } |
| 83 | + |
| 84 | + /** |
| 85 | + * Sets the HTTP status of the response. |
| 86 | + * |
| 87 | + * @param string $status |
| 88 | + * @return $this |
| 89 | + * @throws ArgumentNullException |
| 90 | + * @throws ArgumentOutOfRangeException |
| 91 | + */ |
| 92 | + public function setStatus(string $status): self |
| 93 | + { |
| 94 | + return $this; |
| 95 | + } |
| 96 | + |
| 97 | + /** |
| 98 | + * Returns the HTTP status of the response. |
| 99 | + * |
| 100 | + * @return int|string|null |
| 101 | + */ |
| 102 | + public function getStatus() |
| 103 | + { |
| 104 | + return null; |
| 105 | + } |
| 106 | + |
| 107 | + /** |
| 108 | + * Sets the latest time for the Last-Modified header field. |
| 109 | + * |
| 110 | + * @param Type\DateTime $time |
| 111 | + * @return $this |
| 112 | + */ |
| 113 | + public function setLastModified(Type\DateTime $time): self |
| 114 | + { |
| 115 | + return $this; |
| 116 | + } |
| 117 | + |
| 118 | + /** |
| 119 | + * Undocumented function |
| 120 | + * |
| 121 | + * @param callable $job |
| 122 | + * @param array $args |
| 123 | + * @return void |
| 124 | + */ |
| 125 | + public function addBackgroundJob(callable $job, array $args = []): self |
| 126 | + { |
| 127 | + return $this; |
| 128 | + } |
| 129 | +} |
0 commit comments