|
4 | 4 |
|
5 | 5 | class Curl |
6 | 6 | { |
7 | | - const VERSION = '4.8.0'; |
| 7 | + const VERSION = '4.8.1'; |
8 | 8 | const DEFAULT_TIMEOUT = 30; |
9 | 9 |
|
10 | 10 | public $curl; |
@@ -997,73 +997,3 @@ public static function is_array_multidim($array) |
997 | 997 | return (bool)count(array_filter($array, 'is_array')); |
998 | 998 | } |
999 | 999 | } |
1000 | | - |
1001 | | -class CaseInsensitiveArray implements \ArrayAccess, \Countable, \Iterator |
1002 | | -{ |
1003 | | - private $container = array(); |
1004 | | - |
1005 | | - public function offsetSet($offset, $value) |
1006 | | - { |
1007 | | - if ($offset === null) { |
1008 | | - $this->container[] = $value; |
1009 | | - } else { |
1010 | | - $index = array_search(strtolower($offset), array_keys(array_change_key_case($this->container, CASE_LOWER))); |
1011 | | - if (!($index === false)) { |
1012 | | - $keys = array_keys($this->container); |
1013 | | - unset($this->container[$keys[$index]]); |
1014 | | - } |
1015 | | - $this->container[$offset] = $value; |
1016 | | - } |
1017 | | - } |
1018 | | - |
1019 | | - public function offsetExists($offset) |
1020 | | - { |
1021 | | - return array_key_exists(strtolower($offset), array_change_key_case($this->container, CASE_LOWER)); |
1022 | | - } |
1023 | | - |
1024 | | - public function offsetUnset($offset) |
1025 | | - { |
1026 | | - unset($this->container[$offset]); |
1027 | | - } |
1028 | | - |
1029 | | - public function offsetGet($offset) |
1030 | | - { |
1031 | | - $index = array_search(strtolower($offset), array_keys(array_change_key_case($this->container, CASE_LOWER))); |
1032 | | - if ($index === false) { |
1033 | | - return null; |
1034 | | - } |
1035 | | - |
1036 | | - $values = array_values($this->container); |
1037 | | - return $values[$index]; |
1038 | | - } |
1039 | | - |
1040 | | - public function count() |
1041 | | - { |
1042 | | - return count($this->container); |
1043 | | - } |
1044 | | - |
1045 | | - public function current() |
1046 | | - { |
1047 | | - return current($this->container); |
1048 | | - } |
1049 | | - |
1050 | | - public function next() |
1051 | | - { |
1052 | | - return next($this->container); |
1053 | | - } |
1054 | | - |
1055 | | - public function key() |
1056 | | - { |
1057 | | - return key($this->container); |
1058 | | - } |
1059 | | - |
1060 | | - public function valid() |
1061 | | - { |
1062 | | - return !($this->current() === false); |
1063 | | - } |
1064 | | - |
1065 | | - public function rewind() |
1066 | | - { |
1067 | | - reset($this->container); |
1068 | | - } |
1069 | | -} |
0 commit comments