@@ 31-35 (lines=5) @@ | ||
28 | ||
29 | public function get($header = null) { |
|
30 | ||
31 | if ( is_null($header) ) return $this->headers; |
|
32 | ||
33 | else if ( array_key_exists($header, $this->headers) ) return $this->headers[$header]; |
|
34 | ||
35 | else return null; |
|
36 | ||
37 | } |
|
38 | ||
@@ 48-52 (lines=5) @@ | ||
45 | array_values($this->headers) |
|
46 | ); |
|
47 | ||
48 | } else if ( array_key_exists($header, $this->headers) ) { |
|
49 | ||
50 | return self::headerToString($header, $this->headers[$header]); |
|
51 | ||
52 | } else return null; |
|
53 | ||
54 | } |
|
55 | ||
@@ 82-92 (lines=11) @@ | ||
79 | ||
80 | return true; |
|
81 | ||
82 | } else if ( array_key_exists($header, $this->headers) ) { |
|
83 | ||
84 | unset($this->headers[$header]); |
|
85 | ||
86 | return true; |
|
87 | ||
88 | } else { |
|
89 | ||
90 | return false; |
|
91 | ||
92 | } |
|
93 | ||
94 | } |
|
95 |