ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
FigCookieTestingMessage.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Dflydev\FigCookies;
4 
6 
8 {
9  private $headers = [];
10  public function getProtocolVersion()
11  {
12  throw new \RuntimeException("This method has not been implemented.");
13  }
14 
15  public function withProtocolVersion($version)
16  {
17  throw new \RuntimeException("This method has not been implemented.");
18  }
19 
20  public function hasHeader($name)
21  {
22  throw new \RuntimeException("This method has not been implemented.");
23  }
24 
25  public function withHeader($name, $value)
26  {
27  $clone = clone($this);
28 
29  $clone->headers[$name] = [$value];
30 
31  return $clone;
32  }
33 
34  public function withAddedHeader($name, $value)
35  {
36  $clone = clone($this);
37 
38  if (! isset($clone->headers[$name])) {
39  $clone->headers[$name] = [];
40  }
41 
42  $clone->headers[$name][] = $value;
43 
44  return $clone;
45  }
46 
47  public function withoutHeader($name)
48  {
49  $clone = clone($this);
50 
51  if (isset($clone->headers[$name])) {
52  unset($clone->headers[$name]);
53  }
54 
55  return $clone;
56  }
57 
58  public function getBody()
59  {
60  throw new \RuntimeException("This method has not been implemented.");
61  }
62 
63  public function withBody(StreamInterface $body)
64  {
65  throw new \RuntimeException("This method has not been implemented.");
66  }
67 
68  public function getHeaders()
69  {
70  throw new \RuntimeException("This method has not been implemented.");
71  }
72 
73  public function getHeader($name)
74  {
75  if (! isset($this->headers[$name])) {
76  return [];
77  }
78 
79  return $this->headers[$name];
80  }
81 
82  public function getHeaderLine($name)
83  {
84  return implode(',', $this->headers[$name]);
85  }
86 
87  public function getHeaderLines($name)
88  {
89  if (! isset($this->headers[$name])) {
90  return [];
91  }
92 
93  return $this->headers[$name];
94  }
95 }
withBody(StreamInterface $body)
if($format !==null) $name
Definition: metadata.php:146
Describes a data stream.