From 250fc547356a799c447c81d202c55e19ae6c6de4 Mon Sep 17 00:00:00 2001 From: JaguarJack <82664165@qq.com> Date: Sat, 26 Jan 2019 18:29:45 +0800 Subject: [PATCH] http client --- extend/icloud/src/httpclient/Client.php | 64 +++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 extend/icloud/src/httpclient/Client.php diff --git a/extend/icloud/src/httpclient/Client.php b/extend/icloud/src/httpclient/Client.php new file mode 100644 index 0000000..3c8fd08 --- /dev/null +++ b/extend/icloud/src/httpclient/Client.php @@ -0,0 +1,64 @@ +request($this->method, $this->uri, $this->params); + } + + public function set($offset, $value) + { + $this->$offset = $value; + } + + /** + * 魔术方法 + * + * @time at 2019年01月26日 + * @param string $key + * @param $value + * @return void + */ + public function __set(string $key, $value) + { + $this->$key = $value; + } + + public function offsetSet($offset, $value) + { + $this->params[$offset] = $value; + } + + public function offsetGet($offset) + { + return $this->params[$offset]; + } + + public function offsetExists($offset) + { + return isset($this->params[$offset]); + } + + public function offsetUnset($offset) + { + unset($this->params[$offset]); + } +}