From 968e5137a89e3b865e319eacfb46d67559852fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=BB=BA=E7=82=8A?= <924182103@qq.com> Date: Thu, 26 Dec 2024 14:32:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=AC=E4=B8=9C=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Business/BusinessOrderController.php | 4 +- .../Controllers/Shop/ShopSendsController.php | 67 + app/Models/ShopSender.php | 5 + .../WayBill/JingDong/JingDongService.php | 211 ++ .../WayBill/JingDong/WayBillService.php | 301 +++ composer.json | 3 +- extend/lop-opensdk-php/.gitignore | 12 + extend/lop-opensdk-php/README.md | 0 extend/lop-opensdk-php/composer.json | 18 + extend/lop-opensdk-php/composer.lock | 2284 +++++++++++++++++ extend/lop-opensdk-php/src/Client.php | 14 + extend/lop-opensdk-php/src/Executor.php | 14 + .../lop-opensdk-php/src/ExecutorFactory.php | 13 + extend/lop-opensdk-php/src/Filter.php | 15 + extend/lop-opensdk-php/src/FilterChain.php | 14 + .../src/Filters/ErrorResponseFilter.php | 24 + .../lop-opensdk-php/src/Filters/IsvFilter.php | 66 + .../src/Filters/LoggerFilter.php | 59 + .../src/Filters/PartnerFilter.php | 58 + extend/lop-opensdk-php/src/Filters/Utils.php | 36 + extend/lop-opensdk-php/src/Options.php | 40 + extend/lop-opensdk-php/src/Request.php | 137 + extend/lop-opensdk-php/src/Response.php | 94 + extend/lop-opensdk-php/src/SdkException.php | 27 + .../src/Support/DefaultClient.php | 79 + .../src/Support/DefaultExecutor.php | 56 + .../src/Support/DefaultExecutorFactory.php | 14 + .../src/Support/DefaultFilterChain.php | 51 + .../src/Support/GenericRequest.php | 184 ++ .../src/Support/GenericResponse.php | 129 + extend/lop-opensdk-php/src/Version.php | 8 + routes/api.php | 2 + 32 files changed, 4036 insertions(+), 3 deletions(-) create mode 100644 app/Http/Controllers/Shop/ShopSendsController.php create mode 100644 app/Services/WayBill/JingDong/JingDongService.php create mode 100644 app/Services/WayBill/JingDong/WayBillService.php create mode 100644 extend/lop-opensdk-php/.gitignore create mode 100644 extend/lop-opensdk-php/README.md create mode 100644 extend/lop-opensdk-php/composer.json create mode 100644 extend/lop-opensdk-php/composer.lock create mode 100644 extend/lop-opensdk-php/src/Client.php create mode 100644 extend/lop-opensdk-php/src/Executor.php create mode 100644 extend/lop-opensdk-php/src/ExecutorFactory.php create mode 100644 extend/lop-opensdk-php/src/Filter.php create mode 100644 extend/lop-opensdk-php/src/FilterChain.php create mode 100644 extend/lop-opensdk-php/src/Filters/ErrorResponseFilter.php create mode 100644 extend/lop-opensdk-php/src/Filters/IsvFilter.php create mode 100644 extend/lop-opensdk-php/src/Filters/LoggerFilter.php create mode 100644 extend/lop-opensdk-php/src/Filters/PartnerFilter.php create mode 100644 extend/lop-opensdk-php/src/Filters/Utils.php create mode 100644 extend/lop-opensdk-php/src/Options.php create mode 100644 extend/lop-opensdk-php/src/Request.php create mode 100644 extend/lop-opensdk-php/src/Response.php create mode 100644 extend/lop-opensdk-php/src/SdkException.php create mode 100644 extend/lop-opensdk-php/src/Support/DefaultClient.php create mode 100644 extend/lop-opensdk-php/src/Support/DefaultExecutor.php create mode 100644 extend/lop-opensdk-php/src/Support/DefaultExecutorFactory.php create mode 100644 extend/lop-opensdk-php/src/Support/DefaultFilterChain.php create mode 100644 extend/lop-opensdk-php/src/Support/GenericRequest.php create mode 100644 extend/lop-opensdk-php/src/Support/GenericResponse.php create mode 100644 extend/lop-opensdk-php/src/Version.php diff --git a/app/Http/Controllers/Business/BusinessOrderController.php b/app/Http/Controllers/Business/BusinessOrderController.php index 2545f55..65ea4c4 100644 --- a/app/Http/Controllers/Business/BusinessOrderController.php +++ b/app/Http/Controllers/Business/BusinessOrderController.php @@ -9,7 +9,7 @@ use App\Models\BusinessOrder; use App\Models\BusinessOrderItem; use App\Models\GoodsSku; use App\Models\Shop; -use App\Services\Ship\WayBillService; +use App\Services\WayBill\JingDong\WayBillService; use App\Utils\DateTimeUtils; use Carbon\Carbon; use Illuminate\Http\Request; @@ -188,7 +188,7 @@ class BusinessOrderController extends Controller $waybill = new WayBillService(); $waybill->setOrders($businessOrders); - $contents = $waybill->getContents(); + $contents = $waybill->getWayBillContents(); // 待打印数据 [$documents, $orderIds] = $waybill->getDocumentsAndOrderIds($contents); diff --git a/app/Http/Controllers/Shop/ShopSendsController.php b/app/Http/Controllers/Shop/ShopSendsController.php new file mode 100644 index 0000000..e038ff9 --- /dev/null +++ b/app/Http/Controllers/Shop/ShopSendsController.php @@ -0,0 +1,67 @@ +filter()->paginate($request->get('per_page')); + + return JsonResource::collection($shopSender); + } + + public function store(Request $request) + { + $params = $request->validate([ + 'id' => 'sometimes', + 'shop_id' => 'required|int', + 'province' => 'required', + 'city' => 'required', + 'district' => 'required', + 'detail' => 'required', + 'name' => 'required', + 'mobile' => 'required', + 'sort' => 'sometimes', + 'wp_code' => 'sometimes', + ], [ + 'shop_id.required' => '请选择店铺', + 'province.required' => '请选择省份', + 'city.required' => '请选择城市', + 'district.required' => '请选择地区', + 'detail.required' => '请填写详细地址', + ]); + $params['wp_code'] = $params['wp_code'] ?? 'jd'; + $params['country'] = $params['country'] ?? '中国'; + if (empty($params['id'])) { + $shopSender = new ShopSender(); + $shopSender->fill($params); + $shopSender->save(); + } else { + ShopSender::query()->where('id', $params['id'])->update($params); + } + + return response($this->res, $this->res['httpCode']); + } + + +} diff --git a/app/Models/ShopSender.php b/app/Models/ShopSender.php index 1eec811..da9826a 100644 --- a/app/Models/ShopSender.php +++ b/app/Models/ShopSender.php @@ -7,4 +7,9 @@ use Illuminate\Database\Eloquent\Model; class ShopSender extends Model { protected $guarded = []; + + //查询字段 + public $fieldSearchable = [ + 'shop_id', + ]; } diff --git a/app/Services/WayBill/JingDong/JingDongService.php b/app/Services/WayBill/JingDong/JingDongService.php new file mode 100644 index 0000000..a9a64f9 --- /dev/null +++ b/app/Services/WayBill/JingDong/JingDongService.php @@ -0,0 +1,211 @@ + '预约信息有误', + 2 => '快递员无法取件', + 3 => '上门太慢', + 4 => '运费太贵', + 7 => '联系不上快递员', + 8 => '快递员要求取消', + 11 => '其他(如疫情管控,无法寄 件)', + 9 => '预约信息有误', + ]; + + public function __construct() + { + $this->baseUrl = "https://api.jdl.com"; + $this->appKey = "5ee218f6619e438db8755ee560c3eaa7"; + $this->appSecret = "7ffb176f75014ebbb37061f051024bf3"; + $this->accessToken = "4e411a1d178147cdb58b5579a0df378d";//每年都会过期 https://oauth.jdl.com/oauth/authorize?client_id=YOUR_APP_KEY&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code + //生产环境域名:https://oauth.jdl.com 预发环境域名:https://uat-oauth.jdl.com + $this->domain = "FreshMedicineDelivery";//对接方案的编码 生鲜快递 + $this->customerCode = "028K4188368";//月结编码 + /*if (!EnvUtils::checkIsProduce()) { + //沙箱环境 + $this->baseUrl = "https://test-api.jdl.com"; + $this->appKey = "62d07644754843cc882fca7c01476c4f"; + $this->appSecret = "0c2c8b6b7c10481ea639f6daa09ac02e"; + $this->accessToken = "78c246c0ab564e67add6296a9eaf04a1";;//每年都会过期 https://oauth.jdl.com/oauth/authorize?client_id=YOUR_APP_KEY&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code + $this->customerCode = "27K1234912";//月结编码 + }*/ + + } + + public function request($body, $path) + { + // 生产环境: https://api.jdl.com + $client = new DefaultClient($this->baseUrl); + // 系统参数,应用的app_ley和app_secret,可从【控制台-应用管理-概览】中查看;access_token是用户授权时获取的令牌,用户授权相关说明请查看https://cloud.jdl.com/#/devSupport/53392 + $isvFilter = new IsvFilter($this->appKey, $this->appSecret, $this->accessToken); + $errorResponseFilter = new ErrorResponseFilter(); + + $request = new GenericRequest(); + $request->setDomain($this->domain);//对接方案的编码,应用订购对接方案后可在订阅记录查看 + $request->setPath($path);//api的path,可在API文档查看 + $request->setMethod("POST");//只支持POST + // 序列化后的JSON字符串 + $request->setBody(json_encode([$body])); + + // 为请求添加ISV模式过滤器,自动根据算法计算开放平台鉴权及签名信息 + $request->addFilter($isvFilter); + // 为请求添加错误响应解析过滤器,如果不添加需要手动解析错误响应 + $request->addFilter($errorResponseFilter); + + $options = new Options(); + + $options->setAlgorithm(Options::MD5_SALT); + Log::info("京东请求body:{$path}", [$body]); + $response = $client->execute($request, $options); + $response = json_decode($response->getBody(), true); + Log::info("京东返回请求response", [$response]); + if (!isset($response['code']) || ($response['code'] != 0 && $response['code'] != 1000)) { + throw new \Exception($response['msg'] ?? "code异常"); + } + return $response; + } + + + private function buildCargoes($extend) + { + return [ + [ + "quantity" => $extend["quantity"] ?? 1, + "goodsName" => "鲜花", + "volume" => ($extend['volume'] ?? 0) > 0 ? $extend['volume'] : 100, + "weight" => $extend['weight'] ?? 1, + "packageQty" => 1 + ] + ]; + } + + public function buildContact($params) + { + return [ + 'senderName' => $params['name'] ?? '', + 'senderPhone' => $params['mobile'] ?? '', + 'senderAddress' => substr($params['province_name'] . $params['city_name'] . $params['area_name'] . $params['address_detail'], 0, 350), + ]; + } + + public function createOrder(Waybill $pickup) + { + $path = "/freshmedicinedelivery/delivery/create/order/v1"; + $pickupData = $pickup->toArray(); + $body = [ + "orderId" => $pickupData['object_id'], + "senderContactRequest" => [ + 'senderName' => $pickupData['sender_name'] ?? '', + 'senderPhone' => $pickupData['sender_mobile'] ?? '', + 'senderAddress' => substr($pickupData['sender_province'] . $pickupData['sender_city'] + . $pickupData['sender_district'] . $pickupData['sender_detail'], 0, 350) + ], + "customerCode" => $this->customerCode, + "remark" => $pickup['note'] ?? '', + "salePlatform" => '0010001',//京东 + "cargoesRequest" => $this->buildCargoes($pickup), + "receiverContactRequest" => [ + 'receiverName' => $pickupData['recipient_name'] ?? '', + 'receiverPhone' => $pickupData['recipient_mobile'] ?? '', + 'receiverAddress' => substr($pickupData['recipient_province'] . $pickupData['recipient_city'] . $pickupData['recipient_district'] . $pickupData['recipient_detail'], 0, 350) + ], + "channelOrderId" => $pickupData['order_sn'], + "promiseTimeType" => 26,//22:医药冷链 26:冷链专送,29医药专送 + "goodsType" => 7,//1:普通,2:生鲜常温,5:鲜活,6:控温,7:冷藏,8:冷冻,9:深冷;21:医药冷藏,23:医药控温,24:医药常温,25:医药冷冻,27:医药深冷 + //"pickUpStartTime" => Carbon::today()->startOfDay()->addHours(19)->toDateTimeString(), + //"pickUpEndTime" => Carbon::today()->startOfDay()->addHours(21)->toDateTimeString(), + ]; + dd($body); + $response = $this->request($body, $path); + return $response['data']; + + } + + + public function cancelOrder(Waybill $pickup) + { + $path = "/freshmedicinedelivery/delivery/cancel/waybill/v1"; + $pickupData = $pickup->toArray(); + $body = [ + "waybillNo" => $pickupData['waybill_code'], + "customerCode" => $this->customerCode, + "interceptReason" => "订单信息有误", + ]; + $response = $this->request($body, $path); + + return $response['data']; + } + + public function queryOrder(Waybill $pickup) + { + $path = "/ecap/v1/orders/details/query"; + $pickupData = $pickup->toArray(); + $body = [ + "waybillCode" => $pickupData['ship_sn'] ?? '', + "orderCode" => $pickupData['out_order_sn'] ?? "", + "customerCode" => $this->customerCode, + "orderOrigin" => 2, + ]; + $response = $this->request($body, $path); + + return $response['data']; + } + + public function subscribe(Waybill $pickup) + { + $path = "/jd/tracking/subscribe"; + $pickupData = $pickup->toArray(); + $body = [ + "referenceNumber" => $pickupData['ship_sn'] ?? '', + "referenceType" => 20000, + "customerCode" => $this->customerCode, + ]; + $this->domain = "Tracking_JD";//对接方案的编码 + $response = $this->request($body, $path); + + return $response['data']; + } + + public function queryFee(Waybill $pickup) + { + $path = "/ecap/v1/orders/actualfee/query"; + $pickupData = $pickup->toArray(); + $body = [ + "waybillCode" => $pickupData['ship_sn'] ?? '', + "orderCode" => $pickupData['out_order_sn'] ?? "", + "customerCode" => $this->customerCode, + "orderOrigin" => 2, + ]; + $response = $this->request($body, $path); + + return $response['data']; + } + +} + diff --git a/app/Services/WayBill/JingDong/WayBillService.php b/app/Services/WayBill/JingDong/WayBillService.php new file mode 100644 index 0000000..2b56101 --- /dev/null +++ b/app/Services/WayBill/JingDong/WayBillService.php @@ -0,0 +1,301 @@ +adminUser = auth('api')->user(); + foreach ($this->orders as $shopId => $order) { + // 订单取消的情况暂不处理 + $shopSend = $this->getShopSend($shopId); + foreach ($order as $item) { + [$sender, $orderInfo, $senderConfig] = $this->prepareRequest($item, $shopSend); + $waybill = $this->saveWayBill($item, $shopSend, $senderConfig); + if (empty($waybill->id)) { + $jingDongService = new JingDongService(); + $resp = $jingDongService->createOrder($waybill); + + if (isset($resp['pdd_waybill_get_response'])) { + $data = $resp['pdd_waybill_get_response']['modules'][0]; + $printData = json_decode($data['print_data'], true); + $waybill->request_id = $resp['pdd_waybill_get_response']['request_id']; + $waybill->encryptedData = $printData['encryptedData']; + $waybill->signature = $printData['signature']; + $waybill->templateUrl = $printData['templateUrl']; + $waybill->ver = $printData['ver']; + $waybill->waybill_code = $data['waybill_code']; + $waybill->save(); + // 返回待打印内容 + $contents[$waybill->id] = [ + 'addData' => [ + 'sender' => $sender, + ], + 'encryptedData' => $printData['encryptedData'], + 'signature' => $printData['signature'], + 'templateUrl' => env('APP_URL') . '/ktt/' . $this->sfOneTemplate, // 电子面单模板 + 'ver' => $printData['ver'], + 'userid' => $waybill->user_id, + 'items' => $item['items'], + 'documentID' => $waybill->id, + 'order_id' => $item['id'], + 'participate_no' => $waybill->participate_no, + 'note' => $waybill->note, + ]; + event(new CreateLogisticEvent($shopShip->shop_id, $waybill->order_sn, $data['waybill_code'])); + } + } else { + $contents[$waybill->id] = [ + 'addData' => [ + 'sender' => $sender, + ], + 'encryptedData' => $waybill->encryptedData, + 'signature' => $waybill->signature, + 'templateUrl' => env('APP_URL') . '/ktt/' . $this->sfOneTemplate, // 电子面单模板 + 'ver' => $waybill->ver, + 'userid' => $waybill->user_id, + 'items' => json_decode($waybill->items, true), + 'documentID' => $waybill->id, + 'order_id' => $item['id'], + 'participate_no' => $waybill->participate_no, + 'note' => $waybill->note, + ]; + } + } + } + + return $contents; + } + + public function getDocumentsAndOrderIds($contents) + { + // 打印单,根据商品排序 + $items = []; + foreach ($contents as $docId => $content) { + foreach ($content['items'] as $item) { + if ($item['is_single']) { + $items[$item['external_sku_id']][] = $docId; + } + } + } + ksort($items); + $documents = $orderIds = $hasIds = []; + foreach ($items as $docIds) { + $docIds = array_unique($docIds); + $docIds = array_diff($docIds, $hasIds); + $hasIds = array_merge($hasIds, $docIds); + foreach ($docIds as $docId) { + $orderIds[] = $contents[$docId]['order_id']; + $documents[] = $contents[$docId]; + } + } + + return [$documents, $orderIds]; + } + + private function saveWayBill($order, $shopShip, $senderConfig) + { + $waybill = Waybill::query()->firstOrNew( + ['order_sn' => $order['order_sn']] + ); + + $waybill->shop_id = $order->shop_id; + $waybill->object_id = $this->objectId; + + $waybill->sender_country = $senderConfig['country']; + $waybill->sender_province = $senderConfig['province']; + $waybill->sender_city = $senderConfig['city']; + $waybill->sender_district = $senderConfig['district']; + $waybill->sender_detail = $senderConfig['detail']; + $waybill->sender_name = $senderConfig['name']; + $waybill->sender_mobile = $senderConfig['mobile']; + + $waybill->recipient_province = $order['recipient_province']; + $waybill->recipient_city = $order['recipient_city']; + $waybill->recipient_district = $order['recipient_district']; + $waybill->recipient_detail = $order['recipient_detail']; + $waybill->recipient_name = $order['recipient_name']; + $waybill->recipient_mobile = $order['recipient_mobile']; + + $waybill->user_id = $this->adminUser->id ?? 0; + $waybill->wp_code = $senderConfig['wp_code']; + $waybill->order_sn = $order['order_sn']; + $waybill->order_id = $order['id']; + $waybill->participate_no = $order['participate_no']; + $waybill->note = $order['note']; + $waybill->items = json_encode($order['items'], 256); + + return $waybill; + } + + private function getTimedDelivery($order) + { + $this->timedDeliveryCode = Waybill::$BUSINESS_EXPRESS_CODE; + $address = [ + '辽宁省' => [], + '吉林省' => [], + '黑龙江省' => [], + '甘肃省' => [], + '海南省' => [], + '宁夏回族自治区' => [ + '银川市', '石嘴山市', '吴忠市', '固原市' + ], + '青海省' => [ + '西宁市', '海东市', '海北藏族自治州', '黄南藏族自治州', '海南藏族自治州', '玉树藏族自治州' + ], + ]; + if (isset($address[$order['recipient_province']])) { + if (empty($address[$order['recipient_province']])) { + $this->timedDeliveryCode = Waybill::$AIR_FREIGHT_CODE; + } + if ($address[$order['recipient_province']] && in_array($order['recipient_city'], $address[$order['recipient_province']], true)) { + $this->timedDeliveryCode = Waybill::$AIR_FREIGHT_CODE; + } + } + } + + private function prepareRequest($order, $shopSend) + { + $this->setObjectId(); + + $items = []; + foreach ($order['items'] as $item) { + $items[] = [ + 'name' => $item['name'], + 'count' => $item['count'], + ]; + } + + if (empty($shopSend)) { + abort(404, '发货人信息未匹配'); + } + $senderConfig = $shopSend; + $sender = [ + 'address' => [ + 'city' => $senderConfig['city'], + 'country' => $senderConfig['country'], + 'detail' => $senderConfig['detail'], + 'district' => $senderConfig['district'], + 'province' => $senderConfig['province'], + ], + 'name' => $senderConfig['name'], + 'mobile' => $senderConfig['mobile'], + ]; + + $orderInfo = [ + 'object_id' => $this->objectId, + 'order_info' => [ + 'order_channels_type' => 'PDD', + 'trade_order_list' => [$order['order_sn']], + ], + 'package_info' => [ + 'items' => $items, + ], + 'recipient' => [ + 'address' => [ + 'city' => $order['recipient_city'], + 'detail' => $order['recipient_detail'], + 'district' => $order['recipient_district'], + 'province' => $order['recipient_province'], + ], + 'name' => $order['recipient_name'], + 'mobile' => $order['recipient_mobile'], + ], + 'template_url' => $this->sfOne, + ]; + + return [$sender, $orderInfo, $senderConfig]; + } + + public function setObjectId() + { + $this->objectId = date('YmdHis') . str_pad(mt_rand(1, 9999999), 7, '0', STR_PAD_LEFT); + + return $this; + } + + public function setOrders($orders) + { + $orders = $orders->toArray(); + // 订单拆分组合 + foreach ($orders as $order) { + $info = [ + 'id' => $order['id'], + 'order_sn' => $order['order_sn'], + 'recipient_province' => $order['receiver_address_province'], + 'recipient_city' => $order['receiver_address_city'], + 'recipient_district' => $order['receiver_address_district'], + 'recipient_detail' => $order['receiver_address_detail'], + 'recipient_name' => $order['receiver_name'], + 'recipient_mobile' => $order['receiver_mobile'], + 'participate_no' => $order['is_supplier'] ? $order['participate_no'] : $order['supply_participate_no'], + 'note' => $order['business_note'] ? $order['business_note'] . ',' . $order['buyer_memo'] : $order['buyer_memo'], + 'items' => [] + ]; + foreach ($order['items'] as $item) { + $count = $item['goods_number'] - $item['already_cancel_number']; + $info['items'][] = [ + 'is_single' => true, + 'should_print' => true, + 'name' => $item['goods_name'], + 'count' => $count, + 'external_sku_id' => $item['external_sku_id'], + ]; + + } + $this->orders[$order['shop_id']][] = $info; + } + + return $this; + } + + private function getShopSend($shopId) + { + return ShopSender::query() + ->where('status', 1)->orderBy('sort') + ->first(); + } + + private function getShopShip($shopId) + { + return ShopShip::query() + ->select(['id', 'shop_id', 'access_token', 'owner_id']) + ->where('shop_id', $shopId) + ->with([ + 'senders' => function ($query) { + $query->where('status', 1)->orderBy('sort'); + } + ]) + ->first(); + } +} diff --git a/composer.json b/composer.json index 59875f9..bb6ee3b 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,8 @@ }, "autoload": { "psr-4": { - "App\\": "app/" + "App\\": "app/", + "Lop\\LopOpensdkPhp\\" : "extend/lop-opensdk-php/src/" }, "classmap": [ "database/seeds", diff --git a/extend/lop-opensdk-php/.gitignore b/extend/lop-opensdk-php/.gitignore new file mode 100644 index 0000000..72a5a43 --- /dev/null +++ b/extend/lop-opensdk-php/.gitignore @@ -0,0 +1,12 @@ +# Created by https://www.toptal.com/developers/gitignore/api/composer +# Edit at https://www.toptal.com/developers/gitignore?templates=composer + +### Composer ### +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +# composer.lock + +# End of https://www.toptal.com/developers/gitignore/api/composer \ No newline at end of file diff --git a/extend/lop-opensdk-php/README.md b/extend/lop-opensdk-php/README.md new file mode 100644 index 0000000..e69de29 diff --git a/extend/lop-opensdk-php/composer.json b/extend/lop-opensdk-php/composer.json new file mode 100644 index 0000000..05e7c5c --- /dev/null +++ b/extend/lop-opensdk-php/composer.json @@ -0,0 +1,18 @@ +{ + "name": "lop/lop-opensdk-php", + "type": "library", + "version": "1.0.0", + "autoload": { + "psr-4": { + "Lop\\LopOpensdkPhp\\": "src/" + } + }, + "require": { + "php": ">=5.6", + "ext-json": "*", + "guzzlehttp/guzzle": "^6.5" + }, + "require-dev": { + "phpunit/phpunit": "^5.7" + } +} diff --git a/extend/lop-opensdk-php/composer.lock b/extend/lop-opensdk-php/composer.lock new file mode 100644 index 0000000..6cf03ab --- /dev/null +++ b/extend/lop-opensdk-php/composer.lock @@ -0,0 +1,2284 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "fae8fd439dc7c200cc8bd723b0bd3dc3", + "packages": [ + { + "name": "guzzlehttp/guzzle", + "version": "6.5.5", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.6.1", + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.17.0" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.1" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.5-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/6.5" + }, + "time": "2020-06-16T21:01:06+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "symfony/phpunit-bridge": "^4.4 || ^5.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/1.5.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2021-10-22T20:56:57+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.8.5", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "337e3ad8e5716c15f9657bd214d16cc5e69df268" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/337e3ad8e5716c15f9657bd214d16cc5e69df268", + "reference": "337e3ad8e5716c15f9657bd214d16cc5e69df268", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/1.8.5" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2022-03-20T21:51:18+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v2.0.21", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "96c132c7f2f7bc3230723b66e89f8f150b29d5ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/96c132c7f2f7bc3230723b66e89f8f150b29d5ae", + "reference": "96c132c7f2f7bc3230723b66e89f8f150b29d5ae", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "autoload": { + "files": [ + "lib/random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, + "time": "2022-02-16T17:07:03+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.19.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "4ad5115c0f5d5172a9fe8147675ec6de266d8826" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/4ad5115c0f5d5172a9fe8147675ec6de266d8826", + "reference": "4ad5115c0f5d5172a9fe8147675ec6de266d8826", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php70": "^1.10", + "symfony/polyfill-php72": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.19-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.19.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-21T09:57:48+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.19.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "8db0ae7936b42feb370840cf24de1a144fb0ef27" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8db0ae7936b42feb370840cf24de1a144fb0ef27", + "reference": "8db0ae7936b42feb370840cf24de1a144fb0ef27", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.19-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.19.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-23T09:01:57+00:00" + }, + { + "name": "symfony/polyfill-php70", + "version": "v1.19.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "3fe414077251a81a1b15b1c709faf5c2fbae3d4e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/3fe414077251a81a1b15b1c709faf5c2fbae3d4e", + "reference": "3fe414077251a81a1b15b1c709faf5c2fbae3d4e", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "~1.0|~2.0|~9.99", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.19-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php70\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php70/tree/v1.19.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-23T09:01:57+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.19.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "beecef6b463b06954638f02378f52496cb84bacc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/beecef6b463b06954638f02378f52496cb84bacc", + "reference": "beecef6b463b06954638f02378f52496cb84bacc", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.19-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.19.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-23T09:01:57+00:00" + } + ], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/master" + }, + "time": "2015-06-14T21:17:01+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.7.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^4.1" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.x" + }, + "time": "2017-10-19T19:58:43+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/master" + }, + "time": "2017-09-11T18:02:19+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "3.3.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "bf329f6c1aadea3299f08ee804682b7c45b326a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bf329f6c1aadea3299f08ee804682b7c45b326a2", + "reference": "bf329f6c1aadea3299f08ee804682b7c45b326a2", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/release/3.x" + }, + "time": "2017-11-10T14:09:06+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/master" + }, + "time": "2017-07-14T14:27:02+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.10.3", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "451c3cd1418cf640de218914901e51b064abb093" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", + "reference": "451c3cd1418cf640de218914901e51b064abb093", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5 || ^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/v1.10.3" + }, + "time": "2020-03-05T15:02:03+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "4.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d", + "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^5.6 || ^7.0", + "phpunit/php-file-iterator": "^1.3", + "phpunit/php-text-template": "^1.2", + "phpunit/php-token-stream": "^1.4.2 || ^2.0", + "sebastian/code-unit-reverse-lookup": "^1.0", + "sebastian/environment": "^1.3.2 || ^2.0", + "sebastian/version": "^1.0 || ^2.0" + }, + "require-dev": { + "ext-xdebug": "^2.1.4", + "phpunit/phpunit": "^5.7" + }, + "suggest": { + "ext-xdebug": "^2.5.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "irc": "irc://irc.freenode.net/phpunit", + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/4.0" + }, + "time": "2017-04-02T07:44:40+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "irc": "irc://irc.freenode.net/phpunit", + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/1.4.5" + }, + "time": "2017-11-27T13:52:08+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + }, + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/master" + }, + "time": "2017-02-26T11:10:40+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.12", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16", + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", + "source": "https://github.com/sebastianbergmann/php-token-stream/tree/1.4" + }, + "abandoned": true, + "time": "2017-12-04T08:55:13+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "5.7.27", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", + "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "~1.3", + "php": "^5.6 || ^7.0", + "phpspec/prophecy": "^1.6.2", + "phpunit/php-code-coverage": "^4.0.4", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "^3.2", + "sebastian/comparator": "^1.2.4", + "sebastian/diff": "^1.4.3", + "sebastian/environment": "^1.3.4 || ^2.0", + "sebastian/exporter": "~2.0", + "sebastian/global-state": "^1.1", + "sebastian/object-enumerator": "~2.0", + "sebastian/resource-operations": "~1.0", + "sebastian/version": "^1.0.6|^2.0.1", + "symfony/yaml": "~2.1|~3.0|~4.0" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "3.0.2" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-xdebug": "*", + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.7.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/5.7.27" + }, + "time": "2018-02-01T05:50:59+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "3.4.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "a23b761686d50a560cc56233b9ecf49597cc9118" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/a23b761686d50a560cc56233b9ecf49597cc9118", + "reference": "a23b761686d50a560cc56233b9ecf49597cc9118", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.6 || ^7.0", + "phpunit/php-text-template": "^1.2", + "sebastian/exporter": "^1.2 || ^2.0" + }, + "conflict": { + "phpunit/phpunit": "<5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "support": { + "irc": "irc://irc.freenode.net/phpunit", + "issues": "https://github.com/sebastianbergmann/phpunit-mock-objects/issues", + "source": "https://github.com/sebastianbergmann/phpunit-mock-objects/tree/3.4" + }, + "abandoned": true, + "time": "2017-06-30T09:13:00+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:15:22+00:00" + }, + { + "name": "sebastian/comparator", + "version": "1.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2 || ~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/1.2" + }, + "time": "2017-01-29T09:50:25+00:00" + }, + { + "name": "sebastian/diff", + "version": "1.4.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/1.4" + }, + "time": "2017-05-22T07:24:03+00:00" + }, + { + "name": "sebastian/environment", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/master" + }, + "time": "2016-11-26T07:53:53+00:00" + }, + { + "name": "sebastian/exporter", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~2.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/master" + }, + "time": "2016-11-19T08:54:04+00:00" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/1.1.1" + }, + "time": "2015-10-12T03:26:01+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7", + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "sebastian/recursion-context": "~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/master" + }, + "time": "2017-02-18T15:18:39+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/master" + }, + "time": "2016-11-19T07:33:16+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/master" + }, + "time": "2015-07-28T20:34:47+00:00" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/master" + }, + "time": "2016-10-03T07:35:21+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.19.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "aed596913b70fae57be53d86faa2e9ef85a2297b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/aed596913b70fae57be53d86faa2e9ef85a2297b", + "reference": "aed596913b70fae57be53d86faa2e9ef85a2297b", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.19-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.19.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-23T09:01:57+00:00" + }, + { + "name": "symfony/yaml", + "version": "v3.4.47", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "88289caa3c166321883f67fe5130188ebbb47094" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/88289caa3c166321883f67fe5130188ebbb47094", + "reference": "88289caa3c166321883f67fe5130188ebbb47094", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-24T10:57:07+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.9.1", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0 || ^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<3.9.1" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36 || ^7.5.13" + }, + "type": "library", + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.9.1" + }, + "time": "2020-07-08T17:02:28+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.6", + "ext-json": "*" + }, + "platform-dev": [], + "plugin-api-version": "2.2.0" +} diff --git a/extend/lop-opensdk-php/src/Client.php b/extend/lop-opensdk-php/src/Client.php new file mode 100644 index 0000000..8e20557 --- /dev/null +++ b/extend/lop-opensdk-php/src/Client.php @@ -0,0 +1,14 @@ +doFilter($request, $options); + $matches = array(); + if (preg_match(self::ERROR_RESPONSE_PATTERN, $response->getBody(), $matches) === 1) { + $response->setSucceed(false); + $response->setEnDesc($matches[1]); + $response->setZhDesc($matches[2]); + $response->setCode(intval($matches[3])); + } + return $response; + } +} \ No newline at end of file diff --git a/extend/lop-opensdk-php/src/Filters/IsvFilter.php b/extend/lop-opensdk-php/src/Filters/IsvFilter.php new file mode 100644 index 0000000..26174f8 --- /dev/null +++ b/extend/lop-opensdk-php/src/Filters/IsvFilter.php @@ -0,0 +1,66 @@ +appKey = $appKey; + $this->appSecret = $appSecret; + $this->accessToken = $accessToken; + } + + /** + * @throws SdkException + */ + function doFilter($request, $options, $chain) + { + $request->setHeader("lop-tz", strval(date("Z") / 3600)); + + $timestamp = date("Y-m-d H:i:s"); + $content = implode("", array( + $this->appSecret, + "access_token", $this->accessToken, + "app_key", $this->appKey, + "method", $request->getPath(), + "param_json", $request->getBody(), + "timestamp", $timestamp, + "v", "2.0", + $this->appSecret + )); + $sign = Utils::sign($options->getAlgorithm(), $content, $this->appSecret); + + $request->setQuery("app_key", $this->appKey); + $request->setQuery("access_token", $this->accessToken); + $request->setQuery("timestamp", $timestamp); + $request->setQuery("v", "2.0"); + $request->setQuery("sign", $sign); + $request->setQuery("algorithm", $options->getAlgorithm()); + + return $chain->doFilter($request, $options); + } +} \ No newline at end of file diff --git a/extend/lop-opensdk-php/src/Filters/LoggerFilter.php b/extend/lop-opensdk-php/src/Filters/LoggerFilter.php new file mode 100644 index 0000000..d2c7e35 --- /dev/null +++ b/extend/lop-opensdk-php/src/Filters/LoggerFilter.php @@ -0,0 +1,59 @@ +file = $file; + } + + function doFilter($request, $options, $chain) + { + $this->printf("[%s, Request ] Domain: %s, Path: %s, Method: %s", $request->getRequestId(), + $request->getDomain(), $request->getPath(), $request->getMethod()); + $this->printf("[%s, Request ] Queries: %s", $request->getRequestId(), json_encode($request->getQueries())); + $this->printf("[%s, Request ] Headers: %s", $request->getRequestId(), json_encode($request->getHeaders())); + $this->printf("[%s, Request ] Body: %s", $request->getRequestId(), $request->getBody()); + + try { + $response = $chain->doFilter($request, $options); + } catch (SdkException $e) { + $this->printf("[%s, Response ] Error: %s", $e->getMessage()); + throw $e; + } + + $this->printf("[%s, Response ] Succeed: %t, TraceId: %s, EnDesc: %s, ZhDesc: %s, Code: %d, Status: %d", + $request->getRequestId(), $response->isSucceed(), $response->getTraceId(), + $response->getEnDesc(), $response->getZhDesc(), $response->getCode(), $response->getStatus()); + $this->printf("[%s, Response ] Body: %s", $request->getRequestId(), $response->getBody()); + + return $response; + } + + /** + * @param string $format + * @param mixed ...$values + * @return void + */ + private function printf($format, ...$values) + { + fwrite($this->file, date("Y/m/d H:i:s")); + fwrite($this->file, " "); + fwrite($this->file, sprintf($format, $values)); + fwrite($this->file, "\n"); + } +} \ No newline at end of file diff --git a/extend/lop-opensdk-php/src/Filters/PartnerFilter.php b/extend/lop-opensdk-php/src/Filters/PartnerFilter.php new file mode 100644 index 0000000..704516d --- /dev/null +++ b/extend/lop-opensdk-php/src/Filters/PartnerFilter.php @@ -0,0 +1,58 @@ +appKey = $appKey; + $this->appSecret = $appSecret; + } + + /** + * @throws SdkException + */ + function doFilter($request, $options, $chain) + { + $request->setHeader("lop-tz", strval(date("Z") / 3600)); + + $timestamp = date("Y-m-d H:i:s"); + $content = implode("", array( + $this->appSecret, + "access_token", "", + "app_key", $this->appKey, + "method", $request->getPath(), + "param_json", $request->getBody(), + "timestamp", $timestamp, + "v", "2.0", + $this->appSecret + )); + $sign = Utils::sign($options->getAlgorithm(), $content, $this->appSecret); + + $request->setQuery("app_key", $this->appKey); + $request->setQuery("timestamp", $timestamp); + $request->setQuery("v", "2.0"); + $request->setQuery("sign", $sign); + $request->setQuery("algorithm", $options->getAlgorithm()); + + return $chain->doFilter($request, $options); + } +} \ No newline at end of file diff --git a/extend/lop-opensdk-php/src/Filters/Utils.php b/extend/lop-opensdk-php/src/Filters/Utils.php new file mode 100644 index 0000000..a534188 --- /dev/null +++ b/extend/lop-opensdk-php/src/Filters/Utils.php @@ -0,0 +1,36 @@ +algorithm = self::MD5_SALT; + } + + + /** + * @return string + */ + public function getAlgorithm() + { + return $this->algorithm; + } + + /** + * @param string $algorithm + */ + public function setAlgorithm($algorithm) + { + $this->algorithm = $algorithm; + } +} \ No newline at end of file diff --git a/extend/lop-opensdk-php/src/Request.php b/extend/lop-opensdk-php/src/Request.php new file mode 100644 index 0000000..46bd14f --- /dev/null +++ b/extend/lop-opensdk-php/src/Request.php @@ -0,0 +1,137 @@ +response = $response; + } + + /** + * @return Response + */ + public function getResponse() + { + return $this->response; + } +} \ No newline at end of file diff --git a/extend/lop-opensdk-php/src/Support/DefaultClient.php b/extend/lop-opensdk-php/src/Support/DefaultClient.php new file mode 100644 index 0000000..a447f35 --- /dev/null +++ b/extend/lop-opensdk-php/src/Support/DefaultClient.php @@ -0,0 +1,79 @@ +baseUri = $baseUri; + $this->executorFactory = new DefaultExecutorFactory(); + } + + /** + * @throws SdkException + */ + function execute($request, $options) + { + if (empty($request->getRequestId())) { + $request->setRequestId(uniqid()); + } + + if (empty($request->getBody())) { + $request->setBody(json_encode($request->getEntity())); + } + + if (!$request->hasQuery("LOP-DN")) { + $request->setQuery("LOP-DN", $request->getDomain()); + } + + if (!$request->hasHeader("User-Agent")) { + $request->setHeader("User-Agent", "lop-opensdk/php@" . Version::VERSION); + } + + $executor = $this->executorFactory->create($this->baseUri); + + $chain = new DefaultFilterChain($executor, $request->getFilters()); + $response = $chain->doFilter($request, $options); + + if (!$response->isSucceed()) { + return $response; + } + + if (empty($request->getResponseType())) { + return $response; + } + + $entity = json_decode($response->getBody()); + if (json_last_error() != JSON_ERROR_NONE) { + throw new SdkException("json decode failed", 0, $response); + } + if (!settype($entity, $request->getResponseType())) { + throw new SdkException("set entity to response type failed", 0, $response); + } + + $response->setEntity($entity); + + return $response; + } + + /** + * @param ExecutorFactory $executorFactory + */ + public function setExecutorFactory($executorFactory) + { + $this->executorFactory = $executorFactory; + } +} \ No newline at end of file diff --git a/extend/lop-opensdk-php/src/Support/DefaultExecutor.php b/extend/lop-opensdk-php/src/Support/DefaultExecutor.php new file mode 100644 index 0000000..204073a --- /dev/null +++ b/extend/lop-opensdk-php/src/Support/DefaultExecutor.php @@ -0,0 +1,56 @@ +baseUri = $baseUri; + } + + /** + * @throws SdkException + */ + function execute($request, $options) + { + $uri = $this->baseUri . $request->getPath(); + $httpRequest = new Request($request->getMethod(), $uri, $request->getHeaders(), $request->getBody()); + + $client = new Client(); + try { + $httpResponse = $client->send($httpRequest, [ + "query" => $request->getQueries(), + "http_errors" => false + ]); + } catch (GuzzleException $e) { + throw new SdkException("", 0, null, $e); + } + + $response = new GenericResponse(); + $response->setSucceed($httpResponse->getStatusCode() == 200); + $response->setStatus($httpResponse->getStatusCode()); + $response->setBody($httpResponse->getBody()->getContents()); + + $traceIds = $httpResponse->getHeader("Lop-Trace-Id"); + if (count($traceIds) > 0) { + $response->setTraceId($traceIds[0]); + } + + return $response; + } +} diff --git a/extend/lop-opensdk-php/src/Support/DefaultExecutorFactory.php b/extend/lop-opensdk-php/src/Support/DefaultExecutorFactory.php new file mode 100644 index 0000000..1ab97ca --- /dev/null +++ b/extend/lop-opensdk-php/src/Support/DefaultExecutorFactory.php @@ -0,0 +1,14 @@ +executor = $executor; + $this->filters = $filters; + $this->position = 0; + } + + /** + * @throws SdkException + */ + function doFilter($request, $options) + { + if ($this->position < count($this->filters)) { + $filter = $this->filters[$this->position]; + $this->position++; + return $filter->doFilter($request, $options, $this); + } else { + return $this->executor->execute($request, $options); + } + } +} \ No newline at end of file diff --git a/extend/lop-opensdk-php/src/Support/GenericRequest.php b/extend/lop-opensdk-php/src/Support/GenericRequest.php new file mode 100644 index 0000000..81a6928 --- /dev/null +++ b/extend/lop-opensdk-php/src/Support/GenericRequest.php @@ -0,0 +1,184 @@ +queries = array(); + $this->headers = array(); + $this->filters = array(); + } + + + function getDomain() + { + return $this->domain; + } + + function setDomain($domain) + { + $this->domain = $domain; + } + + function getPath() + { + return $this->path; + } + + function setPath($path) + { + $this->path = $path; + } + + function getMethod() + { + return $this->method; + } + + function setMethod($method) + { + $this->method = $method; + } + + function hasQuery($key) + { + return array_key_exists($key, $this->queries); + } + + function getQuery($key) + { + return $this->queries[$key]; + } + + function setQuery($key, $value) + { + $this->queries[$key] = $value; + } + + function getQueries() + { + return $this->queries; + } + + function hasHeader($key) + { + return array_key_exists($key, $this->headers); + } + + function getHeader($key) + { + return $this->headers[$key]; + } + + function setHeader($key, $value) + { + $this->headers[$key] = $value; + } + + function getHeaders() + { + return $this->headers; + } + + function addFilter($filter) + { + $this->filters[] = $filter; + } + + function getFilters() + { + return $this->filters; + } + + function getEntity() + { + return null; + } + + function getBody() + { + return $this->body; + } + + function setBody($body) + { + $this->body = $body; + } + + function getRequestId() + { + return $this->requestId; + } + + function setRequestId($requestId) + { + $this->requestId = $requestId; + } + + /** + * @return string + */ + function getResponseType() + { + return $this->responseType; + } + + /** + * @param string $responseType + * @return void + */ + function setResponseType($responseType) + { + $this->responseType = $responseType; + } +} \ No newline at end of file diff --git a/extend/lop-opensdk-php/src/Support/GenericResponse.php b/extend/lop-opensdk-php/src/Support/GenericResponse.php new file mode 100644 index 0000000..789ad56 --- /dev/null +++ b/extend/lop-opensdk-php/src/Support/GenericResponse.php @@ -0,0 +1,129 @@ +succeed; + } + + function setSucceed($succeed) + { + $this->succeed = $succeed; + } + + function getTraceId() + { + return $this->traceId; + } + + function setTraceId($traceId) + { + $this->traceId = $traceId; + } + + function getZhDesc() + { + return $this->zhDesc; + } + + function setZhDesc($zhDesc) + { + $this->zhDesc = $zhDesc; + } + + function getEnDesc() + { + return $this->enDesc; + } + + function setEnDesc($enDesc) + { + $this->enDesc = $enDesc; + } + + function getCode() + { + return $this->code; + } + + function setCode($code) + { + $this->code = $code; + } + + function getStatus() + { + return $this->status; + } + + function setStatus($status) + { + $this->status = $status; + } + + function getBody() + { + return $this->body; + } + + function setBody($body) + { + $this->body = $body; + } + + function getEntity() + { + return $this->entity; + } + + function setEntity($entity) + { + $this->entity = $entity; + } +} \ No newline at end of file diff --git a/extend/lop-opensdk-php/src/Version.php b/extend/lop-opensdk-php/src/Version.php new file mode 100644 index 0000000..c656c9f --- /dev/null +++ b/extend/lop-opensdk-php/src/Version.php @@ -0,0 +1,8 @@ +group(function () { // 发货信息 Route::get('shop/ship/senders', [ShipController::class, 'getSenders'])->name('shop_ship.senders.get'); Route::post('shop/ship/senders', [ShipController::class, 'saveSenders'])->name('shop_ship.senders.save'); + Route::resource('shop_sends', 'Shop\ShopSendsController', ['only' => ['index', 'store']]); + // 数据中心 Route::get('data_center/sales_report', [DataCenterController::class, 'salesReport'])->name('sales_report.index'); //供应商