run:R W Run
3.03 KB
2026-03-11 16:18:52
R W Run
error_log
📄Headers.php
1<?php
2/**
3 * Case-insensitive dictionary, suitable for HTTP headers
4 *
5 * @package Requests
6 */
7
8namespace WpOrg\Requests\Response;
9
10use WpOrg\Requests\Exception;
11use WpOrg\Requests\Exception\InvalidArgument;
12use WpOrg\Requests\Utility\CaseInsensitiveDictionary;
13use WpOrg\Requests\Utility\FilteredIterator;
14
15/**
16 * Case-insensitive dictionary, suitable for HTTP headers
17 *
18 * @package Requests
19 */
20class Headers extends CaseInsensitiveDictionary {
21 /**
22 * Get the given header
23 *
24 * Unlike {@see \WpOrg\Requests\Response\Headers::getValues()}, this returns a string. If there are
25 * multiple values, it concatenates them with a comma as per RFC2616.
26 *
27 * Avoid using this where commas may be used unquoted in values, such as
28 * Set-Cookie headers.
29 *
30 * @param string $offset Name of the header to retrieve.
31 * @return string|null Header value
32 */
33 public function offsetGet($offset) {
34 if (is_string($offset)) {
35 $offset = strtolower($offset);
36 }
37
38 if (!isset($this->data[$offset])) {
39 return null;
40 }
41
42 return $this->flatten($this->data[$offset]);
43 }
44
45 /**
46 * Set the given item
47 *
48 * @param string $offset Item name
49 * @param string $value Item value
50 *
51 * @throws \WpOrg\Requests\Exception On attempting to use dictionary as list (`invalidset`)
52 */
53 public function offsetSet($offset, $value) {
54 if ($offset === null) {
55 throw new Exception('Object is a dictionary, not a list', 'invalidset');
56 }
57
58 if (is_string($offset)) {
59 $offset = strtolower($offset);
60 }
61
62 if (!isset($this->data[$offset])) {
63 $this->data[$offset] = [];
64 }
65
66 $this->data[$offset][] = $value;
67 }
68
69 /**
70 * Get all values for a given header
71 *
72 * @param string $offset Name of the header to retrieve.
73 * @return array|null Header values
74 *
75 * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed argument is not valid as an array key.
76 */
77 public function getValues($offset) {
78 if (!is_string($offset) && !is_int($offset)) {
79 throw InvalidArgument::create(1, '$offset', 'string|int', gettype($offset));
80 }
81
82 if (is_string($offset)) {
83 $offset = strtolower($offset);
84 }
85
86 if (!isset($this->data[$offset])) {
87 return null;
88 }
89
90 return $this->data[$offset];
91 }
92
93 /**
94 * Flattens a value into a string
95 *
96 * Converts an array into a string by imploding values with a comma, as per
97 * RFC2616's rules for folding headers.
98 *
99 * @param string|array $value Value to flatten
100 * @return string Flattened value
101 *
102 * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed argument is not a string or an array.
103 */
104 public function flatten($value) {
105 if (is_string($value)) {
106 return $value;
107 }
108
109 if (is_array($value)) {
110 return implode(',', $value);
111 }
112
113 throw InvalidArgument::create(1, '$value', 'string|array', gettype($value));
114 }
115
116 /**
117 * Get an iterator for the data
118 *
119 * Converts the internally stored values to a comma-separated string if there is more
120 * than one value for a key.
121 *
122 * @return \ArrayIterator
123 */
124 public function getIterator() {
125 return new FilteredIterator($this->data, [$this, 'flatten']);
126 }
127}
128
Ui Ux Design – Teachers Night Out https://cardgames4educators.com Wed, 16 Oct 2024 22:24:18 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.4 https://cardgames4educators.com/wp-content/uploads/2024/06/cropped-Card-4-Educators-logo-32x32.png Ui Ux Design – Teachers Night Out https://cardgames4educators.com 32 32 Masters In English How English Speaker https://cardgames4educators.com/masters-in-english-how-english-speaker/ https://cardgames4educators.com/masters-in-english-how-english-speaker/#comments Mon, 27 May 2024 08:54:45 +0000 https://themexriver.com/wp/kadu/?p=1

Erat himenaeos neque id sagittis massa. Hac suscipit pulvinar dignissim platea magnis eu. Don tellus a pharetra inceptos efficitur dui pulvinar. Feugiat facilisis penatibus pulvinar nunc dictumst donec odio platea habitasse. Lacus porta dolor purus elit ante bibendum tortor netus taciti nullam cubilia. Erat per suspendisse placerat morbi egestas pulvinar bibendum sollicitudin nec. Euismod cubilia eleifend velit himenaeos sodales lectus. Leo maximus cras ac porttitor aliquam torquent pulvinar odio volutpat parturient. Quisque risus finibus suspendisse mus purus magnis facilisi condimentum consectetur dui. Curae elit suspendisse cursus vehicula.

Turpis taciti class non vel pretium quis pulvinar tempor lobortis nunc. Libero phasellus parturient sapien volutpat malesuada ornare. Cubilia dignissim sollicitudin rhoncus lacinia maximus. Cras lorem fermentum bibendum pellentesque nisl etiam ligula enim cubilia. Vulputate pede sapien torquent montes tempus malesuada in mattis dis turpis vitae. Porta est tempor ex eget feugiat vulputate ipsum. Justo nec iaculis habitant diam arcu fermentum.

We offer comprehen sive emplo ment services such as assistance wit employer compliance.Our company is your strategic HR partner as instead of HR. john smithson

Cubilia dignissim sollicitudin rhoncus lacinia maximus. Cras lorem fermentum bibendum pellentesque nisl etiam ligula enim cubilia. Vulputate pede sapien torquent montes tempus malesuada in mattis dis turpis vitae.

Exploring Learning Landscapes in Academic

Feugiat facilisis penatibus pulvinar nunc dictumst donec odio platea habitasse. Lacus porta dolor purus elit ante bibendum tortor netus taciti nullam cubilia. Erat per suspendisse placerat morbi egestas pulvinar bibendum sollicitudin nec. Euismod cubilia eleifend velit himenaeos sodales lectus. Leo maximus cras ac porttitor aliquam torquent.

]]>
https://cardgames4educators.com/masters-in-english-how-english-speaker/feed/ 1