From 7a7f9068d8642fd6a11e17dcdf03110c53eb24ae Mon Sep 17 00:00:00 2001 From: Jacky Date: Sun, 8 Dec 2019 00:56:09 +0800 Subject: [PATCH] v2.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 代码重构 2. API restful 3. 更新 SDK --- .gitignore | 3 +- README.md | 21 +- aliyun-cdn.php | 26 +- autoload.php | 2 +- composer.json | 5 + composer.lock | 710 +++++ languages/aliyun-cdn-helper-zh_CN.mo | Bin 0 -> 4868 bytes languages/aliyun-cdn-helper-zh_CN.po | 284 ++ languages/aliyun-cdn-zh_CN.mo | Bin 5863 -> 0 bytes languages/aliyun-cdn-zh_CN.po | 239 -- readme.txt | 4 +- .../Request/V20141111/AddCdnDomainRequest.php | 184 -- .../AddLiveAppRecordConfigRequest.php | 107 - .../AddLiveAppSnapshotConfigRequest.php | 129 - .../V20141111/AddLiveDomainMappingRequest.php | 74 - .../AddLivePullStreamInfoRequest.php | 118 - .../AddLiveStreamTranscodeRequest.php | 118 - .../V20141111/ClearUserBlackListRequest.php | 63 - .../ClearUserDomainBlackListRequest.php | 74 - ...reateLiveStreamRecordIndexFilesRequest.php | 140 - .../V20141111/DeleteCdnDomainRequest.php | 74 - .../DeleteHttpHeaderConfigRequest.php | 74 - .../DeleteLiveAppRecordConfigRequest.php | 74 - .../DeleteLiveAppSnapshotConfigRequest.php | 74 - .../DeleteLiveDomainMappingRequest.php | 74 - .../DeleteLivePullStreamInfoRequest.php | 85 - .../DeleteLiveStreamTranscodeRequest.php | 96 - .../DescribeCdnDomainBaseDetailRequest.php | 63 - .../DescribeCdnDomainDetailRequest.php | 63 - .../DescribeCdnDomainLogsRequest.php | 118 - .../DescribeCdnMonitorDataRequest.php | 96 - .../DescribeCdnRegionAndIspRequest.php | 52 - .../V20141111/DescribeCdnServiceRequest.php | 52 - .../V20141111/DescribeCdnTypesRequest.php | 63 - ...scribeDomainAverageResponseTimeRequest.php | 107 - ...escribeDomainBpsDataByTimeStampRequest.php | 96 - .../DescribeDomainBpsDataRequest.php | 151 - .../DescribeDomainCCAttackInfoRequest.php | 85 - .../V20141111/DescribeDomainCCDataRequest.php | 85 - .../DescribeDomainConfigsRequest.php | 74 - ...scribeDomainDownstreamBpsOfEdgeRequest.php | 85 - ...ibeDomainFileSizeProportionDataRequest.php | 85 - .../DescribeDomainFlowDataRequest.php | 151 - .../DescribeDomainHitRateDataRequest.php | 129 - .../DescribeDomainHttpCodeDataRequest.php | 129 - .../DescribeDomainHttpsDataRequest.php | 140 - .../DescribeDomainISPDataRequest.php | 85 - .../DescribeDomainMax95BpsDataRequest.php | 85 - ...scribeDomainMonthBillingBpsDataRequest.php | 96 - .../DescribeDomainOnlineUserNumberRequest.php | 85 - .../DescribeDomainPathDataRequest.php | 128 - .../V20141111/DescribeDomainPvDataRequest.php | 85 - .../DescribeDomainQpsDataRequest.php | 151 - .../DescribeDomainRealTimeDataRequest.php | 96 - .../DescribeDomainRegionDataRequest.php | 85 - .../DescribeDomainReqHitRateDataRequest.php | 96 - .../DescribeDomainSrcBpsDataRequest.php | 118 - .../DescribeDomainSrcFlowDataRequest.php | 118 - .../DescribeDomainTopReferVisitRequest.php | 85 - .../DescribeDomainTopUrlVisitRequest.php | 85 - ...DescribeDomainUpstreamBpsOfEdgeRequest.php | 85 - .../DescribeDomainUpstreamOfCenterRequest.php | 85 - .../V20141111/DescribeDomainUvDataRequest.php | 85 - .../DescribeDomainsBySourceRequest.php | 63 - .../DescribeDomainsUsageByDayRequest.php | 85 - .../DescribeExtensiveDomainDataRequest.php | 107 - .../V20141111/DescribeIpInfoRequest.php | 63 - .../DescribeL2VipsByDomainRequest.php | 63 - .../DescribeLiveAppRecordConfigRequest.php | 74 - .../DescribeLivePullStreamConfigRequest.php | 63 - .../DescribeLiveRecordConfigRequest.php | 63 - .../DescribeLiveSnapshotConfigRequest.php | 118 - ...scribeLiveSpecificDomainMappingRequest.php | 74 - .../DescribeLiveStreamBitRateDataRequest.php | 107 - .../DescribeLiveStreamBpsDataRequest.php | 107 - ...DescribeLiveStreamDomainAppInfoRequest.php | 63 - ...veStreamFrameAndBitRateByDomainRequest.php | 96 - .../DescribeLiveStreamFrameInfoRequest.php | 107 - ...escribeLiveStreamFrameLossRatioRequest.php | 107 - ...eStreamHlsOnlineUserNumByDomainRequest.php | 107 - .../DescribeLiveStreamLimitInfoRequest.php | 63 - .../DescribeLiveStreamNumberListRequest.php | 96 - .../DescribeLiveStreamOnlineBpsRequest.php | 107 - ...LiveStreamOnlineUserNumByDomainRequest.php | 107 - ...DescribeLiveStreamOnlineUserNumRequest.php | 118 - .../DescribeLiveStreamPushDataRequest.php | 85 - .../DescribeLiveStreamPushErrorsRequest.php | 85 - ...DescribeLiveStreamRecordContentRequest.php | 107 - ...scribeLiveStreamRecordIndexFileRequest.php | 96 - ...cribeLiveStreamRecordIndexFilesRequest.php | 107 - ...cribeLiveStreamRelayPushBitRateRequest.php | 85 - ...DescribeLiveStreamRelayPushDataRequest.php | 85 - ...scribeLiveStreamRelayPushErrorsRequest.php | 85 - .../DescribeLiveStreamRoomBitRateRequest.php | 107 - ...escribeLiveStreamRoomUserNumberRequest.php | 118 - .../DescribeLiveStreamSnapshotInfoRequest.php | 118 - .../DescribeLiveStreamStreamStatusRequest.php | 85 - ...DescribeLiveStreamTranscodeInfoRequest.php | 63 - ...ibeLiveStreamTranscodeStreamNumRequest.php | 74 - .../DescribeLiveStreamsBlockListRequest.php | 63 - ...scribeLiveStreamsControlHistoryRequest.php | 96 - ...eStreamsFrameRateAndBitRateDataRequest.php | 107 - .../DescribeLiveStreamsOnlineListRequest.php | 74 - .../DescribeLiveStreamsPublishListRequest.php | 129 - .../DescribeOneMinuteDataRequest.php | 85 - ...eRangeDataByLocateAndIspServiceRequest.php | 107 - .../V20141111/DescribeRefreshQuotaRequest.php | 52 - .../V20141111/DescribeRefreshTasksRequest.php | 118 - .../DescribeTopDomainsByFlowRequest.php | 85 - .../V20141111/DescribeUserConfigsRequest.php | 63 - .../DescribeUserCustomerLabelsRequest.php | 63 - .../V20141111/DescribeUserDomainsRequest.php | 173 -- .../DescribeUserVipsByDomainRequest.php | 74 - .../V20141111/ForbidLiveStreamRequest.php | 107 - .../GetUserDomainBlackListRequest.php | 74 - .../MigrateDomainToHttpsDeliveryRequest.php | 96 - .../V20141111/ModifyCdnDomainRequest.php | 129 - .../V20141111/ModifyCdnServiceRequest.php | 63 - .../ModifyHttpHeaderConfigRequest.php | 96 - .../V20141111/OpenCdnServiceRequest.php | 63 - .../V20141111/PushObjectCacheRequest.php | 63 - .../V20141111/RefreshObjectCachesRequest.php | 74 - .../V20141111/ResumeLiveStreamRequest.php | 96 - .../Request/V20141111/SetCcConfigRequest.php | 85 - .../SetDomainServerCertificateRequest.php | 118 - .../V20141111/SetDynamicConfigRequest.php | 118 - .../V20141111/SetErrorPageConfigRequest.php | 85 - .../SetForceRedirectConfigRequest.php | 74 - .../SetForwardSchemeConfigRequest.php | 96 - .../SetHttpErrorPageConfigRequest.php | 85 - .../V20141111/SetHttpHeaderConfigRequest.php | 85 - .../SetIgnoreQueryStringConfigRequest.php | 96 - .../V20141111/SetIpBlackListConfigRequest.php | 74 - .../SetLiveStreamsNotifyUrlConfigRequest.php | 74 - .../SetLocationAccessRestrictionRequest.php | 85 - .../V20141111/SetOptimizeConfigRequest.php | 74 - .../V20141111/SetOssLogConfigRequest.php | 85 - .../SetPageCompressConfigRequest.php | 74 - .../V20141111/SetRangeConfigRequest.php | 74 - .../V20141111/SetRefererConfigRequest.php | 107 - .../SetRemoteReqAuthConfigRequest.php | 151 - .../SetRemoveQueryStringConfigRequest.php | 85 - .../V20141111/SetReqAuthConfigRequest.php | 107 - .../V20141111/SetReqHeaderConfigRequest.php | 85 - .../V20141111/SetSourceHostConfigRequest.php | 85 - .../SetUserAgentAcessRestrictionRequest.php | 85 - .../V20141111/SetUserBlackListRequest.php | 74 - .../SetUserDomainBlackListRequest.php | 74 - .../V20141111/SetVideoSeekConfigRequest.php | 74 - .../Request/V20141111/SetWafConfigRequest.php | 74 - .../V20141111/StartCdnDomainRequest.php | 63 - .../StartMixStreamsServiceRequest.php | 140 - .../V20141111/StopCdnDomainRequest.php | 63 - .../StopMixStreamsServiceRequest.php | 118 - .../UpdateLiveAppSnapshotConfigRequest.php | 129 - sdk/aliyun-php-sdk-cdn/ChangeLog.txt | 24 - sdk/aliyun-php-sdk-core/AcsRequest.php | 154 - sdk/aliyun-php-sdk-core/AcsResponse.php | 44 - sdk/aliyun-php-sdk-core/Auth/Credential.php | 83 - sdk/aliyun-php-sdk-core/Auth/ISigner.php | 27 - .../Auth/ShaHmac1Signer.php | 36 - .../Auth/ShaHmac256Signer.php | 36 - .../Autoloader/Autoloader.php | 48 - sdk/aliyun-php-sdk-core/ChangeLog.txt | 3 - sdk/aliyun-php-sdk-core/Config.php | 30 - sdk/aliyun-php-sdk-core/DefaultAcsClient.php | 134 - .../Exception/ClientException.php | 63 - .../Exception/ServerException.php | 45 - sdk/aliyun-php-sdk-core/Http/HttpHelper.php | 80 - sdk/aliyun-php-sdk-core/Http/HttpResponse.php | 52 - sdk/aliyun-php-sdk-core/IAcsClient.php | 23 - .../Profile/DefaultProfile.php | 146 - .../Profile/IClientProfile.php | 29 - sdk/aliyun-php-sdk-core/Regions/Endpoint.php | 62 - .../Regions/EndpointConfig.php | 65 - .../Regions/EndpointProvider.php | 60 - .../Regions/LocationService.php | 120 - .../Regions/ProductDomain.php | 47 - sdk/aliyun-php-sdk-core/Regions/endpoints.xml | 1349 --------- sdk/aliyun-php-sdk-core/RoaAcsRequest.php | 204 -- sdk/aliyun-php-sdk-core/RpcAcsRequest.php | 114 - .../UnitTest/Auth/CredentialTest.php | 35 - .../UnitTest/Auth/ShaHmac1SignerTest.php | 28 - .../UnitTest/Auth/ShaHmac256SignerTest.php | 30 - sdk/aliyun-php-sdk-core/UnitTest/BaseTest.php | 40 - .../BatchCompute/ListImagesRequest.php | 30 - .../UnitTest/DefaultAcsClientTest.php | 42 - .../Ecs/Rquest/DescribeRegionsRequest.php | 80 - .../UnitTest/Http/HttpHelperTest.php | 29 - .../UnitTest/Profile/DefaultProfileTest.php | 60 - .../Regions/EndPointByLocationTest.php | 46 - .../UnitTest/Regions/EndpointProviderTest.php | 28 - src/Api.php | 259 +- src/Config.php | 29 +- src/Helper.php | 59 - src/Init.php | 55 +- src/Settings.php | 30 +- uninstall.php | 8 +- vendor/adbario/php-dot-notation/LICENSE.md | 21 + vendor/adbario/php-dot-notation/composer.json | 29 + vendor/adbario/php-dot-notation/src/Dot.php | 601 ++++ .../adbario/php-dot-notation/src/helpers.php | 23 + vendor/alibabacloud/client/CHANGELOG.md | 264 ++ vendor/alibabacloud/client/CONTRIBUTING.md | 30 + vendor/alibabacloud/client/LICENSE.md | 13 + vendor/alibabacloud/client/NOTICE.md | 88 + vendor/alibabacloud/client/README-zh-CN.md | 161 + vendor/alibabacloud/client/README.md | 162 + vendor/alibabacloud/client/UPGRADING.md | 6 + vendor/alibabacloud/client/composer.json | 116 + vendor/alibabacloud/client/src/Accept.php | 53 + .../alibabacloud/client/src/AlibabaCloud.php | 62 + .../client/src/Clients/AccessKeyClient.php | 30 + .../client/src/Clients/BearerTokenClient.php | 29 + .../client/src/Clients/Client.php | 72 + .../client/src/Clients/EcsRamRoleClient.php | 26 + .../client/src/Clients/ManageTrait.php | 98 + .../client/src/Clients/RamRoleArnClient.php | 33 + .../client/src/Clients/RsaKeyPairClient.php | 30 + .../client/src/Clients/StsClient.php | 28 + .../alibabacloud/client/src/Config/Config.php | 62 + .../alibabacloud/client/src/Config/Data.php | 2653 +++++++++++++++++ .../src/Credentials/AccessKeyCredential.php | 65 + .../src/Credentials/BearerTokenCredential.php | 66 + .../src/Credentials/CredentialsInterface.php | 18 + .../src/Credentials/EcsRamRoleCredential.php | 50 + .../src/Credentials/Ini/CreateTrait.php | 181 ++ .../src/Credentials/Ini/IniCredential.php | 209 ++ .../src/Credentials/Ini/OptionsTrait.php | 111 + .../Providers/CredentialsProvider.php | 170 ++ .../Providers/EcsRamRoleProvider.php | 128 + .../src/Credentials/Providers/Provider.php | 88 + .../Providers/RamRoleArnProvider.php | 84 + .../Providers/RsaKeyPairProvider.php | 86 + .../src/Credentials/RamRoleArnCredential.php | 110 + .../src/Credentials/Requests/AssumeRole.php | 47 + .../Requests/GenerateSessionAccessKey.php | 37 + .../src/Credentials/RsaKeyPairCredential.php | 75 + .../client/src/Credentials/StsCredential.php | 80 + .../client/src/DefaultAcsClient.php | 55 + vendor/alibabacloud/client/src/Encode.php | 64 + .../src/Exception/AlibabaCloudException.php | 70 + .../client/src/Exception/ClientException.php | 38 + .../client/src/Exception/ServerException.php | 158 + .../client/src/Filter/ApiFilter.php | 245 ++ .../client/src/Filter/ClientFilter.php | 139 + .../client/src/Filter/CredentialFilter.php | 152 + .../alibabacloud/client/src/Filter/Filter.php | 67 + .../client/src/Filter/HttpFilter.php | 166 ++ vendor/alibabacloud/client/src/Functions.php | 289 ++ .../client/src/Log/LogFormatter.php | 78 + .../client/src/Profile/DefaultProfile.php | 74 + .../client/src/Regions/EndpointProvider.php | 18 + .../client/src/Regions/LocationService.php | 160 + .../src/Regions/LocationServiceRequest.php | 46 + vendor/alibabacloud/client/src/Release.php | 112 + .../client/src/Request/Request.php | 445 +++ .../client/src/Request/RoaRequest.php | 335 +++ .../client/src/Request/RpcRequest.php | 203 ++ .../client/src/Request/Traits/AcsTrait.php | 239 ++ .../client/src/Request/Traits/ClientTrait.php | 98 + .../src/Request/Traits/DeprecatedRoaTrait.php | 55 + .../src/Request/Traits/DeprecatedTrait.php | 246 ++ .../client/src/Request/Traits/RetryTrait.php | 149 + .../client/src/Request/UserAgent.php | 142 + .../src/Resolver/ActionResolverTrait.php | 50 + .../client/src/Resolver/ApiResolver.php | 113 + .../client/src/Resolver/CallTrait.php | 67 + .../alibabacloud/client/src/Resolver/Roa.php | 43 + .../alibabacloud/client/src/Resolver/Rpc.php | 41 + .../client/src/Resolver/VersionResolver.php | 73 + .../alibabacloud/client/src/Result/Result.php | 151 + vendor/alibabacloud/client/src/SDK.php | 57 + .../src/Signature/BearerTokenSignature.php | 47 + .../src/Signature/ShaHmac1Signature.php | 47 + .../src/Signature/ShaHmac256Signature.php | 47 + .../Signature/ShaHmac256WithRsaSignature.php | 67 + .../client/src/Signature/Signature.php | 49 + .../src/Signature/SignatureInterface.php | 35 + .../client/src/Support/Arrays.php | 41 + .../alibabacloud/client/src/Support/Path.php | 28 + .../alibabacloud/client/src/Support/Sign.php | 140 + .../client/src/Traits/ArrayAccessTrait.php | 57 + .../client/src/Traits/ClientTrait.php | 273 ++ .../client/src/Traits/DefaultRegionTrait.php | 66 + .../client/src/Traits/EndpointTrait.php | 119 + .../client/src/Traits/HasDataTrait.php | 317 ++ .../client/src/Traits/HistoryTrait.php | 68 + .../client/src/Traits/HttpTrait.php | 141 + .../client/src/Traits/LogTrait.php | 64 + .../client/src/Traits/MockTrait.php | 97 + .../client/src/Traits/ObjectAccessTrait.php | 54 + .../client/src/Traits/RegionTrait.php | 33 + .../client/src/Traits/RequestTrait.php | 90 + vendor/autoload.php | 7 + vendor/bin/jp.php | 1 + .../weblibs-configmanager/.gitignore | 2 + .../weblibs-configmanager/.travis.yml | 17 + .../weblibs-configmanager/README.md | 130 + .../weblibs-configmanager/composer.json | 36 + .../weblibs-configmanager/composer.lock | 1235 ++++++++ .../weblibs-configmanager/phpunit.xml | 19 + .../src/ConfigManager.php | 148 + .../tests/ConfigManagerTest.php | 113 + .../testsdata/sample_config_data.php | 23 + vendor/composer/ClassLoader.php | 445 +++ vendor/composer/LICENSE | 21 + vendor/composer/autoload_classmap.php | 9 + vendor/composer/autoload_files.php | 18 + vendor/composer/autoload_namespaces.php | 9 + vendor/composer/autoload_psr4.php | 19 + vendor/composer/autoload_real.php | 70 + vendor/composer/autoload_static.php | 103 + vendor/composer/installed.json | 716 +++++ vendor/danielstjules/stringy/CHANGELOG.md | 180 ++ vendor/danielstjules/stringy/LICENSE.txt | 19 + vendor/danielstjules/stringy/README.md | 1082 +++++++ vendor/danielstjules/stringy/composer.json | 35 + vendor/danielstjules/stringy/src/Create.php | 19 + .../stringy/src/StaticStringy.php | 161 + vendor/danielstjules/stringy/src/Stringy.php | 1986 ++++++++++++ vendor/guzzlehttp/guzzle/.php_cs | 21 + vendor/guzzlehttp/guzzle/CHANGELOG.md | 1304 ++++++++ vendor/guzzlehttp/guzzle/Dockerfile | 18 + vendor/guzzlehttp/guzzle/LICENSE | 19 + vendor/guzzlehttp/guzzle/README.md | 90 + vendor/guzzlehttp/guzzle/UPGRADING.md | 1203 ++++++++ vendor/guzzlehttp/guzzle/composer.json | 58 + vendor/guzzlehttp/guzzle/phpstan.neon.dist | 9 + vendor/guzzlehttp/guzzle/src/Client.php | 422 +++ .../guzzlehttp/guzzle/src/ClientInterface.php | 84 + .../guzzle/src/Cookie/CookieJar.php | 314 ++ .../guzzle/src/Cookie/CookieJarInterface.php | 84 + .../guzzle/src/Cookie/FileCookieJar.php | 91 + .../guzzle/src/Cookie/SessionCookieJar.php | 72 + .../guzzle/src/Cookie/SetCookie.php | 403 +++ .../src/Exception/BadResponseException.php | 27 + .../guzzle/src/Exception/ClientException.php | 9 + .../guzzle/src/Exception/ConnectException.php | 37 + .../guzzle/src/Exception/GuzzleException.php | 23 + .../Exception/InvalidArgumentException.php | 7 + .../guzzle/src/Exception/RequestException.php | 217 ++ .../guzzle/src/Exception/SeekException.php | 27 + .../guzzle/src/Exception/ServerException.php | 9 + .../Exception/TooManyRedirectsException.php | 6 + .../src/Exception/TransferException.php | 6 + .../guzzle/src/Handler/CurlFactory.php | 580 ++++ .../src/Handler/CurlFactoryInterface.php | 27 + .../guzzle/src/Handler/CurlHandler.php | 45 + .../guzzle/src/Handler/CurlMultiHandler.php | 205 ++ .../guzzle/src/Handler/EasyHandle.php | 92 + .../guzzle/src/Handler/MockHandler.php | 190 ++ .../guzzlehttp/guzzle/src/Handler/Proxy.php | 55 + .../guzzle/src/Handler/StreamHandler.php | 544 ++++ vendor/guzzlehttp/guzzle/src/HandlerStack.php | 273 ++ .../guzzle/src/MessageFormatter.php | 180 ++ vendor/guzzlehttp/guzzle/src/Middleware.php | 254 ++ vendor/guzzlehttp/guzzle/src/Pool.php | 123 + .../guzzle/src/PrepareBodyMiddleware.php | 106 + .../guzzle/src/RedirectMiddleware.php | 237 ++ .../guzzlehttp/guzzle/src/RequestOptions.php | 255 ++ .../guzzlehttp/guzzle/src/RetryMiddleware.php | 115 + .../guzzlehttp/guzzle/src/TransferStats.php | 126 + vendor/guzzlehttp/guzzle/src/UriTemplate.php | 237 ++ vendor/guzzlehttp/guzzle/src/functions.php | 346 +++ .../guzzle/src/functions_include.php | 6 + vendor/guzzlehttp/promises/CHANGELOG.md | 65 + vendor/guzzlehttp/promises/LICENSE | 19 + vendor/guzzlehttp/promises/Makefile | 13 + vendor/guzzlehttp/promises/README.md | 504 ++++ vendor/guzzlehttp/promises/composer.json | 34 + .../promises/src/AggregateException.php | 16 + .../promises/src/CancellationException.php | 9 + vendor/guzzlehttp/promises/src/Coroutine.php | 151 + .../guzzlehttp/promises/src/EachPromise.php | 229 ++ .../promises/src/FulfilledPromise.php | 82 + vendor/guzzlehttp/promises/src/Promise.php | 280 ++ .../promises/src/PromiseInterface.php | 93 + .../promises/src/PromisorInterface.php | 15 + .../promises/src/RejectedPromise.php | 87 + .../promises/src/RejectionException.php | 47 + vendor/guzzlehttp/promises/src/TaskQueue.php | 66 + .../promises/src/TaskQueueInterface.php | 25 + vendor/guzzlehttp/promises/src/functions.php | 457 +++ .../promises/src/functions_include.php | 6 + vendor/guzzlehttp/psr7/CHANGELOG.md | 246 ++ vendor/guzzlehttp/psr7/LICENSE | 19 + vendor/guzzlehttp/psr7/README.md | 745 +++++ vendor/guzzlehttp/psr7/composer.json | 49 + vendor/guzzlehttp/psr7/src/AppendStream.php | 241 ++ vendor/guzzlehttp/psr7/src/BufferStream.php | 137 + vendor/guzzlehttp/psr7/src/CachingStream.php | 138 + vendor/guzzlehttp/psr7/src/DroppingStream.php | 42 + vendor/guzzlehttp/psr7/src/FnStream.php | 158 + vendor/guzzlehttp/psr7/src/InflateStream.php | 52 + vendor/guzzlehttp/psr7/src/LazyOpenStream.php | 39 + vendor/guzzlehttp/psr7/src/LimitStream.php | 155 + vendor/guzzlehttp/psr7/src/MessageTrait.php | 213 ++ .../guzzlehttp/psr7/src/MultipartStream.php | 153 + vendor/guzzlehttp/psr7/src/NoSeekStream.php | 22 + vendor/guzzlehttp/psr7/src/PumpStream.php | 165 + vendor/guzzlehttp/psr7/src/Request.php | 151 + vendor/guzzlehttp/psr7/src/Response.php | 154 + vendor/guzzlehttp/psr7/src/Rfc7230.php | 18 + vendor/guzzlehttp/psr7/src/ServerRequest.php | 376 +++ vendor/guzzlehttp/psr7/src/Stream.php | 267 ++ .../psr7/src/StreamDecoratorTrait.php | 149 + vendor/guzzlehttp/psr7/src/StreamWrapper.php | 161 + vendor/guzzlehttp/psr7/src/UploadedFile.php | 316 ++ vendor/guzzlehttp/psr7/src/Uri.php | 760 +++++ vendor/guzzlehttp/psr7/src/UriNormalizer.php | 216 ++ vendor/guzzlehttp/psr7/src/UriResolver.php | 219 ++ vendor/guzzlehttp/psr7/src/functions.php | 899 ++++++ .../guzzlehttp/psr7/src/functions_include.php | 6 + vendor/mtdowling/jmespath.php/.gitignore | 5 + vendor/mtdowling/jmespath.php/.travis.yml | 17 + vendor/mtdowling/jmespath.php/CHANGELOG.md | 52 + vendor/mtdowling/jmespath.php/LICENSE | 19 + vendor/mtdowling/jmespath.php/Makefile | 19 + vendor/mtdowling/jmespath.php/README.rst | 123 + vendor/mtdowling/jmespath.php/bin/jp.php | 65 + vendor/mtdowling/jmespath.php/bin/perf.php | 57 + vendor/mtdowling/jmespath.php/composer.json | 37 + .../mtdowling/jmespath.php/phpunit.xml.dist | 17 + .../mtdowling/jmespath.php/src/AstRuntime.php | 47 + .../jmespath.php/src/CompilerRuntime.php | 83 + .../jmespath.php/src/DebugRuntime.php | 109 + vendor/mtdowling/jmespath.php/src/Env.php | 66 + .../jmespath.php/src/FnDispatcher.php | 401 +++ .../mtdowling/jmespath.php/src/JmesPath.php | 17 + vendor/mtdowling/jmespath.php/src/Lexer.php | 444 +++ vendor/mtdowling/jmespath.php/src/Parser.php | 518 ++++ .../jmespath.php/src/SyntaxErrorException.php | 36 + .../jmespath.php/src/TreeCompiler.php | 419 +++ .../jmespath.php/src/TreeInterpreter.php | 235 ++ vendor/mtdowling/jmespath.php/src/Utils.php | 229 ++ .../jmespath.php/tests/ComplianceTest.php | 136 + .../mtdowling/jmespath.php/tests/EnvTest.php | 31 + .../jmespath.php/tests/FnDispatcherTest.php | 41 + .../jmespath.php/tests/LexerTest.php | 88 + .../jmespath.php/tests/ParserTest.php | 50 + .../tests/SyntaxErrorExceptionTest.php | 42 + .../jmespath.php/tests/TreeCompilerTest.php | 23 + .../tests/TreeInterpreterTest.php | 71 + .../jmespath.php/tests/UtilsTest.php | 130 + .../jmespath.php/tests/compliance/basic.json | 96 + .../tests/compliance/boolean.json | 257 ++ .../tests/compliance/current.json | 25 + .../jmespath.php/tests/compliance/escape.json | 46 + .../tests/compliance/filters.json | 512 ++++ .../tests/compliance/functions.json | 821 +++++ .../tests/compliance/identifiers.json | 1377 +++++++++ .../tests/compliance/indices.json | 346 +++ .../tests/compliance/literal.json | 190 ++ .../tests/compliance/multiselect.json | 393 +++ .../tests/compliance/perf/basic.json | 27 + .../tests/compliance/perf/deep_hierarchy.json | 27 + .../compliance/perf/deep_projection.json | 12 + .../tests/compliance/perf/functions.json | 17 + .../tests/compliance/perf/multiwildcard.json | 22 + .../tests/compliance/perf/wildcardindex.json | 17 + .../jmespath.php/tests/compliance/pipe.json | 131 + .../jmespath.php/tests/compliance/slice.json | 187 ++ .../jmespath.php/tests/compliance/syntax.json | 616 ++++ .../tests/compliance/unicode.json | 38 + .../tests/compliance/wildcard.json | 460 +++ vendor/psr/http-message/CHANGELOG.md | 36 + vendor/psr/http-message/LICENSE | 19 + vendor/psr/http-message/README.md | 13 + vendor/psr/http-message/composer.json | 26 + .../psr/http-message/src/MessageInterface.php | 187 ++ .../psr/http-message/src/RequestInterface.php | 129 + .../http-message/src/ResponseInterface.php | 68 + .../src/ServerRequestInterface.php | 261 ++ .../psr/http-message/src/StreamInterface.php | 158 + .../src/UploadedFileInterface.php | 123 + vendor/psr/http-message/src/UriInterface.php | 323 ++ vendor/ralouphie/getallheaders/LICENSE | 21 + vendor/ralouphie/getallheaders/README.md | 27 + vendor/ralouphie/getallheaders/composer.json | 26 + .../getallheaders/src/getallheaders.php | 46 + vendor/symfony/polyfill-mbstring/LICENSE | 19 + vendor/symfony/polyfill-mbstring/Mbstring.php | 840 ++++++ vendor/symfony/polyfill-mbstring/README.md | 13 + .../Resources/unidata/lowerCase.php | 1096 +++++++ .../Resources/unidata/titleCaseRegexp.php | 5 + .../Resources/unidata/upperCase.php | 1104 +++++++ .../symfony/polyfill-mbstring/bootstrap.php | 62 + .../symfony/polyfill-mbstring/composer.json | 34 + view/button_javascript.php | 56 + view/settings.php | 143 +- 491 files changed, 51456 insertions(+), 17478 deletions(-) create mode 100644 composer.json create mode 100644 composer.lock create mode 100644 languages/aliyun-cdn-helper-zh_CN.mo create mode 100644 languages/aliyun-cdn-helper-zh_CN.po delete mode 100644 languages/aliyun-cdn-zh_CN.mo delete mode 100644 languages/aliyun-cdn-zh_CN.po delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddCdnDomainRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddLiveAppRecordConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddLiveAppSnapshotConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddLiveDomainMappingRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddLivePullStreamInfoRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddLiveStreamTranscodeRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ClearUserBlackListRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ClearUserDomainBlackListRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/CreateLiveStreamRecordIndexFilesRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteCdnDomainRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteHttpHeaderConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteLiveAppRecordConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteLiveAppSnapshotConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteLiveDomainMappingRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteLivePullStreamInfoRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteLiveStreamTranscodeRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnDomainBaseDetailRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnDomainDetailRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnDomainLogsRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnMonitorDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnRegionAndIspRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnServiceRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnTypesRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainAverageResponseTimeRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainBpsDataByTimeStampRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainBpsDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainCCAttackInfoRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainCCDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainConfigsRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainDownstreamBpsOfEdgeRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainFileSizeProportionDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainFlowDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainHitRateDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainHttpCodeDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainHttpsDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainISPDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainMax95BpsDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainMonthBillingBpsDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainOnlineUserNumberRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainPathDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainPvDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainQpsDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainRealTimeDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainRegionDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainReqHitRateDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainSrcBpsDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainSrcFlowDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainTopReferVisitRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainTopUrlVisitRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainUpstreamBpsOfEdgeRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainUpstreamOfCenterRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainUvDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainsBySourceRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainsUsageByDayRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeExtensiveDomainDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeIpInfoRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeL2VipsByDomainRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveAppRecordConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLivePullStreamConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveRecordConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveSnapshotConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveSpecificDomainMappingRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamBitRateDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamBpsDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamDomainAppInfoRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamFrameAndBitRateByDomainRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamFrameInfoRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamFrameLossRatioRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamHlsOnlineUserNumByDomainRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamLimitInfoRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamNumberListRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamOnlineBpsRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamOnlineUserNumByDomainRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamOnlineUserNumRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamPushDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamPushErrorsRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRecordContentRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRecordIndexFileRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRecordIndexFilesRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRelayPushBitRateRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRelayPushDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRelayPushErrorsRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRoomBitRateRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRoomUserNumberRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamSnapshotInfoRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamStreamStatusRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamTranscodeInfoRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamTranscodeStreamNumRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamsBlockListRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamsControlHistoryRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamsFrameRateAndBitRateDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamsOnlineListRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamsPublishListRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeOneMinuteDataRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeRangeDataByLocateAndIspServiceRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeRefreshQuotaRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeRefreshTasksRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeTopDomainsByFlowRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeUserConfigsRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeUserCustomerLabelsRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeUserDomainsRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeUserVipsByDomainRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ForbidLiveStreamRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/GetUserDomainBlackListRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/MigrateDomainToHttpsDeliveryRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ModifyCdnDomainRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ModifyCdnServiceRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ModifyHttpHeaderConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/OpenCdnServiceRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/PushObjectCacheRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/RefreshObjectCachesRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ResumeLiveStreamRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetCcConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetDomainServerCertificateRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetDynamicConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetErrorPageConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetForceRedirectConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetForwardSchemeConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetHttpErrorPageConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetHttpHeaderConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetIgnoreQueryStringConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetIpBlackListConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetLiveStreamsNotifyUrlConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetLocationAccessRestrictionRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetOptimizeConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetOssLogConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetPageCompressConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetRangeConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetRefererConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetRemoteReqAuthConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetRemoveQueryStringConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetReqAuthConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetReqHeaderConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetSourceHostConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetUserAgentAcessRestrictionRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetUserBlackListRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetUserDomainBlackListRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetVideoSeekConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetWafConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/StartCdnDomainRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/StartMixStreamsServiceRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/StopCdnDomainRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/StopMixStreamsServiceRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/UpdateLiveAppSnapshotConfigRequest.php delete mode 100755 sdk/aliyun-php-sdk-cdn/ChangeLog.txt delete mode 100755 sdk/aliyun-php-sdk-core/AcsRequest.php delete mode 100755 sdk/aliyun-php-sdk-core/AcsResponse.php delete mode 100755 sdk/aliyun-php-sdk-core/Auth/Credential.php delete mode 100755 sdk/aliyun-php-sdk-core/Auth/ISigner.php delete mode 100755 sdk/aliyun-php-sdk-core/Auth/ShaHmac1Signer.php delete mode 100755 sdk/aliyun-php-sdk-core/Auth/ShaHmac256Signer.php delete mode 100755 sdk/aliyun-php-sdk-core/Autoloader/Autoloader.php delete mode 100755 sdk/aliyun-php-sdk-core/ChangeLog.txt delete mode 100755 sdk/aliyun-php-sdk-core/Config.php delete mode 100755 sdk/aliyun-php-sdk-core/DefaultAcsClient.php delete mode 100755 sdk/aliyun-php-sdk-core/Exception/ClientException.php delete mode 100755 sdk/aliyun-php-sdk-core/Exception/ServerException.php delete mode 100755 sdk/aliyun-php-sdk-core/Http/HttpHelper.php delete mode 100755 sdk/aliyun-php-sdk-core/Http/HttpResponse.php delete mode 100755 sdk/aliyun-php-sdk-core/IAcsClient.php delete mode 100755 sdk/aliyun-php-sdk-core/Profile/DefaultProfile.php delete mode 100755 sdk/aliyun-php-sdk-core/Profile/IClientProfile.php delete mode 100755 sdk/aliyun-php-sdk-core/Regions/Endpoint.php delete mode 100755 sdk/aliyun-php-sdk-core/Regions/EndpointConfig.php delete mode 100755 sdk/aliyun-php-sdk-core/Regions/EndpointProvider.php delete mode 100755 sdk/aliyun-php-sdk-core/Regions/LocationService.php delete mode 100755 sdk/aliyun-php-sdk-core/Regions/ProductDomain.php delete mode 100755 sdk/aliyun-php-sdk-core/Regions/endpoints.xml delete mode 100755 sdk/aliyun-php-sdk-core/RoaAcsRequest.php delete mode 100755 sdk/aliyun-php-sdk-core/RpcAcsRequest.php delete mode 100755 sdk/aliyun-php-sdk-core/UnitTest/Auth/CredentialTest.php delete mode 100755 sdk/aliyun-php-sdk-core/UnitTest/Auth/ShaHmac1SignerTest.php delete mode 100755 sdk/aliyun-php-sdk-core/UnitTest/Auth/ShaHmac256SignerTest.php delete mode 100755 sdk/aliyun-php-sdk-core/UnitTest/BaseTest.php delete mode 100755 sdk/aliyun-php-sdk-core/UnitTest/BatchCompute/ListImagesRequest.php delete mode 100755 sdk/aliyun-php-sdk-core/UnitTest/DefaultAcsClientTest.php delete mode 100755 sdk/aliyun-php-sdk-core/UnitTest/Ecs/Rquest/DescribeRegionsRequest.php delete mode 100755 sdk/aliyun-php-sdk-core/UnitTest/Http/HttpHelperTest.php delete mode 100755 sdk/aliyun-php-sdk-core/UnitTest/Profile/DefaultProfileTest.php delete mode 100755 sdk/aliyun-php-sdk-core/UnitTest/Regions/EndPointByLocationTest.php delete mode 100755 sdk/aliyun-php-sdk-core/UnitTest/Regions/EndpointProviderTest.php delete mode 100644 src/Helper.php create mode 100644 vendor/adbario/php-dot-notation/LICENSE.md create mode 100644 vendor/adbario/php-dot-notation/composer.json create mode 100644 vendor/adbario/php-dot-notation/src/Dot.php create mode 100644 vendor/adbario/php-dot-notation/src/helpers.php create mode 100644 vendor/alibabacloud/client/CHANGELOG.md create mode 100644 vendor/alibabacloud/client/CONTRIBUTING.md create mode 100644 vendor/alibabacloud/client/LICENSE.md create mode 100644 vendor/alibabacloud/client/NOTICE.md create mode 100644 vendor/alibabacloud/client/README-zh-CN.md create mode 100644 vendor/alibabacloud/client/README.md create mode 100644 vendor/alibabacloud/client/UPGRADING.md create mode 100644 vendor/alibabacloud/client/composer.json create mode 100644 vendor/alibabacloud/client/src/Accept.php create mode 100644 vendor/alibabacloud/client/src/AlibabaCloud.php create mode 100644 vendor/alibabacloud/client/src/Clients/AccessKeyClient.php create mode 100644 vendor/alibabacloud/client/src/Clients/BearerTokenClient.php create mode 100644 vendor/alibabacloud/client/src/Clients/Client.php create mode 100644 vendor/alibabacloud/client/src/Clients/EcsRamRoleClient.php create mode 100644 vendor/alibabacloud/client/src/Clients/ManageTrait.php create mode 100644 vendor/alibabacloud/client/src/Clients/RamRoleArnClient.php create mode 100644 vendor/alibabacloud/client/src/Clients/RsaKeyPairClient.php create mode 100644 vendor/alibabacloud/client/src/Clients/StsClient.php create mode 100644 vendor/alibabacloud/client/src/Config/Config.php create mode 100644 vendor/alibabacloud/client/src/Config/Data.php create mode 100644 vendor/alibabacloud/client/src/Credentials/AccessKeyCredential.php create mode 100644 vendor/alibabacloud/client/src/Credentials/BearerTokenCredential.php create mode 100644 vendor/alibabacloud/client/src/Credentials/CredentialsInterface.php create mode 100644 vendor/alibabacloud/client/src/Credentials/EcsRamRoleCredential.php create mode 100644 vendor/alibabacloud/client/src/Credentials/Ini/CreateTrait.php create mode 100644 vendor/alibabacloud/client/src/Credentials/Ini/IniCredential.php create mode 100644 vendor/alibabacloud/client/src/Credentials/Ini/OptionsTrait.php create mode 100644 vendor/alibabacloud/client/src/Credentials/Providers/CredentialsProvider.php create mode 100644 vendor/alibabacloud/client/src/Credentials/Providers/EcsRamRoleProvider.php create mode 100644 vendor/alibabacloud/client/src/Credentials/Providers/Provider.php create mode 100644 vendor/alibabacloud/client/src/Credentials/Providers/RamRoleArnProvider.php create mode 100644 vendor/alibabacloud/client/src/Credentials/Providers/RsaKeyPairProvider.php create mode 100644 vendor/alibabacloud/client/src/Credentials/RamRoleArnCredential.php create mode 100644 vendor/alibabacloud/client/src/Credentials/Requests/AssumeRole.php create mode 100644 vendor/alibabacloud/client/src/Credentials/Requests/GenerateSessionAccessKey.php create mode 100644 vendor/alibabacloud/client/src/Credentials/RsaKeyPairCredential.php create mode 100644 vendor/alibabacloud/client/src/Credentials/StsCredential.php create mode 100644 vendor/alibabacloud/client/src/DefaultAcsClient.php create mode 100644 vendor/alibabacloud/client/src/Encode.php create mode 100644 vendor/alibabacloud/client/src/Exception/AlibabaCloudException.php create mode 100644 vendor/alibabacloud/client/src/Exception/ClientException.php create mode 100644 vendor/alibabacloud/client/src/Exception/ServerException.php create mode 100644 vendor/alibabacloud/client/src/Filter/ApiFilter.php create mode 100644 vendor/alibabacloud/client/src/Filter/ClientFilter.php create mode 100644 vendor/alibabacloud/client/src/Filter/CredentialFilter.php create mode 100644 vendor/alibabacloud/client/src/Filter/Filter.php create mode 100644 vendor/alibabacloud/client/src/Filter/HttpFilter.php create mode 100644 vendor/alibabacloud/client/src/Functions.php create mode 100644 vendor/alibabacloud/client/src/Log/LogFormatter.php create mode 100644 vendor/alibabacloud/client/src/Profile/DefaultProfile.php create mode 100644 vendor/alibabacloud/client/src/Regions/EndpointProvider.php create mode 100644 vendor/alibabacloud/client/src/Regions/LocationService.php create mode 100644 vendor/alibabacloud/client/src/Regions/LocationServiceRequest.php create mode 100644 vendor/alibabacloud/client/src/Release.php create mode 100644 vendor/alibabacloud/client/src/Request/Request.php create mode 100644 vendor/alibabacloud/client/src/Request/RoaRequest.php create mode 100644 vendor/alibabacloud/client/src/Request/RpcRequest.php create mode 100644 vendor/alibabacloud/client/src/Request/Traits/AcsTrait.php create mode 100644 vendor/alibabacloud/client/src/Request/Traits/ClientTrait.php create mode 100644 vendor/alibabacloud/client/src/Request/Traits/DeprecatedRoaTrait.php create mode 100644 vendor/alibabacloud/client/src/Request/Traits/DeprecatedTrait.php create mode 100644 vendor/alibabacloud/client/src/Request/Traits/RetryTrait.php create mode 100644 vendor/alibabacloud/client/src/Request/UserAgent.php create mode 100644 vendor/alibabacloud/client/src/Resolver/ActionResolverTrait.php create mode 100644 vendor/alibabacloud/client/src/Resolver/ApiResolver.php create mode 100644 vendor/alibabacloud/client/src/Resolver/CallTrait.php create mode 100644 vendor/alibabacloud/client/src/Resolver/Roa.php create mode 100644 vendor/alibabacloud/client/src/Resolver/Rpc.php create mode 100644 vendor/alibabacloud/client/src/Resolver/VersionResolver.php create mode 100644 vendor/alibabacloud/client/src/Result/Result.php create mode 100644 vendor/alibabacloud/client/src/SDK.php create mode 100644 vendor/alibabacloud/client/src/Signature/BearerTokenSignature.php create mode 100644 vendor/alibabacloud/client/src/Signature/ShaHmac1Signature.php create mode 100644 vendor/alibabacloud/client/src/Signature/ShaHmac256Signature.php create mode 100644 vendor/alibabacloud/client/src/Signature/ShaHmac256WithRsaSignature.php create mode 100644 vendor/alibabacloud/client/src/Signature/Signature.php create mode 100644 vendor/alibabacloud/client/src/Signature/SignatureInterface.php create mode 100644 vendor/alibabacloud/client/src/Support/Arrays.php create mode 100644 vendor/alibabacloud/client/src/Support/Path.php create mode 100644 vendor/alibabacloud/client/src/Support/Sign.php create mode 100644 vendor/alibabacloud/client/src/Traits/ArrayAccessTrait.php create mode 100644 vendor/alibabacloud/client/src/Traits/ClientTrait.php create mode 100644 vendor/alibabacloud/client/src/Traits/DefaultRegionTrait.php create mode 100644 vendor/alibabacloud/client/src/Traits/EndpointTrait.php create mode 100644 vendor/alibabacloud/client/src/Traits/HasDataTrait.php create mode 100644 vendor/alibabacloud/client/src/Traits/HistoryTrait.php create mode 100644 vendor/alibabacloud/client/src/Traits/HttpTrait.php create mode 100644 vendor/alibabacloud/client/src/Traits/LogTrait.php create mode 100644 vendor/alibabacloud/client/src/Traits/MockTrait.php create mode 100644 vendor/alibabacloud/client/src/Traits/ObjectAccessTrait.php create mode 100644 vendor/alibabacloud/client/src/Traits/RegionTrait.php create mode 100644 vendor/alibabacloud/client/src/Traits/RequestTrait.php create mode 100644 vendor/autoload.php create mode 120000 vendor/bin/jp.php create mode 100644 vendor/clagiordano/weblibs-configmanager/.gitignore create mode 100644 vendor/clagiordano/weblibs-configmanager/.travis.yml create mode 100644 vendor/clagiordano/weblibs-configmanager/README.md create mode 100644 vendor/clagiordano/weblibs-configmanager/composer.json create mode 100644 vendor/clagiordano/weblibs-configmanager/composer.lock create mode 100644 vendor/clagiordano/weblibs-configmanager/phpunit.xml create mode 100644 vendor/clagiordano/weblibs-configmanager/src/ConfigManager.php create mode 100644 vendor/clagiordano/weblibs-configmanager/tests/ConfigManagerTest.php create mode 100644 vendor/clagiordano/weblibs-configmanager/testsdata/sample_config_data.php create mode 100644 vendor/composer/ClassLoader.php create mode 100644 vendor/composer/LICENSE create mode 100644 vendor/composer/autoload_classmap.php create mode 100644 vendor/composer/autoload_files.php create mode 100644 vendor/composer/autoload_namespaces.php create mode 100644 vendor/composer/autoload_psr4.php create mode 100644 vendor/composer/autoload_real.php create mode 100644 vendor/composer/autoload_static.php create mode 100644 vendor/composer/installed.json create mode 100644 vendor/danielstjules/stringy/CHANGELOG.md create mode 100644 vendor/danielstjules/stringy/LICENSE.txt create mode 100644 vendor/danielstjules/stringy/README.md create mode 100644 vendor/danielstjules/stringy/composer.json create mode 100644 vendor/danielstjules/stringy/src/Create.php create mode 100644 vendor/danielstjules/stringy/src/StaticStringy.php create mode 100644 vendor/danielstjules/stringy/src/Stringy.php create mode 100644 vendor/guzzlehttp/guzzle/.php_cs create mode 100644 vendor/guzzlehttp/guzzle/CHANGELOG.md create mode 100644 vendor/guzzlehttp/guzzle/Dockerfile create mode 100644 vendor/guzzlehttp/guzzle/LICENSE create mode 100644 vendor/guzzlehttp/guzzle/README.md create mode 100644 vendor/guzzlehttp/guzzle/UPGRADING.md create mode 100644 vendor/guzzlehttp/guzzle/composer.json create mode 100644 vendor/guzzlehttp/guzzle/phpstan.neon.dist create mode 100644 vendor/guzzlehttp/guzzle/src/Client.php create mode 100644 vendor/guzzlehttp/guzzle/src/ClientInterface.php create mode 100644 vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php create mode 100644 vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php create mode 100644 vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php create mode 100644 vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php create mode 100644 vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/ClientException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/RequestException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/SeekException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/ServerException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/TransferException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/Proxy.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php create mode 100644 vendor/guzzlehttp/guzzle/src/HandlerStack.php create mode 100644 vendor/guzzlehttp/guzzle/src/MessageFormatter.php create mode 100644 vendor/guzzlehttp/guzzle/src/Middleware.php create mode 100644 vendor/guzzlehttp/guzzle/src/Pool.php create mode 100644 vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php create mode 100644 vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php create mode 100644 vendor/guzzlehttp/guzzle/src/RequestOptions.php create mode 100644 vendor/guzzlehttp/guzzle/src/RetryMiddleware.php create mode 100644 vendor/guzzlehttp/guzzle/src/TransferStats.php create mode 100644 vendor/guzzlehttp/guzzle/src/UriTemplate.php create mode 100644 vendor/guzzlehttp/guzzle/src/functions.php create mode 100644 vendor/guzzlehttp/guzzle/src/functions_include.php create mode 100644 vendor/guzzlehttp/promises/CHANGELOG.md create mode 100644 vendor/guzzlehttp/promises/LICENSE create mode 100644 vendor/guzzlehttp/promises/Makefile create mode 100644 vendor/guzzlehttp/promises/README.md create mode 100644 vendor/guzzlehttp/promises/composer.json create mode 100644 vendor/guzzlehttp/promises/src/AggregateException.php create mode 100644 vendor/guzzlehttp/promises/src/CancellationException.php create mode 100644 vendor/guzzlehttp/promises/src/Coroutine.php create mode 100644 vendor/guzzlehttp/promises/src/EachPromise.php create mode 100644 vendor/guzzlehttp/promises/src/FulfilledPromise.php create mode 100644 vendor/guzzlehttp/promises/src/Promise.php create mode 100644 vendor/guzzlehttp/promises/src/PromiseInterface.php create mode 100644 vendor/guzzlehttp/promises/src/PromisorInterface.php create mode 100644 vendor/guzzlehttp/promises/src/RejectedPromise.php create mode 100644 vendor/guzzlehttp/promises/src/RejectionException.php create mode 100644 vendor/guzzlehttp/promises/src/TaskQueue.php create mode 100644 vendor/guzzlehttp/promises/src/TaskQueueInterface.php create mode 100644 vendor/guzzlehttp/promises/src/functions.php create mode 100644 vendor/guzzlehttp/promises/src/functions_include.php create mode 100644 vendor/guzzlehttp/psr7/CHANGELOG.md create mode 100644 vendor/guzzlehttp/psr7/LICENSE create mode 100644 vendor/guzzlehttp/psr7/README.md create mode 100644 vendor/guzzlehttp/psr7/composer.json create mode 100644 vendor/guzzlehttp/psr7/src/AppendStream.php create mode 100644 vendor/guzzlehttp/psr7/src/BufferStream.php create mode 100644 vendor/guzzlehttp/psr7/src/CachingStream.php create mode 100644 vendor/guzzlehttp/psr7/src/DroppingStream.php create mode 100644 vendor/guzzlehttp/psr7/src/FnStream.php create mode 100644 vendor/guzzlehttp/psr7/src/InflateStream.php create mode 100644 vendor/guzzlehttp/psr7/src/LazyOpenStream.php create mode 100644 vendor/guzzlehttp/psr7/src/LimitStream.php create mode 100644 vendor/guzzlehttp/psr7/src/MessageTrait.php create mode 100644 vendor/guzzlehttp/psr7/src/MultipartStream.php create mode 100644 vendor/guzzlehttp/psr7/src/NoSeekStream.php create mode 100644 vendor/guzzlehttp/psr7/src/PumpStream.php create mode 100644 vendor/guzzlehttp/psr7/src/Request.php create mode 100644 vendor/guzzlehttp/psr7/src/Response.php create mode 100644 vendor/guzzlehttp/psr7/src/Rfc7230.php create mode 100644 vendor/guzzlehttp/psr7/src/ServerRequest.php create mode 100644 vendor/guzzlehttp/psr7/src/Stream.php create mode 100644 vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php create mode 100644 vendor/guzzlehttp/psr7/src/StreamWrapper.php create mode 100644 vendor/guzzlehttp/psr7/src/UploadedFile.php create mode 100644 vendor/guzzlehttp/psr7/src/Uri.php create mode 100644 vendor/guzzlehttp/psr7/src/UriNormalizer.php create mode 100644 vendor/guzzlehttp/psr7/src/UriResolver.php create mode 100644 vendor/guzzlehttp/psr7/src/functions.php create mode 100644 vendor/guzzlehttp/psr7/src/functions_include.php create mode 100644 vendor/mtdowling/jmespath.php/.gitignore create mode 100644 vendor/mtdowling/jmespath.php/.travis.yml create mode 100644 vendor/mtdowling/jmespath.php/CHANGELOG.md create mode 100644 vendor/mtdowling/jmespath.php/LICENSE create mode 100644 vendor/mtdowling/jmespath.php/Makefile create mode 100644 vendor/mtdowling/jmespath.php/README.rst create mode 100755 vendor/mtdowling/jmespath.php/bin/jp.php create mode 100755 vendor/mtdowling/jmespath.php/bin/perf.php create mode 100644 vendor/mtdowling/jmespath.php/composer.json create mode 100644 vendor/mtdowling/jmespath.php/phpunit.xml.dist create mode 100644 vendor/mtdowling/jmespath.php/src/AstRuntime.php create mode 100644 vendor/mtdowling/jmespath.php/src/CompilerRuntime.php create mode 100644 vendor/mtdowling/jmespath.php/src/DebugRuntime.php create mode 100644 vendor/mtdowling/jmespath.php/src/Env.php create mode 100644 vendor/mtdowling/jmespath.php/src/FnDispatcher.php create mode 100644 vendor/mtdowling/jmespath.php/src/JmesPath.php create mode 100644 vendor/mtdowling/jmespath.php/src/Lexer.php create mode 100644 vendor/mtdowling/jmespath.php/src/Parser.php create mode 100644 vendor/mtdowling/jmespath.php/src/SyntaxErrorException.php create mode 100644 vendor/mtdowling/jmespath.php/src/TreeCompiler.php create mode 100644 vendor/mtdowling/jmespath.php/src/TreeInterpreter.php create mode 100644 vendor/mtdowling/jmespath.php/src/Utils.php create mode 100644 vendor/mtdowling/jmespath.php/tests/ComplianceTest.php create mode 100644 vendor/mtdowling/jmespath.php/tests/EnvTest.php create mode 100644 vendor/mtdowling/jmespath.php/tests/FnDispatcherTest.php create mode 100644 vendor/mtdowling/jmespath.php/tests/LexerTest.php create mode 100644 vendor/mtdowling/jmespath.php/tests/ParserTest.php create mode 100644 vendor/mtdowling/jmespath.php/tests/SyntaxErrorExceptionTest.php create mode 100644 vendor/mtdowling/jmespath.php/tests/TreeCompilerTest.php create mode 100644 vendor/mtdowling/jmespath.php/tests/TreeInterpreterTest.php create mode 100644 vendor/mtdowling/jmespath.php/tests/UtilsTest.php create mode 100644 vendor/mtdowling/jmespath.php/tests/compliance/basic.json create mode 100644 vendor/mtdowling/jmespath.php/tests/compliance/boolean.json create mode 100644 vendor/mtdowling/jmespath.php/tests/compliance/current.json create mode 100644 vendor/mtdowling/jmespath.php/tests/compliance/escape.json create mode 100644 vendor/mtdowling/jmespath.php/tests/compliance/filters.json create mode 100644 vendor/mtdowling/jmespath.php/tests/compliance/functions.json create mode 100644 vendor/mtdowling/jmespath.php/tests/compliance/identifiers.json create mode 100644 vendor/mtdowling/jmespath.php/tests/compliance/indices.json create mode 100644 vendor/mtdowling/jmespath.php/tests/compliance/literal.json create mode 100644 vendor/mtdowling/jmespath.php/tests/compliance/multiselect.json create mode 100644 vendor/mtdowling/jmespath.php/tests/compliance/perf/basic.json create mode 100644 vendor/mtdowling/jmespath.php/tests/compliance/perf/deep_hierarchy.json create mode 100644 vendor/mtdowling/jmespath.php/tests/compliance/perf/deep_projection.json create mode 100644 vendor/mtdowling/jmespath.php/tests/compliance/perf/functions.json create mode 100644 vendor/mtdowling/jmespath.php/tests/compliance/perf/multiwildcard.json create mode 100644 vendor/mtdowling/jmespath.php/tests/compliance/perf/wildcardindex.json create mode 100644 vendor/mtdowling/jmespath.php/tests/compliance/pipe.json create mode 100644 vendor/mtdowling/jmespath.php/tests/compliance/slice.json create mode 100644 vendor/mtdowling/jmespath.php/tests/compliance/syntax.json create mode 100644 vendor/mtdowling/jmespath.php/tests/compliance/unicode.json create mode 100644 vendor/mtdowling/jmespath.php/tests/compliance/wildcard.json create mode 100644 vendor/psr/http-message/CHANGELOG.md create mode 100644 vendor/psr/http-message/LICENSE create mode 100644 vendor/psr/http-message/README.md create mode 100644 vendor/psr/http-message/composer.json create mode 100644 vendor/psr/http-message/src/MessageInterface.php create mode 100644 vendor/psr/http-message/src/RequestInterface.php create mode 100644 vendor/psr/http-message/src/ResponseInterface.php create mode 100644 vendor/psr/http-message/src/ServerRequestInterface.php create mode 100644 vendor/psr/http-message/src/StreamInterface.php create mode 100644 vendor/psr/http-message/src/UploadedFileInterface.php create mode 100644 vendor/psr/http-message/src/UriInterface.php create mode 100644 vendor/ralouphie/getallheaders/LICENSE create mode 100644 vendor/ralouphie/getallheaders/README.md create mode 100644 vendor/ralouphie/getallheaders/composer.json create mode 100644 vendor/ralouphie/getallheaders/src/getallheaders.php create mode 100644 vendor/symfony/polyfill-mbstring/LICENSE create mode 100644 vendor/symfony/polyfill-mbstring/Mbstring.php create mode 100644 vendor/symfony/polyfill-mbstring/README.md create mode 100644 vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php create mode 100644 vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php create mode 100644 vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php create mode 100644 vendor/symfony/polyfill-mbstring/bootstrap.php create mode 100644 vendor/symfony/polyfill-mbstring/composer.json create mode 100644 view/button_javascript.php diff --git a/.gitignore b/.gitignore index 723ef36..090a1f0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.idea \ No newline at end of file +.idea +.DS_Store diff --git a/README.md b/README.md index f3d1f0c..00401e7 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ### 当前版本 -v2.2 +v2.5 ![image][image-1] @@ -15,13 +15,12 @@ v2.2 3. 设置页面可以显示当日的刷新剩余量 4. 中英文支持 5. 支持文件刷新和目录刷新 -6. 支持批量预热文件 ### 环境 -WordPress 4.9.5 (低版本暂未测试,理论上是支持的) +WordPress 5.0+ -PHP 5.3 ~ 7.1 (取决于阿里云 SDK) +PHP 7.0+ ### 插件的使用 #### 下载 @@ -29,8 +28,6 @@ PHP 5.3 ~ 7.1 (取决于阿里云 SDK) #### 安装 -插件已提交到 WordPress 插件商店,正在等待审核,在此之前,您需要使用以下的安装方法: - 将压缩包解压,上传到 `/wp-content/plugins/` 或通过 WordPress 插件管理页面上传插件压缩包来安装 #### 配置 @@ -43,13 +40,13 @@ PHP 5.3 ~ 7.1 (取决于阿里云 SDK) 这个是对快捷按钮的设置,如果选择 `刷新当前主题目录内的静态文件(目录)` 或 `全站刷新(目录)` 则请求强制回源拉取更新的目录(使用一个刷新目录配额)。 -#### URL 预热 +v2.5 版本更新: -预热可以将源站的内容主动预热到 L2 Cache 节点上,用户首次访问可直接命中缓存,缓解源站压力, +1. 代码重构 -如果您是首次使用 CDN 和这个插件,您可以点击预热按钮,插件将会自动搜索当前主题目录类的静态资源文件,处理成标准的 URL 格式后提交到预热接口。 +2. API Restful -由于阿里云的 SDK 不支持批量刷新,所以现在使用循环提交的方式,主题内文件较多的话等待时间可能稍微长一点,具体使用 URL 配额由文件数量决定。 +3. 更新 SDK v2.2 版本更新: @@ -57,7 +54,7 @@ v2.2 版本更新: 2. 阿里云 SDK 已支持批量刷新,但貌似会提示文件名称格式不正确的问题,所以仍使用循环提交的方式,并做了一些小调整,只提交后缀为 `css, js` 的文件(下个版本会增加自定义后缀的功能),如果您有好的方案,欢迎提交 Pull Request -3. 为了提交到 WordPress 已将插件名更名为 `Jacky AliCDN Helper`。(求 dalao 给它取个更好听的名字w) +3. 为了提交到 WordPress 已将插件名更名为 `Aliyun CDN Helper`。(求 dalao 给它取个更好听的名字w) #### 刷新自定义 URL @@ -72,7 +69,7 @@ v2.2 版本更新: ![image][image-2] -[1]: https://github.com/0xJacky/jacky-alicdn-helper/releases/latest +[1]: https://github.com/0xJacky/aliyun-cdn-helper/releases/latest [image-1]: https://github.com/0xJacky/aliyun-cdn-helper/raw/master/assets/screenshot-1.png [image-2]: https://github.com/0xJacky/aliyun-cdn-helper/raw/master/assets/my_alipay.png diff --git a/aliyun-cdn.php b/aliyun-cdn.php index b79ee7b..00fcf57 100644 --- a/aliyun-cdn.php +++ b/aliyun-cdn.php @@ -1,6 +1,6 @@ getMessage(); - register_activation_hook( __FILE__, function () { - add_option( 'alicdn_options', Config::$originOptions, '', 'yes' ); //autoload - } ); +if ( is_admin() ) { + new Init; + new Settings; } diff --git a/autoload.php b/autoload.php index 57dfc44..4ed514b 100644 --- a/autoload.php +++ b/autoload.php @@ -13,6 +13,7 @@ * @return void */ defined( 'ALIYUN_CDN_PATH' ) OR exit(); +require( ALIYUN_CDN_PATH . '/vendor/autoload.php' ); spl_autoload_register( function ( $class ) { $auto_load_class = array( 'CDN\\WP\\' => '/src/' @@ -28,4 +29,3 @@ } } } ); -include ALIYUN_CDN_PATH . '/sdk/aliyun-php-sdk-core/Config.php'; diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..4eae94d --- /dev/null +++ b/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "alibabacloud/client": "^1.5" + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..44e1000 --- /dev/null +++ b/composer.lock @@ -0,0 +1,710 @@ +{ + "_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": "2d3c09198cf7641d091965b560b47bef", + "packages": [ + { + "name": "adbario/php-dot-notation", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/adbario/php-dot-notation.git", + "reference": "eee4fc81296531e6aafba4c2bbccfc5adab1676e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/adbario/php-dot-notation/zipball/eee4fc81296531e6aafba4c2bbccfc5adab1676e", + "reference": "eee4fc81296531e6aafba4c2bbccfc5adab1676e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.0|^5.0|^6.0", + "squizlabs/php_codesniffer": "^3.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Adbar\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Riku Särkinen", + "email": "riku@adbar.io" + } + ], + "description": "PHP dot notation access to arrays", + "homepage": "https://github.com/adbario/php-dot-notation", + "keywords": [ + "ArrayAccess", + "dotnotation" + ], + "time": "2019-01-01T23:59:15+00:00" + }, + { + "name": "alibabacloud/client", + "version": "1.5.18", + "source": { + "type": "git", + "url": "https://github.com/aliyun/openapi-sdk-php-client.git", + "reference": "5dcf7b8fdfa64abdae7a5ca867289baf95e8e12a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aliyun/openapi-sdk-php-client/zipball/5dcf7b8fdfa64abdae7a5ca867289baf95e8e12a", + "reference": "5dcf7b8fdfa64abdae7a5ca867289baf95e8e12a", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "adbario/php-dot-notation": "^2.2", + "clagiordano/weblibs-configmanager": "^1.0", + "danielstjules/stringy": "^3.1", + "ext-curl": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-simplexml": "*", + "ext-xmlwriter": "*", + "guzzlehttp/guzzle": "^6.3", + "mtdowling/jmespath.php": "^2.4", + "php": ">=5.5" + }, + "require-dev": { + "composer/composer": "^1.8", + "drupal/coder": "^8.3", + "ext-dom": "*", + "ext-pcre": "*", + "ext-sockets": "*", + "ext-spl": "*", + "league/climate": "^3.2.4", + "mikey179/vfsstream": "^1.6", + "monolog/monolog": "^1.24", + "phpunit/phpunit": "^4.8.35|^5.4.3", + "psr/cache": "^1.0", + "symfony/dotenv": "^3.4", + "symfony/var-dumper": "^3.4" + }, + "suggest": { + "ext-sockets": "To use client-side monitoring" + }, + "type": "library", + "autoload": { + "psr-4": { + "AlibabaCloud\\Client\\": "src" + }, + "files": [ + "src/Functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Alibaba Cloud SDK", + "email": "sdk-team@alibabacloud.com", + "homepage": "http://www.alibabacloud.com" + } + ], + "description": "Alibaba Cloud Client for PHP - Use Alibaba Cloud in your PHP project", + "homepage": "https://www.alibabacloud.com/", + "keywords": [ + "alibaba", + "alibabacloud", + "aliyun", + "client", + "cloud", + "library", + "sdk", + "tool" + ], + "time": "2019-10-11T11:09:47+00:00" + }, + { + "name": "clagiordano/weblibs-configmanager", + "version": "v1.0.7", + "source": { + "type": "git", + "url": "https://github.com/clagiordano/weblibs-configmanager.git", + "reference": "6ef4c27354368deb2f54b39bbe06601da8c873a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clagiordano/weblibs-configmanager/zipball/6ef4c27354368deb2f54b39bbe06601da8c873a0", + "reference": "6ef4c27354368deb2f54b39bbe06601da8c873a0", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "clagiordano/phpunit-result-printer": "^1", + "phpunit/phpunit": "^4.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "clagiordano\\weblibs\\configmanager\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Claudio Giordano", + "email": "claudio.giordano@autistici.org", + "role": "Developer" + } + ], + "description": "weblibs-configmanager is a tool library for easily read and access to php config array file and direct read/write configuration file / object", + "keywords": [ + "clagiordano", + "configuration", + "manager", + "tool", + "weblibs" + ], + "time": "2019-09-25T22:10:10+00:00" + }, + { + "name": "danielstjules/stringy", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/danielstjules/Stringy.git", + "reference": "df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/danielstjules/Stringy/zipball/df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e", + "reference": "df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.4.0", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Stringy\\": "src/" + }, + "files": [ + "src/Create.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel St. Jules", + "email": "danielst.jules@gmail.com", + "homepage": "http://www.danielstjules.com" + } + ], + "description": "A string manipulation library with multibyte support", + "homepage": "https://github.com/danielstjules/Stringy", + "keywords": [ + "UTF", + "helpers", + "manipulation", + "methods", + "multibyte", + "string", + "utf-8", + "utility", + "utils" + ], + "time": "2017-06-12T01:10:27+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "6.4.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "0895c932405407fd3a7368b6910c09a24d26db11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0895c932405407fd3a7368b6910c09a24d26db11", + "reference": "0895c932405407fd3a7368b6910c09a24d26db11", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.6.1", + "php": ">=5.5" + }, + "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.3-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "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" + ], + "time": "2019-10-23T15:58:00+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20T10:07:11+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "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.8" + }, + "suggest": { + "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "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" + ], + "time": "2019-07-01T23:21:34+00:00" + }, + { + "name": "mtdowling/jmespath.php", + "version": "2.4.0", + "source": { + "type": "git", + "url": "https://github.com/jmespath/jmespath.php.git", + "reference": "adcc9531682cf87dfda21e1fd5d0e7a41d292fac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/adcc9531682cf87dfda21e1fd5d0e7a41d292fac", + "reference": "adcc9531682cf87dfda21e1fd5d0e7a41d292fac", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "bin": [ + "bin/jp.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "JmesPath\\": "src/" + }, + "files": [ + "src/JmesPath.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Declaratively specify how to extract elements from a JSON document", + "keywords": [ + "json", + "jsonpath" + ], + "time": "2016-12-03T22:08:25+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": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "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" + ], + "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": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "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.", + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.13.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f", + "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.13-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2019-11-27T14:18:11+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/languages/aliyun-cdn-helper-zh_CN.mo b/languages/aliyun-cdn-helper-zh_CN.mo new file mode 100644 index 0000000000000000000000000000000000000000..48fd4d0bd6a7e6ca359970667ff5e87ed61ac37e GIT binary patch literal 4868 zcmb_fTToqB8Q#{`3tnpLrPk|8Y_zGI10m@c495^5C91 ze0$yg_5J_<{cA7&`uM|V6+Bj0sjW913vnQqKpE61bhYf z4)7bmp${lZ1Mqi15BMZVeI7UrB)hKzKM9-%k{`bZ63+~f?EeQC20r~EiHCsLQaKLX z4?F>6z&``afd2+o05^YFQ9cFyA+Qv91o$}cBJdgDP2g_e+rX=c*~StXuQxv`n$Md`w++zRsa!tr5U&n zr~@|ue*^p)@GT(e=D$F)^DO?90`~%`?cooN_X8=5^-@FVW@AWb6QBv*>d7xAO#%MwHk=@sb_`h`4&ztl(iqX!|%KcB%HTvs*) zJ#a_(Nm`)?G7>r=t$&3&g69b!&>oh5sq<_ zlB2SyZgb7G>@McnMk$M0%(PsF;1es5Q=?I~L$jiMXW5Q2flS2!lF7|zSlO>SF6Be4 zGB{eLtb;Nei*by&aZDB&j$57)EwXl$+c|sKh3v^)YGWoPzFxJ}HV%qTFbihmINwJ1lha|PF0U=IJ=tC(Ri>I!jzzsvvW3VX>ndnymQCTwuOR)X zkcYv=UM7pH4z$Wm=6be?MaVj0C;ZVotTkPPv`y7bX2KtE^9)ySH@Hv$b7WLJc%m{* zwQU_~XQ&+*qu@Kd9dU56uAX8GK5>p(=!kPTC3h+Ep|(cw40;NMC_EAQ2Eo81qbqMy zDgjBd*9lXRc^RTy9yHa2;<@~#>7^u_9_i2T`TzPHC54PwCuiMqm^F2h&(Opgw7a_XmdNJGW z0#^;E8)@af)3K!OKGqv>#3>Cf9M%{ybaD~P$wb;Hl;hI}`4Nw5$Z9@J5+siztR`2k zo0SHyxlI@6DRWh)wUj|tq>&C4r9jbagxei)1YJ6RUxP2;B&M_mM-5J&fGNcQjT|=} zud+nq>RSxk51UUOKp+RB1YMwu#(;U+C=HpS(^oSS@@ zJ}F*UGs_ewAAHL+y4d=>_aKIwmF)S|Y~RV`?bG69&#d(NgRlDYQ-1IKKe~I0&V1GD z)D2z5Dd$?2AxabncC;Oz69irWTfbhuy}Z1Hj>J%-t(uOZ;$V$1^q4UZg%E1wYFmT_!N_+< z*iYk4)dx!IYU_3v2y6+Lm!N1|6i=v8=X<6-ZPqR}tw#t2) znsDb4@yO39@{Fst7OzLJL*)qfdIP&VHN%VYC{1`KeAp>@;7eC>btZLYF*CE0UYfBuFNPA*Rn zqrf%6Q(90meXsd5&vzb%#{_we7^|kOYb+ZT7vR5u(v+S9%%knLNsNmdm^3E?BRQ>a<$6!*;sjjDtc?1-Q_0)M zlMCI+h1b%r%=pV^{fj5k<1Z3FEKV*A!C8M5ah~%hrr{pO(uq-jZp9zGoLm@u*NuzZ zPW7KoCVuHBZf9m@C{=UEgGogfsnmP|>;3+@V8~xxPM@9fhkH_I=W>^=Vk_r(j|Xn$Y1J)0K|!n?X%sNXiNXvID$n1Vvue25=29Q@`;0 zZ~4P>Qa}&rKH0@SFb8g#*(<5hA?Q_#j=sfGW8!}l`T8!+uGh(O1#&D{o;uf;Ox#M} zOh8RJ)%H%OUmrt8^7aCmId`pQh41PE%}*{QvRBTFjNE6wtc@Hak!iVDYM*p9{$lpR zSgQM&bm7iYzpP4sb}@5vQhJ19l=JT_4dh}uJd(V9Et!CJtiV5JbwU7 zJ=4j=pnvUEe|R>TmkQ;3*^r)PTkcP}OfFwePnconfigure " +"it to work." +msgstr "Aliyun CDN Helper 启动成功,您需要配置它工作。" + +#: src/Settings.php:34 src/Settings.php:35 +msgid "Alibaba Cloud CDN" +msgstr "阿里云 CDN" + +#: src/Settings.php:58 +msgid "Configuration saved successfully" +msgstr "设置保存成功" + +#: src/Settings.php:60 +#, php-format +msgid "Fail to save configuration, error message: %s" +msgstr "无法保存配置,错误消息:%s" + +#: view/button_javascript.php:36 view/settings.php:79 view/settings.php:108 +msgid "Submitting task, please wait ..." +msgstr "正在提交任务,请稍候..." + +#: view/settings.php:30 +msgid "Alibaba Cloud CDN Helper" +msgstr "阿里云 CDN 辅助工具" + +#: view/settings.php:34 +msgid "Access Key ID" +msgstr "Access Key ID" + +#: view/settings.php:36 +msgid "Access key Secret" +msgstr "Access key Secret" + +#: view/settings.php:38 +msgid "You cannot see me:-D" +msgstr "你看不到我:-D" + +#: view/settings.php:39 +msgid "" +"Please enter your Access Key ID and Access Key Secret, which can be obtained " +"in the Alibaba Cloud Management Console." +msgstr "请输入您在阿里云管理控制台获取的 Access Key ID 和 Access Key Secret。" + +#: view/settings.php:40 +msgid "" +"Make sure that the Access Key ID and the Access Key Secret you entered are " +"correct and the CDN acceleration has been turned on for the current domain " +"name." +msgstr "" +"请确保您的 Access Key ID 和 Access Key Secret 已正确输入,并且已为当前域名开" +"启 CDN 加速。" + +#: view/settings.php:41 +msgid "" +"Last but not least, we suggest that you should add ver to the " +"Ignore Parameters, which will increase the cache hit ratio." +msgstr "" +"我们建议您将 ver 添加到 忽略参数 中,这会增加缓存命" +"中率。" + +#: view/settings.php:44 +msgid "Refresh file type" +msgstr "刷新文件类型" + +#: view/settings.php:46 +msgid "style.css only (Request object type: File)" +msgstr "仅刷新 style.css (请求对象类型:文件)" + +#: view/settings.php:49 +msgid "" +"Static files in the current theme directory (Request object type: Directory)" +msgstr "刷新当前主题目录中的静态文件(请求对象类型:目录)" + +#: view/settings.php:52 +msgid "The whole site (Request object type: Directory)" +msgstr "全站(请求对象类型:目录)" + +#: view/settings.php:56 +msgid "Custom URLs" +msgstr "自定义 URLs" + +#: view/settings.php:59 +msgid "Multiple URLs should use a carriage return to separate." +msgstr "多个 URL 之间通过换行分隔。" + +#: view/settings.php:60 +msgid "" +"If you enter a directory url, do not forget to add / at the end." +msgstr "如果您输入了一个目录型的 URL,不要忘记在它的结尾加上 /。" + +#: view/settings.php:66 +msgid "Save" +msgstr "保存" + +#: view/settings.php:68 +msgid "Refresh Custom urls" +msgstr "刷新自定义 URLs" + +#: view/settings.php:69 +msgid "" +"After changed the settings, make sure you save the settings before you click " +"the refresh button." +msgstr "修改设置之后,点击刷新按钮之前,请确保您已保存设置。" + +#: view/settings.php:137 +msgid "Querying operation quota..." +msgstr "正在查询操作配额..." + +#. Plugin Name of the plugin/theme +msgid "Aliyun CDN Helper" +msgstr "阿里云 CDN 辅助工具" + +#. Plugin URI of the plugin/theme +msgid "https://github.com/0xJacky/aliyun_cdn_helper" +msgstr "https://github.com/0xJacky/aliyun_cdn_helper" + +#. Description of the plugin/theme +msgid "阿里云 CDN 辅助工具。Aliyun CDN auxiliary tool for wordpress." +msgstr "阿里云 CDN 辅助工具。Aliyun CDN auxiliary tool for wordpress." + +#. Author of the plugin/theme +msgid "0xJacky" +msgstr "0xJacky" + +#. Author URI of the plugin/theme +msgid "https://jackyu.cn/" +msgstr "https://jackyu.cn/" + +#~ msgid "" +#~ "Before you click the refresh button, make sure you save the settings." +#~ msgstr "点击有关于刷新的按钮之前,请确保您已保存设置。" + +#, php-format +#~ msgid "" +#~ "Fail to push!\n" +#~ "Error message: %s" +#~ msgstr "" +#~ "预热失败!\n" +#~ "错误信息: %s" + +#~ msgid "Refresh" +#~ msgstr "刷新" + +#~ msgid "Push" +#~ msgstr "预热" + +#~ msgid " success!" +#~ msgstr "成功!" + +#~ msgid "Today's refresh (push) has reached the maximum number of operations!" +#~ msgstr "今日刷新(预热)数量已达到最大值!" + +#, php-format +#~ msgid "" +#~ "Notice: You can submit a maximum daily refresh-type request amount of " +#~ "URL: %s, amount of directory: %s, push-type request amount of URL: %s. " +#~ "
Today you can refresh URL: %s times, directory: %s times.
Today you can push URL: %s times." +#~ msgstr "" +#~ "注意: 您的账户每天最多可以刷新 %s 个文件(URL)和 %s 个目录,今日最多可预" +#~ "热 %s 个文件(URL)任务生效时间大约为 5 分钟。
\n" +#~ "今日可刷新文件(URL): %s 个,目录: %s 个,
\n" +#~ "今日可预热文件(URL): %s 个。" + +#~ msgid "Refresh task is being submitted, please wait ..." +#~ msgstr "正在提交刷新任务,请稍候..." + +#, php-format +#~ msgid "" +#~ "If you don't know how to use Alibaba Cloud CDN please visit: https://cdn.aliyun.com" +#~ msgstr "" +#~ "如果您不知道如何使用阿里云 CDN,请访问: https://cdn." +#~ "aliyun.com" + +#~ msgid "" +#~ "Document: https://www.alibabacloud.com/help/doc-detail/27200.htm" +#~ msgstr "" +#~ "如果出现错误,请查阅: https://help.aliyun.com/" +#~ "document_detail/27200.html" + +#~ msgid "Push object cache" +#~ msgstr "预热" + +#~ msgid "" +#~ "Takes content from the origin site and actively preprocess it to the L2 " +#~ "Cache node. Upon first access, users can directly cache hit to relieve " +#~ "pressure on the origin site." +#~ msgstr "" +#~ "从源站点获取内容,并主动将其预处理到 L2 Cache 节点。首次访问时,用户可以直" +#~ "接缓存命中以减轻原始站点的压力。" + +#~ msgid "" +#~ "If you are using Alibaba Cloud CDN and this plugin for the first time, " +#~ "you can click on the following button, the plugin will automatically " +#~ "search the current theme directory of the static resource file, and " +#~ "submitted the URLs to the interface." +#~ msgstr "" +#~ "如果您是第一次使用阿里云 CDN 和这个插件,您可以点击以下按钮,插件将自动搜" +#~ "索静态资源文件的当前主题目录,并将URL提交到预热接口。" + +#~ msgid "" +#~ "Multiple URLs should use a carriage return to separate, if you enter the " +#~ "directory, please do not forget to add /" +#~ msgstr "" +#~ "多个 URL 应该使用回车分隔,如果您输入目录,请不要忘记添加/" + +#~ msgid "" +#~ " failed!\n" +#~ "Error message: %s" +#~ msgstr "" +#~ " 失败!\n" +#~ "错误消息:%s" diff --git a/languages/aliyun-cdn-zh_CN.mo b/languages/aliyun-cdn-zh_CN.mo deleted file mode 100644 index a8139da7fbd198a96d5acf07fd878bfa721aac8b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5863 zcmb_fTWlOx86KceFr`4DEiJU1q=a7Zt~YK&qs;}1ozRe^xT#C2c(BH^$KI)DXSQ>x z?Q)Tm#_=VI?Z(c{aqA|v9rqI3p&@pBiQg+EL?3uU2#KB9U8zzY%2OW@-+#``uAR7~ zAXXZGGw1T3|Ns8W`Te&$ZaJ>tw*k+0@YH@rQ8odM&*Be$KmMGedID=P>b9y&H zc0x_!ChIxrbrs?ymVvv}W}ajloYFjqwfTQuLR3Pu{KsV3759b~|fVu58CRx1f@^jz06E5&Fi zrByc!rh0HKbkkILnmJsx5lysJ^FWCS>1m$fETt1amfg;*CNb@}w26TN%d<67#efpT zwBt2qbl0U2gct;kLv+%+PHZ=+8jmZX(J9M(&}A*A)ymR%u+D=&ZzLcq9sQE-=qp2y z;yMZ=EoD;pAw4MYM40?c)mqv~S~*{oy=n`GiXhuft1dBbN3kLEaAma6h|I;cqa}0< zf{aS#~SW%P(Z79^KERf%X3>5;OSX}NTKGZ$&Erc!LHW~KP{s;yN5 zm8UFt69N7_$_GV}bRtt(Ms3qGUWTQR7VXeL1bxhH&yqSXdK~emW-JeZg1~^YDMt_o zrJ<5Ka)PqzCcEQoYopDow%1!JwOynJDHNU@9U+1q2dxq>2jgpPr*l{DjVodGC{uT1 z)u5rRZu^ahH&;&!E~V^++#=YMx7`H`%y0h#bq-scs>A zxyTt+bM==v0xE0stZmVC7+y)VdQUa0A!-n|DIRCfW+{0@siPEg;C56A8^<6nWB@>t zAd{u##b$Fu=P14q?}%g%>){GL;?VU|T2>ELTGQ~MG~lMxiO7A>DaGtV6nzgfDhW0x z!(?fUQp@x*jkvdvKcxsja}Z`C%A>o2ZHr<$wks9;1$=`}B1x4u+AO=3in^cI$7;X!R&T4OW2m^ElB{BnYBqbw zy;wb0Gf5UwR2ojQm(vY3PgU&QwRcBZ(~a>&1@e@FHdZe(!R2jkRn|a?Z$W>d+75TO zJzKvswz<5HPHp0LY=?;&isVSL&5gQS@ypmxxk;H!>eN|0g^;X{C*qG|Mt;VAg03a2 zy6Gemr=rgAY}JVEwCs$NWF{_Wd^+1UZlT*AuiFw^$~$)&YO@n-Lm?*xlPnfPF^}QG zqf+B+b4yG($?~S>>Yn6kibEY4C^5P#v*~Pk#WUg(uaR~pnKZPdF0MiHw6jNdaAZTn zmIl71!Ax$ftlrYlMxbFNdNJFQk7<=O#~rOfbzK`9O0T^98g8H|^n*sYO1#Qd;8 zt`7R0|){4___)yI=6f_*gq{Aald;uI5G2y)4|C%g7=O~{v^eq zM+ylpcS8vNe?U7gS%hbxL;l@&b8{WRyJvGt%lVDMcp5n17nib3ZnM33?1i`>a{?fVPYo~*b{e?dq4CV)d6J3y# zA3o?W4f;Jtb8`#DbEooWru?Pj*zRAsjJ@!4&_9ryAM?9sBppHDxZnRK(NoeqH+M7- zpYI>UNN(x)8p=Z+98#ECE}n#H!{z_oZqh)nW?<#jpg>;!EQKeigAI{W!ybBtn^*ME z{_O9A3vXhZ^s%%uH#daw+}ymR!5-Kl6HFX~OS5R2&{6ks>Xil{}=!NIrl0RAFi+m|cM6>$>3Jy~*HUf09X? z3YR7V#MpGdKlWBI(&3K{OLxn_L!Zki8iW_GEp|h#Yl}T(xSS{*oLlG(PL7uZNH?y% zJGTI(&gO?kgX7)7$;-u)m;ABw`S}U3!!|K8@fa~78{7&h7&=LXuG55agcJlNQk7_+ z^7`#zV68SJT1~`L?1&^PP%pZJu)Kyu~55g;@m z93`VLeJ&V0iZY0_EuMRgdP`|x2%-yKX>1cPw68+^^)8-pG#}M&i*#_pAS16PsJ;40EmA&VG`bkz;%Q IPyOt_0ary2B>(^b diff --git a/languages/aliyun-cdn-zh_CN.po b/languages/aliyun-cdn-zh_CN.po deleted file mode 100644 index 45e41ed..0000000 --- a/languages/aliyun-cdn-zh_CN.po +++ /dev/null @@ -1,239 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Aliyun CDN Helper\n" -"POT-Creation-Date: 2018-05-06 14:02+0800\n" -"PO-Revision-Date: 2018-05-06 14:04+0800\n" -"Last-Translator: \n" -"Language-Team: 0xJacky\n" -"Language: zh_CN\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.7\n" -"X-Poedit-Basepath: ..\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Poedit-Flags-xgettext: --add-comments=translators:\n" -"X-Poedit-WPHeader: aliyun-cdn.php\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" -"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;" -"_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n" -"X-Poedit-SearchPath-0: .\n" -"X-Poedit-SearchPathExcluded-0: *.js\n" - -#: src/Api.php:110 -#, php-format -msgid "" -"Fail to refresh!\n" -"Error message: %s" -msgstr "" -"刷新失败!\n" -"错误信息: %s" - -#: src/Api.php:123 -#, php-format -msgid "" -"Fail to push!\n" -"Error message: %s" -msgstr "" -"预热失败!\n" -"错误信息: %s" - -#: src/Api.php:134 view/settings.php:51 view/settings.php:64 -msgid "Refresh" -msgstr "刷新" - -#: src/Api.php:137 view/settings.php:57 -msgid "Push" -msgstr "预热" - -#: src/Api.php:158 -msgid " success!" -msgstr "成功!" - -#: src/Api.php:162 -msgid "Today's refresh (push) has reached the maximum number of operations!" -msgstr "今日刷新(预热)数量已达到最大值!" - -#: src/Api.php:169 -#, php-format -msgid "" -"Notice: You can submit a maximum daily refresh-type request amount of URL: " -"%s, amount of directory: %s, push-type request amount of URL: %s.
Today you can refresh URL: %s times, directory: %s times.
Today you " -"can push URL: %s times." -msgstr "" -"注意: 您的账户每天最多可以刷新 %s 个文件(URL)和 %s 个目录,今日最多可预热 " -"%s 个文件(URL)任务生效时间大约为 5 分钟。
\n" -"今日可刷新文件(URL): %s 个,目录: %s 个,
\n" -"今日可预热文件(URL): %s 个。" - -#: src/Init.php:41 -msgid "Refresh CDN" -msgstr "刷新 CDN" - -#: src/Init.php:60 -msgid "Refresh task is being submitted, please wait ..." -msgstr "正在提交刷新任务,请稍候..." - -#: src/Init.php:67 -msgid "" -"Error:Please check whether the Access Key ID and Access key Secret are " -"entered correctly." -msgstr "错误:请检查 Access Key ID 和 Access key Secret 是否输入输入。" - -#: src/Init.php:96 -#, php-format -msgid "" -"Aliyun CDN Helper launch success, you need to configure " -"it to work." -msgstr "Aliyun CDN Helper 启动成功,您需要配置它工作。" - -#: src/Settings.php:34 src/Settings.php:35 view/settings.php:27 -msgid "Alibaba Cloud CDN" -msgstr "阿里云 CDN" - -#: src/Settings.php:58 -msgid "Configuration saved successfully" -msgstr "设置保存成功" - -#: src/Settings.php:60 -#, php-format -msgid "Fail to save configuration, error message: %s" -msgstr "无法保存配置,错误消息:%s" - -#: view/settings.php:24 -msgid "You can't see me" -msgstr "你看不到我" - -#: view/settings.php:31 -msgid "Access Key ID" -msgstr "Access Key ID" - -#: view/settings.php:33 -msgid "Access key Secret" -msgstr "Access key Secret" - -#: view/settings.php:35 -msgid "" -"Please enter the Access Key ID and the Access Key Secret, you obtained in " -"the Alibaba Cloud Management Console." -msgstr "请输入您在阿里云管理控制台获取的 Access Key ID 和 Access Key Secret。" - -#: view/settings.php:36 -msgid "" -"Make sure that your Access Key ID and Access Key Secret are entered " -"correctly and that CDN acceleration has been turned on for the current " -"domain name." -msgstr "" -"请确保您的 Access Key ID 和 Access Key Secret 已正确输入,并且已为当前域名开" -"启 CDN 加速。" - -#: view/settings.php:37 -#, php-format -msgid "" -"If you don't know how to use Alibaba Cloud CDN please visit: https://cdn.aliyun.com" -msgstr "" -"如果您不知道如何使用阿里云 CDN,请访问: https://cdn.aliyun." -"com" - -#: view/settings.php:38 -msgid "" -"Document: https://www.alibabacloud.com/help/doc-detail/27200.htm" -msgstr "" -"如果出现错误,请查阅: https://help.aliyun.com/document_detail/27200." -"html" - -#: view/settings.php:41 -msgid "Refresh file type" -msgstr "刷新文件类型" - -#: view/settings.php:43 -msgid "style.css only (Request object type: File)" -msgstr "仅刷新 style.css (请求对象类型:文件)" - -#: view/settings.php:46 -msgid "" -"Refresh static files in the current theme directory (Request object type: " -"Directory)" -msgstr "刷新当前主题目录中的静态文件(请求对象类型:目录)" - -#: view/settings.php:49 -msgid "The whole site (Request object type: Directory)" -msgstr "全站(请求对象类型:目录)" - -#: view/settings.php:54 -msgid "Push object cache" -msgstr "预热" - -#: view/settings.php:55 -msgid "" -"Takes content from the origin site and actively preprocess it to the L2 " -"Cache node. Upon first access, users can directly cache hit to relieve " -"pressure on the origin site." -msgstr "" -"从源站点获取内容,并主动将其预处理到 L2 Cache 节点。首次访问时,用户可以直接" -"缓存命中以减轻原始站点的压力。" - -#: view/settings.php:56 -msgid "" -"If you are using Alibaba Cloud CDN and this plugin for the first time, you " -"can click on the following button, the plugin will automatically search the " -"current theme directory of the static resource file, and submitted the URLs " -"to the interface." -msgstr "" -"如果您是第一次使用阿里云 CDN 和这个插件,您可以点击以下按钮,插件将自动搜索" -"静态资源文件的当前主题目录,并将URL提交到预热接口。" - -#: view/settings.php:60 -msgid "Custom URL" -msgstr "自定义 URL" - -#: view/settings.php:63 -msgid "" -"Multiple URLs should use a carriage return to separate, if you enter the " -"directory, please do not forget to add /" -msgstr "" -"多个 URL 应该使用回车分隔,如果您输入目录,请不要忘记添加/" - -#: view/settings.php:70 -msgid "Save" -msgstr "保存" - -#: view/settings.php:83 view/settings.php:112 -msgid "Task is being submitted, please wait ..." -msgstr "正在提交任务,请稍候..." - -#: view/settings.php:131 -msgid "Querying operation quota..." -msgstr "正在查询操作配额..." - -#. Plugin Name of the plugin/theme -msgid "Jacky AliCDN Helper" -msgstr "阿里云 CDN 辅助工具" - -#. Plugin URI of the plugin/theme -msgid "https://github.com/0xJacky/aliyun_cdn_helper" -msgstr "https://github.com/0xJacky/aliyun_cdn_helper" - -#. Description of the plugin/theme -msgid "阿里云 CDN 辅助工具。Aliyun CDN auxiliary tool for wordpress." -msgstr "阿里云 CDN 辅助工具。Aliyun CDN auxiliary tool for wordpress." - -#. Author of the plugin/theme -msgid "0xJacky" -msgstr "" - -#. Author URI of the plugin/theme -msgid "https://jackyu.cn/" -msgstr "" - -#~ msgid "" -#~ " failed!\n" -#~ "Error message: %s" -#~ msgstr "" -#~ " 失败!\n" -#~ "错误消息:%s" diff --git a/readme.txt b/readme.txt index b8920ba..4575acc 100644 --- a/readme.txt +++ b/readme.txt @@ -1,6 +1,6 @@ -=== Jacky AliCDN Helper === +=== Aliyun CDN Helper === Contributors: 0xJacky -Donate link: https://jackyu.cn/projects/jacky-alicdn-helper +Donate link: https://jackyu.cn/projects/aliyun-cdn-helper Tags: aliyun, cdn Requires at least: 4.6 Tested up to: 4.8.2 diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddCdnDomainRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddCdnDomainRequest.php deleted file mode 100755 index 0b247e6..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddCdnDomainRequest.php +++ /dev/null @@ -1,184 +0,0 @@ -setMethod("POST"); - } - - private $topLevelDomain; - - private $sources; - - private $ownerAccount; - - private $domainName; - - private $ownerId; - - private $resourceGroupId; - - private $sourcePort; - - private $priorities; - - private $securityToken; - - private $cdnType; - - private $scope; - - private $sourceType; - - private $checkUrl; - - private $region; - - public function getTopLevelDomain() { - return $this->topLevelDomain; - } - - public function setTopLevelDomain($topLevelDomain) { - $this->topLevelDomain = $topLevelDomain; - $this->queryParameters["TopLevelDomain"]=$topLevelDomain; - } - - public function getSources() { - return $this->sources; - } - - public function setSources($sources) { - $this->sources = $sources; - $this->queryParameters["Sources"]=$sources; - } - - public function getOwnerAccount() { - return $this->ownerAccount; - } - - public function setOwnerAccount($ownerAccount) { - $this->ownerAccount = $ownerAccount; - $this->queryParameters["OwnerAccount"]=$ownerAccount; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getResourceGroupId() { - return $this->resourceGroupId; - } - - public function setResourceGroupId($resourceGroupId) { - $this->resourceGroupId = $resourceGroupId; - $this->queryParameters["ResourceGroupId"]=$resourceGroupId; - } - - public function getSourcePort() { - return $this->sourcePort; - } - - public function setSourcePort($sourcePort) { - $this->sourcePort = $sourcePort; - $this->queryParameters["SourcePort"]=$sourcePort; - } - - public function getPriorities() { - return $this->priorities; - } - - public function setPriorities($priorities) { - $this->priorities = $priorities; - $this->queryParameters["Priorities"]=$priorities; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getCdnType() { - return $this->cdnType; - } - - public function setCdnType($cdnType) { - $this->cdnType = $cdnType; - $this->queryParameters["CdnType"]=$cdnType; - } - - public function getScope() { - return $this->scope; - } - - public function setScope($scope) { - $this->scope = $scope; - $this->queryParameters["Scope"]=$scope; - } - - public function getSourceType() { - return $this->sourceType; - } - - public function setSourceType($sourceType) { - $this->sourceType = $sourceType; - $this->queryParameters["SourceType"]=$sourceType; - } - - public function getCheckUrl() { - return $this->checkUrl; - } - - public function setCheckUrl($checkUrl) { - $this->checkUrl = $checkUrl; - $this->queryParameters["CheckUrl"]=$checkUrl; - } - - public function getRegion() { - return $this->region; - } - - public function setRegion($region) { - $this->region = $region; - $this->queryParameters["Region"]=$region; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddLiveAppRecordConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddLiveAppRecordConfigRequest.php deleted file mode 100755 index 1e847b4..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddLiveAppRecordConfigRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -setMethod("POST"); - } - - private $ossBucket; - - private $appName; - - private $securityToken; - - private $domainName; - - private $ossEndpoint; - - private $ossObjectPrefix; - - private $ownerId; - - public function getOssBucket() { - return $this->ossBucket; - } - - public function setOssBucket($ossBucket) { - $this->ossBucket = $ossBucket; - $this->queryParameters["OssBucket"]=$ossBucket; - } - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOssEndpoint() { - return $this->ossEndpoint; - } - - public function setOssEndpoint($ossEndpoint) { - $this->ossEndpoint = $ossEndpoint; - $this->queryParameters["OssEndpoint"]=$ossEndpoint; - } - - public function getOssObjectPrefix() { - return $this->ossObjectPrefix; - } - - public function setOssObjectPrefix($ossObjectPrefix) { - $this->ossObjectPrefix = $ossObjectPrefix; - $this->queryParameters["OssObjectPrefix"]=$ossObjectPrefix; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddLiveAppSnapshotConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddLiveAppSnapshotConfigRequest.php deleted file mode 100755 index 0371d97..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddLiveAppSnapshotConfigRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -setMethod("POST"); - } - - private $timeInterval; - - private $ossBucket; - - private $appName; - - private $securityToken; - - private $domainName; - - private $ossEndpoint; - - private $sequenceOssObject; - - private $overwriteOssObject; - - private $ownerId; - - public function getTimeInterval() { - return $this->timeInterval; - } - - public function setTimeInterval($timeInterval) { - $this->timeInterval = $timeInterval; - $this->queryParameters["TimeInterval"]=$timeInterval; - } - - public function getOssBucket() { - return $this->ossBucket; - } - - public function setOssBucket($ossBucket) { - $this->ossBucket = $ossBucket; - $this->queryParameters["OssBucket"]=$ossBucket; - } - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOssEndpoint() { - return $this->ossEndpoint; - } - - public function setOssEndpoint($ossEndpoint) { - $this->ossEndpoint = $ossEndpoint; - $this->queryParameters["OssEndpoint"]=$ossEndpoint; - } - - public function getSequenceOssObject() { - return $this->sequenceOssObject; - } - - public function setSequenceOssObject($sequenceOssObject) { - $this->sequenceOssObject = $sequenceOssObject; - $this->queryParameters["SequenceOssObject"]=$sequenceOssObject; - } - - public function getOverwriteOssObject() { - return $this->overwriteOssObject; - } - - public function setOverwriteOssObject($overwriteOssObject) { - $this->overwriteOssObject = $overwriteOssObject; - $this->queryParameters["OverwriteOssObject"]=$overwriteOssObject; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddLiveDomainMappingRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddLiveDomainMappingRequest.php deleted file mode 100755 index 31baca4..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddLiveDomainMappingRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $pullDomain; - - private $securityToken; - - private $pushDomain; - - private $ownerId; - - public function getPullDomain() { - return $this->pullDomain; - } - - public function setPullDomain($pullDomain) { - $this->pullDomain = $pullDomain; - $this->queryParameters["PullDomain"]=$pullDomain; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getPushDomain() { - return $this->pushDomain; - } - - public function setPushDomain($pushDomain) { - $this->pushDomain = $pushDomain; - $this->queryParameters["PushDomain"]=$pushDomain; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddLivePullStreamInfoRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddLivePullStreamInfoRequest.php deleted file mode 100755 index 0f93fe0..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddLivePullStreamInfoRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -setMethod("POST"); - } - - private $sourceUrl; - - private $appName; - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - private $streamName; - - public function getSourceUrl() { - return $this->sourceUrl; - } - - public function setSourceUrl($sourceUrl) { - $this->sourceUrl = $sourceUrl; - $this->queryParameters["SourceUrl"]=$sourceUrl; - } - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getStreamName() { - return $this->streamName; - } - - public function setStreamName($streamName) { - $this->streamName = $streamName; - $this->queryParameters["StreamName"]=$streamName; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddLiveStreamTranscodeRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddLiveStreamTranscodeRequest.php deleted file mode 100755 index e3b13f5..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/AddLiveStreamTranscodeRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -setMethod("POST"); - } - - private $template; - - private $app; - - private $securityToken; - - private $ownerAccount; - - private $domain; - - private $record; - - private $ownerId; - - private $snapshot; - - public function getTemplate() { - return $this->template; - } - - public function setTemplate($template) { - $this->template = $template; - $this->queryParameters["Template"]=$template; - } - - public function getApp() { - return $this->app; - } - - public function setApp($app) { - $this->app = $app; - $this->queryParameters["App"]=$app; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getOwnerAccount() { - return $this->ownerAccount; - } - - public function setOwnerAccount($ownerAccount) { - $this->ownerAccount = $ownerAccount; - $this->queryParameters["OwnerAccount"]=$ownerAccount; - } - - public function getDomain() { - return $this->domain; - } - - public function setDomain($domain) { - $this->domain = $domain; - $this->queryParameters["Domain"]=$domain; - } - - public function getRecord() { - return $this->record; - } - - public function setRecord($record) { - $this->record = $record; - $this->queryParameters["Record"]=$record; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getSnapshot() { - return $this->snapshot; - } - - public function setSnapshot($snapshot) { - $this->snapshot = $snapshot; - $this->queryParameters["Snapshot"]=$snapshot; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ClearUserBlackListRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ClearUserBlackListRequest.php deleted file mode 100755 index b6dac3a..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ClearUserBlackListRequest.php +++ /dev/null @@ -1,63 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $ownerAccount; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getOwnerAccount() { - return $this->ownerAccount; - } - - public function setOwnerAccount($ownerAccount) { - $this->ownerAccount = $ownerAccount; - $this->queryParameters["OwnerAccount"]=$ownerAccount; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ClearUserDomainBlackListRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ClearUserDomainBlackListRequest.php deleted file mode 100755 index d2027ac..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ClearUserDomainBlackListRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $ownerAccount; - - private $domainName; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getOwnerAccount() { - return $this->ownerAccount; - } - - public function setOwnerAccount($ownerAccount) { - $this->ownerAccount = $ownerAccount; - $this->queryParameters["OwnerAccount"]=$ownerAccount; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/CreateLiveStreamRecordIndexFilesRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/CreateLiveStreamRecordIndexFilesRequest.php deleted file mode 100755 index d8e1987..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/CreateLiveStreamRecordIndexFilesRequest.php +++ /dev/null @@ -1,140 +0,0 @@ -setMethod("POST"); - } - - private $ossBucket; - - private $appName; - - private $securityToken; - - private $domainName; - - private $ossEndpoint; - - private $endTime; - - private $startTime; - - private $ownerId; - - private $streamName; - - private $ossObject; - - public function getOssBucket() { - return $this->ossBucket; - } - - public function setOssBucket($ossBucket) { - $this->ossBucket = $ossBucket; - $this->queryParameters["OssBucket"]=$ossBucket; - } - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOssEndpoint() { - return $this->ossEndpoint; - } - - public function setOssEndpoint($ossEndpoint) { - $this->ossEndpoint = $ossEndpoint; - $this->queryParameters["OssEndpoint"]=$ossEndpoint; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getStreamName() { - return $this->streamName; - } - - public function setStreamName($streamName) { - $this->streamName = $streamName; - $this->queryParameters["StreamName"]=$streamName; - } - - public function getOssObject() { - return $this->ossObject; - } - - public function setOssObject($ossObject) { - $this->ossObject = $ossObject; - $this->queryParameters["OssObject"]=$ossObject; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteCdnDomainRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteCdnDomainRequest.php deleted file mode 100755 index 65f4a84..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteCdnDomainRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $resourceGroupId; - - private $securityToken; - - private $domainName; - - private $ownerId; - - public function getResourceGroupId() { - return $this->resourceGroupId; - } - - public function setResourceGroupId($resourceGroupId) { - $this->resourceGroupId = $resourceGroupId; - $this->queryParameters["ResourceGroupId"]=$resourceGroupId; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteHttpHeaderConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteHttpHeaderConfigRequest.php deleted file mode 100755 index 52ab6dc..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteHttpHeaderConfigRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $configID; - - private $domainName; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getConfigID() { - return $this->configID; - } - - public function setConfigID($configID) { - $this->configID = $configID; - $this->queryParameters["ConfigID"]=$configID; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteLiveAppRecordConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteLiveAppRecordConfigRequest.php deleted file mode 100755 index d656bfa..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteLiveAppRecordConfigRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $domainName; - - private $ownerId; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteLiveAppSnapshotConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteLiveAppSnapshotConfigRequest.php deleted file mode 100755 index cb0d103..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteLiveAppSnapshotConfigRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $domainName; - - private $ownerId; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteLiveDomainMappingRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteLiveDomainMappingRequest.php deleted file mode 100755 index ddcce0e..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteLiveDomainMappingRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $pullDomain; - - private $securityToken; - - private $pushDomain; - - private $ownerId; - - public function getPullDomain() { - return $this->pullDomain; - } - - public function setPullDomain($pullDomain) { - $this->pullDomain = $pullDomain; - $this->queryParameters["PullDomain"]=$pullDomain; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getPushDomain() { - return $this->pushDomain; - } - - public function setPushDomain($pushDomain) { - $this->pushDomain = $pushDomain; - $this->queryParameters["PushDomain"]=$pushDomain; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteLivePullStreamInfoRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteLivePullStreamInfoRequest.php deleted file mode 100755 index 10a2aa5..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteLivePullStreamInfoRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $domainName; - - private $ownerId; - - private $streamName; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getStreamName() { - return $this->streamName; - } - - public function setStreamName($streamName) { - $this->streamName = $streamName; - $this->queryParameters["StreamName"]=$streamName; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteLiveStreamTranscodeRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteLiveStreamTranscodeRequest.php deleted file mode 100755 index d7729f8..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DeleteLiveStreamTranscodeRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -setMethod("POST"); - } - - private $template; - - private $app; - - private $securityToken; - - private $ownerAccount; - - private $domain; - - private $ownerId; - - public function getTemplate() { - return $this->template; - } - - public function setTemplate($template) { - $this->template = $template; - $this->queryParameters["Template"]=$template; - } - - public function getApp() { - return $this->app; - } - - public function setApp($app) { - $this->app = $app; - $this->queryParameters["App"]=$app; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getOwnerAccount() { - return $this->ownerAccount; - } - - public function setOwnerAccount($ownerAccount) { - $this->ownerAccount = $ownerAccount; - $this->queryParameters["OwnerAccount"]=$ownerAccount; - } - - public function getDomain() { - return $this->domain; - } - - public function setDomain($domain) { - $this->domain = $domain; - $this->queryParameters["Domain"]=$domain; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnDomainBaseDetailRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnDomainBaseDetailRequest.php deleted file mode 100755 index 9b98c45..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnDomainBaseDetailRequest.php +++ /dev/null @@ -1,63 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnDomainDetailRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnDomainDetailRequest.php deleted file mode 100755 index 6516ff8..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnDomainDetailRequest.php +++ /dev/null @@ -1,63 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnDomainLogsRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnDomainLogsRequest.php deleted file mode 100755 index ed935b8..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnDomainLogsRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $pageSize; - - private $endTime; - - private $startTime; - - private $ownerId; - - private $pageNumber; - - private $logDay; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getPageSize() { - return $this->pageSize; - } - - public function setPageSize($pageSize) { - $this->pageSize = $pageSize; - $this->queryParameters["PageSize"]=$pageSize; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getPageNumber() { - return $this->pageNumber; - } - - public function setPageNumber($pageNumber) { - $this->pageNumber = $pageNumber; - $this->queryParameters["PageNumber"]=$pageNumber; - } - - public function getLogDay() { - return $this->logDay; - } - - public function setLogDay($logDay) { - $this->logDay = $logDay; - $this->queryParameters["LogDay"]=$logDay; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnMonitorDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnMonitorDataRequest.php deleted file mode 100755 index 3be0722..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnMonitorDataRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $endTime; - - private $interval; - - private $startTime; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getInterval() { - return $this->interval; - } - - public function setInterval($interval) { - $this->interval = $interval; - $this->queryParameters["Interval"]=$interval; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnRegionAndIspRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnRegionAndIspRequest.php deleted file mode 100755 index 08ccc79..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnRegionAndIspRequest.php +++ /dev/null @@ -1,52 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnServiceRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnServiceRequest.php deleted file mode 100755 index 841b098..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnServiceRequest.php +++ /dev/null @@ -1,52 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnTypesRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnTypesRequest.php deleted file mode 100755 index ce9a85b..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeCdnTypesRequest.php +++ /dev/null @@ -1,63 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $ownerAccount; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getOwnerAccount() { - return $this->ownerAccount; - } - - public function setOwnerAccount($ownerAccount) { - $this->ownerAccount = $ownerAccount; - $this->queryParameters["OwnerAccount"]=$ownerAccount; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainAverageResponseTimeRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainAverageResponseTimeRequest.php deleted file mode 100755 index 1f6a185..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainAverageResponseTimeRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $timeMerge; - - private $domainName; - - private $endTime; - - private $interval; - - private $startTime; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getTimeMerge() { - return $this->timeMerge; - } - - public function setTimeMerge($timeMerge) { - $this->timeMerge = $timeMerge; - $this->queryParameters["TimeMerge"]=$timeMerge; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getInterval() { - return $this->interval; - } - - public function setInterval($interval) { - $this->interval = $interval; - $this->queryParameters["Interval"]=$interval; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainBpsDataByTimeStampRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainBpsDataByTimeStampRequest.php deleted file mode 100755 index 77a7918..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainBpsDataByTimeStampRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -setMethod("POST"); - } - - private $ispNames; - - private $securityToken; - - private $locationNames; - - private $domainName; - - private $ownerId; - - private $timePoint; - - public function getIspNames() { - return $this->ispNames; - } - - public function setIspNames($ispNames) { - $this->ispNames = $ispNames; - $this->queryParameters["IspNames"]=$ispNames; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getLocationNames() { - return $this->locationNames; - } - - public function setLocationNames($locationNames) { - $this->locationNames = $locationNames; - $this->queryParameters["LocationNames"]=$locationNames; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getTimePoint() { - return $this->timePoint; - } - - public function setTimePoint($timePoint) { - $this->timePoint = $timePoint; - $this->queryParameters["TimePoint"]=$timePoint; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainBpsDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainBpsDataRequest.php deleted file mode 100755 index 8f9f892..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainBpsDataRequest.php +++ /dev/null @@ -1,151 +0,0 @@ -setMethod("POST"); - } - - private $fixTimeGap; - - private $timeMerge; - - private $domainName; - - private $endTime; - - private $locationNameEn; - - private $startTime; - - private $ispNameEn; - - private $ownerId; - - private $domainType; - - private $securityToken; - - private $interval; - - public function getFixTimeGap() { - return $this->fixTimeGap; - } - - public function setFixTimeGap($fixTimeGap) { - $this->fixTimeGap = $fixTimeGap; - $this->queryParameters["FixTimeGap"]=$fixTimeGap; - } - - public function getTimeMerge() { - return $this->timeMerge; - } - - public function setTimeMerge($timeMerge) { - $this->timeMerge = $timeMerge; - $this->queryParameters["TimeMerge"]=$timeMerge; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getLocationNameEn() { - return $this->locationNameEn; - } - - public function setLocationNameEn($locationNameEn) { - $this->locationNameEn = $locationNameEn; - $this->queryParameters["LocationNameEn"]=$locationNameEn; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getIspNameEn() { - return $this->ispNameEn; - } - - public function setIspNameEn($ispNameEn) { - $this->ispNameEn = $ispNameEn; - $this->queryParameters["IspNameEn"]=$ispNameEn; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getDomainType() { - return $this->domainType; - } - - public function setDomainType($domainType) { - $this->domainType = $domainType; - $this->queryParameters["DomainType"]=$domainType; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getInterval() { - return $this->interval; - } - - public function setInterval($interval) { - $this->interval = $interval; - $this->queryParameters["Interval"]=$interval; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainCCAttackInfoRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainCCAttackInfoRequest.php deleted file mode 100755 index cb75f4a..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainCCAttackInfoRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainCCDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainCCDataRequest.php deleted file mode 100755 index d32adfd..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainCCDataRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainConfigsRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainConfigsRequest.php deleted file mode 100755 index b8ab8e2..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainConfigsRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $configList; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getConfigList() { - return $this->configList; - } - - public function setConfigList($configList) { - $this->configList = $configList; - $this->queryParameters["ConfigList"]=$configList; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainDownstreamBpsOfEdgeRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainDownstreamBpsOfEdgeRequest.php deleted file mode 100755 index 96fb333..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainDownstreamBpsOfEdgeRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainFileSizeProportionDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainFileSizeProportionDataRequest.php deleted file mode 100755 index e69f66e..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainFileSizeProportionDataRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainFlowDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainFlowDataRequest.php deleted file mode 100755 index 7f1b0e9..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainFlowDataRequest.php +++ /dev/null @@ -1,151 +0,0 @@ -setMethod("POST"); - } - - private $fixTimeGap; - - private $timeMerge; - - private $domainName; - - private $endTime; - - private $locationNameEn; - - private $startTime; - - private $ispNameEn; - - private $ownerId; - - private $domainType; - - private $securityToken; - - private $interval; - - public function getFixTimeGap() { - return $this->fixTimeGap; - } - - public function setFixTimeGap($fixTimeGap) { - $this->fixTimeGap = $fixTimeGap; - $this->queryParameters["FixTimeGap"]=$fixTimeGap; - } - - public function getTimeMerge() { - return $this->timeMerge; - } - - public function setTimeMerge($timeMerge) { - $this->timeMerge = $timeMerge; - $this->queryParameters["TimeMerge"]=$timeMerge; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getLocationNameEn() { - return $this->locationNameEn; - } - - public function setLocationNameEn($locationNameEn) { - $this->locationNameEn = $locationNameEn; - $this->queryParameters["LocationNameEn"]=$locationNameEn; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getIspNameEn() { - return $this->ispNameEn; - } - - public function setIspNameEn($ispNameEn) { - $this->ispNameEn = $ispNameEn; - $this->queryParameters["IspNameEn"]=$ispNameEn; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getDomainType() { - return $this->domainType; - } - - public function setDomainType($domainType) { - $this->domainType = $domainType; - $this->queryParameters["DomainType"]=$domainType; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getInterval() { - return $this->interval; - } - - public function setInterval($interval) { - $this->interval = $interval; - $this->queryParameters["Interval"]=$interval; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainHitRateDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainHitRateDataRequest.php deleted file mode 100755 index a10a596..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainHitRateDataRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $timeMerge; - - private $domainName; - - private $endTime; - - private $locationNameEn; - - private $interval; - - private $startTime; - - private $ispNameEn; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getTimeMerge() { - return $this->timeMerge; - } - - public function setTimeMerge($timeMerge) { - $this->timeMerge = $timeMerge; - $this->queryParameters["TimeMerge"]=$timeMerge; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getLocationNameEn() { - return $this->locationNameEn; - } - - public function setLocationNameEn($locationNameEn) { - $this->locationNameEn = $locationNameEn; - $this->queryParameters["LocationNameEn"]=$locationNameEn; - } - - public function getInterval() { - return $this->interval; - } - - public function setInterval($interval) { - $this->interval = $interval; - $this->queryParameters["Interval"]=$interval; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getIspNameEn() { - return $this->ispNameEn; - } - - public function setIspNameEn($ispNameEn) { - $this->ispNameEn = $ispNameEn; - $this->queryParameters["IspNameEn"]=$ispNameEn; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainHttpCodeDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainHttpCodeDataRequest.php deleted file mode 100755 index eb68c28..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainHttpCodeDataRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $timeMerge; - - private $domainName; - - private $endTime; - - private $locationNameEn; - - private $interval; - - private $startTime; - - private $ispNameEn; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getTimeMerge() { - return $this->timeMerge; - } - - public function setTimeMerge($timeMerge) { - $this->timeMerge = $timeMerge; - $this->queryParameters["TimeMerge"]=$timeMerge; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getLocationNameEn() { - return $this->locationNameEn; - } - - public function setLocationNameEn($locationNameEn) { - $this->locationNameEn = $locationNameEn; - $this->queryParameters["LocationNameEn"]=$locationNameEn; - } - - public function getInterval() { - return $this->interval; - } - - public function setInterval($interval) { - $this->interval = $interval; - $this->queryParameters["Interval"]=$interval; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getIspNameEn() { - return $this->ispNameEn; - } - - public function setIspNameEn($ispNameEn) { - $this->ispNameEn = $ispNameEn; - $this->queryParameters["IspNameEn"]=$ispNameEn; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainHttpsDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainHttpsDataRequest.php deleted file mode 100755 index f7cab4b..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainHttpsDataRequest.php +++ /dev/null @@ -1,140 +0,0 @@ -setMethod("POST"); - } - - private $domainType; - - private $fixTimeGap; - - private $securityToken; - - private $timeMerge; - - private $domainNames; - - private $endTime; - - private $interval; - - private $startTime; - - private $cls; - - private $ownerId; - - public function getDomainType() { - return $this->domainType; - } - - public function setDomainType($domainType) { - $this->domainType = $domainType; - $this->queryParameters["DomainType"]=$domainType; - } - - public function getFixTimeGap() { - return $this->fixTimeGap; - } - - public function setFixTimeGap($fixTimeGap) { - $this->fixTimeGap = $fixTimeGap; - $this->queryParameters["FixTimeGap"]=$fixTimeGap; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getTimeMerge() { - return $this->timeMerge; - } - - public function setTimeMerge($timeMerge) { - $this->timeMerge = $timeMerge; - $this->queryParameters["TimeMerge"]=$timeMerge; - } - - public function getDomainNames() { - return $this->domainNames; - } - - public function setDomainNames($domainNames) { - $this->domainNames = $domainNames; - $this->queryParameters["DomainNames"]=$domainNames; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getInterval() { - return $this->interval; - } - - public function setInterval($interval) { - $this->interval = $interval; - $this->queryParameters["Interval"]=$interval; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getCls() { - return $this->cls; - } - - public function setCls($cls) { - $this->cls = $cls; - $this->queryParameters["Cls"]=$cls; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainISPDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainISPDataRequest.php deleted file mode 100755 index 0d71c95..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainISPDataRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainMax95BpsDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainMax95BpsDataRequest.php deleted file mode 100755 index f54fcd0..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainMax95BpsDataRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainMonthBillingBpsDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainMonthBillingBpsDataRequest.php deleted file mode 100755 index 35901fc..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainMonthBillingBpsDataRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $internetChargeType; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getInternetChargeType() { - return $this->internetChargeType; - } - - public function setInternetChargeType($internetChargeType) { - $this->internetChargeType = $internetChargeType; - $this->queryParameters["InternetChargeType"]=$internetChargeType; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainOnlineUserNumberRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainOnlineUserNumberRequest.php deleted file mode 100755 index 0b7399f..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainOnlineUserNumberRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainPathDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainPathDataRequest.php deleted file mode 100755 index 0717ce7..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainPathDataRequest.php +++ /dev/null @@ -1,128 +0,0 @@ -startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getPageNumber() { - return $this->pageNumber; - } - - public function setPageNumber($pageNumber) { - $this->pageNumber = $pageNumber; - $this->queryParameters["PageNumber"]=$pageNumber; - } - - public function getPath() { - return $this->path; - } - - public function setPath($path) { - $this->path = $path; - $this->queryParameters["Path"]=$path; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getPageSize() { - return $this->pageSize; - } - - public function setPageSize($pageSize) { - $this->pageSize = $pageSize; - $this->queryParameters["PageSize"]=$pageSize; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getVersion() { - return $this->version; - } - - public function setVersion($version) { - $this->version = $version; - $this->queryParameters["Version"]=$version; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainPvDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainPvDataRequest.php deleted file mode 100755 index 114453e..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainPvDataRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainQpsDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainQpsDataRequest.php deleted file mode 100755 index e7485fc..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainQpsDataRequest.php +++ /dev/null @@ -1,151 +0,0 @@ -setMethod("POST"); - } - - private $fixTimeGap; - - private $timeMerge; - - private $domainName; - - private $endTime; - - private $locationNameEn; - - private $startTime; - - private $ispNameEn; - - private $ownerId; - - private $domainType; - - private $securityToken; - - private $interval; - - public function getFixTimeGap() { - return $this->fixTimeGap; - } - - public function setFixTimeGap($fixTimeGap) { - $this->fixTimeGap = $fixTimeGap; - $this->queryParameters["FixTimeGap"]=$fixTimeGap; - } - - public function getTimeMerge() { - return $this->timeMerge; - } - - public function setTimeMerge($timeMerge) { - $this->timeMerge = $timeMerge; - $this->queryParameters["TimeMerge"]=$timeMerge; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getLocationNameEn() { - return $this->locationNameEn; - } - - public function setLocationNameEn($locationNameEn) { - $this->locationNameEn = $locationNameEn; - $this->queryParameters["LocationNameEn"]=$locationNameEn; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getIspNameEn() { - return $this->ispNameEn; - } - - public function setIspNameEn($ispNameEn) { - $this->ispNameEn = $ispNameEn; - $this->queryParameters["IspNameEn"]=$ispNameEn; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getDomainType() { - return $this->domainType; - } - - public function setDomainType($domainType) { - $this->domainType = $domainType; - $this->queryParameters["DomainType"]=$domainType; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getInterval() { - return $this->interval; - } - - public function setInterval($interval) { - $this->interval = $interval; - $this->queryParameters["Interval"]=$interval; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainRealTimeDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainRealTimeDataRequest.php deleted file mode 100755 index 1f676ee..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainRealTimeDataRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -setMethod("POST"); - } - - private $field; - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getField() { - return $this->field; - } - - public function setField($field) { - $this->field = $field; - $this->queryParameters["Field"]=$field; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainRegionDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainRegionDataRequest.php deleted file mode 100755 index 3d109db..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainRegionDataRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainReqHitRateDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainReqHitRateDataRequest.php deleted file mode 100755 index 29abc2c..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainReqHitRateDataRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $endTime; - - private $interval; - - private $startTime; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getInterval() { - return $this->interval; - } - - public function setInterval($interval) { - $this->interval = $interval; - $this->queryParameters["Interval"]=$interval; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainSrcBpsDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainSrcBpsDataRequest.php deleted file mode 100755 index 9f3b171..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainSrcBpsDataRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -setMethod("POST"); - } - - private $fixTimeGap; - - private $securityToken; - - private $timeMerge; - - private $domainName; - - private $endTime; - - private $interval; - - private $startTime; - - private $ownerId; - - public function getFixTimeGap() { - return $this->fixTimeGap; - } - - public function setFixTimeGap($fixTimeGap) { - $this->fixTimeGap = $fixTimeGap; - $this->queryParameters["FixTimeGap"]=$fixTimeGap; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getTimeMerge() { - return $this->timeMerge; - } - - public function setTimeMerge($timeMerge) { - $this->timeMerge = $timeMerge; - $this->queryParameters["TimeMerge"]=$timeMerge; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getInterval() { - return $this->interval; - } - - public function setInterval($interval) { - $this->interval = $interval; - $this->queryParameters["Interval"]=$interval; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainSrcFlowDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainSrcFlowDataRequest.php deleted file mode 100755 index f19fd06..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainSrcFlowDataRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -setMethod("POST"); - } - - private $fixTimeGap; - - private $securityToken; - - private $timeMerge; - - private $domainName; - - private $endTime; - - private $interval; - - private $startTime; - - private $ownerId; - - public function getFixTimeGap() { - return $this->fixTimeGap; - } - - public function setFixTimeGap($fixTimeGap) { - $this->fixTimeGap = $fixTimeGap; - $this->queryParameters["FixTimeGap"]=$fixTimeGap; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getTimeMerge() { - return $this->timeMerge; - } - - public function setTimeMerge($timeMerge) { - $this->timeMerge = $timeMerge; - $this->queryParameters["TimeMerge"]=$timeMerge; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getInterval() { - return $this->interval; - } - - public function setInterval($interval) { - $this->interval = $interval; - $this->queryParameters["Interval"]=$interval; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainTopReferVisitRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainTopReferVisitRequest.php deleted file mode 100755 index 75c4e00..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainTopReferVisitRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $sortBy; - - private $startTime; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getSortBy() { - return $this->sortBy; - } - - public function setSortBy($sortBy) { - $this->sortBy = $sortBy; - $this->queryParameters["SortBy"]=$sortBy; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainTopUrlVisitRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainTopUrlVisitRequest.php deleted file mode 100755 index 9a92495..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainTopUrlVisitRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $sortBy; - - private $startTime; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getSortBy() { - return $this->sortBy; - } - - public function setSortBy($sortBy) { - $this->sortBy = $sortBy; - $this->queryParameters["SortBy"]=$sortBy; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainUpstreamBpsOfEdgeRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainUpstreamBpsOfEdgeRequest.php deleted file mode 100755 index 1b4d71c..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainUpstreamBpsOfEdgeRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainUpstreamOfCenterRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainUpstreamOfCenterRequest.php deleted file mode 100755 index 151d5ad..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainUpstreamOfCenterRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainUvDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainUvDataRequest.php deleted file mode 100755 index 970b190..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainUvDataRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainsBySourceRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainsBySourceRequest.php deleted file mode 100755 index f1efb17..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainsBySourceRequest.php +++ /dev/null @@ -1,63 +0,0 @@ -setMethod("POST"); - } - - private $sources; - - private $securityToken; - - private $ownerId; - - public function getSources() { - return $this->sources; - } - - public function setSources($sources) { - $this->sources = $sources; - $this->queryParameters["Sources"]=$sources; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainsUsageByDayRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainsUsageByDayRequest.php deleted file mode 100755 index 110f4b7..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeDomainsUsageByDayRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeExtensiveDomainDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeExtensiveDomainDataRequest.php deleted file mode 100755 index e5697c9..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeExtensiveDomainDataRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $extensiveDomain; - - private $pageSize; - - private $endTime; - - private $startTime; - - private $ownerId; - - private $pageNumber; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getExtensiveDomain() { - return $this->extensiveDomain; - } - - public function setExtensiveDomain($extensiveDomain) { - $this->extensiveDomain = $extensiveDomain; - $this->queryParameters["ExtensiveDomain"]=$extensiveDomain; - } - - public function getPageSize() { - return $this->pageSize; - } - - public function setPageSize($pageSize) { - $this->pageSize = $pageSize; - $this->queryParameters["PageSize"]=$pageSize; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getPageNumber() { - return $this->pageNumber; - } - - public function setPageNumber($pageNumber) { - $this->pageNumber = $pageNumber; - $this->queryParameters["PageNumber"]=$pageNumber; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeIpInfoRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeIpInfoRequest.php deleted file mode 100755 index 5d2a85d..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeIpInfoRequest.php +++ /dev/null @@ -1,63 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $iP; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getIP() { - return $this->iP; - } - - public function setIP($iP) { - $this->iP = $iP; - $this->queryParameters["IP"]=$iP; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeL2VipsByDomainRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeL2VipsByDomainRequest.php deleted file mode 100755 index 2613e5a..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeL2VipsByDomainRequest.php +++ /dev/null @@ -1,63 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveAppRecordConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveAppRecordConfigRequest.php deleted file mode 100755 index 9b5fd97..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveAppRecordConfigRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $domainName; - - private $ownerId; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLivePullStreamConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLivePullStreamConfigRequest.php deleted file mode 100755 index de5eae0..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLivePullStreamConfigRequest.php +++ /dev/null @@ -1,63 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveRecordConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveRecordConfigRequest.php deleted file mode 100755 index 6c03dbd..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveRecordConfigRequest.php +++ /dev/null @@ -1,63 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveSnapshotConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveSnapshotConfigRequest.php deleted file mode 100755 index 88db4c5..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveSnapshotConfigRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $domainName; - - private $pageSize; - - private $ownerId; - - private $pageNum; - - private $streamName; - - private $order; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getPageSize() { - return $this->pageSize; - } - - public function setPageSize($pageSize) { - $this->pageSize = $pageSize; - $this->queryParameters["PageSize"]=$pageSize; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getPageNum() { - return $this->pageNum; - } - - public function setPageNum($pageNum) { - $this->pageNum = $pageNum; - $this->queryParameters["PageNum"]=$pageNum; - } - - public function getStreamName() { - return $this->streamName; - } - - public function setStreamName($streamName) { - $this->streamName = $streamName; - $this->queryParameters["StreamName"]=$streamName; - } - - public function getOrder() { - return $this->order; - } - - public function setOrder($order) { - $this->order = $order; - $this->queryParameters["Order"]=$order; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveSpecificDomainMappingRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveSpecificDomainMappingRequest.php deleted file mode 100755 index eb20723..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveSpecificDomainMappingRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $pullDomain; - - private $securityToken; - - private $pushDomain; - - private $ownerId; - - public function getPullDomain() { - return $this->pullDomain; - } - - public function setPullDomain($pullDomain) { - $this->pullDomain = $pullDomain; - $this->queryParameters["PullDomain"]=$pullDomain; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getPushDomain() { - return $this->pushDomain; - } - - public function setPushDomain($pushDomain) { - $this->pushDomain = $pushDomain; - $this->queryParameters["PushDomain"]=$pushDomain; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamBitRateDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamBitRateDataRequest.php deleted file mode 100755 index aefe1eb..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamBitRateDataRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - private $streamName; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getStreamName() { - return $this->streamName; - } - - public function setStreamName($streamName) { - $this->streamName = $streamName; - $this->queryParameters["StreamName"]=$streamName; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamBpsDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamBpsDataRequest.php deleted file mode 100755 index e873fc1..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamBpsDataRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - private $streamName; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getStreamName() { - return $this->streamName; - } - - public function setStreamName($streamName) { - $this->streamName = $streamName; - $this->queryParameters["StreamName"]=$streamName; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamDomainAppInfoRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamDomainAppInfoRequest.php deleted file mode 100755 index 2a30b3f..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamDomainAppInfoRequest.php +++ /dev/null @@ -1,63 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $appDomain; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getAppDomain() { - return $this->appDomain; - } - - public function setAppDomain($appDomain) { - $this->appDomain = $appDomain; - $this->queryParameters["AppDomain"]=$appDomain; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamFrameAndBitRateByDomainRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamFrameAndBitRateByDomainRequest.php deleted file mode 100755 index 7424d0d..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamFrameAndBitRateByDomainRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $domainName; - - private $pageSize; - - private $ownerId; - - private $pageNumber; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getPageSize() { - return $this->pageSize; - } - - public function setPageSize($pageSize) { - $this->pageSize = $pageSize; - $this->queryParameters["PageSize"]=$pageSize; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getPageNumber() { - return $this->pageNumber; - } - - public function setPageNumber($pageNumber) { - $this->pageNumber = $pageNumber; - $this->queryParameters["PageNumber"]=$pageNumber; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamFrameInfoRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamFrameInfoRequest.php deleted file mode 100755 index e3982d0..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamFrameInfoRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - private $streamName; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getStreamName() { - return $this->streamName; - } - - public function setStreamName($streamName) { - $this->streamName = $streamName; - $this->queryParameters["StreamName"]=$streamName; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamFrameLossRatioRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamFrameLossRatioRequest.php deleted file mode 100755 index c67e0b2..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamFrameLossRatioRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - private $streamName; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getStreamName() { - return $this->streamName; - } - - public function setStreamName($streamName) { - $this->streamName = $streamName; - $this->queryParameters["StreamName"]=$streamName; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamHlsOnlineUserNumByDomainRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamHlsOnlineUserNumByDomainRequest.php deleted file mode 100755 index 43079ea..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamHlsOnlineUserNumByDomainRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $hlsSwitch; - - private $domainName; - - private $pageSize; - - private $ownerId; - - private $pageNumber; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getHlsSwitch() { - return $this->hlsSwitch; - } - - public function setHlsSwitch($hlsSwitch) { - $this->hlsSwitch = $hlsSwitch; - $this->queryParameters["HlsSwitch"]=$hlsSwitch; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getPageSize() { - return $this->pageSize; - } - - public function setPageSize($pageSize) { - $this->pageSize = $pageSize; - $this->queryParameters["PageSize"]=$pageSize; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getPageNumber() { - return $this->pageNumber; - } - - public function setPageNumber($pageNumber) { - $this->pageNumber = $pageNumber; - $this->queryParameters["PageNumber"]=$pageNumber; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamLimitInfoRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamLimitInfoRequest.php deleted file mode 100755 index 7ab24bc..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamLimitInfoRequest.php +++ /dev/null @@ -1,63 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $ownerId; - - private $limitDomain; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getLimitDomain() { - return $this->limitDomain; - } - - public function setLimitDomain($limitDomain) { - $this->limitDomain = $limitDomain; - $this->queryParameters["LimitDomain"]=$limitDomain; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamNumberListRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamNumberListRequest.php deleted file mode 100755 index a00f5d0..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamNumberListRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamOnlineBpsRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamOnlineBpsRequest.php deleted file mode 100755 index 21bdd7b..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamOnlineBpsRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - private $streamName; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getStreamName() { - return $this->streamName; - } - - public function setStreamName($streamName) { - $this->streamName = $streamName; - $this->queryParameters["StreamName"]=$streamName; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamOnlineUserNumByDomainRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamOnlineUserNumByDomainRequest.php deleted file mode 100755 index 680099e..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamOnlineUserNumByDomainRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $hlsSwitch; - - private $domainName; - - private $pageSize; - - private $ownerId; - - private $pageNumber; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getHlsSwitch() { - return $this->hlsSwitch; - } - - public function setHlsSwitch($hlsSwitch) { - $this->hlsSwitch = $hlsSwitch; - $this->queryParameters["HlsSwitch"]=$hlsSwitch; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getPageSize() { - return $this->pageSize; - } - - public function setPageSize($pageSize) { - $this->pageSize = $pageSize; - $this->queryParameters["PageSize"]=$pageSize; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getPageNumber() { - return $this->pageNumber; - } - - public function setPageNumber($pageNumber) { - $this->pageNumber = $pageNumber; - $this->queryParameters["PageNumber"]=$pageNumber; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamOnlineUserNumRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamOnlineUserNumRequest.php deleted file mode 100755 index ffd30ed..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamOnlineUserNumRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $hlsSwitch; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - private $streamName; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getHlsSwitch() { - return $this->hlsSwitch; - } - - public function setHlsSwitch($hlsSwitch) { - $this->hlsSwitch = $hlsSwitch; - $this->queryParameters["HlsSwitch"]=$hlsSwitch; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getStreamName() { - return $this->streamName; - } - - public function setStreamName($streamName) { - $this->streamName = $streamName; - $this->queryParameters["StreamName"]=$streamName; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamPushDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamPushDataRequest.php deleted file mode 100755 index 2287efa..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamPushDataRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamPushErrorsRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamPushErrorsRequest.php deleted file mode 100755 index 41c9cb8..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamPushErrorsRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRecordContentRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRecordContentRequest.php deleted file mode 100755 index 54789a8..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRecordContentRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - private $streamName; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getStreamName() { - return $this->streamName; - } - - public function setStreamName($streamName) { - $this->streamName = $streamName; - $this->queryParameters["StreamName"]=$streamName; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRecordIndexFileRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRecordIndexFileRequest.php deleted file mode 100755 index 74cd744..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRecordIndexFileRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -setMethod("POST"); - } - - private $recordId; - - private $appName; - - private $securityToken; - - private $domainName; - - private $ownerId; - - private $streamName; - - public function getRecordId() { - return $this->recordId; - } - - public function setRecordId($recordId) { - $this->recordId = $recordId; - $this->queryParameters["RecordId"]=$recordId; - } - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getStreamName() { - return $this->streamName; - } - - public function setStreamName($streamName) { - $this->streamName = $streamName; - $this->queryParameters["StreamName"]=$streamName; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRecordIndexFilesRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRecordIndexFilesRequest.php deleted file mode 100755 index 41e3614..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRecordIndexFilesRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - private $streamName; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getStreamName() { - return $this->streamName; - } - - public function setStreamName($streamName) { - $this->streamName = $streamName; - $this->queryParameters["StreamName"]=$streamName; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRelayPushBitRateRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRelayPushBitRateRequest.php deleted file mode 100755 index 867aa91..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRelayPushBitRateRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $domainName; - - private $ownerId; - - private $streamName; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getStreamName() { - return $this->streamName; - } - - public function setStreamName($streamName) { - $this->streamName = $streamName; - $this->queryParameters["StreamName"]=$streamName; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRelayPushDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRelayPushDataRequest.php deleted file mode 100755 index 0398731..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRelayPushDataRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $relayDomain; - - private $securityToken; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getRelayDomain() { - return $this->relayDomain; - } - - public function setRelayDomain($relayDomain) { - $this->relayDomain = $relayDomain; - $this->queryParameters["RelayDomain"]=$relayDomain; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRelayPushErrorsRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRelayPushErrorsRequest.php deleted file mode 100755 index 0650cca..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRelayPushErrorsRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $relayDomain; - - private $securityToken; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getRelayDomain() { - return $this->relayDomain; - } - - public function setRelayDomain($relayDomain) { - $this->relayDomain = $relayDomain; - $this->queryParameters["RelayDomain"]=$relayDomain; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRoomBitRateRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRoomBitRateRequest.php deleted file mode 100755 index a0de609..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRoomBitRateRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - private $streamName; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getStreamName() { - return $this->streamName; - } - - public function setStreamName($streamName) { - $this->streamName = $streamName; - $this->queryParameters["StreamName"]=$streamName; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRoomUserNumberRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRoomUserNumberRequest.php deleted file mode 100755 index b685f74..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamRoomUserNumberRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $hlsSwitch; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - private $streamName; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getHlsSwitch() { - return $this->hlsSwitch; - } - - public function setHlsSwitch($hlsSwitch) { - $this->hlsSwitch = $hlsSwitch; - $this->queryParameters["HlsSwitch"]=$hlsSwitch; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getStreamName() { - return $this->streamName; - } - - public function setStreamName($streamName) { - $this->streamName = $streamName; - $this->queryParameters["StreamName"]=$streamName; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamSnapshotInfoRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamSnapshotInfoRequest.php deleted file mode 100755 index 812c84b..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamSnapshotInfoRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $domainName; - - private $limit; - - private $endTime; - - private $startTime; - - private $ownerId; - - private $streamName; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getLimit() { - return $this->limit; - } - - public function setLimit($limit) { - $this->limit = $limit; - $this->queryParameters["Limit"]=$limit; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getStreamName() { - return $this->streamName; - } - - public function setStreamName($streamName) { - $this->streamName = $streamName; - $this->queryParameters["StreamName"]=$streamName; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamStreamStatusRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamStreamStatusRequest.php deleted file mode 100755 index 25c9bb1..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamStreamStatusRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $domainName; - - private $ownerId; - - private $streamName; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getStreamName() { - return $this->streamName; - } - - public function setStreamName($streamName) { - $this->streamName = $streamName; - $this->queryParameters["StreamName"]=$streamName; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamTranscodeInfoRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamTranscodeInfoRequest.php deleted file mode 100755 index 38f2b6b..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamTranscodeInfoRequest.php +++ /dev/null @@ -1,63 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $ownerId; - - private $domainTranscodeName; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getDomainTranscodeName() { - return $this->domainTranscodeName; - } - - public function setDomainTranscodeName($domainTranscodeName) { - $this->domainTranscodeName = $domainTranscodeName; - $this->queryParameters["DomainTranscodeName"]=$domainTranscodeName; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamTranscodeStreamNumRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamTranscodeStreamNumRequest.php deleted file mode 100755 index fb4c948..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamTranscodeStreamNumRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $pullDomain; - - private $securityToken; - - private $pushDomain; - - private $ownerId; - - public function getPullDomain() { - return $this->pullDomain; - } - - public function setPullDomain($pullDomain) { - $this->pullDomain = $pullDomain; - $this->queryParameters["PullDomain"]=$pullDomain; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getPushDomain() { - return $this->pushDomain; - } - - public function setPushDomain($pushDomain) { - $this->pushDomain = $pushDomain; - $this->queryParameters["PushDomain"]=$pushDomain; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamsBlockListRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamsBlockListRequest.php deleted file mode 100755 index 64793b8..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamsBlockListRequest.php +++ /dev/null @@ -1,63 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamsControlHistoryRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamsControlHistoryRequest.php deleted file mode 100755 index ba1fa50..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamsControlHistoryRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamsFrameRateAndBitRateDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamsFrameRateAndBitRateDataRequest.php deleted file mode 100755 index a644ed2..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamsFrameRateAndBitRateDataRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $domainName; - - private $endTime; - - private $startTime; - - private $ownerId; - - private $streamName; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getStreamName() { - return $this->streamName; - } - - public function setStreamName($streamName) { - $this->streamName = $streamName; - $this->queryParameters["StreamName"]=$streamName; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamsOnlineListRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamsOnlineListRequest.php deleted file mode 100755 index 0813db0..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamsOnlineListRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $domainName; - - private $ownerId; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamsPublishListRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamsPublishListRequest.php deleted file mode 100755 index ee36a02..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeLiveStreamsPublishListRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $domainName; - - private $pageSize; - - private $endTime; - - private $startTime; - - private $ownerId; - - private $streamName; - - private $pageNumber; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getPageSize() { - return $this->pageSize; - } - - public function setPageSize($pageSize) { - $this->pageSize = $pageSize; - $this->queryParameters["PageSize"]=$pageSize; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getStreamName() { - return $this->streamName; - } - - public function setStreamName($streamName) { - $this->streamName = $streamName; - $this->queryParameters["StreamName"]=$streamName; - } - - public function getPageNumber() { - return $this->pageNumber; - } - - public function setPageNumber($pageNumber) { - $this->pageNumber = $pageNumber; - $this->queryParameters["PageNumber"]=$pageNumber; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeOneMinuteDataRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeOneMinuteDataRequest.php deleted file mode 100755 index 727e73f..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeOneMinuteDataRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $resourceOwnerId; - - private $resourceOwnerAccount; - - private $dataTime; - - private $domainName; - - private $ownerId; - - public function getResourceOwnerId() { - return $this->resourceOwnerId; - } - - public function setResourceOwnerId($resourceOwnerId) { - $this->resourceOwnerId = $resourceOwnerId; - $this->queryParameters["ResourceOwnerId"]=$resourceOwnerId; - } - - public function getResourceOwnerAccount() { - return $this->resourceOwnerAccount; - } - - public function setResourceOwnerAccount($resourceOwnerAccount) { - $this->resourceOwnerAccount = $resourceOwnerAccount; - $this->queryParameters["ResourceOwnerAccount"]=$resourceOwnerAccount; - } - - public function getDataTime() { - return $this->dataTime; - } - - public function setDataTime($dataTime) { - $this->dataTime = $dataTime; - $this->queryParameters["DataTime"]=$dataTime; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeRangeDataByLocateAndIspServiceRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeRangeDataByLocateAndIspServiceRequest.php deleted file mode 100755 index a65554f..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeRangeDataByLocateAndIspServiceRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -setMethod("POST"); - } - - private $ispNames; - - private $securityToken; - - private $domainNames; - - private $locationNames; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getIspNames() { - return $this->ispNames; - } - - public function setIspNames($ispNames) { - $this->ispNames = $ispNames; - $this->queryParameters["IspNames"]=$ispNames; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainNames() { - return $this->domainNames; - } - - public function setDomainNames($domainNames) { - $this->domainNames = $domainNames; - $this->queryParameters["DomainNames"]=$domainNames; - } - - public function getLocationNames() { - return $this->locationNames; - } - - public function setLocationNames($locationNames) { - $this->locationNames = $locationNames; - $this->queryParameters["LocationNames"]=$locationNames; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getstartTime() { - return $this->startTime; - } - - public function setstartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["startTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeRefreshQuotaRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeRefreshQuotaRequest.php deleted file mode 100755 index 486e5fb..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeRefreshQuotaRequest.php +++ /dev/null @@ -1,52 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeRefreshTasksRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeRefreshTasksRequest.php deleted file mode 100755 index 13187c0..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeRefreshTasksRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $objectPath; - - private $pageSize; - - private $endTime; - - private $startTime; - - private $ownerId; - - private $taskId; - - private $pageNumber; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getObjectPath() { - return $this->objectPath; - } - - public function setObjectPath($objectPath) { - $this->objectPath = $objectPath; - $this->queryParameters["ObjectPath"]=$objectPath; - } - - public function getPageSize() { - return $this->pageSize; - } - - public function setPageSize($pageSize) { - $this->pageSize = $pageSize; - $this->queryParameters["PageSize"]=$pageSize; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getTaskId() { - return $this->taskId; - } - - public function setTaskId($taskId) { - $this->taskId = $taskId; - $this->queryParameters["TaskId"]=$taskId; - } - - public function getPageNumber() { - return $this->pageNumber; - } - - public function setPageNumber($pageNumber) { - $this->pageNumber = $pageNumber; - $this->queryParameters["PageNumber"]=$pageNumber; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeTopDomainsByFlowRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeTopDomainsByFlowRequest.php deleted file mode 100755 index 6c139e5..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeTopDomainsByFlowRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $limit; - - private $endTime; - - private $startTime; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getLimit() { - return $this->limit; - } - - public function setLimit($limit) { - $this->limit = $limit; - $this->queryParameters["Limit"]=$limit; - } - - public function getEndTime() { - return $this->endTime; - } - - public function setEndTime($endTime) { - $this->endTime = $endTime; - $this->queryParameters["EndTime"]=$endTime; - } - - public function getStartTime() { - return $this->startTime; - } - - public function setStartTime($startTime) { - $this->startTime = $startTime; - $this->queryParameters["StartTime"]=$startTime; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeUserConfigsRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeUserConfigsRequest.php deleted file mode 100755 index c599cf7..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeUserConfigsRequest.php +++ /dev/null @@ -1,63 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $ownerId; - - private $config; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getConfig() { - return $this->config; - } - - public function setConfig($config) { - $this->config = $config; - $this->queryParameters["Config"]=$config; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeUserCustomerLabelsRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeUserCustomerLabelsRequest.php deleted file mode 100755 index 970941a..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeUserCustomerLabelsRequest.php +++ /dev/null @@ -1,63 +0,0 @@ -setMethod("POST"); - } - - private $uid; - - private $securityToken; - - private $ownerId; - - public function getUid() { - return $this->uid; - } - - public function setUid($uid) { - $this->uid = $uid; - $this->queryParameters["Uid"]=$uid; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeUserDomainsRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeUserDomainsRequest.php deleted file mode 100755 index 79b1838..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeUserDomainsRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -setMethod("POST"); - } - - private $funcFilter; - - private $sources; - - private $domainName; - - private $ownerId; - - private $funcId; - - private $pageNumber; - - private $domainStatus; - - private $domainSearchType; - - private $checkDomainShow; - - private $resourceGroupId; - - private $securityToken; - - private $cdnType; - - private $pageSize; - - public function getFuncFilter() { - return $this->funcFilter; - } - - public function setFuncFilter($funcFilter) { - $this->funcFilter = $funcFilter; - $this->queryParameters["FuncFilter"]=$funcFilter; - } - - public function getSources() { - return $this->sources; - } - - public function setSources($sources) { - $this->sources = $sources; - $this->queryParameters["Sources"]=$sources; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getFuncId() { - return $this->funcId; - } - - public function setFuncId($funcId) { - $this->funcId = $funcId; - $this->queryParameters["FuncId"]=$funcId; - } - - public function getPageNumber() { - return $this->pageNumber; - } - - public function setPageNumber($pageNumber) { - $this->pageNumber = $pageNumber; - $this->queryParameters["PageNumber"]=$pageNumber; - } - - public function getDomainStatus() { - return $this->domainStatus; - } - - public function setDomainStatus($domainStatus) { - $this->domainStatus = $domainStatus; - $this->queryParameters["DomainStatus"]=$domainStatus; - } - - public function getDomainSearchType() { - return $this->domainSearchType; - } - - public function setDomainSearchType($domainSearchType) { - $this->domainSearchType = $domainSearchType; - $this->queryParameters["DomainSearchType"]=$domainSearchType; - } - - public function getCheckDomainShow() { - return $this->checkDomainShow; - } - - public function setCheckDomainShow($checkDomainShow) { - $this->checkDomainShow = $checkDomainShow; - $this->queryParameters["CheckDomainShow"]=$checkDomainShow; - } - - public function getResourceGroupId() { - return $this->resourceGroupId; - } - - public function setResourceGroupId($resourceGroupId) { - $this->resourceGroupId = $resourceGroupId; - $this->queryParameters["ResourceGroupId"]=$resourceGroupId; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getCdnType() { - return $this->cdnType; - } - - public function setCdnType($cdnType) { - $this->cdnType = $cdnType; - $this->queryParameters["CdnType"]=$cdnType; - } - - public function getPageSize() { - return $this->pageSize; - } - - public function setPageSize($pageSize) { - $this->pageSize = $pageSize; - $this->queryParameters["PageSize"]=$pageSize; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeUserVipsByDomainRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeUserVipsByDomainRequest.php deleted file mode 100755 index 11a1685..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/DescribeUserVipsByDomainRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $available; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getAvailable() { - return $this->available; - } - - public function setAvailable($available) { - $this->available = $available; - $this->queryParameters["Available"]=$available; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ForbidLiveStreamRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ForbidLiveStreamRequest.php deleted file mode 100755 index 62635d4..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ForbidLiveStreamRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -setMethod("POST"); - } - - private $resumeTime; - - private $appName; - - private $securityToken; - - private $liveStreamType; - - private $domainName; - - private $ownerId; - - private $streamName; - - public function getResumeTime() { - return $this->resumeTime; - } - - public function setResumeTime($resumeTime) { - $this->resumeTime = $resumeTime; - $this->queryParameters["ResumeTime"]=$resumeTime; - } - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getLiveStreamType() { - return $this->liveStreamType; - } - - public function setLiveStreamType($liveStreamType) { - $this->liveStreamType = $liveStreamType; - $this->queryParameters["LiveStreamType"]=$liveStreamType; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getStreamName() { - return $this->streamName; - } - - public function setStreamName($streamName) { - $this->streamName = $streamName; - $this->queryParameters["StreamName"]=$streamName; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/GetUserDomainBlackListRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/GetUserDomainBlackListRequest.php deleted file mode 100755 index 671b7c2..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/GetUserDomainBlackListRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $ownerAccount; - - private $domainName; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getOwnerAccount() { - return $this->ownerAccount; - } - - public function setOwnerAccount($ownerAccount) { - $this->ownerAccount = $ownerAccount; - $this->queryParameters["OwnerAccount"]=$ownerAccount; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/MigrateDomainToHttpsDeliveryRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/MigrateDomainToHttpsDeliveryRequest.php deleted file mode 100755 index a18ba31..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/MigrateDomainToHttpsDeliveryRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -setMethod("POST"); - } - - private $privateKey; - - private $serverCertificate; - - private $securityToken; - - private $ownerAccount; - - private $domainName; - - private $ownerId; - - public function getPrivateKey() { - return $this->privateKey; - } - - public function setPrivateKey($privateKey) { - $this->privateKey = $privateKey; - $this->queryParameters["PrivateKey"]=$privateKey; - } - - public function getServerCertificate() { - return $this->serverCertificate; - } - - public function setServerCertificate($serverCertificate) { - $this->serverCertificate = $serverCertificate; - $this->queryParameters["ServerCertificate"]=$serverCertificate; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getOwnerAccount() { - return $this->ownerAccount; - } - - public function setOwnerAccount($ownerAccount) { - $this->ownerAccount = $ownerAccount; - $this->queryParameters["OwnerAccount"]=$ownerAccount; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ModifyCdnDomainRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ModifyCdnDomainRequest.php deleted file mode 100755 index 6d811a2..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ModifyCdnDomainRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -setMethod("POST"); - } - - private $topLevelDomain; - - private $sourcePort; - - private $resourceGroupId; - - private $priorities; - - private $sources; - - private $securityToken; - - private $domainName; - - private $sourceType; - - private $ownerId; - - public function getTopLevelDomain() { - return $this->topLevelDomain; - } - - public function setTopLevelDomain($topLevelDomain) { - $this->topLevelDomain = $topLevelDomain; - $this->queryParameters["TopLevelDomain"]=$topLevelDomain; - } - - public function getSourcePort() { - return $this->sourcePort; - } - - public function setSourcePort($sourcePort) { - $this->sourcePort = $sourcePort; - $this->queryParameters["SourcePort"]=$sourcePort; - } - - public function getResourceGroupId() { - return $this->resourceGroupId; - } - - public function setResourceGroupId($resourceGroupId) { - $this->resourceGroupId = $resourceGroupId; - $this->queryParameters["ResourceGroupId"]=$resourceGroupId; - } - - public function getPriorities() { - return $this->priorities; - } - - public function setPriorities($priorities) { - $this->priorities = $priorities; - $this->queryParameters["Priorities"]=$priorities; - } - - public function getSources() { - return $this->sources; - } - - public function setSources($sources) { - $this->sources = $sources; - $this->queryParameters["Sources"]=$sources; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getSourceType() { - return $this->sourceType; - } - - public function setSourceType($sourceType) { - $this->sourceType = $sourceType; - $this->queryParameters["SourceType"]=$sourceType; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ModifyCdnServiceRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ModifyCdnServiceRequest.php deleted file mode 100755 index 6390221..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ModifyCdnServiceRequest.php +++ /dev/null @@ -1,63 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $internetChargeType; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getInternetChargeType() { - return $this->internetChargeType; - } - - public function setInternetChargeType($internetChargeType) { - $this->internetChargeType = $internetChargeType; - $this->queryParameters["InternetChargeType"]=$internetChargeType; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ModifyHttpHeaderConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ModifyHttpHeaderConfigRequest.php deleted file mode 100755 index 8b6a8cb..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ModifyHttpHeaderConfigRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -setMethod("POST"); - } - - private $headerValue; - - private $securityToken; - - private $configID; - - private $domainName; - - private $headerKey; - - private $ownerId; - - public function getHeaderValue() { - return $this->headerValue; - } - - public function setHeaderValue($headerValue) { - $this->headerValue = $headerValue; - $this->queryParameters["HeaderValue"]=$headerValue; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getConfigID() { - return $this->configID; - } - - public function setConfigID($configID) { - $this->configID = $configID; - $this->queryParameters["ConfigID"]=$configID; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getHeaderKey() { - return $this->headerKey; - } - - public function setHeaderKey($headerKey) { - $this->headerKey = $headerKey; - $this->queryParameters["HeaderKey"]=$headerKey; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/OpenCdnServiceRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/OpenCdnServiceRequest.php deleted file mode 100755 index 8e13a8b..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/OpenCdnServiceRequest.php +++ /dev/null @@ -1,63 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $internetChargeType; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getInternetChargeType() { - return $this->internetChargeType; - } - - public function setInternetChargeType($internetChargeType) { - $this->internetChargeType = $internetChargeType; - $this->queryParameters["InternetChargeType"]=$internetChargeType; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/PushObjectCacheRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/PushObjectCacheRequest.php deleted file mode 100755 index 7bacbed..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/PushObjectCacheRequest.php +++ /dev/null @@ -1,63 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $objectPath; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getObjectPath() { - return $this->objectPath; - } - - public function setObjectPath($objectPath) { - $this->objectPath = $objectPath; - $this->queryParameters["ObjectPath"]=$objectPath; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/RefreshObjectCachesRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/RefreshObjectCachesRequest.php deleted file mode 100755 index ee6cc32..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/RefreshObjectCachesRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $objectPath; - - private $ownerId; - - private $objectType; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getObjectPath() { - return $this->objectPath; - } - - public function setObjectPath($objectPath) { - $this->objectPath = $objectPath; - $this->queryParameters["ObjectPath"]=$objectPath; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getObjectType() { - return $this->objectType; - } - - public function setObjectType($objectType) { - $this->objectType = $objectType; - $this->queryParameters["ObjectType"]=$objectType; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ResumeLiveStreamRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ResumeLiveStreamRequest.php deleted file mode 100755 index 9569cc5..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/ResumeLiveStreamRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -setMethod("POST"); - } - - private $appName; - - private $securityToken; - - private $liveStreamType; - - private $domainName; - - private $ownerId; - - private $streamName; - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getLiveStreamType() { - return $this->liveStreamType; - } - - public function setLiveStreamType($liveStreamType) { - $this->liveStreamType = $liveStreamType; - $this->queryParameters["LiveStreamType"]=$liveStreamType; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getStreamName() { - return $this->streamName; - } - - public function setStreamName($streamName) { - $this->streamName = $streamName; - $this->queryParameters["StreamName"]=$streamName; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetCcConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetCcConfigRequest.php deleted file mode 100755 index 663a4b2..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetCcConfigRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $allowIps; - - private $securityToken; - - private $domainName; - - private $ownerId; - - private $blockIps; - - public function getAllowIps() { - return $this->allowIps; - } - - public function setAllowIps($allowIps) { - $this->allowIps = $allowIps; - $this->queryParameters["AllowIps"]=$allowIps; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getBlockIps() { - return $this->blockIps; - } - - public function setBlockIps($blockIps) { - $this->blockIps = $blockIps; - $this->queryParameters["BlockIps"]=$blockIps; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetDomainServerCertificateRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetDomainServerCertificateRequest.php deleted file mode 100755 index d9e9baa..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetDomainServerCertificateRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -setMethod("POST"); - } - - private $privateKey; - - private $serverCertificateStatus; - - private $serverCertificate; - - private $securityToken; - - private $certName; - - private $domainName; - - private $ownerId; - - private $region; - - public function getPrivateKey() { - return $this->privateKey; - } - - public function setPrivateKey($privateKey) { - $this->privateKey = $privateKey; - $this->queryParameters["PrivateKey"]=$privateKey; - } - - public function getServerCertificateStatus() { - return $this->serverCertificateStatus; - } - - public function setServerCertificateStatus($serverCertificateStatus) { - $this->serverCertificateStatus = $serverCertificateStatus; - $this->queryParameters["ServerCertificateStatus"]=$serverCertificateStatus; - } - - public function getServerCertificate() { - return $this->serverCertificate; - } - - public function setServerCertificate($serverCertificate) { - $this->serverCertificate = $serverCertificate; - $this->queryParameters["ServerCertificate"]=$serverCertificate; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getCertName() { - return $this->certName; - } - - public function setCertName($certName) { - $this->certName = $certName; - $this->queryParameters["CertName"]=$certName; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getRegion() { - return $this->region; - } - - public function setRegion($region) { - $this->region = $region; - $this->queryParameters["Region"]=$region; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetDynamicConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetDynamicConfigRequest.php deleted file mode 100755 index 7fb67e7..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetDynamicConfigRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -setMethod("POST"); - } - - private $dynamicOrigin; - - private $staticType; - - private $securityToken; - - private $staticUri; - - private $domainName; - - private $staticPath; - - private $dynamicCacheControl; - - private $ownerId; - - public function getDynamicOrigin() { - return $this->dynamicOrigin; - } - - public function setDynamicOrigin($dynamicOrigin) { - $this->dynamicOrigin = $dynamicOrigin; - $this->queryParameters["DynamicOrigin"]=$dynamicOrigin; - } - - public function getStaticType() { - return $this->staticType; - } - - public function setStaticType($staticType) { - $this->staticType = $staticType; - $this->queryParameters["StaticType"]=$staticType; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getStaticUri() { - return $this->staticUri; - } - - public function setStaticUri($staticUri) { - $this->staticUri = $staticUri; - $this->queryParameters["StaticUri"]=$staticUri; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getStaticPath() { - return $this->staticPath; - } - - public function setStaticPath($staticPath) { - $this->staticPath = $staticPath; - $this->queryParameters["StaticPath"]=$staticPath; - } - - public function getDynamicCacheControl() { - return $this->dynamicCacheControl; - } - - public function setDynamicCacheControl($dynamicCacheControl) { - $this->dynamicCacheControl = $dynamicCacheControl; - $this->queryParameters["DynamicCacheControl"]=$dynamicCacheControl; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetErrorPageConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetErrorPageConfigRequest.php deleted file mode 100755 index 773331c..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetErrorPageConfigRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $pageType; - - private $securityToken; - - private $domainName; - - private $customPageUrl; - - private $ownerId; - - public function getPageType() { - return $this->pageType; - } - - public function setPageType($pageType) { - $this->pageType = $pageType; - $this->queryParameters["PageType"]=$pageType; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getCustomPageUrl() { - return $this->customPageUrl; - } - - public function setCustomPageUrl($customPageUrl) { - $this->customPageUrl = $customPageUrl; - $this->queryParameters["CustomPageUrl"]=$customPageUrl; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetForceRedirectConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetForceRedirectConfigRequest.php deleted file mode 100755 index 3b73df4..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetForceRedirectConfigRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $redirectType; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getRedirectType() { - return $this->redirectType; - } - - public function setRedirectType($redirectType) { - $this->redirectType = $redirectType; - $this->queryParameters["RedirectType"]=$redirectType; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetForwardSchemeConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetForwardSchemeConfigRequest.php deleted file mode 100755 index 3796756..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetForwardSchemeConfigRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -setMethod("POST"); - } - - private $schemeOrigin; - - private $schemeOriginPort; - - private $securityToken; - - private $enable; - - private $domainName; - - private $ownerId; - - public function getSchemeOrigin() { - return $this->schemeOrigin; - } - - public function setSchemeOrigin($schemeOrigin) { - $this->schemeOrigin = $schemeOrigin; - $this->queryParameters["SchemeOrigin"]=$schemeOrigin; - } - - public function getSchemeOriginPort() { - return $this->schemeOriginPort; - } - - public function setSchemeOriginPort($schemeOriginPort) { - $this->schemeOriginPort = $schemeOriginPort; - $this->queryParameters["SchemeOriginPort"]=$schemeOriginPort; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getEnable() { - return $this->enable; - } - - public function setEnable($enable) { - $this->enable = $enable; - $this->queryParameters["Enable"]=$enable; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetHttpErrorPageConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetHttpErrorPageConfigRequest.php deleted file mode 100755 index 53ea801..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetHttpErrorPageConfigRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $pageUrl; - - private $ownerId; - - private $errorCode; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getPageUrl() { - return $this->pageUrl; - } - - public function setPageUrl($pageUrl) { - $this->pageUrl = $pageUrl; - $this->queryParameters["PageUrl"]=$pageUrl; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getErrorCode() { - return $this->errorCode; - } - - public function setErrorCode($errorCode) { - $this->errorCode = $errorCode; - $this->queryParameters["ErrorCode"]=$errorCode; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetHttpHeaderConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetHttpHeaderConfigRequest.php deleted file mode 100755 index 6b56ec5..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetHttpHeaderConfigRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $headerValue; - - private $securityToken; - - private $domainName; - - private $headerKey; - - private $ownerId; - - public function getHeaderValue() { - return $this->headerValue; - } - - public function setHeaderValue($headerValue) { - $this->headerValue = $headerValue; - $this->queryParameters["HeaderValue"]=$headerValue; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getHeaderKey() { - return $this->headerKey; - } - - public function setHeaderKey($headerKey) { - $this->headerKey = $headerKey; - $this->queryParameters["HeaderKey"]=$headerKey; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetIgnoreQueryStringConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetIgnoreQueryStringConfigRequest.php deleted file mode 100755 index a47b432..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetIgnoreQueryStringConfigRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -setMethod("POST"); - } - - private $keepOssArgs; - - private $hashKeyArgs; - - private $securityToken; - - private $enable; - - private $domainName; - - private $ownerId; - - public function getKeepOssArgs() { - return $this->keepOssArgs; - } - - public function setKeepOssArgs($keepOssArgs) { - $this->keepOssArgs = $keepOssArgs; - $this->queryParameters["KeepOssArgs"]=$keepOssArgs; - } - - public function getHashKeyArgs() { - return $this->hashKeyArgs; - } - - public function setHashKeyArgs($hashKeyArgs) { - $this->hashKeyArgs = $hashKeyArgs; - $this->queryParameters["HashKeyArgs"]=$hashKeyArgs; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getEnable() { - return $this->enable; - } - - public function setEnable($enable) { - $this->enable = $enable; - $this->queryParameters["Enable"]=$enable; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetIpBlackListConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetIpBlackListConfigRequest.php deleted file mode 100755 index b54d37f..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetIpBlackListConfigRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $ownerId; - - private $blockIps; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getBlockIps() { - return $this->blockIps; - } - - public function setBlockIps($blockIps) { - $this->blockIps = $blockIps; - $this->queryParameters["BlockIps"]=$blockIps; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetLiveStreamsNotifyUrlConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetLiveStreamsNotifyUrlConfigRequest.php deleted file mode 100755 index ab80b79..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetLiveStreamsNotifyUrlConfigRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $notifyUrl; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getNotifyUrl() { - return $this->notifyUrl; - } - - public function setNotifyUrl($notifyUrl) { - $this->notifyUrl = $notifyUrl; - $this->queryParameters["NotifyUrl"]=$notifyUrl; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetLocationAccessRestrictionRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetLocationAccessRestrictionRequest.php deleted file mode 100755 index bd7775b..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetLocationAccessRestrictionRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $location; - - private $ownerId; - - private $type; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getLocation() { - return $this->location; - } - - public function setLocation($location) { - $this->location = $location; - $this->queryParameters["Location"]=$location; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getType() { - return $this->type; - } - - public function setType($type) { - $this->type = $type; - $this->queryParameters["Type"]=$type; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetOptimizeConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetOptimizeConfigRequest.php deleted file mode 100755 index f39b0d2..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetOptimizeConfigRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $enable; - - private $domainName; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getEnable() { - return $this->enable; - } - - public function setEnable($enable) { - $this->enable = $enable; - $this->queryParameters["Enable"]=$enable; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetOssLogConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetOssLogConfigRequest.php deleted file mode 100755 index cac1721..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetOssLogConfigRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $bucket; - - private $securityToken; - - private $enable; - - private $prefix; - - private $ownerId; - - public function getBucket() { - return $this->bucket; - } - - public function setBucket($bucket) { - $this->bucket = $bucket; - $this->queryParameters["Bucket"]=$bucket; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getEnable() { - return $this->enable; - } - - public function setEnable($enable) { - $this->enable = $enable; - $this->queryParameters["Enable"]=$enable; - } - - public function getPrefix() { - return $this->prefix; - } - - public function setPrefix($prefix) { - $this->prefix = $prefix; - $this->queryParameters["Prefix"]=$prefix; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetPageCompressConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetPageCompressConfigRequest.php deleted file mode 100755 index cf6d97f..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetPageCompressConfigRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $enable; - - private $domainName; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getEnable() { - return $this->enable; - } - - public function setEnable($enable) { - $this->enable = $enable; - $this->queryParameters["Enable"]=$enable; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetRangeConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetRangeConfigRequest.php deleted file mode 100755 index 1a33013..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetRangeConfigRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $enable; - - private $domainName; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getEnable() { - return $this->enable; - } - - public function setEnable($enable) { - $this->enable = $enable; - $this->queryParameters["Enable"]=$enable; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetRefererConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetRefererConfigRequest.php deleted file mode 100755 index 420bbeb..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetRefererConfigRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -setMethod("POST"); - } - - private $referList; - - private $securityToken; - - private $domainName; - - private $referType; - - private $disableAst; - - private $ownerId; - - private $allowEmpty; - - public function getReferList() { - return $this->referList; - } - - public function setReferList($referList) { - $this->referList = $referList; - $this->queryParameters["ReferList"]=$referList; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getReferType() { - return $this->referType; - } - - public function setReferType($referType) { - $this->referType = $referType; - $this->queryParameters["ReferType"]=$referType; - } - - public function getDisableAst() { - return $this->disableAst; - } - - public function setDisableAst($disableAst) { - $this->disableAst = $disableAst; - $this->queryParameters["DisableAst"]=$disableAst; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getAllowEmpty() { - return $this->allowEmpty; - } - - public function setAllowEmpty($allowEmpty) { - $this->allowEmpty = $allowEmpty; - $this->queryParameters["AllowEmpty"]=$allowEmpty; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetRemoteReqAuthConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetRemoteReqAuthConfigRequest.php deleted file mode 100755 index 4f73164..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetRemoteReqAuthConfigRequest.php +++ /dev/null @@ -1,151 +0,0 @@ -setMethod("POST"); - } - - private $authPath; - - private $domainName; - - private $authEnable; - - private $ownerId; - - private $timeOut; - - private $authType; - - private $authProvider; - - private $securityToken; - - private $authCrash; - - private $authAddr; - - private $authFileType; - - public function getAuthPath() { - return $this->authPath; - } - - public function setAuthPath($authPath) { - $this->authPath = $authPath; - $this->queryParameters["AuthPath"]=$authPath; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getAuthEnable() { - return $this->authEnable; - } - - public function setAuthEnable($authEnable) { - $this->authEnable = $authEnable; - $this->queryParameters["AuthEnable"]=$authEnable; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getTimeOut() { - return $this->timeOut; - } - - public function setTimeOut($timeOut) { - $this->timeOut = $timeOut; - $this->queryParameters["TimeOut"]=$timeOut; - } - - public function getAuthType() { - return $this->authType; - } - - public function setAuthType($authType) { - $this->authType = $authType; - $this->queryParameters["AuthType"]=$authType; - } - - public function getAuthProvider() { - return $this->authProvider; - } - - public function setAuthProvider($authProvider) { - $this->authProvider = $authProvider; - $this->queryParameters["AuthProvider"]=$authProvider; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getAuthCrash() { - return $this->authCrash; - } - - public function setAuthCrash($authCrash) { - $this->authCrash = $authCrash; - $this->queryParameters["AuthCrash"]=$authCrash; - } - - public function getAuthAddr() { - return $this->authAddr; - } - - public function setAuthAddr($authAddr) { - $this->authAddr = $authAddr; - $this->queryParameters["AuthAddr"]=$authAddr; - } - - public function getAuthFileType() { - return $this->authFileType; - } - - public function setAuthFileType($authFileType) { - $this->authFileType = $authFileType; - $this->queryParameters["AuthFileType"]=$authFileType; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetRemoveQueryStringConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetRemoveQueryStringConfigRequest.php deleted file mode 100755 index 6626990..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetRemoveQueryStringConfigRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $keepOssArgs; - - private $securityToken; - - private $domainName; - - private $aliRemoveArgs; - - private $ownerId; - - public function getKeepOssArgs() { - return $this->keepOssArgs; - } - - public function setKeepOssArgs($keepOssArgs) { - $this->keepOssArgs = $keepOssArgs; - $this->queryParameters["KeepOssArgs"]=$keepOssArgs; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getAliRemoveArgs() { - return $this->aliRemoveArgs; - } - - public function setAliRemoveArgs($aliRemoveArgs) { - $this->aliRemoveArgs = $aliRemoveArgs; - $this->queryParameters["AliRemoveArgs"]=$aliRemoveArgs; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetReqAuthConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetReqAuthConfigRequest.php deleted file mode 100755 index 65f3591..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetReqAuthConfigRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -setMethod("POST"); - } - - private $key1; - - private $key2; - - private $securityToken; - - private $domainName; - - private $ownerId; - - private $timeOut; - - private $authType; - - public function getKey1() { - return $this->key1; - } - - public function setKey1($key1) { - $this->key1 = $key1; - $this->queryParameters["Key1"]=$key1; - } - - public function getKey2() { - return $this->key2; - } - - public function setKey2($key2) { - $this->key2 = $key2; - $this->queryParameters["Key2"]=$key2; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getTimeOut() { - return $this->timeOut; - } - - public function setTimeOut($timeOut) { - $this->timeOut = $timeOut; - $this->queryParameters["TimeOut"]=$timeOut; - } - - public function getAuthType() { - return $this->authType; - } - - public function setAuthType($authType) { - $this->authType = $authType; - $this->queryParameters["AuthType"]=$authType; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetReqHeaderConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetReqHeaderConfigRequest.php deleted file mode 100755 index b6bf618..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetReqHeaderConfigRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $ownerId; - - private $value; - - private $key; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getValue() { - return $this->value; - } - - public function setValue($value) { - $this->value = $value; - $this->queryParameters["Value"]=$value; - } - - public function getKey() { - return $this->key; - } - - public function setKey($key) { - $this->key = $key; - $this->queryParameters["Key"]=$key; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetSourceHostConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetSourceHostConfigRequest.php deleted file mode 100755 index 0941542..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetSourceHostConfigRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $enable; - - private $domainName; - - private $ownerId; - - private $backSrcDomain; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getEnable() { - return $this->enable; - } - - public function setEnable($enable) { - $this->enable = $enable; - $this->queryParameters["Enable"]=$enable; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getBackSrcDomain() { - return $this->backSrcDomain; - } - - public function setBackSrcDomain($backSrcDomain) { - $this->backSrcDomain = $backSrcDomain; - $this->queryParameters["BackSrcDomain"]=$backSrcDomain; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetUserAgentAcessRestrictionRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetUserAgentAcessRestrictionRequest.php deleted file mode 100755 index 9d21eab..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetUserAgentAcessRestrictionRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $userAgent; - - private $ownerId; - - private $type; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getUserAgent() { - return $this->userAgent; - } - - public function setUserAgent($userAgent) { - $this->userAgent = $userAgent; - $this->queryParameters["UserAgent"]=$userAgent; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getType() { - return $this->type; - } - - public function setType($type) { - $this->type = $type; - $this->queryParameters["Type"]=$type; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetUserBlackListRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetUserBlackListRequest.php deleted file mode 100755 index 0c3d2f5..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetUserBlackListRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $configUrl; - - private $securityToken; - - private $ownerAccount; - - private $ownerId; - - public function getConfigUrl() { - return $this->configUrl; - } - - public function setConfigUrl($configUrl) { - $this->configUrl = $configUrl; - $this->queryParameters["ConfigUrl"]=$configUrl; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getOwnerAccount() { - return $this->ownerAccount; - } - - public function setOwnerAccount($ownerAccount) { - $this->ownerAccount = $ownerAccount; - $this->queryParameters["OwnerAccount"]=$ownerAccount; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetUserDomainBlackListRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetUserDomainBlackListRequest.php deleted file mode 100755 index af043de..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetUserDomainBlackListRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $ownerAccount; - - private $domainName; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getOwnerAccount() { - return $this->ownerAccount; - } - - public function setOwnerAccount($ownerAccount) { - $this->ownerAccount = $ownerAccount; - $this->queryParameters["OwnerAccount"]=$ownerAccount; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetVideoSeekConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetVideoSeekConfigRequest.php deleted file mode 100755 index e9bdc49..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetVideoSeekConfigRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $enable; - - private $domainName; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getEnable() { - return $this->enable; - } - - public function setEnable($enable) { - $this->enable = $enable; - $this->queryParameters["Enable"]=$enable; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetWafConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetWafConfigRequest.php deleted file mode 100755 index 1fe4c6e..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/SetWafConfigRequest.php +++ /dev/null @@ -1,74 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $enable; - - private $domainName; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getEnable() { - return $this->enable; - } - - public function setEnable($enable) { - $this->enable = $enable; - $this->queryParameters["Enable"]=$enable; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/StartCdnDomainRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/StartCdnDomainRequest.php deleted file mode 100755 index f0bb1ca..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/StartCdnDomainRequest.php +++ /dev/null @@ -1,63 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/StartMixStreamsServiceRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/StartMixStreamsServiceRequest.php deleted file mode 100755 index bbff8ad..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/StartMixStreamsServiceRequest.php +++ /dev/null @@ -1,140 +0,0 @@ -setMethod("POST"); - } - - private $mixType; - - private $securityToken; - - private $mainDomainName; - - private $mixStreamName; - - private $mixTemplate; - - private $mixDomainName; - - private $ownerId; - - private $mainAppName; - - private $mixAppName; - - private $mainStreamName; - - public function getMixType() { - return $this->mixType; - } - - public function setMixType($mixType) { - $this->mixType = $mixType; - $this->queryParameters["MixType"]=$mixType; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getMainDomainName() { - return $this->mainDomainName; - } - - public function setMainDomainName($mainDomainName) { - $this->mainDomainName = $mainDomainName; - $this->queryParameters["MainDomainName"]=$mainDomainName; - } - - public function getMixStreamName() { - return $this->mixStreamName; - } - - public function setMixStreamName($mixStreamName) { - $this->mixStreamName = $mixStreamName; - $this->queryParameters["MixStreamName"]=$mixStreamName; - } - - public function getMixTemplate() { - return $this->mixTemplate; - } - - public function setMixTemplate($mixTemplate) { - $this->mixTemplate = $mixTemplate; - $this->queryParameters["MixTemplate"]=$mixTemplate; - } - - public function getMixDomainName() { - return $this->mixDomainName; - } - - public function setMixDomainName($mixDomainName) { - $this->mixDomainName = $mixDomainName; - $this->queryParameters["MixDomainName"]=$mixDomainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getMainAppName() { - return $this->mainAppName; - } - - public function setMainAppName($mainAppName) { - $this->mainAppName = $mainAppName; - $this->queryParameters["MainAppName"]=$mainAppName; - } - - public function getMixAppName() { - return $this->mixAppName; - } - - public function setMixAppName($mixAppName) { - $this->mixAppName = $mixAppName; - $this->queryParameters["MixAppName"]=$mixAppName; - } - - public function getMainStreamName() { - return $this->mainStreamName; - } - - public function setMainStreamName($mainStreamName) { - $this->mainStreamName = $mainStreamName; - $this->queryParameters["MainStreamName"]=$mainStreamName; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/StopCdnDomainRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/StopCdnDomainRequest.php deleted file mode 100755 index 430626a..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/StopCdnDomainRequest.php +++ /dev/null @@ -1,63 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $domainName; - - private $ownerId; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/StopMixStreamsServiceRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/StopMixStreamsServiceRequest.php deleted file mode 100755 index a69dc61..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/StopMixStreamsServiceRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -setMethod("POST"); - } - - private $securityToken; - - private $mainDomainName; - - private $mixStreamName; - - private $mixDomainName; - - private $ownerId; - - private $mainAppName; - - private $mixAppName; - - private $mainStreamName; - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getMainDomainName() { - return $this->mainDomainName; - } - - public function setMainDomainName($mainDomainName) { - $this->mainDomainName = $mainDomainName; - $this->queryParameters["MainDomainName"]=$mainDomainName; - } - - public function getMixStreamName() { - return $this->mixStreamName; - } - - public function setMixStreamName($mixStreamName) { - $this->mixStreamName = $mixStreamName; - $this->queryParameters["MixStreamName"]=$mixStreamName; - } - - public function getMixDomainName() { - return $this->mixDomainName; - } - - public function setMixDomainName($mixDomainName) { - $this->mixDomainName = $mixDomainName; - $this->queryParameters["MixDomainName"]=$mixDomainName; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getMainAppName() { - return $this->mainAppName; - } - - public function setMainAppName($mainAppName) { - $this->mainAppName = $mainAppName; - $this->queryParameters["MainAppName"]=$mainAppName; - } - - public function getMixAppName() { - return $this->mixAppName; - } - - public function setMixAppName($mixAppName) { - $this->mixAppName = $mixAppName; - $this->queryParameters["MixAppName"]=$mixAppName; - } - - public function getMainStreamName() { - return $this->mainStreamName; - } - - public function setMainStreamName($mainStreamName) { - $this->mainStreamName = $mainStreamName; - $this->queryParameters["MainStreamName"]=$mainStreamName; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/UpdateLiveAppSnapshotConfigRequest.php b/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/UpdateLiveAppSnapshotConfigRequest.php deleted file mode 100755 index 6e43820..0000000 --- a/sdk/aliyun-php-sdk-cdn/Cdn/Request/V20141111/UpdateLiveAppSnapshotConfigRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -setMethod("POST"); - } - - private $timeInterval; - - private $ossBucket; - - private $appName; - - private $securityToken; - - private $domainName; - - private $ossEndpoint; - - private $sequenceOssObject; - - private $overwriteOssObject; - - private $ownerId; - - public function getTimeInterval() { - return $this->timeInterval; - } - - public function setTimeInterval($timeInterval) { - $this->timeInterval = $timeInterval; - $this->queryParameters["TimeInterval"]=$timeInterval; - } - - public function getOssBucket() { - return $this->ossBucket; - } - - public function setOssBucket($ossBucket) { - $this->ossBucket = $ossBucket; - $this->queryParameters["OssBucket"]=$ossBucket; - } - - public function getAppName() { - return $this->appName; - } - - public function setAppName($appName) { - $this->appName = $appName; - $this->queryParameters["AppName"]=$appName; - } - - public function getSecurityToken() { - return $this->securityToken; - } - - public function setSecurityToken($securityToken) { - $this->securityToken = $securityToken; - $this->queryParameters["SecurityToken"]=$securityToken; - } - - public function getDomainName() { - return $this->domainName; - } - - public function setDomainName($domainName) { - $this->domainName = $domainName; - $this->queryParameters["DomainName"]=$domainName; - } - - public function getOssEndpoint() { - return $this->ossEndpoint; - } - - public function setOssEndpoint($ossEndpoint) { - $this->ossEndpoint = $ossEndpoint; - $this->queryParameters["OssEndpoint"]=$ossEndpoint; - } - - public function getSequenceOssObject() { - return $this->sequenceOssObject; - } - - public function setSequenceOssObject($sequenceOssObject) { - $this->sequenceOssObject = $sequenceOssObject; - $this->queryParameters["SequenceOssObject"]=$sequenceOssObject; - } - - public function getOverwriteOssObject() { - return $this->overwriteOssObject; - } - - public function setOverwriteOssObject($overwriteOssObject) { - $this->overwriteOssObject = $overwriteOssObject; - $this->queryParameters["OverwriteOssObject"]=$overwriteOssObject; - } - - public function getOwnerId() { - return $this->ownerId; - } - - public function setOwnerId($ownerId) { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-cdn/ChangeLog.txt b/sdk/aliyun-php-sdk-cdn/ChangeLog.txt deleted file mode 100755 index 0ec45cc..0000000 --- a/sdk/aliyun-php-sdk-cdn/ChangeLog.txt +++ /dev/null @@ -1,24 +0,0 @@ -2017-08-25 Version: 2.5.0 -1, 新增接口DescribeDomainsUsageByDay。 -2, 新增接口DescribeTopDomainsByFlow。 - -2017-08-04 Version: 2.4.0 -1, 增加了DescribeDomainAverageResponseTime接口。 -2, 增加了DescribeDomainMax95BpsData接口。 -3, 增加了DescribeDomainPathData接口。 -4, 增加了DescribeDomainRealTimeData接口。 -5, 增加了DescribeLiveStreamBitRateData接口。 -6, 增加了DescribeLiveStreamFrameAndBitRateByDomain接口。 -7, 增加了DescribeLiveStreamFrameInfo接口。 -8, 增加了DescribeLiveStreamFrameLossRatio接口。 -9, 增加了DescribeLiveStreamHlsOnlineUserNumByDomain接口。 -10, 增加了DescribeLiveStreamOnlineBps接口。 -11, 增加了DescribeLiveStreamOnlineUserNumByDomain接口。 -12, 增加了DescribeLiveStreamRelayPushBitRate接口。 -13, 增加了DescribeLiveStreamRoomBitRate接口。 -14, 增加了DescribeLiveStreamRoomUserNumber接口。 -15, 增加了DescribeUserCustomerLabels接口。 -16, 增加了SetIpBlackListConfig接口。 -17, 增加了SetRemoteReqAuthConfig接口。 -18, 增加了SetRemoveQueryStringConfig接口。 - diff --git a/sdk/aliyun-php-sdk-core/AcsRequest.php b/sdk/aliyun-php-sdk-core/AcsRequest.php deleted file mode 100755 index e1a553e..0000000 --- a/sdk/aliyun-php-sdk-core/AcsRequest.php +++ /dev/null @@ -1,154 +0,0 @@ -headers["x-sdk-client"] = "php/2.0.0"; - $this->product = $product; - $this->version = $version; - $this->actionName = $actionName; - - $this->locationServiceCode = $locationServiceCode; - $this->locationEndpointType = $locationEndpointType; - } - - public abstract function composeUrl($iSigner, $credential, $domain); - - public function getVersion() - { - return $this->version; - } - - public function setVersion($version) - { - $this->version = $version; - } - - public function getProduct() - { - return $this->product; - } - - public function setProduct($product) - { - $this->product = $product; - } - - public function getActionName() - { - return $this->actionName; - } - - public function setActionName($actionName) - { - $this->actionName = $actionName; - } - - public function getAcceptFormat() - { - return $this->acceptFormat; - } - - public function setAcceptFormat($acceptFormat) - { - $this->acceptFormat = $acceptFormat; - } - - public function getQueryParameters() - { - return $this->queryParameters; - } - - public function getHeaders() - { - return $this->headers; - } - - public function getMethod() - { - return $this->method; - } - - public function setMethod($method) - { - $this->method = $method; - } - - public function getProtocol() - { - return $this->protocolType; - } - - public function setProtocol($protocol) - { - $this->protocolType = $protocol; - } - - public function getRegionId() - { - return $this->regionId; - } - public function setRegionId($region) - { - $this->regionId = $region; - } - - public function getContent() - { - return $this->content; - } - - public function setContent($content) - { - $this->content = $content; - } - - - public function addHeader($headerKey, $headerValue) - { - $this->headers[$headerKey] = $headerValue; - } - - public function getLocationServiceCode() - { - return $this->locationServiceCode; - } - - public function getLocationEndpointType() - { - return $this->locationEndpointType; - } -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-core/AcsResponse.php b/sdk/aliyun-php-sdk-core/AcsResponse.php deleted file mode 100755 index bda087b..0000000 --- a/sdk/aliyun-php-sdk-core/AcsResponse.php +++ /dev/null @@ -1,44 +0,0 @@ -code; - } - - public function setCode($code) - { - $this->code = $code; - } - - public function getMessage() - { - return $this->message; - } - - public function setMessage($message) - { - $this->message = $message; - } -} diff --git a/sdk/aliyun-php-sdk-core/Auth/Credential.php b/sdk/aliyun-php-sdk-core/Auth/Credential.php deleted file mode 100755 index 3d348ff..0000000 --- a/sdk/aliyun-php-sdk-core/Auth/Credential.php +++ /dev/null @@ -1,83 +0,0 @@ -accessKeyId = $accessKeyId; - $this->accessSecret = $accessSecret; - $this->refreshDate = date($this->dateTimeFormat); - } - - public function isExpired() - { - if ($this->expiredDate == null) { - return false; - } - if (strtotime($this->expiredDate)>date($this->dateTimeFormat)) { - return false; - } - return true; - } - - public function getRefreshDate() - { - return $this->refreshDate; - } - - public function getExpiredDate() - { - return $this->expiredDate; - } - - public function setExpiredDate($expiredHours) - { - if ($expiredHours>0) { - return $this->expiredDate = date($this->dateTimeFormat, strtotime("+".$expiredHours." hour")); - } - } - - public function getAccessKeyId() - { - return $this->accessKeyId; - } - - public function setAccessKeyId($accessKeyId) - { - $this->accessKeyId = $accessKeyId; - } - - public function getAccessSecret() - { - return $this->accessSecret; - } - - public function setAccessSecret($accessSecret) - { - $this->accessSecret = $accessSecret; - } -} diff --git a/sdk/aliyun-php-sdk-core/Auth/ISigner.php b/sdk/aliyun-php-sdk-core/Auth/ISigner.php deleted file mode 100755 index 451f6ff..0000000 --- a/sdk/aliyun-php-sdk-core/Auth/ISigner.php +++ /dev/null @@ -1,27 +0,0 @@ -iClientProfile = $iClientProfile; - $this->__urlTestFlag__ = false; - $this->locationService = new LocationService($this->iClientProfile); - } - - public function getAcsResponse($request, $iSigner = null, $credential = null, $autoRetry = true, $maxRetryNumber = 3) - { - $httpResponse = $this->doActionImpl($request, $iSigner, $credential, $autoRetry, $maxRetryNumber); - $respObject = $this->parseAcsResponse($httpResponse->getBody(), $request->getAcceptFormat()); - if (false == $httpResponse->isSuccess()) { - $this->buildApiException($respObject, $httpResponse->getStatus()); - } - return $respObject; - } - - private function doActionImpl($request, $iSigner = null, $credential = null, $autoRetry = true, $maxRetryNumber = 3) - { - if (null == $this->iClientProfile && (null == $iSigner || null == $credential - || null == $request->getRegionId() || null == $request->getAcceptFormat())) { - throw new ClientException("No active profile found.", "SDK.InvalidProfile"); - } - if (null == $iSigner) { - $iSigner = $this->iClientProfile->getSigner(); - } - if (null == $credential) { - $credential = $this->iClientProfile->getCredential(); - } - $request = $this->prepareRequest($request); - - $domain = ''; - // Get the domain from the Location Service by speicified `ServiceCode` and `RegionId`. - if (null != $request->getLocationServiceCode()) - { - $domain = $this->locationService->findProductDomain($request->getRegionId(), $request->getLocationServiceCode(), $request->getLocationEndpointType(), $request->getProduct()); - } - if ($domain == null) - { - $domain = EndpointProvider::findProductDomain($request->getRegionId(), $request->getProduct()); - } - - if (null == $domain) { - throw new ClientException("Can not find endpoint to access.", "SDK.InvalidRegionId"); - } - $requestUrl = $request->composeUrl($iSigner, $credential, $domain); - - if ($this->__urlTestFlag__) { - throw new ClientException($requestUrl, "URLTestFlagIsSet"); - } - - if (count($request->getDomainParameter())>0) { - $httpResponse = HttpHelper::curl($requestUrl, $request->getMethod(), $request->getDomainParameter(), $request->getHeaders()); - } else { - $httpResponse = HttpHelper::curl($requestUrl, $request->getMethod(), $request->getContent(), $request->getHeaders()); - } - - $retryTimes = 1; - while (500 <= $httpResponse->getStatus() && $autoRetry && $retryTimes < $maxRetryNumber) { - $requestUrl = $request->composeUrl($iSigner, $credential, $domain); - - if (count($request->getDomainParameter())>0) { - $httpResponse = HttpHelper::curl($requestUrl, $request->getDomainParameter(), $request->getHeaders()); - } else { - $httpResponse = HttpHelper::curl($requestUrl, $request->getMethod(), $request->getContent(), $request->getHeaders()); - } - $retryTimes ++; - } - return $httpResponse; - } - - public function doAction($request, $iSigner = null, $credential = null, $autoRetry = true, $maxRetryNumber = 3) - { - trigger_error("doAction() is deprecated. Please use getAcsResponse() instead.", E_USER_NOTICE); - return $this->doActionImpl($request, $iSigner, $credential, $autoRetry, $maxRetryNumber); - } - - private function prepareRequest($request) - { - if (null == $request->getRegionId()) { - $request->setRegionId($this->iClientProfile->getRegionId()); - } - if (null == $request->getAcceptFormat()) { - $request->setAcceptFormat($this->iClientProfile->getFormat()); - } - if (null == $request->getMethod()) { - $request->setMethod("GET"); - } - return $request; - } - - - private function buildApiException($respObject, $httpStatus) - { - throw new ServerException($respObject->Message, $respObject->Code, $httpStatus, $respObject->RequestId); - } - - private function parseAcsResponse($body, $format) - { - if ("JSON" == $format) { - $respObject = json_decode($body); - } elseif ("XML" == $format) { - $respObject = @simplexml_load_string($body); - } elseif ("RAW" == $format) { - $respObject = $body; - } - return $respObject; - } -} diff --git a/sdk/aliyun-php-sdk-core/Exception/ClientException.php b/sdk/aliyun-php-sdk-core/Exception/ClientException.php deleted file mode 100755 index b5b5fe1..0000000 --- a/sdk/aliyun-php-sdk-core/Exception/ClientException.php +++ /dev/null @@ -1,63 +0,0 @@ -errorMessage = $errorMessage; - $this->errorCode = $errorCode; - $this->setErrorType("Client"); - } - - private $errorCode; - private $errorMessage; - private $errorType; - - public function getErrorCode() - { - return $this->errorCode; - } - - public function setErrorCode($errorCode) - { - $this->errorCode = $errorCode; - } - - public function getErrorMessage() - { - return $this->errorMessage; - } - - public function setErrorMessage($errorMessage) - { - $this->errorMessage = $errorMessage; - } - - public function getErrorType() - { - return $this->errorType; - } - - public function setErrorType($errorType) - { - $this->errorType = $errorType; - } -} diff --git a/sdk/aliyun-php-sdk-core/Exception/ServerException.php b/sdk/aliyun-php-sdk-core/Exception/ServerException.php deleted file mode 100755 index 7c5d3c3..0000000 --- a/sdk/aliyun-php-sdk-core/Exception/ServerException.php +++ /dev/null @@ -1,45 +0,0 @@ -setErrorMessage($errorMessage); - $this->setErrorType("Server"); - $this->httpStatus = $httpStatus; - $this->requestId = $requestId; - } - - public function getHttpStatus() - { - return $this->httpStatus; - } - - public function getRequestId() - { - return $this->requestId; - } -} diff --git a/sdk/aliyun-php-sdk-core/Http/HttpHelper.php b/sdk/aliyun-php-sdk-core/Http/HttpHelper.php deleted file mode 100755 index 397d098..0000000 --- a/sdk/aliyun-php-sdk-core/Http/HttpHelper.php +++ /dev/null @@ -1,80 +0,0 @@ - 5 && strtolower(substr($url, 0, 5)) == "https") { - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); - } - if (is_array($headers) && 0 < count($headers)) { - $httpHeaders =self::getHttpHearders($headers); - curl_setopt($ch, CURLOPT_HTTPHEADER, $httpHeaders); - } - $httpResponse = new HttpResponse(); - $httpResponse->setBody(curl_exec($ch)); - $httpResponse->setStatus(curl_getinfo($ch, CURLINFO_HTTP_CODE)); - if (curl_errno($ch)) { - throw new ClientException("Server unreachable: Errno: " . curl_errno($ch) . " " . curl_error($ch), "SDK.ServerUnreachable"); - } - curl_close($ch); - return $httpResponse; - } - public static function getPostHttpBody($postFildes) - { - $content = ""; - foreach ($postFildes as $apiParamKey => $apiParamValue) { - $content .= "$apiParamKey=" . urlencode($apiParamValue) . "&"; - } - return substr($content, 0, -1); - } - public static function getHttpHearders($headers) - { - $httpHeader = array(); - foreach ($headers as $key => $value) { - array_push($httpHeader, $key.":".$value); - } - return $httpHeader; - } -} diff --git a/sdk/aliyun-php-sdk-core/Http/HttpResponse.php b/sdk/aliyun-php-sdk-core/Http/HttpResponse.php deleted file mode 100755 index ccbcc4a..0000000 --- a/sdk/aliyun-php-sdk-core/Http/HttpResponse.php +++ /dev/null @@ -1,52 +0,0 @@ -body; - } - - public function setBody($body) - { - $this->body = $body; - } - - public function getStatus() - { - return $this->status; - } - - public function setStatus($status) - { - $this->status = $status; - } - - public function isSuccess() - { - if (200 <= $this->status && 300 > $this->status) { - return true; - } - return false; - } -} diff --git a/sdk/aliyun-php-sdk-core/IAcsClient.php b/sdk/aliyun-php-sdk-core/IAcsClient.php deleted file mode 100755 index cd4dc93..0000000 --- a/sdk/aliyun-php-sdk-core/IAcsClient.php +++ /dev/null @@ -1,23 +0,0 @@ - $endpoint) - { - if($endpoint->getName() == $endpointName) - { - return $endpoint; - } - } - } - - private static function addEndpoint_($endpointName,$regionId, $product, $domain) - { - $regionIds = array($regionId); - $productsDomains = array(new ProductDomain($product, $domain)); - $endpoint = new Endpoint($endpointName, $regionIds, $productsDomains); - array_push(self::$endpoints, $endpoint); - } - - private static function updateEndpoint($regionId, $product, $domain, $endpoint) - { - $regionIds = $endpoint->getRegionIds(); - if(!in_array($regionId,$regionIds)) - { - array_push($regionIds, $regionId); - $endpoint->setRegionIds($regionIds); - } - - $productDomains = $endpoint->getProductDomains(); - if (null == self::findProductDomainAndUpdate($productDomains, $product, $domain)) { - array_push($productDomains, new ProductDomain($product, $domain)); - } - - $endpoint->setProductDomains($productDomains); - } - - private static function findProductDomainAndUpdate($productDomains, $product, $domain) - { - foreach ($productDomains as $key => $productDomain) { - if ($productDomain->getProductName() == $product) { - $productDomain->setDomainName($domain); - return $productDomain; - } - } - return null; - } -} diff --git a/sdk/aliyun-php-sdk-core/Profile/IClientProfile.php b/sdk/aliyun-php-sdk-core/Profile/IClientProfile.php deleted file mode 100755 index 99bc1fc..0000000 --- a/sdk/aliyun-php-sdk-core/Profile/IClientProfile.php +++ /dev/null @@ -1,29 +0,0 @@ -name = $name; - $this->regionIds = $regionIds; - $this->productDomains = $productDomains; - } - - public function getName() - { - return $this->name; - } - - public function setName($name) - { - $this->name = $name; - } - - public function getRegionIds() - { - return $this->regionIds; - } - - public function setRegionIds($regionIds) - { - $this->regionIds = $regionIds; - } - - public function getProductDomains() - { - return $this->productDomains; - } - - public function setProductDomains($productDomains) - { - $this->productDomains = $productDomains; - } -} diff --git a/sdk/aliyun-php-sdk-core/Regions/EndpointConfig.php b/sdk/aliyun-php-sdk-core/Regions/EndpointConfig.php deleted file mode 100755 index bd5e110..0000000 --- a/sdk/aliyun-php-sdk-core/Regions/EndpointConfig.php +++ /dev/null @@ -1,65 +0,0 @@ - $endpoint) { - if (in_array($regionId, $endpoint->getRegionIds())) { - return self::findProductDomainByProduct($endpoint->getProductDomains(), $product); - } - } - return null; - } - - private static function findProductDomainByProduct($productDomains, $product) - { - if (null == $productDomains) { - return null; - } - foreach ($productDomains as $key => $productDomain) { - if ($product == $productDomain->getProductName()) { - return $productDomain->getDomainName(); - } - } - return null; - } - - - public static function getEndpoints() - { - return self::$endpoints; - } - - public static function setEndpoints($endpoints) - { - self::$endpoints = $endpoints; - } -} diff --git a/sdk/aliyun-php-sdk-core/Regions/LocationService.php b/sdk/aliyun-php-sdk-core/Regions/LocationService.php deleted file mode 100755 index 6ecf352..0000000 --- a/sdk/aliyun-php-sdk-core/Regions/LocationService.php +++ /dev/null @@ -1,120 +0,0 @@ -queryParameters["Id"] = $id; - $this->queryParameters["ServiceCode"] = $serviceCode; - $this->queryParameters["Type"] = $endPointType; - $this->setRegionId(LOCATION_SERVICE_REGION); - - $this->setAcceptFormat("JSON"); - } -} - -class LocationService -{ - private $clientProfile; - public static $cache = array(); - public static $lastClearTimePerProduct = array(); - public static $serviceDomain = LOCATION_SERVICE_DOMAIN; - - function __construct($clientProfile) { - $this->clientProfile = $clientProfile; - } - - public function findProductDomain($regionId, $serviceCode, $endPointType, $product) - { - $key = $regionId.'#'.$product; - $domain = self::$cache[$key]; - if ($domain == null || $this->checkCacheIsExpire($key) == true) - { - $domain = $this->findProductDomainFromLocationService($regionId, $serviceCode, $endPointType); - self::$cache[$key] = $domain; - } - - return $domain; - } - - public static function addEndPoint($regionId, $product, $domain) - { - $key = $regionId.'#'.$product; - self::$cache[$key] = $domain; - $lastClearTime = mktime(0, 0, 0, 1, 1, 2999); - self::$lastClearTimePerProduct[$key] = $lastClearTime; - } - - public static function modifyServiceDomain($domain) - { - self::$serviceDomain = $domain; - } - - private function checkCacheIsExpire($key) - { - $lastClearTime = self::$lastClearTimePerProduct[$key]; - if ($lastClearTime == null) - { - $lastClearTime = time(); - self::$lastClearTimePerProduct[$key] = $lastClearTime; - } - - $now = time(); - $elapsedTime = $now - $lastClearTime; - - if ($elapsedTime > CACHE_EXPIRE_TIME) - { - $lastClearTime = time(); - self::$lastClearTimePerProduct[$key] = $lastClearTime; - return true; - } - - return false; - } - - private function findProductDomainFromLocationService($regionId, $serviceCode, $endPointType) - { - $request = new DescribeEndpointRequest($regionId, $serviceCode, $endPointType); - - $signer = $this->clientProfile->getSigner(); - $credential = $this->clientProfile->getCredential(); - - $requestUrl = $request->composeUrl($signer, $credential, self::$serviceDomain); - - $httpResponse = HttpHelper::curl($requestUrl, $request->getMethod(), null, $request->getHeaders()); - - if (!$httpResponse->isSuccess()) - { - return null; - } - - $respObj = json_decode($httpResponse->getBody()); - return $respObj->Endpoints->Endpoint[0]->Endpoint; - } -} \ No newline at end of file diff --git a/sdk/aliyun-php-sdk-core/Regions/ProductDomain.php b/sdk/aliyun-php-sdk-core/Regions/ProductDomain.php deleted file mode 100755 index 8cebc57..0000000 --- a/sdk/aliyun-php-sdk-core/Regions/ProductDomain.php +++ /dev/null @@ -1,47 +0,0 @@ -productName = $product; - $this->domainName = $domain; - } - - public function getProductName() - { - return $this->productName; - } - public function setProductName($productName) - { - $this->productName = $productName; - } - public function getDomainName() - { - return $this->domainName; - } - public function setDomainName($domainName) - { - $this->domainName = $domainName; - } -} diff --git a/sdk/aliyun-php-sdk-core/Regions/endpoints.xml b/sdk/aliyun-php-sdk-core/Regions/endpoints.xml deleted file mode 100755 index 0d332e9..0000000 --- a/sdk/aliyun-php-sdk-core/Regions/endpoints.xml +++ /dev/null @@ -1,1349 +0,0 @@ - - - - jp-fudao-1 - - Ecsecs-cn-hangzhou.aliyuncs.com - - - - me-east-1 - - Rdsrds.me-east-1.aliyuncs.com - Ecsecs.me-east-1.aliyuncs.com - Vpcvpc.me-east-1.aliyuncs.com - Kmskms.me-east-1.aliyuncs.com - Cmsmetrics.cn-hangzhou.aliyuncs.com - Slbslb.me-east-1.aliyuncs.com - - - - us-east-1 - - CScs.aliyuncs.com - Pushcloudpush.aliyuncs.com - COScos.aliyuncs.com - Essess.aliyuncs.com - Ace-opsace-ops.cn-hangzhou.aliyuncs.com - Billingbilling.aliyuncs.com - Dqsdqs.aliyuncs.com - Ddsmongodb.aliyuncs.com - Emremr.aliyuncs.com - Smssms.aliyuncs.com - Jaqjaq.aliyuncs.com - HPChpc.aliyuncs.com - Locationlocation.aliyuncs.com - ChargingServicechargingservice.aliyuncs.com - Msgmsg-inner.aliyuncs.com - Commondrivercommon.driver.aliyuncs.com - R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com - Bssbss.aliyuncs.com - Workorderworkorder.aliyuncs.com - Ocsm-kvstore.aliyuncs.com - Yundunyundun-cn-hangzhou.aliyuncs.com - Ubsms-innerubsms-inner.aliyuncs.com - Dmdm.aliyuncs.com - Greengreen.aliyuncs.com - Riskrisk-cn-hangzhou.aliyuncs.com - oceanbaseoceanbase.aliyuncs.com - Mscmsc-inner.aliyuncs.com - Yundunhsmyundunhsm.aliyuncs.com - Iotiot.aliyuncs.com - jaqjaq.aliyuncs.com - Omsoms.aliyuncs.com - livelive.aliyuncs.com - Ecsecs-cn-hangzhou.aliyuncs.com - Ubsmsubsms.aliyuncs.com - Vpcvpc.aliyuncs.com - Alertalert.aliyuncs.com - Aceace.cn-hangzhou.aliyuncs.com - AMSams.aliyuncs.com - ROSros.aliyuncs.com - PTSpts.aliyuncs.com - Qualitycheckqualitycheck.aliyuncs.com - M-kvstorem-kvstore.aliyuncs.com - HighDDosyd-highddos-cn-hangzhou.aliyuncs.com - CmsSiteMonitorsitemonitor.aliyuncs.com - Rdsrds.aliyuncs.com - BatchComputebatchCompute.aliyuncs.com - CFcf.aliyuncs.com - Drdsdrds.aliyuncs.com - Acsacs.aliyun-inc.com - Httpdnshttpdns-api.aliyuncs.com - Location-innerlocation-inner.aliyuncs.com - Aasaas.aliyuncs.com - Stssts.aliyuncs.com - Dtsdts.aliyuncs.com - Drcdrc.aliyuncs.com - Vpc-innervpc-inner.aliyuncs.com - Cmsmetrics.cn-hangzhou.aliyuncs.com - Slbslb.aliyuncs.com - Crmcrm-cn-hangzhou.aliyuncs.com - Domaindomain.aliyuncs.com - Otsots-pop.aliyuncs.com - Ossoss-cn-hangzhou.aliyuncs.com - Ramram.aliyuncs.com - Salessales.cn-hangzhou.aliyuncs.com - OssAdminoss-admin.aliyuncs.com - Alidnsalidns.aliyuncs.com - Onsons.aliyuncs.com - Cdncdn.aliyuncs.com - YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com - - - - ap-northeast-1 - - Rdsrds.ap-northeast-1.aliyuncs.com - Kmskms.ap-northeast-1.aliyuncs.com - Vpcvpc.ap-northeast-1.aliyuncs.com - Ecsecs.ap-northeast-1.aliyuncs.com - Cmsmetrics.ap-northeast-1.aliyuncs.com - Kvstorer-kvstore.ap-northeast-1.aliyuncs.com - Slbslb.ap-northeast-1.aliyuncs.com - - - - cn-hangzhou-bj-b01 - - Ecsecs-cn-hangzhou.aliyuncs.com - - - - cn-hongkong - - Pushcloudpush.aliyuncs.com - COScos.aliyuncs.com - Onsons.aliyuncs.com - Essess.aliyuncs.com - Ace-opsace-ops.cn-hangzhou.aliyuncs.com - Billingbilling.aliyuncs.com - Dqsdqs.aliyuncs.com - Ddsmongodb.aliyuncs.com - Emremr.aliyuncs.com - Smssms.aliyuncs.com - Jaqjaq.aliyuncs.com - CScs.aliyuncs.com - Kmskms.cn-hongkong.aliyuncs.com - Locationlocation.aliyuncs.com - Msgmsg-inner.aliyuncs.com - ChargingServicechargingservice.aliyuncs.com - R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com - Alertalert.aliyuncs.com - Mscmsc-inner.aliyuncs.com - Drcdrc.aliyuncs.com - Yundunyundun-cn-hangzhou.aliyuncs.com - Ubsms-innerubsms-inner.aliyuncs.com - Ocsm-kvstore.aliyuncs.com - Dmdm.aliyuncs.com - Riskrisk-cn-hangzhou.aliyuncs.com - oceanbaseoceanbase.aliyuncs.com - Workorderworkorder.aliyuncs.com - Yundunhsmyundunhsm.aliyuncs.com - Iotiot.aliyuncs.com - HPChpc.aliyuncs.com - jaqjaq.aliyuncs.com - Omsoms.aliyuncs.com - livelive.aliyuncs.com - Ecsecs-cn-hangzhou.aliyuncs.com - M-kvstorem-kvstore.aliyuncs.com - Vpcvpc.aliyuncs.com - BatchComputebatchCompute.aliyuncs.com - AMSams.aliyuncs.com - ROSros.aliyuncs.com - PTSpts.aliyuncs.com - Qualitycheckqualitycheck.aliyuncs.com - Bssbss.aliyuncs.com - Ubsmsubsms.aliyuncs.com - CloudAPIapigateway.cn-hongkong.aliyuncs.com - Stssts.aliyuncs.com - CmsSiteMonitorsitemonitor.aliyuncs.com - Aceace.cn-hangzhou.aliyuncs.com - Mtsmts.cn-hongkong.aliyuncs.com - Location-innerlocation-inner.aliyuncs.com - CFcf.aliyuncs.com - Acsacs.aliyun-inc.com - Httpdnshttpdns-api.aliyuncs.com - Greengreen.aliyuncs.com - Aasaas.aliyuncs.com - Alidnsalidns.aliyuncs.com - Dtsdts.aliyuncs.com - HighDDosyd-highddos-cn-hangzhou.aliyuncs.com - Vpc-innervpc-inner.aliyuncs.com - Cmsmetrics.cn-hangzhou.aliyuncs.com - Slbslb.aliyuncs.com - Commondrivercommon.driver.aliyuncs.com - Domaindomain.aliyuncs.com - Otsots-pop.aliyuncs.com - Cdncdn.aliyuncs.com - Ramram.aliyuncs.com - Drdsdrds.aliyuncs.com - Rdsrds.aliyuncs.com - Crmcrm-cn-hangzhou.aliyuncs.com - OssAdminoss-admin.aliyuncs.com - Salessales.cn-hangzhou.aliyuncs.com - YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com - Ossoss-cn-hongkong.aliyuncs.com - - - - cn-beijing-nu16-b01 - - Ecsecs-cn-hangzhou.aliyuncs.com - - - - cn-beijing-am13-c01 - - Ecsecs-cn-hangzhou.aliyuncs.com - Vpcvpc.aliyuncs.com - - - - in-west-antgroup-1 - - Ecsecs-cn-hangzhou.aliyuncs.com - - - - cn-guizhou-gov - - Ecsecs-cn-hangzhou.aliyuncs.com - Vpcvpc.aliyuncs.com - - - - in-west-antgroup-2 - - Ecsecs-cn-hangzhou.aliyuncs.com - - - - cn-qingdao-cm9 - - CScs.aliyuncs.com - Riskrisk-cn-hangzhou.aliyuncs.com - COScos.aliyuncs.com - Essess.aliyuncs.com - Billingbilling.aliyuncs.com - Dqsdqs.aliyuncs.com - Ddsmongodb.aliyuncs.com - Alidnsalidns.aliyuncs.com - Smssms.aliyuncs.com - Drdsdrds.aliyuncs.com - HPChpc.aliyuncs.com - Locationlocation.aliyuncs.com - Msgmsg-inner.aliyuncs.com - ChargingServicechargingservice.aliyuncs.com - Ocsm-kvstore.aliyuncs.com - Alertalert.aliyuncs.com - Mscmsc-inner.aliyuncs.com - HighDDosyd-highddos-cn-hangzhou.aliyuncs.com - R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com - Yundunyundun-cn-hangzhou.aliyuncs.com - Ubsms-innerubsms-inner.aliyuncs.com - Dmdm.aliyuncs.com - Greengreen.aliyuncs.com - YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com - oceanbaseoceanbase.aliyuncs.com - Workorderworkorder.aliyuncs.com - Yundunhsmyundunhsm.aliyuncs.com - Iotiot.aliyuncs.com - jaqjaq.aliyuncs.com - Omsoms.aliyuncs.com - livelive.aliyuncs.com - Ecsecs-cn-hangzhou.aliyuncs.com - Ubsmsubsms.aliyuncs.com - CmsSiteMonitorsitemonitor.aliyuncs.com - AMSams.aliyuncs.com - Crmcrm-cn-hangzhou.aliyuncs.com - PTSpts.aliyuncs.com - Qualitycheckqualitycheck.aliyuncs.com - Bssbss.aliyuncs.com - M-kvstorem-kvstore.aliyuncs.com - Aceace.cn-hangzhou.aliyuncs.com - Mtsmts.cn-qingdao.aliyuncs.com - CFcf.aliyuncs.com - Httpdnshttpdns-api.aliyuncs.com - Location-innerlocation-inner.aliyuncs.com - Aasaas.aliyuncs.com - Stssts.aliyuncs.com - Dtsdts.aliyuncs.com - Emremr.aliyuncs.com - Drcdrc.aliyuncs.com - Pushcloudpush.aliyuncs.com - Cmsmetrics.aliyuncs.com - Slbslb.aliyuncs.com - Commondrivercommon.driver.aliyuncs.com - Domaindomain.aliyuncs.com - Otsots-pop.aliyuncs.com - ROSros.aliyuncs.com - Ossoss-cn-hangzhou.aliyuncs.com - Ramram.aliyuncs.com - Salessales.cn-hangzhou.aliyuncs.com - Rdsrds.aliyuncs.com - OssAdminoss-admin.aliyuncs.com - Onsons.aliyuncs.com - Cdncdn.aliyuncs.com - - - - tw-snowcloud-kaohsiung - - Ecsecs-cn-hangzhou.aliyuncs.com - - - - cn-shanghai-finance-1 - - Kmskms.cn-shanghai-finance-1.aliyuncs.com - Ecsecs-cn-hangzhou.aliyuncs.com - Vpcvpc.aliyuncs.com - Rdsrds.aliyuncs.com - - - - cn-guizhou - - Ecsecs-cn-hangzhou.aliyuncs.com - Vpcvpc.aliyuncs.com - - - - cn-qingdao-finance - - Ossoss-cn-qdjbp-a.aliyuncs.com - - - - cn-beijing-gov-1 - - Ossoss-cn-haidian-a.aliyuncs.com - Rdsrds.aliyuncs.com - - - - cn-shanghai - - ARMSarms.cn-shanghai.aliyuncs.com - Riskrisk-cn-hangzhou.aliyuncs.com - COScos.aliyuncs.com - HPChpc.aliyuncs.com - Billingbilling.aliyuncs.com - Dqsdqs.aliyuncs.com - Drcdrc.aliyuncs.com - Alidnsalidns.aliyuncs.com - Smssms.aliyuncs.com - Drdsdrds.aliyuncs.com - CScs.aliyuncs.com - Kmskms.cn-shanghai.aliyuncs.com - Locationlocation.aliyuncs.com - Msgmsg-inner.aliyuncs.com - ChargingServicechargingservice.aliyuncs.com - Ocsm-kvstore.aliyuncs.com - Alertalert.aliyuncs.com - Mscmsc-inner.aliyuncs.com - R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com - Yundunyundun-cn-hangzhou.aliyuncs.com - Ubsms-innerubsms-inner.aliyuncs.com - Dmdm.aliyuncs.com - Greengreen.cn-shanghai.aliyuncs.com - Commondrivercommon.driver.aliyuncs.com - oceanbaseoceanbase.aliyuncs.com - Workorderworkorder.aliyuncs.com - Yundunhsmyundunhsm.aliyuncs.com - Iotiot.cn-shanghai.aliyuncs.com - Bssbss.aliyuncs.com - Omsoms.aliyuncs.com - Ubsmsubsms.aliyuncs.com - livelive.aliyuncs.com - Ecsecs-cn-hangzhou.aliyuncs.com - Ace-opsace-ops.cn-hangzhou.aliyuncs.com - CmsSiteMonitorsitemonitor.aliyuncs.com - BatchComputebatchCompute.aliyuncs.com - AMSams.aliyuncs.com - ROSros.aliyuncs.com - PTSpts.aliyuncs.com - Qualitycheckqualitycheck.aliyuncs.com - M-kvstorem-kvstore.aliyuncs.com - Apigatewayapigateway.cn-shanghai.aliyuncs.com - CloudAPIapigateway.cn-shanghai.aliyuncs.com - Stssts.aliyuncs.com - Vpcvpc.aliyuncs.com - Aceace.cn-hangzhou.aliyuncs.com - Mtsmts.cn-shanghai.aliyuncs.com - Ddsmongodb.aliyuncs.com - CFcf.aliyuncs.com - Acsacs.aliyun-inc.com - Httpdnshttpdns-api.aliyuncs.com - Pushcloudpush.aliyuncs.com - Location-innerlocation-inner.aliyuncs.com - Aasaas.aliyuncs.com - Emremr.aliyuncs.com - Dtsdts.aliyuncs.com - HighDDosyd-highddos-cn-hangzhou.aliyuncs.com - Jaqjaq.aliyuncs.com - Cmsmetrics.cn-hangzhou.aliyuncs.com - Slbslb.aliyuncs.com - Crmcrm-cn-hangzhou.aliyuncs.com - Domaindomain.aliyuncs.com - Otsots-pop.aliyuncs.com - jaqjaq.aliyuncs.com - Cdncdn.aliyuncs.com - Ramram.aliyuncs.com - Salessales.cn-hangzhou.aliyuncs.com - Vpc-innervpc-inner.aliyuncs.com - Rdsrds.aliyuncs.com - OssAdminoss-admin.aliyuncs.com - Onsons.aliyuncs.com - Essess.aliyuncs.com - Ossoss-cn-shanghai.aliyuncs.com - YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com - vodvod.cn-shanghai.aliyuncs.com - - - - cn-shenzhen-inner - - Riskrisk-cn-hangzhou.aliyuncs.com - COScos.aliyuncs.com - Onsons.aliyuncs.com - Essess.aliyuncs.com - Billingbilling.aliyuncs.com - Dqsdqs.aliyuncs.com - Ddsmongodb.aliyuncs.com - Alidnsalidns.aliyuncs.com - Smssms.aliyuncs.com - Salessales.cn-hangzhou.aliyuncs.com - HPChpc.aliyuncs.com - Locationlocation.aliyuncs.com - Msgmsg-inner.aliyuncs.com - ChargingServicechargingservice.aliyuncs.com - Ocsm-kvstore.aliyuncs.com - jaqjaq.aliyuncs.com - Mscmsc-inner.aliyuncs.com - HighDDosyd-highddos-cn-hangzhou.aliyuncs.com - R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com - Bssbss.aliyuncs.com - Ubsms-innerubsms-inner.aliyuncs.com - Dmdm.aliyuncs.com - Commondrivercommon.driver.aliyuncs.com - oceanbaseoceanbase.aliyuncs.com - Workorderworkorder.aliyuncs.com - Yundunhsmyundunhsm.aliyuncs.com - Iotiot.aliyuncs.com - Alertalert.aliyuncs.com - Omsoms.aliyuncs.com - livelive.aliyuncs.com - Ecsecs-cn-hangzhou.aliyuncs.com - Ubsmsubsms.aliyuncs.com - CmsSiteMonitorsitemonitor.aliyuncs.com - AMSams.aliyuncs.com - Crmcrm-cn-hangzhou.aliyuncs.com - PTSpts.aliyuncs.com - Qualitycheckqualitycheck.aliyuncs.com - M-kvstorem-kvstore.aliyuncs.com - Stssts.aliyuncs.com - Aceace.cn-hangzhou.aliyuncs.com - Mtsmts.cn-shenzhen.aliyuncs.com - CFcf.aliyuncs.com - Httpdnshttpdns-api.aliyuncs.com - Greengreen.aliyuncs.com - Aasaas.aliyuncs.com - Emremr.aliyuncs.com - CScs.aliyuncs.com - Drcdrc.aliyuncs.com - Pushcloudpush.aliyuncs.com - Cmsmetrics.aliyuncs.com - Slbslb.aliyuncs.com - YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com - Dtsdts.aliyuncs.com - Domaindomain.aliyuncs.com - Otsots-pop.aliyuncs.com - ROSros.aliyuncs.com - Cdncdn.aliyuncs.com - Ramram.aliyuncs.com - Drdsdrds.aliyuncs.com - Rdsrds.aliyuncs.com - OssAdminoss-admin.aliyuncs.com - Location-innerlocation-inner.aliyuncs.com - Yundunyundun-cn-hangzhou.aliyuncs.com - Ossoss-cn-hangzhou.aliyuncs.com - - - - cn-fujian - - Ecsecs-cn-hangzhou.aliyuncs.com - Rdsrds.aliyuncs.com - - - - in-mumbai-alipay - - Ecsecs-cn-hangzhou.aliyuncs.com - - - - us-west-1 - - CScs.aliyuncs.com - COScos.aliyuncs.com - Essess.aliyuncs.com - Ace-opsace-ops.cn-hangzhou.aliyuncs.com - Billingbilling.aliyuncs.com - Dqsdqs.aliyuncs.com - Ddsmongodb.aliyuncs.com - Stssts.aliyuncs.com - Smssms.aliyuncs.com - Jaqjaq.aliyuncs.com - Pushcloudpush.aliyuncs.com - Alidnsalidns.aliyuncs.com - Locationlocation.aliyuncs.com - Msgmsg-inner.aliyuncs.com - ChargingServicechargingservice.aliyuncs.com - Ocsm-kvstore.aliyuncs.com - Bssbss.aliyuncs.com - Mscmsc-inner.aliyuncs.com - R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com - Yundunyundun-cn-hangzhou.aliyuncs.com - Ubsms-innerubsms-inner.aliyuncs.com - Dmdm.aliyuncs.com - Greengreen.aliyuncs.com - Riskrisk-cn-hangzhou.aliyuncs.com - oceanbaseoceanbase.aliyuncs.com - Workorderworkorder.aliyuncs.com - Yundunhsmyundunhsm.aliyuncs.com - Iotiot.aliyuncs.com - Alertalert.aliyuncs.com - Omsoms.aliyuncs.com - livelive.aliyuncs.com - Ecsecs-cn-hangzhou.aliyuncs.com - M-kvstorem-kvstore.aliyuncs.com - Vpcvpc.aliyuncs.com - BatchComputebatchCompute.aliyuncs.com - Aceace.cn-hangzhou.aliyuncs.com - AMSams.aliyuncs.com - ROSros.aliyuncs.com - PTSpts.aliyuncs.com - Qualitycheckqualitycheck.aliyuncs.com - Ubsmsubsms.aliyuncs.com - HighDDosyd-highddos-cn-hangzhou.aliyuncs.com - CmsSiteMonitorsitemonitor.aliyuncs.com - Rdsrds.aliyuncs.com - Mtsmts.us-west-1.aliyuncs.com - CFcf.aliyuncs.com - Acsacs.aliyun-inc.com - Httpdnshttpdns-api.aliyuncs.com - Location-innerlocation-inner.aliyuncs.com - Aasaas.aliyuncs.com - Emremr.aliyuncs.com - HPChpc.aliyuncs.com - Drcdrc.aliyuncs.com - Vpc-innervpc-inner.aliyuncs.com - Cmsmetrics.cn-hangzhou.aliyuncs.com - Slbslb.aliyuncs.com - Crmcrm-cn-hangzhou.aliyuncs.com - Dtsdts.aliyuncs.com - Domaindomain.aliyuncs.com - Otsots-pop.aliyuncs.com - Commondrivercommon.driver.aliyuncs.com - jaqjaq.aliyuncs.com - Cdncdn.aliyuncs.com - Ramram.aliyuncs.com - Drdsdrds.aliyuncs.com - OssAdminoss-admin.aliyuncs.com - Salessales.cn-hangzhou.aliyuncs.com - Onsons.aliyuncs.com - Ossoss-us-west-1.aliyuncs.com - YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com - - - - cn-shanghai-inner - - CScs.aliyuncs.com - COScos.aliyuncs.com - Essess.aliyuncs.com - Billingbilling.aliyuncs.com - Dqsdqs.aliyuncs.com - Ddsmongodb.aliyuncs.com - Emremr.aliyuncs.com - Smssms.aliyuncs.com - Drdsdrds.aliyuncs.com - HPChpc.aliyuncs.com - Locationlocation.aliyuncs.com - ChargingServicechargingservice.aliyuncs.com - Msgmsg-inner.aliyuncs.com - Commondrivercommon.driver.aliyuncs.com - R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com - jaqjaq.aliyuncs.com - Mscmsc-inner.aliyuncs.com - Ocsm-kvstore.aliyuncs.com - Yundunyundun-cn-hangzhou.aliyuncs.com - Ubsms-innerubsms-inner.aliyuncs.com - Dmdm.aliyuncs.com - Greengreen.aliyuncs.com - Riskrisk-cn-hangzhou.aliyuncs.com - oceanbaseoceanbase.aliyuncs.com - Workorderworkorder.aliyuncs.com - Yundunhsmyundunhsm.aliyuncs.com - Iotiot.aliyuncs.com - Bssbss.aliyuncs.com - Omsoms.aliyuncs.com - livelive.aliyuncs.com - Ecsecs-cn-hangzhou.aliyuncs.com - M-kvstorem-kvstore.aliyuncs.com - CmsSiteMonitorsitemonitor.aliyuncs.com - Alertalert.aliyuncs.com - Aceace.cn-hangzhou.aliyuncs.com - AMSams.aliyuncs.com - ROSros.aliyuncs.com - PTSpts.aliyuncs.com - Qualitycheckqualitycheck.aliyuncs.com - Ubsmsubsms.aliyuncs.com - HighDDosyd-highddos-cn-hangzhou.aliyuncs.com - Rdsrds.aliyuncs.com - Mtsmts.cn-shanghai.aliyuncs.com - CFcf.aliyuncs.com - Httpdnshttpdns-api.aliyuncs.com - Location-innerlocation-inner.aliyuncs.com - Aasaas.aliyuncs.com - Stssts.aliyuncs.com - Dtsdts.aliyuncs.com - Drcdrc.aliyuncs.com - Pushcloudpush.aliyuncs.com - Cmsmetrics.aliyuncs.com - Slbslb.aliyuncs.com - YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com - Domaindomain.aliyuncs.com - Otsots-pop.aliyuncs.com - Ossoss-cn-hangzhou.aliyuncs.com - Ramram.aliyuncs.com - Salessales.cn-hangzhou.aliyuncs.com - Crmcrm-cn-hangzhou.aliyuncs.com - OssAdminoss-admin.aliyuncs.com - Alidnsalidns.aliyuncs.com - Onsons.aliyuncs.com - Cdncdn.aliyuncs.com - - - - cn-anhui-gov-1 - - Ecsecs-cn-hangzhou.aliyuncs.com - - - - cn-hangzhou-finance - - Ossoss-cn-hzjbp-b-console.aliyuncs.com - - - - cn-hangzhou - - ARMSarms.cn-hangzhou.aliyuncs.com - CScs.aliyuncs.com - COScos.aliyuncs.com - Essess.aliyuncs.com - Ace-opsace-ops.cn-hangzhou.aliyuncs.com - Billingbilling.aliyuncs.com - Dqsdqs.aliyuncs.com - Ddsmongodb.aliyuncs.com - Stssts.aliyuncs.com - Smssms.aliyuncs.com - Msgmsg-inner.aliyuncs.com - Jaqjaq.aliyuncs.com - Pushcloudpush.aliyuncs.com - Livelive.aliyuncs.com - Kmskms.cn-hangzhou.aliyuncs.com - Locationlocation.aliyuncs.com - Hpchpc.aliyuncs.com - ChargingServicechargingservice.aliyuncs.com - R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com - Alertalert.aliyuncs.com - Mscmsc-inner.aliyuncs.com - Drcdrc.aliyuncs.com - Yundunyundun-cn-hangzhou.aliyuncs.com - Ubsms-innerubsms-inner.aliyuncs.com - Ocsm-kvstore.aliyuncs.com - Dmdm.aliyuncs.com - Greengreen.cn-hangzhou.aliyuncs.com - Commondrivercommon.driver.aliyuncs.com - oceanbaseoceanbase.aliyuncs.com - Workorderworkorder.aliyuncs.com - Yundunhsmyundunhsm.aliyuncs.com - Iotiot.aliyuncs.com - jaqjaq.aliyuncs.com - Omsoms.aliyuncs.com - livelive.aliyuncs.com - Ecsecs-cn-hangzhou.aliyuncs.com - M-kvstorem-kvstore.aliyuncs.com - Vpcvpc.aliyuncs.com - BatchComputebatchCompute.aliyuncs.com - Domaindomain.aliyuncs.com - AMSams.aliyuncs.com - ROSros.aliyuncs.com - PTSpts.aliyuncs.com - Qualitycheckqualitycheck.aliyuncs.com - Ubsmsubsms.aliyuncs.com - Apigatewayapigateway.cn-hangzhou.aliyuncs.com - CloudAPIapigateway.cn-hangzhou.aliyuncs.com - CmsSiteMonitorsitemonitor.aliyuncs.com - Aceace.cn-hangzhou.aliyuncs.com - Mtsmts.cn-hangzhou.aliyuncs.com - Oascn-hangzhou.oas.aliyuncs.com - CFcf.aliyuncs.com - Acsacs.aliyun-inc.com - Httpdnshttpdns-api.aliyuncs.com - Location-innerlocation-inner.aliyuncs.com - Aasaas.aliyuncs.com - Alidnsalidns.aliyuncs.com - HPChpc.aliyuncs.com - Emremr.aliyuncs.com - HighDDosyd-highddos-cn-hangzhou.aliyuncs.com - Vpc-innervpc-inner.aliyuncs.com - Cmsmetrics.cn-hangzhou.aliyuncs.com - Slbslb.aliyuncs.com - Riskrisk-cn-hangzhou.aliyuncs.com - Dtsdts.aliyuncs.com - Bssbss.aliyuncs.com - Otsots-pop.aliyuncs.com - Cdncdn.aliyuncs.com - Ramram.aliyuncs.com - Drdsdrds.aliyuncs.com - Rdsrds.aliyuncs.com - Crmcrm-cn-hangzhou.aliyuncs.com - OssAdminoss-admin.aliyuncs.com - Salessales.cn-hangzhou.aliyuncs.com - Onsons.aliyuncs.com - Ossoss-cn-hangzhou.aliyuncs.com - YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com - - - - cn-beijing-inner - - Riskrisk-cn-hangzhou.aliyuncs.com - COScos.aliyuncs.com - HPChpc.aliyuncs.com - Billingbilling.aliyuncs.com - Dqsdqs.aliyuncs.com - Ddsmongodb.aliyuncs.com - Emremr.aliyuncs.com - Smssms.aliyuncs.com - Drdsdrds.aliyuncs.com - CScs.aliyuncs.com - Locationlocation.aliyuncs.com - ChargingServicechargingservice.aliyuncs.com - Msgmsg-inner.aliyuncs.com - Essess.aliyuncs.com - R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com - Bssbss.aliyuncs.com - Workorderworkorder.aliyuncs.com - Drcdrc.aliyuncs.com - Yundunyundun-cn-hangzhou.aliyuncs.com - Ubsms-innerubsms-inner.aliyuncs.com - Ocsm-kvstore.aliyuncs.com - Dmdm.aliyuncs.com - YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com - oceanbaseoceanbase.aliyuncs.com - Mscmsc-inner.aliyuncs.com - Yundunhsmyundunhsm.aliyuncs.com - Iotiot.aliyuncs.com - jaqjaq.aliyuncs.com - Omsoms.aliyuncs.com - M-kvstorem-kvstore.aliyuncs.com - livelive.aliyuncs.com - Ecsecs-cn-hangzhou.aliyuncs.com - Alertalert.aliyuncs.com - CmsSiteMonitorsitemonitor.aliyuncs.com - Aceace.cn-hangzhou.aliyuncs.com - AMSams.aliyuncs.com - Otsots-pop.aliyuncs.com - PTSpts.aliyuncs.com - Qualitycheckqualitycheck.aliyuncs.com - Ubsmsubsms.aliyuncs.com - Stssts.aliyuncs.com - Rdsrds.aliyuncs.com - Mtsmts.cn-beijing.aliyuncs.com - Location-innerlocation-inner.aliyuncs.com - CFcf.aliyuncs.com - Httpdnshttpdns-api.aliyuncs.com - Greengreen.aliyuncs.com - Aasaas.aliyuncs.com - Alidnsalidns.aliyuncs.com - Pushcloudpush.aliyuncs.com - HighDDosyd-highddos-cn-hangzhou.aliyuncs.com - Cmsmetrics.aliyuncs.com - Slbslb.aliyuncs.com - Commondrivercommon.driver.aliyuncs.com - Dtsdts.aliyuncs.com - Domaindomain.aliyuncs.com - ROSros.aliyuncs.com - Ossoss-cn-hangzhou.aliyuncs.com - Ramram.aliyuncs.com - Salessales.cn-hangzhou.aliyuncs.com - Crmcrm-cn-hangzhou.aliyuncs.com - OssAdminoss-admin.aliyuncs.com - Onsons.aliyuncs.com - Cdncdn.aliyuncs.com - - - - cn-haidian-cm12-c01 - - Ecsecs-cn-hangzhou.aliyuncs.com - Vpcvpc.aliyuncs.com - Rdsrds.aliyuncs.com - - - - cn-anhui-gov - - Ecsecs-cn-hangzhou.aliyuncs.com - Vpcvpc.aliyuncs.com - - - - cn-shenzhen - - ARMSarms.cn-shenzhen.aliyuncs.com - CScs.aliyuncs.com - COScos.aliyuncs.com - Onsons.aliyuncs.com - Essess.aliyuncs.com - Dqsdqs.aliyuncs.com - Ddsmongodb.aliyuncs.com - Alidnsalidns.aliyuncs.com - Smssms.aliyuncs.com - Jaqjaq.aliyuncs.com - Pushcloudpush.aliyuncs.com - Kmskms.cn-shenzhen.aliyuncs.com - Locationlocation.aliyuncs.com - Ocsm-kvstore.aliyuncs.com - Alertalert.aliyuncs.com - Drcdrc.aliyuncs.com - R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com - Yundunyundun-cn-hangzhou.aliyuncs.com - Ubsms-innerubsms-inner.aliyuncs.com - Dmdm.aliyuncs.com - Commondrivercommon.driver.aliyuncs.com - oceanbaseoceanbase.aliyuncs.com - Iotiot.aliyuncs.com - HPChpc.aliyuncs.com - Bssbss.aliyuncs.com - Omsoms.aliyuncs.com - Ubsmsubsms.aliyuncs.com - livelive.aliyuncs.com - Ecsecs-cn-hangzhou.aliyuncs.com - M-kvstorem-kvstore.aliyuncs.com - CmsSiteMonitorsitemonitor.aliyuncs.com - BatchComputebatchcompute.cn-shenzhen.aliyuncs.com - Aceace.cn-hangzhou.aliyuncs.com - ROSros.aliyuncs.com - PTSpts.aliyuncs.com - Ace-opsace-ops.cn-hangzhou.aliyuncs.com - Apigatewayapigateway.cn-shenzhen.aliyuncs.com - CloudAPIapigateway.cn-shenzhen.aliyuncs.com - Stssts.aliyuncs.com - Vpcvpc.aliyuncs.com - Rdsrds.aliyuncs.com - Mtsmts.cn-shenzhen.aliyuncs.com - Oascn-shenzhen.oas.aliyuncs.com - CFcf.aliyuncs.com - Acsacs.aliyun-inc.com - Crmcrm-cn-hangzhou.aliyuncs.com - Location-innerlocation-inner.aliyuncs.com - Aasaas.aliyuncs.com - Emremr.aliyuncs.com - Dtsdts.aliyuncs.com - HighDDosyd-highddos-cn-hangzhou.aliyuncs.com - Vpc-innervpc-inner.aliyuncs.com - Cmsmetrics.cn-hangzhou.aliyuncs.com - Slbslb.aliyuncs.com - Riskrisk-cn-hangzhou.aliyuncs.com - Domaindomain.aliyuncs.com - Otsots-pop.aliyuncs.com - jaqjaq.aliyuncs.com - Cdncdn.aliyuncs.com - Ramram.aliyuncs.com - Drdsdrds.aliyuncs.com - OssAdminoss-admin.aliyuncs.com - Greengreen.aliyuncs.com - Httpdnshttpdns-api.aliyuncs.com - Ossoss-cn-shenzhen.aliyuncs.com - - - - ap-southeast-2 - - Rdsrds.ap-southeast-2.aliyuncs.com - Kmskms.ap-southeast-2.aliyuncs.com - Vpcvpc.ap-southeast-2.aliyuncs.com - Ecsecs.ap-southeast-2.aliyuncs.com - Cmsmetrics.cn-hangzhou.aliyuncs.com - Slbslb.ap-southeast-2.aliyuncs.com - - - - cn-qingdao - - CScs.aliyuncs.com - COScos.aliyuncs.com - HPChpc.aliyuncs.com - Dqsdqs.aliyuncs.com - Ddsmongodb.aliyuncs.com - Emremr.cn-qingdao.aliyuncs.com - Smssms.aliyuncs.com - Jaqjaq.aliyuncs.com - Dtsdts.aliyuncs.com - Locationlocation.aliyuncs.com - Essess.aliyuncs.com - R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com - Alertalert.aliyuncs.com - Drcdrc.aliyuncs.com - Yundunyundun-cn-hangzhou.aliyuncs.com - Ubsms-innerubsms-inner.cn-qingdao.aliyuncs.com - Ocsm-kvstore.aliyuncs.com - Dmdm.aliyuncs.com - Riskrisk-cn-hangzhou.aliyuncs.com - oceanbaseoceanbase.aliyuncs.com - Iotiot.aliyuncs.com - Bssbss.aliyuncs.com - Omsoms.aliyuncs.com - Ubsmsubsms.cn-qingdao.aliyuncs.com - livelive.aliyuncs.com - Ecsecs-cn-hangzhou.aliyuncs.com - M-kvstorem-kvstore.aliyuncs.com - CmsSiteMonitorsitemonitor.aliyuncs.com - BatchComputebatchcompute.cn-qingdao.aliyuncs.com - Aceace.cn-hangzhou.aliyuncs.com - Otsots-pop.aliyuncs.com - PTSpts.aliyuncs.com - Ace-opsace-ops.cn-hangzhou.aliyuncs.com - Apigatewayapigateway.cn-qingdao.aliyuncs.com - CloudAPIapigateway.cn-qingdao.aliyuncs.com - Stssts.aliyuncs.com - Rdsrds.aliyuncs.com - Mtsmts.cn-qingdao.aliyuncs.com - Location-innerlocation-inner.aliyuncs.com - CFcf.aliyuncs.com - Acsacs.aliyun-inc.com - Httpdnshttpdns-api.aliyuncs.com - Greengreen.aliyuncs.com - Aasaas.aliyuncs.com - Alidnsalidns.aliyuncs.com - Pushcloudpush.aliyuncs.com - HighDDosyd-highddos-cn-hangzhou.aliyuncs.com - Vpc-innervpc-inner.aliyuncs.com - Cmsmetrics.cn-hangzhou.aliyuncs.com - Slbslb.aliyuncs.com - Commondrivercommon.driver.aliyuncs.com - Domaindomain.aliyuncs.com - ROSros.aliyuncs.com - jaqjaq.aliyuncs.com - Cdncdn.aliyuncs.com - Ramram.aliyuncs.com - Drdsdrds.aliyuncs.com - Crmcrm-cn-hangzhou.aliyuncs.com - OssAdminoss-admin.aliyuncs.com - Onsons.aliyuncs.com - Ossoss-cn-qingdao.aliyuncs.com - - - - cn-shenzhen-su18-b02 - - Ecsecs-cn-hangzhou.aliyuncs.com - - - - cn-shenzhen-su18-b03 - - Ecsecs-cn-hangzhou.aliyuncs.com - - - - cn-shenzhen-su18-b01 - - Ecsecs-cn-hangzhou.aliyuncs.com - - - - ap-southeast-antgroup-1 - - Ecsecs-cn-hangzhou.aliyuncs.com - - - - oss-cn-bjzwy - - Ossoss-cn-bjzwy.aliyuncs.com - - - - cn-henan-am12001 - - Ecsecs-cn-hangzhou.aliyuncs.com - Vpcvpc.aliyuncs.com - - - - cn-beijing - - ARMSarms.cn-beijing.aliyuncs.com - CScs.aliyuncs.com - COScos.aliyuncs.com - Jaqjaq.aliyuncs.com - Essess.aliyuncs.com - Billingbilling.aliyuncs.com - Dqsdqs.aliyuncs.com - Ddsmongodb.aliyuncs.com - Stssts.aliyuncs.com - Smssms.aliyuncs.com - Msgmsg-inner.aliyuncs.com - Salessales.cn-hangzhou.aliyuncs.com - HPChpc.aliyuncs.com - Oascn-beijing.oas.aliyuncs.com - Locationlocation.aliyuncs.com - Onsons.aliyuncs.com - ChargingServicechargingservice.aliyuncs.com - Hpchpc.aliyuncs.com - Commondrivercommon.driver.aliyuncs.com - Ocsm-kvstore.aliyuncs.com - jaqjaq.aliyuncs.com - Workorderworkorder.aliyuncs.com - R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com - Bssbss.aliyuncs.com - Ubsms-innerubsms-inner.aliyuncs.com - Dmdm.aliyuncs.com - Riskrisk-cn-hangzhou.aliyuncs.com - oceanbaseoceanbase.aliyuncs.com - Mscmsc-inner.aliyuncs.com - Yundunhsmyundunhsm.aliyuncs.com - Iotiot.aliyuncs.com - Alertalert.aliyuncs.com - Omsoms.aliyuncs.com - Ubsmsubsms.aliyuncs.com - livelive.aliyuncs.com - Ecsecs-cn-hangzhou.aliyuncs.com - Ace-opsace-ops.cn-hangzhou.aliyuncs.com - Vpcvpc.aliyuncs.com - BatchComputebatchCompute.aliyuncs.com - AMSams.aliyuncs.com - ROSros.aliyuncs.com - PTSpts.aliyuncs.com - M-kvstorem-kvstore.aliyuncs.com - Apigatewayapigateway.cn-beijing.aliyuncs.com - CloudAPIapigateway.cn-beijing.aliyuncs.com - Kmskms.cn-beijing.aliyuncs.com - HighDDosyd-highddos-cn-hangzhou.aliyuncs.com - CmsSiteMonitorsitemonitor.aliyuncs.com - Aceace.cn-hangzhou.aliyuncs.com - Mtsmts.cn-beijing.aliyuncs.com - CFcf.aliyuncs.com - Acsacs.aliyun-inc.com - Httpdnshttpdns-api.aliyuncs.com - Location-innerlocation-inner.aliyuncs.com - Aasaas.aliyuncs.com - Emremr.aliyuncs.com - Dtsdts.aliyuncs.com - Drcdrc.aliyuncs.com - Pushcloudpush.aliyuncs.com - Cmsmetrics.cn-hangzhou.aliyuncs.com - Slbslb.aliyuncs.com - Crmcrm-cn-hangzhou.aliyuncs.com - Domaindomain.aliyuncs.com - Otsots-pop.aliyuncs.com - Ossoss-cn-beijing.aliyuncs.com - Ramram.aliyuncs.com - Drdsdrds.aliyuncs.com - Vpc-innervpc-inner.aliyuncs.com - Rdsrds.aliyuncs.com - OssAdminoss-admin.aliyuncs.com - Alidnsalidns.aliyuncs.com - Greengreen.aliyuncs.com - Yundunyundun-cn-hangzhou.aliyuncs.com - Cdncdn.aliyuncs.com - YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com - vodvod.cn-beijing.aliyuncs.com - - - - cn-hangzhou-d - - CScs.aliyuncs.com - COScos.aliyuncs.com - Essess.aliyuncs.com - Billingbilling.aliyuncs.com - Dqsdqs.aliyuncs.com - Ddsmongodb.aliyuncs.com - Emremr.aliyuncs.com - Smssms.aliyuncs.com - Salessales.cn-hangzhou.aliyuncs.com - Dtsdts.aliyuncs.com - Locationlocation.aliyuncs.com - Msgmsg-inner.aliyuncs.com - ChargingServicechargingservice.aliyuncs.com - R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com - Bssbss.aliyuncs.com - Mscmsc-inner.aliyuncs.com - Ocsm-kvstore.aliyuncs.com - Yundunyundun-cn-hangzhou.aliyuncs.com - Ubsms-innerubsms-inner.aliyuncs.com - Dmdm.aliyuncs.com - Riskrisk-cn-hangzhou.aliyuncs.com - oceanbaseoceanbase.aliyuncs.com - Workorderworkorder.aliyuncs.com - Alidnsalidns.aliyuncs.com - Iotiot.aliyuncs.com - HPChpc.aliyuncs.com - jaqjaq.aliyuncs.com - Omsoms.aliyuncs.com - livelive.aliyuncs.com - Ecsecs-cn-hangzhou.aliyuncs.com - M-kvstorem-kvstore.aliyuncs.com - CmsSiteMonitorsitemonitor.aliyuncs.com - Alertalert.aliyuncs.com - Aceace.cn-hangzhou.aliyuncs.com - AMSams.aliyuncs.com - Otsots-pop.aliyuncs.com - PTSpts.aliyuncs.com - Qualitycheckqualitycheck.aliyuncs.com - Ubsmsubsms.aliyuncs.com - Rdsrds.aliyuncs.com - Mtsmts.cn-hangzhou.aliyuncs.com - Location-innerlocation-inner.aliyuncs.com - CFcf.aliyuncs.com - Httpdnshttpdns-api.aliyuncs.com - Greengreen.aliyuncs.com - Aasaas.aliyuncs.com - Stssts.aliyuncs.com - Pushcloudpush.aliyuncs.com - HighDDosyd-highddos-cn-hangzhou.aliyuncs.com - Cmsmetrics.aliyuncs.com - Slbslb.aliyuncs.com - YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com - Domaindomain.aliyuncs.com - Commondrivercommon.driver.aliyuncs.com - ROSros.aliyuncs.com - Cdncdn.aliyuncs.com - Ramram.aliyuncs.com - Drdsdrds.aliyuncs.com - Crmcrm-cn-hangzhou.aliyuncs.com - OssAdminoss-admin.aliyuncs.com - Onsons.aliyuncs.com - Yundunhsmyundunhsm.aliyuncs.com - Drcdrc.aliyuncs.com - Ossoss-cn-hangzhou.aliyuncs.com - - - - cn-gansu-am6 - - Ecsecs-cn-hangzhou.aliyuncs.com - Vpcvpc.aliyuncs.com - Rdsrds.aliyuncs.com - - - - cn-ningxiazhongwei - - Ecsecs-cn-hangzhou.aliyuncs.com - Vpcvpc.aliyuncs.com - - - - cn-shanghai-et2-b01 - - CScs.aliyuncs.com - Riskrisk-cn-hangzhou.aliyuncs.com - COScos.aliyuncs.com - Onsons.aliyuncs.com - Essess.aliyuncs.com - Billingbilling.aliyuncs.com - Dqsdqs.aliyuncs.com - Ddsmongodb.aliyuncs.com - Alidnsalidns.aliyuncs.com - Smssms.aliyuncs.com - Jaqjaq.aliyuncs.com - Dtsdts.aliyuncs.com - Locationlocation.aliyuncs.com - Msgmsg-inner.aliyuncs.com - ChargingServicechargingservice.aliyuncs.com - Ocsm-kvstore.aliyuncs.com - Bssbss.aliyuncs.com - Mscmsc-inner.aliyuncs.com - R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com - Yundunyundun-cn-hangzhou.aliyuncs.com - Ubsms-innerubsms-inner.aliyuncs.com - Dmdm.aliyuncs.com - Commondrivercommon.driver.aliyuncs.com - oceanbaseoceanbase.aliyuncs.com - Workorderworkorder.aliyuncs.com - Yundunhsmyundunhsm.aliyuncs.com - Iotiot.aliyuncs.com - jaqjaq.aliyuncs.com - Omsoms.aliyuncs.com - Ubsmsubsms.aliyuncs.com - livelive.aliyuncs.com - Ecsecs-cn-hangzhou.aliyuncs.com - Ace-opsace-ops.cn-hangzhou.aliyuncs.com - CmsSiteMonitorsitemonitor.aliyuncs.com - BatchComputebatchCompute.aliyuncs.com - Aceace.cn-hangzhou.aliyuncs.com - AMSams.aliyuncs.com - Otsots-pop.aliyuncs.com - PTSpts.aliyuncs.com - Qualitycheckqualitycheck.aliyuncs.com - M-kvstorem-kvstore.aliyuncs.com - Rdsrds.aliyuncs.com - Mtsmts.cn-hangzhou.aliyuncs.com - CFcf.aliyuncs.com - Acsacs.aliyun-inc.com - Httpdnshttpdns-api.aliyuncs.com - Location-innerlocation-inner.aliyuncs.com - Aasaas.aliyuncs.com - Stssts.aliyuncs.com - HPChpc.aliyuncs.com - Emremr.aliyuncs.com - HighDDosyd-highddos-cn-hangzhou.aliyuncs.com - Pushcloudpush.aliyuncs.com - Cmsmetrics.aliyuncs.com - Slbslb.aliyuncs.com - Crmcrm-cn-hangzhou.aliyuncs.com - Alertalert.aliyuncs.com - Domaindomain.aliyuncs.com - ROSros.aliyuncs.com - Cdncdn.aliyuncs.com - Ramram.aliyuncs.com - Drdsdrds.aliyuncs.com - Vpc-innervpc-inner.aliyuncs.com - OssAdminoss-admin.aliyuncs.com - Salessales.cn-hangzhou.aliyuncs.com - Greengreen.aliyuncs.com - Drcdrc.aliyuncs.com - Ossoss-cn-hangzhou.aliyuncs.com - YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com - - - - cn-ningxia-am7-c01 - - Ecsecs-cn-hangzhou.aliyuncs.com - Vpcvpc.aliyuncs.com - - - - cn-shenzhen-finance-1 - - Kmskms.cn-shenzhen-finance-1.aliyuncs.com - Ecsecs-cn-hangzhou.aliyuncs.com - Rdsrds.aliyuncs.com - Vpcvpc.aliyuncs.com - - - - ap-southeast-1 - - CScs.aliyuncs.com - Riskrisk-cn-hangzhou.aliyuncs.com - COScos.aliyuncs.com - Essess.aliyuncs.com - Billingbilling.aliyuncs.com - Dqsdqs.aliyuncs.com - Ddsmongodb.aliyuncs.com - Alidnsalidns.aliyuncs.com - Smssms.aliyuncs.com - Drdsdrds.aliyuncs.com - Dtsdts.aliyuncs.com - Kmskms.ap-southeast-1.aliyuncs.com - Locationlocation.aliyuncs.com - Msgmsg-inner.aliyuncs.com - ChargingServicechargingservice.aliyuncs.com - R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com - Alertalert.aliyuncs.com - Mscmsc-inner.aliyuncs.com - HighDDosyd-highddos-cn-hangzhou.aliyuncs.com - Yundunyundun-cn-hangzhou.aliyuncs.com - Ubsms-innerubsms-inner.aliyuncs.com - Ocsm-kvstore.aliyuncs.com - Dmdm.aliyuncs.com - Greengreen.aliyuncs.com - Commondrivercommon.driver.aliyuncs.com - oceanbaseoceanbase.aliyuncs.com - Workorderworkorder.aliyuncs.com - Yundunhsmyundunhsm.aliyuncs.com - Iotiot.aliyuncs.com - HPChpc.aliyuncs.com - jaqjaq.aliyuncs.com - Omsoms.aliyuncs.com - livelive.aliyuncs.com - Ecsecs-cn-hangzhou.aliyuncs.com - M-kvstorem-kvstore.aliyuncs.com - Vpcvpc.aliyuncs.com - BatchComputebatchCompute.aliyuncs.com - AMSams.aliyuncs.com - ROSros.aliyuncs.com - PTSpts.aliyuncs.com - Qualitycheckqualitycheck.aliyuncs.com - Bssbss.aliyuncs.com - Ubsmsubsms.aliyuncs.com - Apigatewayapigateway.ap-southeast-1.aliyuncs.com - CloudAPIapigateway.ap-southeast-1.aliyuncs.com - Stssts.aliyuncs.com - CmsSiteMonitorsitemonitor.aliyuncs.com - Aceace.cn-hangzhou.aliyuncs.com - Mtsmts.ap-southeast-1.aliyuncs.com - CFcf.aliyuncs.com - Crmcrm-cn-hangzhou.aliyuncs.com - Location-innerlocation-inner.aliyuncs.com - Aasaas.aliyuncs.com - Emremr.aliyuncs.com - Httpdnshttpdns-api.aliyuncs.com - Drcdrc.aliyuncs.com - Pushcloudpush.aliyuncs.com - Cmsmetrics.cn-hangzhou.aliyuncs.com - Slbslb.aliyuncs.com - YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com - Domaindomain.aliyuncs.com - Otsots-pop.aliyuncs.com - Cdncdn.aliyuncs.com - Ramram.aliyuncs.com - Salessales.cn-hangzhou.aliyuncs.com - Rdsrds.aliyuncs.com - OssAdminoss-admin.aliyuncs.com - Onsons.aliyuncs.com - Ossoss-ap-southeast-1.aliyuncs.com - - - - cn-shenzhen-st4-d01 - - Ecsecs-cn-hangzhou.aliyuncs.com - - - - eu-central-1 - - Rdsrds.eu-central-1.aliyuncs.com - Ecsecs.eu-central-1.aliyuncs.com - Vpcvpc.eu-central-1.aliyuncs.com - Kmskms.eu-central-1.aliyuncs.com - Cmsmetrics.cn-hangzhou.aliyuncs.com - Slbslb.eu-central-1.aliyuncs.com - - - - cn-zhangjiakou - - Rdsrds.cn-zhangjiakou.aliyuncs.com - Ecsecs.cn-zhangjiakou.aliyuncs.com - Vpcvpc.cn-zhangjiakou.aliyuncs.com - Cmsmetrics.cn-hangzhou.aliyuncs.com - Slbslb.cn-zhangjiakou.aliyuncs.com - - - diff --git a/sdk/aliyun-php-sdk-core/RoaAcsRequest.php b/sdk/aliyun-php-sdk-core/RoaAcsRequest.php deleted file mode 100755 index 9c538f6..0000000 --- a/sdk/aliyun-php-sdk-core/RoaAcsRequest.php +++ /dev/null @@ -1,204 +0,0 @@ -setVersion($version); - $this->initialize(); - } - - private function initialize() - { - $this->setMethod("RAW"); - } - - public function composeUrl($iSigner, $credential, $domain) - { - $this->prepareHeader($iSigner); - - $signString = $this->getMethod().self::$headerSeparator; - if (isset($this->headers["Accept"])) { - $signString = $signString.$this->headers["Accept"]; - } - $signString = $signString.self::$headerSeparator; - - if (isset($this->headers["Content-MD5"])) { - $signString = $signString.$this->headers["Content-MD5"]; - } - $signString = $signString.self::$headerSeparator; - - if (isset($this->headers["Content-Type"])) { - $signString = $signString.$this->headers["Content-Type"]; - } - $signString = $signString.self::$headerSeparator; - - if (isset($this->headers["Date"])) { - $signString = $signString.$this->headers["Date"]; - } - $signString = $signString.self::$headerSeparator; - - $uri = $this->replaceOccupiedParameters(); - $signString = $signString.$this->buildCanonicalHeaders(); - $queryString = $this->buildQueryString($uri); - $signString .= $queryString; - $this->headers["Authorization"] = "acs ".$credential->getAccessKeyId().":" - .$iSigner->signString($signString, $credential->getAccessSecret()); - $requestUrl = $this->getProtocol()."://".$domain.$queryString; - return $requestUrl; - } - - private function prepareHeader($iSigner) - { - date_default_timezone_set("GMT"); - $this->headers["Date"] = date($this->dateTimeFormat); - if (null == $this->acceptFormat) { - $this->acceptFormat = "RAW"; - } - $this->headers["Accept"] = $this->formatToAccept($this->getAcceptFormat()); - $this->headers["x-acs-signature-method"] = $iSigner->getSignatureMethod(); - $this->headers["x-acs-signature-version"] = $iSigner->getSignatureVersion(); - $this->headers["x-acs-region-id"] = $this->regionId; - $content = $this->getDomainParameter(); - if ($content != null) { - $this->headers["Content-MD5"] = base64_encode(md5(json_encode($content), true)); - } - $this->headers["Content-Type"] = "application/octet-stream;charset=utf-8"; - } - - private function replaceOccupiedParameters() - { - $result = $this->uriPattern; - foreach ($this->pathParameters as $pathParameterKey => $apiParameterValue) { - $target = "[".$pathParameterKey."]"; - $result = str_replace($target, $apiParameterValue, $result); - } - return $result; - } - - private function buildCanonicalHeaders() - { - $sortMap = array(); - foreach ($this->headers as $headerKey => $headerValue) { - $key = strtolower($headerKey); - if (strpos($key, "x-acs-") === 0) { - $sortMap[$key] = $headerValue; - } - } - ksort($sortMap); - $headerString = ""; - foreach ($sortMap as $sortMapKey => $sortMapValue) { - $headerString = $headerString.$sortMapKey.":".$sortMapValue.self::$headerSeparator; - } - return $headerString; - } - - private function splitSubResource($uri) - { - $queIndex = strpos($uri, "?"); - $uriParts = array(); - if (null != $queIndex) { - array_push($uriParts, substr($uri, 0, $queIndex)); - array_push($uriParts, substr($uri, $queIndex+1)); - } else { - array_push($uriParts, $uri); - } - return $uriParts; - } - - private function buildQueryString($uri) - { - $uriParts = $this->splitSubResource($uri); - $sortMap = $this->queryParameters; - if (isset($uriParts[1])) { - $sortMap[$uriParts[1]] = null; - } - $queryString = $uriParts[0]; - if (count($uriParts)) { - $queryString = $queryString."?"; - } - ksort($sortMap); - foreach ($sortMap as $sortMapKey => $sortMapValue) { - $queryString = $queryString.$sortMapKey; - if (isset($sortMapValue)) { - $queryString = $queryString."=".$sortMapValue; - } - $queryString = $queryString.$querySeprator; - } - if (null==count($sortMap)) { - $queryString = substr($queryString, 0, strlen($queryString)-1); - } - return $queryString; - } - - private function formatToAccept($acceptFormat) - { - if ($acceptFormat == "JSON") { - return "application/json"; - } elseif ($acceptFormat == "XML") { - return "application/xml"; - } - return "application/octet-stream"; - } - - public function getPathParameters() - { - return $this->pathParameters; - } - - public function putPathParameter($name, $value) - { - $this->pathParameters[$name] = $value; - } - - public function getDomainParameter() - { - return $this->domainParameters; - } - - public function putDomainParameters($name, $value) - { - $this->domainParameters[$name] = $value; - } - - public function getUriPattern() - { - return $this->uriPattern; - } - - public function setUriPattern($uriPattern) - { - return $this->uriPattern = $uriPattern; - } - - public function setVersion($version) - { - $this->version = $version; - $this->headers["x-acs-version"] = $version; - } -} diff --git a/sdk/aliyun-php-sdk-core/RpcAcsRequest.php b/sdk/aliyun-php-sdk-core/RpcAcsRequest.php deleted file mode 100755 index 9c2cfdd..0000000 --- a/sdk/aliyun-php-sdk-core/RpcAcsRequest.php +++ /dev/null @@ -1,114 +0,0 @@ -initialize(); - } - - private function initialize() - { - $this->setMethod("GET"); - $this->setAcceptFormat("JSON"); - } - - private function prepareValue($value) - { - if (is_bool($value)) { - if ($value) { - return "true"; - } else { - return "false"; - } - } else { - return $value; - } - } - - public function composeUrl($iSigner, $credential, $domain) - { - $apiParams = parent::getQueryParameters(); - foreach ($apiParams as $key => $value) { - $apiParams[$key] = $this->prepareValue($value); - } - $apiParams["RegionId"] = $this->getRegionId(); - $apiParams["AccessKeyId"] = $credential->getAccessKeyId(); - $apiParams["Format"] = $this->getAcceptFormat(); - $apiParams["SignatureMethod"] = $iSigner->getSignatureMethod(); - $apiParams["SignatureVersion"] = $iSigner->getSignatureVersion(); - $apiParams["SignatureNonce"] = uniqid(); - date_default_timezone_set("GMT"); - $apiParams["Timestamp"] = date($this->dateTimeFormat); - $apiParams["Action"] = $this->getActionName(); - $apiParams["Version"] = $this->getVersion(); - $apiParams["Signature"] = $this->computeSignature($apiParams, $credential->getAccessSecret(), $iSigner); - if (parent::getMethod() == "POST") { - $requestUrl = $this->getProtocol()."://". $domain . "/"; - foreach ($apiParams as $apiParamKey => $apiParamValue) { - $this->putDomainParameters($apiParamKey, $apiParamValue); - } - return $requestUrl; - } else { - $requestUrl = $this->getProtocol()."://". $domain . "/?"; - - foreach ($apiParams as $apiParamKey => $apiParamValue) { - $requestUrl .= "$apiParamKey=" . urlencode($apiParamValue) . "&"; - } - return substr($requestUrl, 0, -1); - } - } - - private function computeSignature($parameters, $accessKeySecret, $iSigner) - { - ksort($parameters); - $canonicalizedQueryString = ''; - foreach ($parameters as $key => $value) { - $canonicalizedQueryString .= '&' . $this->percentEncode($key). '=' . $this->percentEncode($value); - } - $stringToSign = parent::getMethod().'&%2F&' . $this->percentencode(substr($canonicalizedQueryString, 1)); - $signature = $iSigner->signString($stringToSign, $accessKeySecret."&"); - - return $signature; - } - - protected function percentEncode($str) - { - $res = urlencode($str); - $res = preg_replace('/\+/', '%20', $res); - $res = preg_replace('/\*/', '%2A', $res); - $res = preg_replace('/%7E/', '~', $res); - return $res; - } - - public function getDomainParameter() - { - return $this->domainParameters; - } - - public function putDomainParameters($name, $value) - { - $this->domainParameters[$name] = $value; - } -} diff --git a/sdk/aliyun-php-sdk-core/UnitTest/Auth/CredentialTest.php b/sdk/aliyun-php-sdk-core/UnitTest/Auth/CredentialTest.php deleted file mode 100755 index 5144140..0000000 --- a/sdk/aliyun-php-sdk-core/UnitTest/Auth/CredentialTest.php +++ /dev/null @@ -1,35 +0,0 @@ -assertEquals("accessKeyId", $credential->getAccessKeyId()); - $this->assertEquals("accessSecret", $credential->getAccessSecret()); - $this->assertNotNull($credential->getRefreshDate()); - - $dateNow = date("Y-m-d\TH:i:s\Z"); - $credential->setExpiredDate(1); - $this->assertNotNull($credential->getExpiredDate()); - $this->assertTrue($credential->getExpiredDate() > $dateNow); - } -} diff --git a/sdk/aliyun-php-sdk-core/UnitTest/Auth/ShaHmac1SignerTest.php b/sdk/aliyun-php-sdk-core/UnitTest/Auth/ShaHmac1SignerTest.php deleted file mode 100755 index 129dac7..0000000 --- a/sdk/aliyun-php-sdk-core/UnitTest/Auth/ShaHmac1SignerTest.php +++ /dev/null @@ -1,28 +0,0 @@ -assertEquals("33nmIV5/p6kG/64eLXNljJ5vw84=", $signer->signString("this is a ShaHmac1 test.", "accessSecret")); - } -} diff --git a/sdk/aliyun-php-sdk-core/UnitTest/Auth/ShaHmac256SignerTest.php b/sdk/aliyun-php-sdk-core/UnitTest/Auth/ShaHmac256SignerTest.php deleted file mode 100755 index 09fbb29..0000000 --- a/sdk/aliyun-php-sdk-core/UnitTest/Auth/ShaHmac256SignerTest.php +++ /dev/null @@ -1,30 +0,0 @@ -assertEquals("TpF1lE/avV9EHGWGg9Vo/QTd2bLRwFCk9jjo56uRbCo=", - $signer->signString("this is a ShaHmac256 test.", "accessSecret")); - } -} diff --git a/sdk/aliyun-php-sdk-core/UnitTest/BaseTest.php b/sdk/aliyun-php-sdk-core/UnitTest/BaseTest.php deleted file mode 100755 index 2c13741..0000000 --- a/sdk/aliyun-php-sdk-core/UnitTest/BaseTest.php +++ /dev/null @@ -1,40 +0,0 @@ -client = new DefaultAcsClient($iClientProfile); - } - - public function getProperty($propertyKey) - { - $accessKey = ""; - $accessSecret = ""; - $iClientProfile = DefaultProfile::getProfile("cn-hangzhou", "AccessKey", "AccessSecret"); - } -} diff --git a/sdk/aliyun-php-sdk-core/UnitTest/BatchCompute/ListImagesRequest.php b/sdk/aliyun-php-sdk-core/UnitTest/BatchCompute/ListImagesRequest.php deleted file mode 100755 index 98d4ccd..0000000 --- a/sdk/aliyun-php-sdk-core/UnitTest/BatchCompute/ListImagesRequest.php +++ /dev/null @@ -1,30 +0,0 @@ -setUriPattern("/images"); - $this->setMethod("GET"); - } -} diff --git a/sdk/aliyun-php-sdk-core/UnitTest/DefaultAcsClientTest.php b/sdk/aliyun-php-sdk-core/UnitTest/DefaultAcsClientTest.php deleted file mode 100755 index a981d62..0000000 --- a/sdk/aliyun-php-sdk-core/UnitTest/DefaultAcsClientTest.php +++ /dev/null @@ -1,42 +0,0 @@ -client->doAction($request); - - $this->assertNotNull($response->RequestId); - $this->assertNotNull($response->Regions->Region[0]->LocalName); - $this->assertNotNull($response->Regions->Region[0]->RegionId); - } - - public function testDoActionROA() - { - $request = new BC\ListImagesRequest(); - $response = $this->client->doAction($request); - $this->assertNotNull($response); - } -} diff --git a/sdk/aliyun-php-sdk-core/UnitTest/Ecs/Rquest/DescribeRegionsRequest.php b/sdk/aliyun-php-sdk-core/UnitTest/Ecs/Rquest/DescribeRegionsRequest.php deleted file mode 100755 index a3463a1..0000000 --- a/sdk/aliyun-php-sdk-core/UnitTest/Ecs/Rquest/DescribeRegionsRequest.php +++ /dev/null @@ -1,80 +0,0 @@ -ownerId; - } - - public function setOwnerId($ownerId) - { - $this->ownerId = $ownerId; - $this->queryParameters["OwnerId"]=$ownerId; - } - - public function getResourceOwnerAccount() - { - return $this->resourceOwnerAccount; - } - - public function setResourceOwnerAccount($resourceOwnerAccount) - { - $this->resourceOwnerAccount = $resourceOwnerAccount; - $this->queryParameters["ResourceOwnerAccount"]=$resourceOwnerAccount; - } - - public function getResourceOwnerId() - { - return $this->resourceOwnerId; - } - - public function setResourceOwnerId($resourceOwnerId) - { - $this->resourceOwnerId = $resourceOwnerId; - $this->queryParameters["ResourceOwnerId"]=$resourceOwnerId; - } - - public function getOwnerAccount() - { - return $this->ownerAccount; - } - - public function setOwnerAccount($ownerAccount) - { - $this->ownerAccount = $ownerAccount; - $this->queryParameters["OwnerAccount"]=$ownerAccount; - } -} diff --git a/sdk/aliyun-php-sdk-core/UnitTest/Http/HttpHelperTest.php b/sdk/aliyun-php-sdk-core/UnitTest/Http/HttpHelperTest.php deleted file mode 100755 index 5570d16..0000000 --- a/sdk/aliyun-php-sdk-core/UnitTest/Http/HttpHelperTest.php +++ /dev/null @@ -1,29 +0,0 @@ -assertEquals(400, $httpResponse->getStatus()); - $this->assertNotNull($httpResponse->getBody()); - } -} diff --git a/sdk/aliyun-php-sdk-core/UnitTest/Profile/DefaultProfileTest.php b/sdk/aliyun-php-sdk-core/UnitTest/Profile/DefaultProfileTest.php deleted file mode 100755 index 2836d12..0000000 --- a/sdk/aliyun-php-sdk-core/UnitTest/Profile/DefaultProfileTest.php +++ /dev/null @@ -1,60 +0,0 @@ -assertEquals("cn-hangzhou", $profile->getRegionId()); - $this->assertEquals("accessId", $profile->getCredential()->getAccessKeyId()); - $this->assertEquals("accessSecret", $profile->getCredential()->getAccessSecret()); - } - - public function testAddEndpoint() - { - $profile = DefaultProfile::getProfile("cn-hangzhou", "accessId", "accessSecret"); - $profile->addEndpoint("cn-hangzhou", "cn-hangzhou", "TestProduct", "testproduct.aliyuncs.com"); - $endpoints = $profile->getEndpoints(); - foreach ($endpoints as $key => $endpoint) { - if ("cn-hangzhou" == $endpoint->getName()) { - $regionIds = $endpoint->getRegionIds(); - $this->assertContains("cn-hangzhou", $regionIds); - - $productDomains= $endpoint->getProductDomains(); - $this->assertNotNull($productDomains); - $productDomain = $this->getProductDomain($productDomains); - $this->assertNotNull($productDomain); - $this->assertEquals("TestProduct", $productDomain->getProductName()); - $this->assertEquals("testproduct.aliyuncs.com", $productDomain->getDomainName()); - } - } - } - - private function getProductDomain($productDomains) - { - foreach ($productDomains as $productDomain) { - if ($productDomain->getProductName() == "TestProduct") { - return $productDomain; - } - } - return null; - } -} diff --git a/sdk/aliyun-php-sdk-core/UnitTest/Regions/EndPointByLocationTest.php b/sdk/aliyun-php-sdk-core/UnitTest/Regions/EndPointByLocationTest.php deleted file mode 100755 index e592200..0000000 --- a/sdk/aliyun-php-sdk-core/UnitTest/Regions/EndPointByLocationTest.php +++ /dev/null @@ -1,46 +0,0 @@ -clientProfile = DefaultProfile::getProfile( - "cn-shanghai", # 您的 Region ID - "", # 您的 Access Key ID - "" # 您的 Access Key Secret - ); - - $this->locationService = new LocationService($this->clientProfile); - } - - public function testFindProductDomain() - { - $this->initClient(); - $domain = $this->locationService->findProductDomain("cn-shanghai", "apigateway", "openAPI", "CloudAPI"); - $this->assertEquals("apigateway.cn-shanghai.aliyuncs.com", $domain); - } - - public function testFindProductDomainWithAddEndPoint() - { - DefaultProfile::addEndpoint("cn-shanghai", "cn-shanghai", "CloudAPI", "apigateway.cn-shanghai123.aliyuncs.com"); - $this->initClient(); - $domain = $this->locationService->findProductDomain("cn-shanghai", "apigateway", "openAPI", "CloudAPI"); - $this->assertEquals("apigateway.cn-shanghai123.aliyuncs.com", $domain); - } - -} diff --git a/sdk/aliyun-php-sdk-core/UnitTest/Regions/EndpointProviderTest.php b/sdk/aliyun-php-sdk-core/UnitTest/Regions/EndpointProviderTest.php deleted file mode 100755 index c6e0fcf..0000000 --- a/sdk/aliyun-php-sdk-core/UnitTest/Regions/EndpointProviderTest.php +++ /dev/null @@ -1,28 +0,0 @@ -assertEquals("ecs.aliyuncs.com", EndpointProvider::findProductDomain("cn-hangzhou", "Ecs")); - } -} diff --git a/src/Api.php b/src/Api.php index fae7ba0..c5115f0 100644 --- a/src/Api.php +++ b/src/Api.php @@ -1,7 +1,7 @@ [ + 'methods' => WP_REST_Server::CREATABLE, + 'callback' => 'do_refresh' + ], + 'quota' => [ + 'methods' => WP_REST_Server::READABLE, + 'callback' => 'get_quota' + ] + ]; function __construct() { - self::init(); - add_action( 'wp_ajax_aliyun_cdn_helper', array( $this, 'aliyun_cdn_helper' ) ); + add_filter( 'rest_api_init', [ $this, 'init' ] ); + } + + public function init() { + foreach ( self::routes as $url => $route ) { + register_rest_route( self::REST_NAMESPACE, $url, [ + 'methods' => $route['methods'], + 'permission_callback' => [ $this, 'privileged_permission_callback' ], + 'callback' => [ $this, $route['callback'] ] + ] ); + } + } + + public static function privileged_permission_callback() { + return current_user_can( 'level_10' ); } - private static function init() { - self::$option = Config::$options; - self::$profile = \DefaultProfile::getProfile( 'cn-hangzhou', Config::$accessKeyId, Config::$accessKeySecret ); - self::$client = new \DefaultAcsClient( self::$profile ); - self::$refresh = new \Cdn\Request\V20141111\RefreshObjectCachesRequest(); - self::$push = new \Cdn\Request\V20141111\PushObjectCacheRequest(); - self::$Quota = new \Cdn\Request\V20141111\DescribeRefreshQuotaRequest(); - self::$Quota->setMethod( "GET" ); - self::$Quota = self::$client->getAcsResponse( self::$Quota ); + public static function build_request( $action, $query = [] ) { + AlibabaCloud::accessKeyClient( Config::$accessKeyId, Config::$accessKeySecret ) + ->regionId( 'cn-hangzhou' ) + ->asDefaultClient(); + + $query = array_merge( [ 'RegionId' => "cn-hangzhou" ], $query ); + + return AlibabaCloud::rpc() + ->product( 'Cdn' ) + ->scheme( 'https' ) // https | http + ->version( '2018-05-10' ) + ->action( $action ) + ->method( 'POST' ) + ->host( 'cdn.aliyuncs.com' ) + ->options( [ + 'query' => $query, + ] ) + ->request()->toArray(); } - public function aliyun_cdn_helper() { - $module = isset( $_REQUEST['module'] ) ? $_REQUEST['module'] : ''; + public static function do_refresh() { + if ( ! Config::is_configured() ) { + return [ + 'status' => 406, + 'message' => __( 'Please check whether the Access Key ID and Access key Secret are entered correctly.', Config::identifier ) + ]; + } + $type = $_REQUEST['type'] ?? Config::$refresh_type ?? 1; $theme_url = get_stylesheet_directory_uri(); - $style = $theme_url . "/style.css"; - $stylesheet = $theme_url . "/"; - $object_type = ''; - switch ( $module ) { + $obj_type = 'Directory'; + switch ( $type ) { + default: case 1: - switch ( self::$option['refresh_type'] ) { - default: - case 1: - // 当前主题的样式表 - $urls = $style; - break; - case 2: - // 当前主题 - $urls = $stylesheet; - $object_type = 'Directory'; - break; - case 3: - // 全站 - $urls = site_url() . '/'; - $object_type = 'Directory'; - break; - } - $custom_url = self::$option['custom_urls']; - if ( $custom_url ) { - $urls = array( $urls ); - $custom_url = explode( "\n", $custom_url ); - $urls = array_merge( $urls, $custom_url ); - } - $this->do_refresh( $urls, $object_type ); - exit(); + $url = $theme_url . '/style.css'; + $obj_type = 'File'; + $msg = __( 'Refresh the style.css and custom urls success!', Config::identifier ); break; case 2: - $urls = Helper::get_file_list( get_stylesheet_directory() ); - $this->do_push( $urls ); - exit(); + $url = $theme_url . '/'; + $msg = __( 'Refresh the theme url and custom urls success!', Config::identifier ); break; case 3: - $custom_url = self::$option['custom_urls']; - $custom_url = explode( "\n", $custom_url ); - $this->do_refresh( $custom_url ); - exit(); + $url = site_url() . '/'; + $msg = __( 'Refresh the site url and custom urls success!', Config::identifier ); break; case 5: - $this->get_quota(); - exit(); + $url = Config::$custom_urls; + $msg = __( 'Refresh custom urls success!', Config::identifier ); break; } - } - - /** - * 处理刷新 - * - * @param $urls - */ - public function do_refresh( $urls, $object_type = '' ) { try { - $this->handle( $urls, 'refresh', $object_type ); - } catch ( \ServerException $e ) { - $this->response( 2, sprintf( __( "Fail to refresh!\nError message: %s", "aliyun-cdn" ), $e->getErrorMessage() ) ); + $result = self::build_request( + 'RefreshObjectCaches', + [ + 'ObjectPath' => $url, + 'ObjectType' => $obj_type + ] ); + + return [ + 'status' => 200, + 'message' => $msg + ]; + } catch ( ClientException $e ) { + return [ + 'status' => 500, + 'message' => sprintf( __( 'Fail to refresh, error message: %s', Config::identifier ), $e->getErrorMessage() ) + ]; + } catch ( ServerException $e ) { + return [ + 'status' => 500, + 'message' => sprintf( __( 'Fail to refresh, error message: %s', Config::identifier ), $e->getErrorMessage() ) + ]; } - } - /** - * 处理预热 - * - * @param $urls - */ - public function do_push( $urls ) { - try { - $this->handle( $urls, 'push' ); - } catch ( \ServerException $e ) { - $this->response( 2, sprintf( __( "Fail to push!\nError message: %s", "aliyun-cdn" ), $e->getErrorMessage() ) ); - } } - private function handle( $urls, $type, $object_type = '' ) { - $requestId = ''; - $desc = ''; - - if ( $type == 'refresh' ) { - $requestId = 'RefreshTaskId'; - $qa = 'UrlRemain'; - $desc = __( 'Refresh', 'aliyun-cdn' ); - } else { - $requestId = 'RequestId'; - $desc = __( 'Push', 'aliyun-cdn' ); - $qa = 'PreloadRemain'; - } - - if ( self::$Quota->$qa > 0 ) { - - if ( is_array( $urls ) ) { - foreach ( $urls as $url) - { - self::$$type->setObjectPath( $url ); - $result = self::$client->getAcsResponse( self::$$type ); - $success = $result->$requestId ? 1 : 0; - } - } else { - self::$$type->setObjectPath( $urls ); - $object_type && self::$$type->setObjectType( 'Directory' ); - $result = self::$client->getAcsResponse( self::$$type ); - $success = $result->$requestId ? 1 : 0; - } - - if ( $success ) { - $this->response( 1, $desc . __( ' success!', 'aliyun-cdn' ) ); - - } - } else { - $this->response( 3, __( 'Today\'s refresh (push) has reached the maximum number of operations!', 'aliyun-cdn' ) ); - } - } - - public function get_quota() { + public static function get_quota() { try { - $Quota = self::$Quota; - $html = sprintf( __( 'Notice: You can submit a maximum daily refresh-type request amount of URL: %s, amount of directory: %s, push-type request amount of URL: %s.
Today you can refresh URL: %s times, directory: %s times.
Today you can push URL: %s times.', 'aliyun-cdn' ), $Quota->UrlQuota, $Quota->DirQuota, $Quota->PreloadQuota, $Quota->UrlRemain, $Quota->DirRemain, $Quota->PreloadRemain ); - $this->response( 1, $html ); - } catch ( \ServerException $e ) { - $this->response( 2, $e->setErrorMessage() ); - $this->response( 2, $e->setErrorMessage() ); + $result = self::build_request( 'DescribeRefreshQuota' ); + + $data = [ + 'status' => 200, + 'message' => sprintf( __( 'You can refresh %s files and %s directories today.', Config::identifier ), + $result['UrlRemain'], $result['DirRemain'] ) + ]; + } catch ( ClientException $e ) { + return [ + 'status' => 500, + 'message' => sprintf( __( 'Fail to get quota, error message: %s', Config::identifier ), $e->getErrorMessage() ) + ]; + } catch ( ServerException $e ) { + return [ + 'status' => 500, + 'message' => sprintf( __( 'Fail to get quota, error message: %s', Config::identifier ), $e->getErrorMessage() ) + ]; } + return $data; } - - /** - * 响应请求 - * - * @param $status - * @param $message - */ - private function response( $status, $message ) { - header( "Content-Type: application/json" ); - $array = array( - 'status' => $status, - 'message' => $message - ); - echo json_encode( $array ); - } - -} +} \ No newline at end of file diff --git a/src/Config.php b/src/Config.php index a44b728..79224f9 100644 --- a/src/Config.php +++ b/src/Config.php @@ -1,6 +1,6 @@ '', 'sk' => '', 'refresh_type' => 1, 'custom_urls' => '' - ); + ]; - public static $options = ''; - public static $plugin_path = 'aliyun-cdn'; - public static $settings_url = "options-general.php?page=jacky-alicdn-helper"; + public static $options = []; + public static $plugin_path = self::identifier; + public static $settings_url = "options-general.php?page=" . self::identifier; public static function init( $plugin_path = "" ) { $plugin_path && self::$plugin_path = plugin_basename( $plugin_path ); - self::$options = array_merge( self::$originOptions, get_option( 'alicdn_options', array() ) ); + self::$options = array_merge( self::$originOptions, get_option( self::option_name, [] ) ); + self::update(); + } + + public static function is_configured() { + return self::$accessKeyId && self::$accessKeySecret; + } + + public static function update() { self::$accessKeyId = self::$options['ak']; self::$accessKeySecret = self::$options['sk']; + self::$refresh_type = self::$options['refresh_type']; + self::$custom_urls = self::$options['custom_urls']; } } diff --git a/src/Helper.php b/src/Helper.php deleted file mode 100644 index abd420f..0000000 --- a/src/Helper.php +++ /dev/null @@ -1,59 +0,0 @@ -read() ) { - if ( $file != '.' && $file != '..' ) { - self::search_dir( $path . '/' . $file, $list ); - } - } - $dp->close(); - } - if ( is_file( $path ) ) { - $ext = self::get_extension( $path ); - $include = array('css', 'js'); - if ( in_array( $ext, $include ) ) { - /* 将绝对路径替换为 URL 形式 */ - $path = str_replace( ABSPATH, site_url() . '/', $path ); - $list[] = $path; - } - } - } - - public static function get_file_list( $dir ) { - $list = array(); - self::search_dir( $dir, $list ); - - return $list; - } - -} diff --git a/src/Init.php b/src/Init.php index 158b498..742a619 100644 --- a/src/Init.php +++ b/src/Init.php @@ -1,6 +1,6 @@ add_menu( array( - 'id' => 'alicdn_shortcut', - 'title' => __( 'Refresh CDN', 'aliyun-cdn' ), + 'id' => 'aliyun_cdn_shortcut', + 'title' => __( 'Refresh CDN', Config::identifier ), 'href' => '#', - 'meta' => array( 'onclick' => 'refresh_alicdn()' ) + 'meta' => [ 'onclick' => 'do_refresh()' ] ) ); } /* Ajax 请求 */ public static function button_javascript() { - echo ""; + require ALIYUN_CDN_PATH . '/view/button_javascript.php'; } /* 加载提示框 css & js */ @@ -98,4 +60,5 @@ public function warning() { echo sprintf( $html, Config::$settings_url ); } + } diff --git a/src/Settings.php b/src/Settings.php index 0677873..37edb43 100644 --- a/src/Settings.php +++ b/src/Settings.php @@ -26,38 +26,38 @@ class Settings { private $client; function __construct() { - add_action( 'admin_menu', array( $this, 'add_admin_menu' ) ); + add_action( 'admin_menu', [ $this, 'add_admin_menu' ] ); } public function add_admin_menu() { - add_options_page( __( 'Alibaba Cloud CDN', 'aliyun-cdn' ), - __( 'Alibaba Cloud CDN', 'aliyun-cdn' ), 'administrator', - 'jacky-alicdn-helper', - array( $this, 'settings_page' ) ); + add_options_page( __( 'Alibaba Cloud CDN', Config::identifier ), + __( 'Alibaba Cloud CDN', Config::identifier ), 'administrator', + 'aliyun-cdn-helper', + [ $this, 'settings_page' ] ); } public function settings_page() { if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) { - $this->handle_sumbit(); + $this->handle_submit(); } require ALIYUN_CDN_PATH . '/view/settings.php'; } - private function handle_sumbit() { + private function handle_submit() { try { - $options = get_option( 'alicdn_options', array() ); - isset( $_POST['access_key_id'] ) && $options['ak'] = trim( $_POST['access_key_id'] ); - empty( $_POST['access_key_secret'] ) || $options['sk'] = trim( $_POST['access_key_secret'] ); - isset( $_POST['refresh_type'] ) && $options['refresh_type'] = (int) $_POST['refresh_type']; - isset( $_POST['custom_urls'] ) && $options['custom_urls'] = trim( $_POST['custom_urls'] ); + isset( $_POST['access_key_id'] ) && Config::$options['ak'] = trim( $_POST['access_key_id'] ); + empty( $_POST['access_key_secret'] ) || Config::$options['sk'] = trim( $_POST['access_key_secret'] ); + isset( $_POST['refresh_type'] ) && Config::$options['refresh_type'] = (int) $_POST['refresh_type']; + isset( $_POST['custom_urls'] ) && Config::$options['custom_urls'] = trim( $_POST['custom_urls'] ); - update_option( 'alicdn_options', $options ); - $msg = '

' . __( 'Configuration saved successfully', 'aliyun-cdn' ) . '

'; + update_option( Config::option_name, Config::$options ); + Config::update(); + $msg = '

' . __( 'Configuration saved successfully', Config::identifier ) . '

'; } catch ( \Exception $e ) { - $msg = '

' . sprintf( __( 'Fail to save configuration, error message: %s', 'aliyun-cdn' ), $e->getMessage() ) . '

'; + $msg = '

' . sprintf( __( 'Fail to save configuration, error message: %s', Config::identifier ), $e->getMessage() ) . '

'; } echo $msg; diff --git a/uninstall.php b/uninstall.php index 956dda2..cd57253 100644 --- a/uninstall.php +++ b/uninstall.php @@ -1,6 +1,6 @@ =5.5", + "ext-json": "*" + }, + "require-dev": { + "phpunit/phpunit": "^4.0|^5.0|^6.0", + "squizlabs/php_codesniffer": "^3.0" + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Adbar\\": "src" + } + } +} diff --git a/vendor/adbario/php-dot-notation/src/Dot.php b/vendor/adbario/php-dot-notation/src/Dot.php new file mode 100644 index 0000000..8d504d9 --- /dev/null +++ b/vendor/adbario/php-dot-notation/src/Dot.php @@ -0,0 +1,601 @@ + + * @link https://github.com/adbario/php-dot-notation + * @license https://github.com/adbario/php-dot-notation/blob/2.x/LICENSE.md (MIT License) + */ +namespace Adbar; + +use Countable; +use ArrayAccess; +use ArrayIterator; +use JsonSerializable; +use IteratorAggregate; + +/** + * Dot + * + * This class provides a dot notation access and helper functions for + * working with arrays of data. Inspired by Laravel Collection. + */ +class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable +{ + /** + * The stored items + * + * @var array + */ + protected $items = []; + + /** + * Create a new Dot instance + * + * @param mixed $items + */ + public function __construct($items = []) + { + $this->items = $this->getArrayItems($items); + } + + /** + * Set a given key / value pair or pairs + * if the key doesn't exist already + * + * @param array|int|string $keys + * @param mixed $value + */ + public function add($keys, $value = null) + { + if (is_array($keys)) { + foreach ($keys as $key => $value) { + $this->add($key, $value); + } + } elseif (is_null($this->get($keys))) { + $this->set($keys, $value); + } + } + + /** + * Return all the stored items + * + * @return array + */ + public function all() + { + return $this->items; + } + + /** + * Delete the contents of a given key or keys + * + * @param array|int|string|null $keys + */ + public function clear($keys = null) + { + if (is_null($keys)) { + $this->items = []; + + return; + } + + $keys = (array) $keys; + + foreach ($keys as $key) { + $this->set($key, []); + } + } + + /** + * Delete the given key or keys + * + * @param array|int|string $keys + */ + public function delete($keys) + { + $keys = (array) $keys; + + foreach ($keys as $key) { + if ($this->exists($this->items, $key)) { + unset($this->items[$key]); + + continue; + } + + $items = &$this->items; + $segments = explode('.', $key); + $lastSegment = array_pop($segments); + + foreach ($segments as $segment) { + if (!isset($items[$segment]) || !is_array($items[$segment])) { + continue 2; + } + + $items = &$items[$segment]; + } + + unset($items[$lastSegment]); + } + } + + /** + * Checks if the given key exists in the provided array. + * + * @param array $array Array to validate + * @param int|string $key The key to look for + * + * @return bool + */ + protected function exists($array, $key) + { + return array_key_exists($key, $array); + } + + /** + * Flatten an array with the given character as a key delimiter + * + * @param string $delimiter + * @param array|null $items + * @param string $prepend + * @return array + */ + public function flatten($delimiter = '.', $items = null, $prepend = '') + { + $flatten = []; + + if (is_null($items)) { + $items = $this->items; + } + + foreach ($items as $key => $value) { + if (is_array($value) && !empty($value)) { + $flatten = array_merge( + $flatten, + $this->flatten($delimiter, $value, $prepend.$key.$delimiter) + ); + } else { + $flatten[$prepend.$key] = $value; + } + } + + return $flatten; + } + + /** + * Return the value of a given key + * + * @param int|string|null $key + * @param mixed $default + * @return mixed + */ + public function get($key = null, $default = null) + { + if (is_null($key)) { + return $this->items; + } + + if ($this->exists($this->items, $key)) { + return $this->items[$key]; + } + + if (strpos($key, '.') === false) { + return $default; + } + + $items = $this->items; + + foreach (explode('.', $key) as $segment) { + if (!is_array($items) || !$this->exists($items, $segment)) { + return $default; + } + + $items = &$items[$segment]; + } + + return $items; + } + + /** + * Return the given items as an array + * + * @param mixed $items + * @return array + */ + protected function getArrayItems($items) + { + if (is_array($items)) { + return $items; + } elseif ($items instanceof self) { + return $items->all(); + } + + return (array) $items; + } + + /** + * Check if a given key or keys exists + * + * @param array|int|string $keys + * @return bool + */ + public function has($keys) + { + $keys = (array) $keys; + + if (!$this->items || $keys === []) { + return false; + } + + foreach ($keys as $key) { + $items = $this->items; + + if ($this->exists($items, $key)) { + continue; + } + + foreach (explode('.', $key) as $segment) { + if (!is_array($items) || !$this->exists($items, $segment)) { + return false; + } + + $items = $items[$segment]; + } + } + + return true; + } + + /** + * Check if a given key or keys are empty + * + * @param array|int|string|null $keys + * @return bool + */ + public function isEmpty($keys = null) + { + if (is_null($keys)) { + return empty($this->items); + } + + $keys = (array) $keys; + + foreach ($keys as $key) { + if (!empty($this->get($key))) { + return false; + } + } + + return true; + } + + /** + * Merge a given array or a Dot object with the given key + * or with the whole Dot object + * + * @param array|string|self $key + * @param array|self $value + */ + public function merge($key, $value = []) + { + if (is_array($key)) { + $this->items = array_merge($this->items, $key); + } elseif (is_string($key)) { + $items = (array) $this->get($key); + $value = array_merge($items, $this->getArrayItems($value)); + + $this->set($key, $value); + } elseif ($key instanceof self) { + $this->items = array_merge($this->items, $key->all()); + } + } + + /** + * Recursively merge a given array or a Dot object with the given key + * or with the whole Dot object. + * + * Duplicate keys are converted to arrays. + * + * @param array|string|self $key + * @param array|self $value + */ + public function mergeRecursive($key, $value = []) + { + if (is_array($key)) { + $this->items = array_merge_recursive($this->items, $key); + } elseif (is_string($key)) { + $items = (array) $this->get($key); + $value = array_merge_recursive($items, $this->getArrayItems($value)); + + $this->set($key, $value); + } elseif ($key instanceof self) { + $this->items = array_merge_recursive($this->items, $key->all()); + } + } + + /** + * Recursively merge a given array or a Dot object with the given key + * or with the whole Dot object. + * + * Instead of converting duplicate keys to arrays, the value from + * given array will replace the value in Dot object. + * + * @param array|string|self $key + * @param array|self $value + */ + public function mergeRecursiveDistinct($key, $value = []) + { + if (is_array($key)) { + $this->items = $this->arrayMergeRecursiveDistinct($this->items, $key); + } elseif (is_string($key)) { + $items = (array) $this->get($key); + $value = $this->arrayMergeRecursiveDistinct($items, $this->getArrayItems($value)); + + $this->set($key, $value); + } elseif ($key instanceof self) { + $this->items = $this->arrayMergeRecursiveDistinct($this->items, $key->all()); + } + } + + /** + * Merges two arrays recursively. In contrast to array_merge_recursive, + * duplicate keys are not converted to arrays but rather overwrite the + * value in the first array with the duplicate value in the second array. + * + * @param array $array1 Initial array to merge + * @param array $array2 Array to recursively merge + * @return array + */ + protected function arrayMergeRecursiveDistinct(array $array1, array $array2) + { + $merged = &$array1; + + foreach ($array2 as $key => $value) { + if (is_array($value) && isset($merged[$key]) && is_array($merged[$key])) { + $merged[$key] = $this->arrayMergeRecursiveDistinct($merged[$key], $value); + } else { + $merged[$key] = $value; + } + } + + return $merged; + } + + /** + * Return the value of a given key and + * delete the key + * + * @param int|string|null $key + * @param mixed $default + * @return mixed + */ + public function pull($key = null, $default = null) + { + if (is_null($key)) { + $value = $this->all(); + $this->clear(); + + return $value; + } + + $value = $this->get($key, $default); + $this->delete($key); + + return $value; + } + + /** + * Push a given value to the end of the array + * in a given key + * + * @param mixed $key + * @param mixed $value + */ + public function push($key, $value = null) + { + if (is_null($value)) { + $this->items[] = $key; + + return; + } + + $items = $this->get($key); + + if (is_array($items) || is_null($items)) { + $items[] = $value; + $this->set($key, $items); + } + } + + /** + * Replace all values or values within the given key + * with an array or Dot object + * + * @param array|string|self $key + * @param array|self $value + */ + public function replace($key, $value = []) + { + if (is_array($key)) { + $this->items = array_replace($this->items, $key); + } elseif (is_string($key)) { + $items = (array) $this->get($key); + $value = array_replace($items, $this->getArrayItems($value)); + + $this->set($key, $value); + } elseif ($key instanceof self) { + $this->items = array_replace($this->items, $key->all()); + } + } + + /** + * Set a given key / value pair or pairs + * + * @param array|int|string $keys + * @param mixed $value + */ + public function set($keys, $value = null) + { + if (is_array($keys)) { + foreach ($keys as $key => $value) { + $this->set($key, $value); + } + + return; + } + + $items = &$this->items; + + foreach (explode('.', $keys) as $key) { + if (!isset($items[$key]) || !is_array($items[$key])) { + $items[$key] = []; + } + + $items = &$items[$key]; + } + + $items = $value; + } + + /** + * Replace all items with a given array + * + * @param mixed $items + */ + public function setArray($items) + { + $this->items = $this->getArrayItems($items); + } + + /** + * Replace all items with a given array as a reference + * + * @param array $items + */ + public function setReference(array &$items) + { + $this->items = &$items; + } + + /** + * Return the value of a given key or all the values as JSON + * + * @param mixed $key + * @param int $options + * @return string + */ + public function toJson($key = null, $options = 0) + { + if (is_string($key)) { + return json_encode($this->get($key), $options); + } + + $options = $key === null ? 0 : $key; + + return json_encode($this->items, $options); + } + + /* + * -------------------------------------------------------------- + * ArrayAccess interface + * -------------------------------------------------------------- + */ + + /** + * Check if a given key exists + * + * @param int|string $key + * @return bool + */ + public function offsetExists($key) + { + return $this->has($key); + } + + /** + * Return the value of a given key + * + * @param int|string $key + * @return mixed + */ + public function offsetGet($key) + { + return $this->get($key); + } + + /** + * Set a given value to the given key + * + * @param int|string|null $key + * @param mixed $value + */ + public function offsetSet($key, $value) + { + if (is_null($key)) { + $this->items[] = $value; + + return; + } + + $this->set($key, $value); + } + + /** + * Delete the given key + * + * @param int|string $key + */ + public function offsetUnset($key) + { + $this->delete($key); + } + + /* + * -------------------------------------------------------------- + * Countable interface + * -------------------------------------------------------------- + */ + + /** + * Return the number of items in a given key + * + * @param int|string|null $key + * @return int + */ + public function count($key = null) + { + return count($this->get($key)); + } + + /* + * -------------------------------------------------------------- + * IteratorAggregate interface + * -------------------------------------------------------------- + */ + + /** + * Get an iterator for the stored items + * + * @return \ArrayIterator + */ + public function getIterator() + { + return new ArrayIterator($this->items); + } + + /* + * -------------------------------------------------------------- + * JsonSerializable interface + * -------------------------------------------------------------- + */ + + /** + * Return items for JSON serialization + * + * @return array + */ + public function jsonSerialize() + { + return $this->items; + } +} diff --git a/vendor/adbario/php-dot-notation/src/helpers.php b/vendor/adbario/php-dot-notation/src/helpers.php new file mode 100644 index 0000000..ffdc826 --- /dev/null +++ b/vendor/adbario/php-dot-notation/src/helpers.php @@ -0,0 +1,23 @@ + + * @link https://github.com/adbario/php-dot-notation + * @license https://github.com/adbario/php-dot-notation/blob/2.x/LICENSE.md (MIT License) + */ + +use Adbar\Dot; + +if (! function_exists('dot')) { + /** + * Create a new Dot object with the given items + * + * @param mixed $items + * @return \Adbar\Dot + */ + function dot($items) + { + return new Dot($items); + } +} diff --git a/vendor/alibabacloud/client/CHANGELOG.md b/vendor/alibabacloud/client/CHANGELOG.md new file mode 100644 index 0000000..09375ad --- /dev/null +++ b/vendor/alibabacloud/client/CHANGELOG.md @@ -0,0 +1,264 @@ +# CHANGELOG + +## 1.5.18 - 2019-10-11 +- Updated Request link. +- Updated Endpoints data. + +## 1.5.17 - 2019-09-15 +- Improved Host Finder. +- Updated Endpoints Data. + +## 1.5.16 - 2019-08-21 +- Updated Endpoints Data. + +## 1.5.15 - 2019-08-14 +- Improved Client. + + +## 1.5.14 - 2019-07-25 +- Improved Credential Filter. + + +## 1.5.13 - 2019-07-18 +- Improved API Resolver. + + +## 1.5.12 - 2019-06-20 +- Fixed Signature for ROA. + + +## 1.5.11 - 2019-06-14 +- Added endpoint rules. + + +## 1.5.10 - 2019-06-13 +- Improved `Resovler`. +- Updated `endpoints`. + + +## 1.5.9 - 2019-06-04 +- Improved `UUID`. + + +## 1.5.8 - 2019-05-30 +- Improved `Arrays`. + + +## 1.5.7 - 2019-05-29 +- Improved `uuid`. + + +## 1.5.6 - 2019-05-29 +- Fixed `uuid` version lock. + + +## 1.5.5 - 2019-05-23 +- Improved `Signature`. + + +## 1.5.4 - 2019-05-22 +- Updated `Endpoints`. +- Fixed `Content-Type` in header. + + +## 1.5.3 - 2019-05-13 +- Improved `Endpoint` tips. +- Improved `Endpoints` for `STS`. + + +## 1.5.2 - 2019-05-10 +- Improved `Result` object. + + +## 1.5.1 - 2019-05-09 +- Supported `Resolver` for Third-party dependencies. + + +## 1.5.0 - 2019-05-07 +- Improved `Resolver` for products. + + +## 1.4.0 - 2019-05-06 +- Support `Retry` and `Asynchronous` for Request. + + +## 1.3.1 - 2019-04-30 +- Allow timeouts to be set in microseconds. + + +## 1.3.0 - 2019-04-18 +- Improved parameters methods. +- Optimized the logic for body encode. + + +## 1.2.1 - 2019-04-11 +- Improve exception code and message for `Region ID`. + + +## 1.2.0 - 2019-04-11 +- Improve exception message for `Region ID`. + + +## 1.1.1 - 2019-04-02 +- Added endpoints for `batchcomputenew`, `privatelink`. +- Improve Region ID tips. + + +## 1.1.0 - 2019-04-01 +- Updated `composer.json`. + + +## 1.0.27 - 2019-03-31 +- Support `Policy` for `ramRoleArnClient`. + + +## 1.0.26 - 2019-03-27 +- Support `pid`, `cost`, `start_time` for Log. + + +## 1.0.25 - 2019-03-27 +- Updated default log format. +- Add endpoints for `dbs`. + + +## 1.0.24 - 2019-03-26 +- Support Log. + + +## 1.0.23 - 2019-03-23 +- Remove SVG. + + +## 1.0.22 - 2019-03-20 +- Add endpoint `cn-hangzhou` for `idaas` . + + +## 1.0.21 - 2019-03-19 +- Installing by Using the ZIP file. +- Update Docs. + + +## 1.0.20 - 2019-03-13 +- Improve Tests. +- Update Docs. + + +## 1.0.19 - 2019-03-12 +- Add SSL Verify Option `verify()`. + + +## 1.0.18 - 2019-03-11 +- Add endpoints for `acr`. +- Add endpoints for `faas`. +- Add endpoints for `ehs`. +- SSL certificates are not validated by default. + + +## 1.0.17 - 2019-03-08 +- Support Mock for Test. + + +## 1.0.16 - 2019-03-07 +- Support Credential Provider Chain. +- Support `CCC`. +- Add `ap-south-1` for `cas`. +- Add `ap-southeast-1` for `waf`. +- Update Docs. + + +## 1.0.15 - 2019-02-27 +- Add endpoints for `Chatbot`. +- Change endpoints for `drdspost` and `drdspre`. + + +## 1.0.14 - 2019-02-21 +- Enable debug mode by set environment variable `DEBUG=sdk`. + + +## 1.0.13 - 2019-02-18 +- Support Release Script `composer release`. +- Add endpoints for apigateway in `drdspre` in `cn-qingdao`. +- Add endpoints for apigateway in `drdspre` in `cn-beijing`. +- Add endpoints for apigateway in `drdspre` in `cn-hangzhou`. +- Add endpoints for apigateway in `drdspre` in `cn-shanghai`. +- Add endpoints for apigateway in `drdspre` in `cn-shenzhen`. +- Add endpoints for apigateway in `drdspre` in `cn-hongkong`. +- Add endpoints for apigateway in `drdspost` in `ap-southeast-1`. +- Add endpoints for apigateway in `drdspost` in `cn-shanghai`. +- Add endpoints for apigateway in `drdspost` in `cn-hongkong`. +- Add endpoints for apigateway in `vod` in `ap-southeast-1`. +- Add endpoints for apigateway in `vod` in `eu-central-1`. + + +## 1.0.12 - 2019-02-16 +- Support `open_basedir`. + + +## 1.0.11 - 2019-02-13 +- Improve User Agent. + + +## 1.0.10 - 2019-02-12 +- `userAgentAppend` is renamed to `appendUserAgent`. + + +## 1.0.9 - 2019-02-12 +- `userAgent` is renamed to `userAgentAppend`. + + +## 1.0.8 - 2019-02-11 +- `userAgent` - Support DIY User Agent. +- Add endpoints for apigateway in Zhangjiakou. +- Add endpoints for apigateway in Hu He Hao Te. +- Add endpoints for vod in Hu He Hao Te. +- Add endpoints for hsm in Zhangjiakou. +- Add endpoints for luban in Germany. +- Add endpoints for linkwan in Hangzhou. +- Add endpoints for drdspost in Singapore. + + +## 1.0.7 - 2019-01-28 +- Add endpoints for gpdb in Tokyo. +- Add endpoints for elasticsearch in Beijing. + + +## 1.0.6 - 2019-01-23 +- Add endpoints for dysmsapi in Singapore. +- Add endpoints for dybaseapi. +- Add endpoints for dyiotapi. +- Add endpoints for dycdpapi. +- Add endpoints for dyplsapi. +- Add endpoints for dypnsapi. +- Add endpoints for dyvmsapi. +- Add endpoints for snsuapi. + + +## 1.0.5 - 2019-01-21 +- Add endpoints for ApiGateway in Silicon Valley, Virginia. +- Add endpoints for Image Search in Shanghai. + + +## 1.0.4 - 2019-01-17 +- Support fixer all. +- Add Endpoints. + + +## 1.0.3 - 2019-01-15 +- Update Endpoints. +- Update README.md. +- Update Return Result Message. + + +## 1.0.2 - 2019-01-15 +- Optimize the documentation. +- Adjust the CI configuration. + + +## 1.0.1 - 2019-01-09 +- Distinguish credential error. +- Add endpoints for NLS. +- Add not found product tip. + + +## 1.0.0 - 2019-01-07 +- Initial release of the Alibaba Cloud Client for PHP Version 1.0.0 on Packagist See for more information. diff --git a/vendor/alibabacloud/client/CONTRIBUTING.md b/vendor/alibabacloud/client/CONTRIBUTING.md new file mode 100644 index 0000000..a1c52a0 --- /dev/null +++ b/vendor/alibabacloud/client/CONTRIBUTING.md @@ -0,0 +1,30 @@ +# Contributing to the Alibaba Cloud Client for PHP + +We work hard to provide a high-quality and useful SDK for Alibaba Cloud, and +we greatly value feedback and contributions from our community. Please submit +your [issues][issues] or [pull requests][pull-requests] through GitHub. + +## Tips + +- The SDK is released under the [Apache license][license]. Any code you submit + will be released under that license. For substantial contributions, we may + ask you to sign a [Alibaba Documentation Corporate Contributor License + Agreement (CLA)][cla]. +- We follow all of the relevant PSR recommendations from the [PHP Framework + Interop Group][php-fig]. Please submit code that follows these standards. + The [PHP CS Fixer][cs-fixer] tool can be helpful for formatting your code. + Your can use `composer fixer` to fix code. +- We maintain a high percentage of code coverage in our unit tests. If you make + changes to the code, please add, update, and/or remove tests as appropriate. +- If your code does not conform to the PSR standards, does not include adequate + tests, or does not contain a changelog document, we may ask you to update + your pull requests before we accept them. We also reserve the right to deny + any pull requests that do not align with our standards or goals. + +[issues]: https://github.com/aliyun/openapi-sdk-php-client/issues +[pull-requests]: https://github.com/aliyun/openapi-sdk-php-client/pulls +[license]: http://www.apache.org/licenses/LICENSE-2.0 +[cla]: https://alibaba-cla-2018.oss-cn-beijing.aliyuncs.com/Alibaba_Documentation_Open_Source_Corporate_CLA.pdf +[php-fig]: http://php-fig.org +[cs-fixer]: http://cs.sensiolabs.org/ +[docs-readme]: https://github.com/aliyun/openapi-sdk-php-client/blob/master/README.md diff --git a/vendor/alibabacloud/client/LICENSE.md b/vendor/alibabacloud/client/LICENSE.md new file mode 100644 index 0000000..47ee76d --- /dev/null +++ b/vendor/alibabacloud/client/LICENSE.md @@ -0,0 +1,13 @@ +Copyright 1999-2019 Alibaba Group Holding Ltd. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/vendor/alibabacloud/client/NOTICE.md b/vendor/alibabacloud/client/NOTICE.md new file mode 100644 index 0000000..c0622c9 --- /dev/null +++ b/vendor/alibabacloud/client/NOTICE.md @@ -0,0 +1,88 @@ +# Alibaba Cloud Client for PHP + + + +Copyright 1999-2019 Alibaba Group. or its affiliates. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"). +You may not use this file except in compliance with the License. +A copy of the License is located at + + + +or in the "license" file accompanying this file. This file is distributed +on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +express or implied. See the License for the specific language governing +permissions and limitations under the License. + +# Guzzle + + + +Copyright (c) 2011-2018 Michael Dowling, https://github.com/mtdowling + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +# jmespath.php + + + +Copyright (c) 2014 Michael Dowling, https://github.com/mtdowling + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +# Dot + + + +Copyright (c) 2016-2019 Riku Särkinen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/alibabacloud/client/README-zh-CN.md b/vendor/alibabacloud/client/README-zh-CN.md new file mode 100644 index 0000000..31de8aa --- /dev/null +++ b/vendor/alibabacloud/client/README-zh-CN.md @@ -0,0 +1,161 @@ +[English](/README.md) | 简体中文 + + +# Alibaba Cloud Client for PHP +[![Latest Stable Version](https://poser.pugx.org/alibabacloud/client/v/stable)](https://packagist.org/packages/alibabacloud/client) +[![composer.lock](https://poser.pugx.org/alibabacloud/client/composerlock)](https://packagist.org/packages/alibabacloud/client) +[![Total Downloads](https://poser.pugx.org/alibabacloud/client/downloads)](https://packagist.org/packages/alibabacloud/client) +[![License](https://poser.pugx.org/alibabacloud/client/license)](https://packagist.org/packages/alibabacloud/client) +[![codecov](https://codecov.io/gh/aliyun/openapi-sdk-php-client/branch/master/graph/badge.svg)](https://codecov.io/gh/aliyun/openapi-sdk-php-client) +[![Travis Build Status](https://travis-ci.org/aliyun/openapi-sdk-php-client.svg?branch=master)](https://travis-ci.org/aliyun/openapi-sdk-php-client) +[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/qb8j3lhg8349k0hk/branch/master?svg=true)](https://ci.appveyor.com/project/aliyun/openapi-sdk-php-client/branch/master) + + +![](https://aliyunsdk-pages.alicdn.com/icons/AlibabaCloud.svg) + + +Alibaba Cloud Client for PHP 是帮助 PHP 开发者管理凭据、发送请求的客户端工具,[Alibaba Cloud SDK for PHP][SDK] 由本工具提供底层支持。 + + +## 在线示例 +[API Explorer](https://api.aliyun.com) 提供在线调用阿里云产品,并动态生成 SDK 代码和快速检索接口等能力,能显著降低使用云 API 的难度。 + + +## 先决条件 +您的系统需要满足[先决条件](/docs/zh-CN/0-Prerequisites.md),包括 PHP> = 5.5。 我们强烈建议使用cURL扩展,并使用TLS后端编译cURL 7.16.2+。 + + +## 安装依赖 +如果已在系统上[全局安装 Composer](https://getcomposer.org/doc/00-intro.md#globally),请直接在项目目录中运行以下内容来安装 Alibaba Cloud Client for PHP 作为依赖项: +``` +composer require alibabacloud/client +``` +> 一些用户可能由于网络问题无法安装,可以使用[阿里云 Composer 全量镜像](https://developer.aliyun.com/composer)。 + +请看[安装](/docs/zh-CN/1-Installation.md)有关通过 Composer 和其他方式安装的详细信息。 + + +## 快速使用 +在您开始之前,您需要注册阿里云帐户并获取您的[凭证](https://usercenter.console.aliyun.com/#/manage/ak)。 + +```php +asDefaultClient(); +``` + +## ROA 请求 +```php +regionId('cn-hangzhou') // 指定请求的区域,不指定则使用客户端区域、默认区域 + ->product('CS') // 指定产品 + ->version('2015-12-15') // 指定产品版本 + ->action('DescribeClusterServices') // 指定产品接口 + ->serviceCode('cs') // 设置 ServiceCode 以备寻址,非必须 + ->endpointType('openAPI') // 设置类型,非必须 + ->method('GET') // 指定请求方式 + ->host('cs.aliyun.com') // 指定域名则不会寻址,如认证方式为 Bearer Token 的服务则需要指定 + ->pathPattern('/clusters/[ClusterId]/services') // 指定ROA风格路径规则 + ->withClusterId('123456') // 为路径中参数赋值,方法名:with + 参数 + ->request(); // 发起请求并返回结果对象,请求需要放在设置的最后面 + + print_r($result->toArray()); + +} catch (ClientException $exception) { + print_r($exception->getErrorMessage()); +} catch (ServerException $exception) { + print_r($exception->getErrorMessage()); +} +``` + +## RPC 请求 +```php +product('Cdn') + ->version('2014-11-11') + ->action('DescribeCdnService') + ->method('POST') + ->request(); + + print_r($result->toArray()); + +} catch (ClientException $exception) { + print_r($exception->getErrorMessage()); +} catch (ServerException $exception) { + print_r($exception->getErrorMessage()); +} +``` + + +## 文档 +* [先决条件](/docs/zh-CN/0-Prerequisites.md) +* [安装](/docs/zh-CN/1-Installation.md) +* [客户端](/docs/zh-CN/2-Client.md) +* [请求](/docs/zh-CN/3-Request.md) +* [结果](/docs/zh-CN/4-Result.md) +* [区域](/docs/zh-CN/5-Region.md) +* [域名](/docs/zh-CN/6-Host.md) +* [SSL 验证](/docs/zh-CN/7-Verify.md) +* [调试](/docs/zh-CN/8-Debug.md) +* [日志](/docs/zh-CN/9-Log.md) +* [测试](/docs/zh-CN/10-Test.md) + + +## 问题 +[提交 Issue](https://github.com/aliyun/openapi-sdk-php-client/issues/new/choose),不符合指南的问题可能会立即关闭。 + + +## 发行说明 +每个版本的详细更改记录在[发行说明](/CHANGELOG.md)中。 + + +## 贡献 +提交 Pull Request 之前请阅读[贡献指南](/CONTRIBUTING.md)。 + + +## 相关 +* [阿里云服务 Regions & Endpoints][endpoints] +* [OpenAPI Explorer][open-api] +* [Packagist][packagist] +* [Composer][composer] +* [Guzzle中文文档][guzzle-docs] +* [最新源码][latest-release] + + +## 许可证 +[Apache-2.0](/LICENSE.md) + +版权所有 1999-2019 阿里巴巴集团 + + +[SDK]: https://github.com/aliyun/openapi-sdk-php +[open-api]: https://api.aliyun.com +[latest-release]: https://github.com/aliyun/openapi-sdk-php-client +[guzzle-docs]: https://guzzle-cn.readthedocs.io/zh_CN/latest/request-options.html +[composer]: https://getcomposer.org +[packagist]: https://packagist.org/packages/alibabacloud/sdk +[home]: https://home.console.aliyun.com +[aliyun]: https://www.aliyun.com +[regions]: https://help.aliyun.com/document_detail/40654.html +[endpoints]: https://developer.aliyun.com/endpoints +[cURL]: http://php.net/manual/zh/book.curl.php +[OPCache]: http://php.net/manual/zh/book.opcache.php +[xdebug]: http://xdebug.org +[OpenSSL]: http://php.net/manual/zh/book.openssl.php +[client]: https://github.com/aliyun/openapi-sdk-php-client diff --git a/vendor/alibabacloud/client/README.md b/vendor/alibabacloud/client/README.md new file mode 100644 index 0000000..00ff572 --- /dev/null +++ b/vendor/alibabacloud/client/README.md @@ -0,0 +1,162 @@ +English | [简体中文](/README-zh-CN.md) + + +# Alibaba Cloud Client for PHP +[![Latest Stable Version](https://poser.pugx.org/alibabacloud/client/v/stable)](https://packagist.org/packages/alibabacloud/client) +[![composer.lock](https://poser.pugx.org/alibabacloud/client/composerlock)](https://packagist.org/packages/alibabacloud/client) +[![Total Downloads](https://poser.pugx.org/alibabacloud/client/downloads)](https://packagist.org/packages/alibabacloud/client) +[![License](https://poser.pugx.org/alibabacloud/client/license)](https://packagist.org/packages/alibabacloud/client) +[![codecov](https://codecov.io/gh/aliyun/openapi-sdk-php-client/branch/master/graph/badge.svg)](https://codecov.io/gh/aliyun/openapi-sdk-php-client) +[![Travis Build Status](https://travis-ci.org/aliyun/openapi-sdk-php-client.svg?branch=master)](https://travis-ci.org/aliyun/openapi-sdk-php-client) +[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/qb8j3lhg8349k0hk/branch/master?svg=true)](https://ci.appveyor.com/project/aliyun/openapi-sdk-php-client/branch/master) + + +![](https://aliyunsdk-pages.alicdn.com/icons/AlibabaCloud.svg) + + +Alibaba Cloud Client for PHP is a client tool that helps PHP developers manage credentials and send requests, [Alibaba Cloud SDK for PHP][SDK] dependency on this tool. + + +## Online Demo +[API Explorer](https://api.aliyun.com) provides the ability to call the cloud product OpenAPI online, and dynamically generate SDK Example code and quick retrieval interface, which can significantly reduce the difficulty of using the cloud API. + + +## Prerequisites +Your system will need to meet the [Prerequisites](/docs/en-US/0-Prerequisites.md), including having PHP >= 5.5. We highly recommend having it compiled with the cURL extension and cURL 7.16.2+. + + +## Installation +If Composer is already [installed globally on your system](https://getcomposer.org/doc/00-intro.md#globally), run the following in the base directory of your project to install Alibaba Cloud Client for PHP as a dependency: +``` +composer require alibabacloud/client +``` +> Some users may not be able to install due to network problems, you can try to switch the Composer mirror. + +Please see the [Installation](/docs/en-US/1-Installation.md) for more detailed information about installing the Alibaba Cloud Client for PHP through Composer and other means. + + +## Quick Examples +Before you begin, you need to sign up for an Alibaba Cloud account and retrieve your [Credentials](https://usercenter.console.aliyun.com/#/manage/ak). + +### Create Client +```php +asDefaultClient(); +``` + +### ROA Request +```php +regionId('cn-hangzhou') // Specify the requested regionId, if not specified, use the client regionId, then default regionId + ->product('CS') // Specify product + ->version('2015-12-15') // Specify product version + ->action('DescribeClusterServices') // Specify product interface + ->serviceCode('cs') // Set ServiceCode for addressing, optional + ->endpointType('openAPI') // Set type, optional + ->method('GET') // Set request method + ->host('cs.aliyun.com') // Location Service will not be enabled if the host is specified. For example, service with a Certification type-Bearer Token should be specified + ->pathPattern('/clusters/[ClusterId]/services') // Specify path rule with ROA-style + ->withClusterId('123456') // Assign values to parameters in the path. Method: with + Parameter + ->request(); // Make a request and return to result object. The request is to be placed at the end of the setting + + print_r($result->toArray()); + +} catch (ClientException $exception) { + print_r($exception->getErrorMessage()); +} catch (ServerException $exception) { + print_r($exception->getErrorMessage()); +} +``` + +### RPC Request +```php +product('Cdn') + ->version('2014-11-11') + ->action('DescribeCdnService') + ->method('POST') + ->request(); + + print_r($result->toArray()); + +} catch (ClientException $exception) { + print_r($exception->getErrorMessage()); +} catch (ServerException $exception) { + print_r($exception->getErrorMessage()); +} +``` + + +## Documentation +* [Prerequisites](/docs/en-US/0-Prerequisites.md) +* [Installation](/docs/en-US/1-Installation.md) +* [Client](/docs/en-US/2-Client.md) +* [Request](/docs/en-US/3-Request.md) +* [Result](/docs/en-US/4-Result.md) +* [Region](/docs/en-US/5-Region.md) +* [Host](/docs/en-US/6-Host.md) +* [SSL Verify](/docs/en-US/7-Verify.md) +* [Debug](/docs/en-US/8-Debug.md) +* [Log](/docs/en-US/9-Log.md) +* [Test](/docs/en-US/10-Test.md) + + +## Issues +[Opening an Issue](https://github.com/aliyun/openapi-sdk-php-client/issues/new/choose), Issues not conforming to the guidelines may be closed immediately. + + +## Changelog +Detailed changes for each release are documented in the [release notes](/CHANGELOG.md). + + +## Contribution +Please make sure to read the [Contributing Guide](/CONTRIBUTING.md) before making a pull request. + + +## References +* [Alibaba Cloud Regions & Endpoints][endpoints] +* [OpenAPI Explorer][open-api] +* [Packagist][packagist] +* [Composer][composer] +* [Guzzle Documentation][guzzle-docs] +* [Latest Release][latest-release] + + +## License +[Apache-2.0](/LICENSE.md) + +Copyright 1999-2019 Alibaba Group Holding Ltd. + + +[SDK]: https://github.com/aliyun/openapi-sdk-php +[open-api]: https://api.alibabacloud.com +[latest-release]: https://github.com/aliyun/openapi-sdk-php-client +[guzzle-docs]: http://docs.guzzlephp.org/en/stable/request-options.html +[composer]: https://getcomposer.org +[packagist]: https://packagist.org/packages/alibabacloud/sdk +[home]: https://home.console.aliyun.com +[alibabacloud]: https://www.alibabacloud.com +[regions]: https://www.alibabacloud.com/help/doc-detail/40654.html +[endpoints]: https://developer.aliyun.com/endpoints +[cURL]: http://php.net/manual/en/book.curl.php +[OPCache]: http://php.net/manual/en/book.opcache.php +[xdebug]: http://xdebug.org +[OpenSSL]: http://php.net/manual/en/book.openssl.php +[client]: https://github.com/aliyun/openapi-sdk-php-client diff --git a/vendor/alibabacloud/client/UPGRADING.md b/vendor/alibabacloud/client/UPGRADING.md new file mode 100644 index 0000000..08c1bb3 --- /dev/null +++ b/vendor/alibabacloud/client/UPGRADING.md @@ -0,0 +1,6 @@ +Upgrading Guide +=============== + +1.x +----------------------- +- This is the first version. See for more information. diff --git a/vendor/alibabacloud/client/composer.json b/vendor/alibabacloud/client/composer.json new file mode 100644 index 0000000..0f5eb3c --- /dev/null +++ b/vendor/alibabacloud/client/composer.json @@ -0,0 +1,116 @@ +{ + "name": "alibabacloud/client", + "homepage": "https://www.alibabacloud.com/", + "description": "Alibaba Cloud Client for PHP - Use Alibaba Cloud in your PHP project", + "keywords": [ + "sdk", + "tool", + "cloud", + "client", + "aliyun", + "library", + "alibaba", + "alibabacloud" + ], + "type": "library", + "license": "Apache-2.0", + "support": { + "source": "https://github.com/aliyun/openapi-sdk-php-client", + "issues": "https://github.com/aliyun/openapi-sdk-php-client/issues" + }, + "authors": [ + { + "name": "Alibaba Cloud SDK", + "email": "sdk-team@alibabacloud.com", + "homepage": "http://www.alibabacloud.com" + } + ], + "require": { + "php": ">=5.5", + "ext-curl": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-openssl": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xmlwriter": "*", + "guzzlehttp/guzzle": "^6.3", + "danielstjules/stringy": "^3.1", + "mtdowling/jmespath.php": "^2.4", + "adbario/php-dot-notation": "^2.2", + "clagiordano/weblibs-configmanager": "^1.0" + }, + "require-dev": { + "ext-spl": "*", + "ext-dom": "*", + "ext-pcre": "*", + "psr/cache": "^1.0", + "ext-sockets": "*", + "drupal/coder": "^8.3", + "symfony/dotenv": "^3.4", + "league/climate": "^3.2.4", + "phpunit/phpunit": "^4.8.35|^5.4.3", + "monolog/monolog": "^1.24", + "composer/composer": "^1.8", + "mikey179/vfsstream": "^1.6", + "symfony/var-dumper": "^3.4" + }, + "suggest": { + "ext-sockets": "To use client-side monitoring" + }, + "autoload": { + "psr-4": { + "AlibabaCloud\\Client\\": "src" + }, + "files": [ + "src/Functions.php" + ] + }, + "autoload-dev": { + "psr-4": { + "AlibabaCloud\\Client\\Tests\\": "tests/" + } + }, + "config": { + "preferred-install": "dist", + "optimize-autoloader": true + }, + "minimum-stability": "dev", + "prefer-stable": true, + "scripts-descriptions": { + "cs": "Tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard.", + "cbf": "Automatically correct coding standard violations.", + "fixer": "Fixes code to follow standards.", + "test": "Run all tests.", + "unit": "Run Unit tests.", + "feature": "Run Feature tests.", + "clearCache": "Clear cache like coverage.", + "coverage": "Show Coverage html.", + "endpoints": "Update endpoints from OSS." + }, + "scripts": { + "cs": "phpcs --standard=PSR2 -n ./", + "cbf": "phpcbf --standard=PSR2 -n ./", + "fixer": "php-cs-fixer fix ./", + "test": [ + "phpunit --colors=always" + ], + "unit": [ + "@clearCache", + "phpunit --testsuite=Unit --colors=always" + ], + "feature": [ + "@clearCache", + "phpunit --testsuite=Feature --colors=always" + ], + "coverage": "open cache/coverage/index.html", + "clearCache": "rm -rf cache/*", + "endpoints": [ + "AlibabaCloud\\Client\\Regions\\LocationService::updateEndpoints", + "@fixer" + ], + "release": [ + "AlibabaCloud\\Client\\Release::release" + ] + } +} diff --git a/vendor/alibabacloud/client/src/Accept.php b/vendor/alibabacloud/client/src/Accept.php new file mode 100644 index 0000000..e7c5261 --- /dev/null +++ b/vendor/alibabacloud/client/src/Accept.php @@ -0,0 +1,53 @@ +format = $format; + } + + /** + * @param $format + * + * @return Accept + */ + public static function create($format) + { + return new static($format); + } + + /** + * @return mixed|string + */ + public function toString() + { + $key = \strtoupper($this->format); + + $list = [ + 'JSON' => 'application/json', + 'XML' => 'application/xml', + 'RAW' => 'application/octet-stream', + 'FORM' => 'application/x-www-form-urlencoded' + ]; + + return isset($list[$key]) ? $list[$key] : $list['RAW']; + } +} diff --git a/vendor/alibabacloud/client/src/AlibabaCloud.php b/vendor/alibabacloud/client/src/AlibabaCloud.php new file mode 100644 index 0000000..08fb558 --- /dev/null +++ b/vendor/alibabacloud/client/src/AlibabaCloud.php @@ -0,0 +1,62 @@ +credential = $credential; + $this->signature = $signature; + $this->options['connect_timeout'] = Request::CONNECT_TIMEOUT; + $this->options['timeout'] = Request::TIMEOUT; + $this->options['verify'] = false; + } + + /** + * @return AccessKeyCredential|BearerTokenCredential|CredentialsInterface|EcsRamRoleCredential|RamRoleArnCredential|RsaKeyPairCredential|StsCredential + */ + public function getCredential() + { + return $this->credential; + } + + /** + * @return SignatureInterface|BearerTokenSignature|ShaHmac1Signature|ShaHmac256Signature|ShaHmac256WithRsaSignature + */ + public function getSignature() + { + return $this->signature; + } +} diff --git a/vendor/alibabacloud/client/src/Clients/EcsRamRoleClient.php b/vendor/alibabacloud/client/src/Clients/EcsRamRoleClient.php new file mode 100644 index 0000000..e97cd6c --- /dev/null +++ b/vendor/alibabacloud/client/src/Clients/EcsRamRoleClient.php @@ -0,0 +1,26 @@ +credential)) { + case EcsRamRoleCredential::class: + return (new EcsRamRoleProvider($this))->get(); + case RamRoleArnCredential::class: + return (new RamRoleArnProvider($this))->get($timeout, $connectTimeout); + case RsaKeyPairCredential::class: + return (new RsaKeyPairProvider($this))->get($timeout, $connectTimeout); + default: + return $this->credential; + } + } + + /** + * @return static + * @throws ClientException + * @deprecated + * @codeCoverageIgnore + */ + public function asGlobalClient() + { + return $this->asDefaultClient(); + } + + /** + * Set the current client as the default client. + * + * @return static + * @throws ClientException + */ + public function asDefaultClient() + { + return $this->name(CredentialsProvider::getDefaultName()); + } + + /** + * Naming clients. + * + * @param string $name + * + * @return static + * @throws ClientException + */ + public function name($name) + { + Filter::name($name); + + return AlibabaCloud::set($name, $this); + } + + /** + * @return bool + */ + public function isDebug() + { + if (isset($this->options['debug'])) { + return $this->options['debug'] === true && PHP_SAPI === 'cli'; + } + + return false; + } +} diff --git a/vendor/alibabacloud/client/src/Clients/RamRoleArnClient.php b/vendor/alibabacloud/client/src/Clients/RamRoleArnClient.php new file mode 100644 index 0000000..b7d3087 --- /dev/null +++ b/vendor/alibabacloud/client/src/Clients/RamRoleArnClient.php @@ -0,0 +1,33 @@ +getValue( + \strtolower($configPath), + $defaultValue + ); + } + + /** + * @return ConfigManager + */ + private static function getConfigManager() + { + if (!self::$configManager instanceof ConfigManager) { + self::$configManager = new ConfigManager(__DIR__ . DIRECTORY_SEPARATOR . 'Data.php'); + } + + return self::$configManager; + } + + /** + * @param string $configPath + * @param mixed $newValue + * + * @return ConfigManager + * @throws Exception + */ + public static function set($configPath, $newValue) + { + self::getConfigManager()->setValue(\strtolower($configPath), $newValue); + + return self::getConfigManager()->saveConfigFile(); + } +} diff --git a/vendor/alibabacloud/client/src/Config/Data.php b/vendor/alibabacloud/client/src/Config/Data.php new file mode 100644 index 0000000..439088c --- /dev/null +++ b/vendor/alibabacloud/client/src/Config/Data.php @@ -0,0 +1,2653 @@ + + [ + 'dysmsapi' => + [ + 'global' => 'dysmsapi.aliyuncs.com', + 'cn-hangzhou' => 'dysmsapi.aliyuncs.com', + 'ap-southeast-1' => 'dysmsapi.ap-southeast-1.aliyuncs.com', + ], + 'ccc' => + [ + 'global' => 'ccc.cn-shanghai.aliyuncs.com', + 'cn-shanghai' => 'ccc.cn-shanghai.aliyuncs.com', + ], + 'dbs' => + [ + 'cn-hangzhou' => 'dbs-api.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'dbs-api.cn-hangzhou.aliyuncs.com', + 'cn-qingdao' => 'dbs-api.cn-hangzhou.aliyuncs.com', + 'cn-beijing' => 'dbs-api.cn-hangzhou.aliyuncs.com', + 'cn-shenzhen' => 'dbs-api.cn-hangzhou.aliyuncs.com', + 'cn-hongkong' => 'dbs-api.cn-hangzhou.aliyuncs.com', + 'ap-southeast-1' => 'dbs-api.ap-southeast-1.aliyuncs.com', + 'ap-northeast-1' => 'dbs-api.ap-northeast-1.aliyuncs.com', + ], + 'dybaseapi' => + [ + 'global' => 'dybaseapi.aliyuncs.com', + 'cn-hangzhou' => 'dybaseapi.aliyuncs.com', + ], + 'dyiotapi' => + [ + 'global' => 'dyiotapi.aliyuncs.com', + 'cn-hangzhou' => 'dyiotapi.aliyuncs.com', + ], + 'dycdpapi' => + [ + 'global' => 'dycdpapi.aliyuncs.com', + 'cn-hangzhou' => 'dycdpapi.aliyuncs.com', + ], + 'dyplsapi' => + [ + 'global' => 'dyplsapi.aliyuncs.com', + 'cn-hangzhou' => 'dyplsapi.aliyuncs.com', + ], + 'dypnsapi' => + [ + 'global' => 'dypnsapi.aliyuncs.com', + 'cn-hangzhou' => 'dypnsapi.aliyuncs.com', + ], + 'dyvmsapi' => + [ + 'global' => 'dyvmsapi.aliyuncs.com', + 'cn-hangzhou' => 'dyvmsapi.aliyuncs.com', + ], + 'snsuapi' => + [ + 'global' => 'snsuapi.aliyuncs.com', + 'cn-hangzhou' => 'snsuapi.aliyuncs.com', + ], + 'ecs' => + [ + 'jp-fudao-1' => 'ecs-cn-hangzhou.aliyuncs.com', + 'me-east-1' => 'ecs.me-east-1.aliyuncs.com', + 'us-east-1' => 'ecs-cn-hangzhou.aliyuncs.com', + 'ap-northeast-1' => 'ecs.ap-northeast-1.aliyuncs.com', + 'cn-hangzhou-bj-b01' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-hongkong' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-beijing-nu16-b01' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-beijing-am13-c01' => 'ecs-cn-hangzhou.aliyuncs.com', + 'in-west-antgroup-1' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-guizhou-gov' => 'ecs-cn-hangzhou.aliyuncs.com', + 'in-west-antgroup-2' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-qingdao-cm9' => 'ecs-cn-hangzhou.aliyuncs.com', + 'tw-snowcloud-kaohsiung' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-shanghai-finance-1' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-guizhou' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-shenzhen-inner' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-fujian' => 'ecs-cn-hangzhou.aliyuncs.com', + 'in-mumbai-alipay' => 'ecs-cn-hangzhou.aliyuncs.com', + 'us-west-1' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-shanghai-inner' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-anhui-gov-1' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-hangzhou' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-beijing-inner' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-haidian-cm12-c01' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-anhui-gov' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-shenzhen' => 'ecs-cn-hangzhou.aliyuncs.com', + 'ap-southeast-2' => 'ecs.ap-southeast-2.aliyuncs.com', + 'cn-qingdao' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-shenzhen-su18-b02' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-shenzhen-su18-b03' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-shenzhen-su18-b01' => 'ecs-cn-hangzhou.aliyuncs.com', + 'ap-southeast-antgroup-1' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-henan-am12001' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-beijing' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-hangzhou-d' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-gansu-am6' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-ningxiazhongwei' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-ningxia-am7-c01' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-shenzhen-finance-1' => 'ecs-cn-hangzhou.aliyuncs.com', + 'ap-southeast-1' => 'ecs-cn-hangzhou.aliyuncs.com', + 'cn-shenzhen-st4-d01' => 'ecs-cn-hangzhou.aliyuncs.com', + 'eu-central-1' => 'ecs.eu-central-1.aliyuncs.com', + 'cn-zhangjiakou' => 'ecs.cn-zhangjiakou.aliyuncs.com', + 'cn-huhehaote' => 'ecs.cn-huhehaote.aliyuncs.com', + 'ap-southeast-3' => 'ecs.ap-southeast-3.aliyuncs.com', + 'ap-southeast-5' => 'ecs.ap-southeast-5.aliyuncs.com', + 'eu-west-1' => 'ecs.eu-west-1.aliyuncs.com', + 'ap-south-1' => 'ecs.ap-south-1.aliyuncs.com', + 'cn-chengdu' => 'ecs.cn-chengdu.aliyuncs.com', + 'cn-north-2-gov-1' => 'ecs.aliyuncs.com', + ], + 'rds' => + [ + 'me-east-1' => 'rds.me-east-1.aliyuncs.com', + 'us-east-1' => 'rds.aliyuncs.com', + 'ap-northeast-1' => 'rds.ap-northeast-1.aliyuncs.com', + 'cn-hongkong' => 'rds.aliyuncs.com', + 'cn-qingdao-cm9' => 'rds.aliyuncs.com', + 'cn-shanghai-finance-1' => 'rds.aliyuncs.com', + 'cn-beijing-gov-1' => 'rds.aliyuncs.com', + 'cn-shanghai' => 'rds.aliyuncs.com', + 'cn-shenzhen-inner' => 'rds.aliyuncs.com', + 'cn-fujian' => 'rds.aliyuncs.com', + 'us-west-1' => 'rds.aliyuncs.com', + 'cn-shanghai-inner' => 'rds.aliyuncs.com', + 'cn-hangzhou' => 'rds.aliyuncs.com', + 'cn-beijing-inner' => 'rds.aliyuncs.com', + 'cn-haidian-cm12-c01' => 'rds.aliyuncs.com', + 'cn-shenzhen' => 'rds.aliyuncs.com', + 'ap-southeast-2' => 'rds.ap-southeast-2.aliyuncs.com', + 'cn-qingdao' => 'rds.aliyuncs.com', + 'cn-beijing' => 'rds.aliyuncs.com', + 'cn-hangzhou-d' => 'rds.aliyuncs.com', + 'cn-gansu-am6' => 'rds.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'rds.aliyuncs.com', + 'cn-shenzhen-finance-1' => 'rds.aliyuncs.com', + 'ap-southeast-1' => 'rds.aliyuncs.com', + 'eu-central-1' => 'rds.eu-central-1.aliyuncs.com', + 'cn-zhangjiakou' => 'rds.cn-zhangjiakou.aliyuncs.com', + 'cn-huhehaote' => 'rds.cn-huhehaote.aliyuncs.com', + 'ap-southeast-3' => 'rds.ap-southeast-3.aliyuncs.com', + 'ap-southeast-5' => 'rds.ap-southeast-5.aliyuncs.com', + 'eu-west-1' => 'rds.eu-west-1.aliyuncs.com', + 'ap-south-1' => 'rds.ap-south-1.aliyuncs.com', + 'cn-chengdu' => 'rds.cn-chengdu.aliyuncs.com', + 'cn-north-2-gov-1' => 'rds.aliyuncs.com', + ], + 'vpc' => + [ + 'me-east-1' => 'vpc.me-east-1.aliyuncs.com', + 'us-east-1' => 'vpc.aliyuncs.com', + 'ap-northeast-1' => 'vpc.ap-northeast-1.aliyuncs.com', + 'cn-hongkong' => 'vpc.aliyuncs.com', + 'cn-beijing-am13-c01' => 'vpc.aliyuncs.com', + 'cn-guizhou-gov' => 'vpc.aliyuncs.com', + 'cn-shanghai-finance-1' => 'vpc.aliyuncs.com', + 'cn-guizhou' => 'vpc.aliyuncs.com', + 'cn-shanghai' => 'vpc.aliyuncs.com', + 'us-west-1' => 'vpc.aliyuncs.com', + 'cn-hangzhou' => 'vpc.aliyuncs.com', + 'cn-haidian-cm12-c01' => 'vpc.aliyuncs.com', + 'cn-anhui-gov' => 'vpc.aliyuncs.com', + 'cn-shenzhen' => 'vpc.aliyuncs.com', + 'ap-southeast-2' => 'vpc.ap-southeast-2.aliyuncs.com', + 'cn-henan-am12001' => 'vpc.aliyuncs.com', + 'cn-beijing' => 'vpc.aliyuncs.com', + 'cn-gansu-am6' => 'vpc.aliyuncs.com', + 'cn-ningxiazhongwei' => 'vpc.aliyuncs.com', + 'cn-ningxia-am7-c01' => 'vpc.aliyuncs.com', + 'cn-shenzhen-finance-1' => 'vpc.aliyuncs.com', + 'ap-southeast-1' => 'vpc.aliyuncs.com', + 'eu-central-1' => 'vpc.eu-central-1.aliyuncs.com', + 'cn-zhangjiakou' => 'vpc.cn-zhangjiakou.aliyuncs.com', + 'cn-qingdao' => 'vpc.aliyuncs.com', + 'cn-huhehaote' => 'vpc.cn-huhehaote.aliyuncs.com', + 'ap-southeast-3' => 'vpc.ap-southeast-3.aliyuncs.com', + 'ap-southeast-5' => 'vpc.ap-southeast-5.aliyuncs.com', + 'eu-west-1' => 'vpc.eu-west-1.aliyuncs.com', + 'ap-south-1' => 'vpc.ap-south-1.aliyuncs.com', + 'cn-chengdu' => 'vpc.cn-chengdu.aliyuncs.com', + 'cn-north-2-gov-1' => 'vpc.aliyuncs.com', + ], + 'kms' => + [ + 'me-east-1' => 'kms.me-east-1.aliyuncs.com', + 'ap-northeast-1' => 'kms.ap-northeast-1.aliyuncs.com', + 'cn-hongkong' => 'kms.cn-hongkong.aliyuncs.com', + 'cn-shanghai-finance-1' => 'kms.cn-shanghai-finance-1.aliyuncs.com', + 'cn-shanghai' => 'kms.cn-shanghai.aliyuncs.com', + 'cn-hangzhou' => 'kms.cn-hangzhou.aliyuncs.com', + 'cn-shenzhen' => 'kms.cn-shenzhen.aliyuncs.com', + 'ap-southeast-2' => 'kms.ap-southeast-2.aliyuncs.com', + 'cn-beijing' => 'kms.cn-beijing.aliyuncs.com', + 'cn-shenzhen-finance-1' => 'kms.cn-shenzhen-finance-1.aliyuncs.com', + 'ap-southeast-1' => 'kms.ap-southeast-1.aliyuncs.com', + 'eu-central-1' => 'kms.eu-central-1.aliyuncs.com', + 'cn-qingdao' => 'kms.cn-qingdao.aliyuncs.com', + 'cn-zhangjiakou' => 'kms.cn-zhangjiakou.aliyuncs.com', + 'cn-huhehaote' => 'kms.cn-huhehaote.aliyuncs.com', + 'ap-southeast-3' => 'kms.ap-southeast-3.aliyuncs.com', + 'ap-southeast-5' => 'kms.ap-southeast-5.aliyuncs.com', + 'eu-west-1' => 'kms.eu-west-1.aliyuncs.com', + 'us-west-1' => 'kms.us-west-1.aliyuncs.com', + 'us-east-1' => 'kms.us-east-1.aliyuncs.com', + 'ap-south-1' => 'kms.ap-south-1.aliyuncs.com', + 'cn-chengdu' => 'kms.cn-chengdu.aliyuncs.com', + 'cn-hangzhou-finance' => 'kms.cn-hangzhou-finance.aliyuncs.com', + 'cn-north-2-gov-1' => 'kms.cn-north-2-gov-1.aliyuncs.com', + ], + 'cms' => + [ + 'me-east-1' => 'metrics.cn-hangzhou.aliyuncs.com', + 'us-east-1' => 'metrics.cn-hangzhou.aliyuncs.com', + 'ap-northeast-1' => 'metrics.ap-northeast-1.aliyuncs.com', + 'cn-hongkong' => 'metrics.cn-hangzhou.aliyuncs.com', + 'cn-qingdao-cm9' => 'metrics.aliyuncs.com', + 'cn-shanghai' => 'metrics.cn-hangzhou.aliyuncs.com', + 'cn-shenzhen-inner' => 'metrics.aliyuncs.com', + 'us-west-1' => 'metrics.cn-hangzhou.aliyuncs.com', + 'cn-shanghai-inner' => 'metrics.aliyuncs.com', + 'cn-hangzhou' => 'metrics.cn-hangzhou.aliyuncs.com', + 'cn-beijing-inner' => 'metrics.aliyuncs.com', + 'cn-shenzhen' => 'metrics.cn-hangzhou.aliyuncs.com', + 'ap-southeast-2' => 'metrics.cn-hangzhou.aliyuncs.com', + 'cn-qingdao' => 'metrics.cn-hangzhou.aliyuncs.com', + 'cn-beijing' => 'metrics.cn-hangzhou.aliyuncs.com', + 'cn-hangzhou-d' => 'metrics.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'metrics.aliyuncs.com', + 'ap-southeast-1' => 'metrics.cn-hangzhou.aliyuncs.com', + 'eu-central-1' => 'metrics.cn-hangzhou.aliyuncs.com', + 'cn-zhangjiakou' => 'metrics.cn-hangzhou.aliyuncs.com', + 'cn-huhehaote' => 'metrics.cn-huhehaote.aliyuncs.com', + 'ap-southeast-3' => 'metrics.ap-southeast-3.aliyuncs.com', + 'ap-southeast-5' => 'metrics.ap-southeast-5.aliyuncs.com', + 'eu-west-1' => 'metrics.eu-west-1.aliyuncs.com', + 'ap-south-1' => 'metrics.ap-south-1.aliyuncs.com', + 'cn-chengdu' => 'metrics.cn-chengdu.aliyuncs.com', + 'cn-shanghai-finance-1' => 'metrics.cn-shanghai-finance-1.aliyuncs.com', + 'cn-shenzhen-finance-1' => 'metrics.cn-shenzhen-finance-1.aliyuncs.com', + 'cn-north-2-gov-1' => 'metrics.aliyuncs.com', + ], + 'slb' => + [ + 'me-east-1' => 'slb.me-east-1.aliyuncs.com', + 'us-east-1' => 'slb.aliyuncs.com', + 'ap-northeast-1' => 'slb.ap-northeast-1.aliyuncs.com', + 'cn-hongkong' => 'slb.aliyuncs.com', + 'cn-qingdao-cm9' => 'slb.aliyuncs.com', + 'cn-shanghai' => 'slb.aliyuncs.com', + 'cn-shenzhen-inner' => 'slb.aliyuncs.com', + 'us-west-1' => 'slb.aliyuncs.com', + 'cn-shanghai-inner' => 'slb.aliyuncs.com', + 'cn-hangzhou' => 'slb.aliyuncs.com', + 'cn-beijing-inner' => 'slb.aliyuncs.com', + 'cn-shenzhen' => 'slb.aliyuncs.com', + 'ap-southeast-2' => 'slb.ap-southeast-2.aliyuncs.com', + 'cn-qingdao' => 'slb.aliyuncs.com', + 'cn-beijing' => 'slb.aliyuncs.com', + 'cn-hangzhou-d' => 'slb.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'slb.aliyuncs.com', + 'ap-southeast-1' => 'slb.aliyuncs.com', + 'eu-central-1' => 'slb.eu-central-1.aliyuncs.com', + 'cn-zhangjiakou' => 'slb.cn-zhangjiakou.aliyuncs.com', + 'cn-huhehaote' => 'slb.cn-huhehaote.aliyuncs.com', + 'ap-southeast-3' => 'slb.ap-southeast-3.aliyuncs.com', + 'ap-southeast-5' => 'slb.ap-southeast-5.aliyuncs.com', + 'eu-west-1' => 'slb.eu-west-1.aliyuncs.com', + 'ap-south-1' => 'slb.ap-south-1.aliyuncs.com', + 'cn-chengdu' => 'slb.cn-chengdu.aliyuncs.com', + 'cn-shanghai-finance-1' => 'slb.aliyuncs.com', + 'cn-shenzhen-finance-1' => 'slb.aliyuncs.com', + 'cn-north-2-gov-1' => 'slb.aliyuncs.com', + ], + 'cs' => + [ + 'us-east-1' => 'cs.aliyuncs.com', + 'cn-hongkong' => 'cs.aliyuncs.com', + 'cn-qingdao-cm9' => 'cs.aliyuncs.com', + 'cn-shanghai' => 'cs.aliyuncs.com', + 'cn-shenzhen-inner' => 'cs.aliyuncs.com', + 'us-west-1' => 'cs.aliyuncs.com', + 'cn-shanghai-inner' => 'cs.aliyuncs.com', + 'cn-hangzhou' => 'cs.aliyuncs.com', + 'cn-beijing-inner' => 'cs.aliyuncs.com', + 'cn-shenzhen' => 'cs.aliyuncs.com', + 'cn-qingdao' => 'cs.aliyuncs.com', + 'cn-beijing' => 'cs.aliyuncs.com', + 'cn-hangzhou-d' => 'cs.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'cs.aliyuncs.com', + 'ap-southeast-1' => 'cs.aliyuncs.com', + ], + 'push' => + [ + 'us-east-1' => 'cloudpush.aliyuncs.com', + 'cn-hongkong' => 'cloudpush.aliyuncs.com', + 'cn-qingdao-cm9' => 'cloudpush.aliyuncs.com', + 'cn-shanghai' => 'cloudpush.aliyuncs.com', + 'cn-shenzhen-inner' => 'cloudpush.aliyuncs.com', + 'us-west-1' => 'cloudpush.aliyuncs.com', + 'cn-shanghai-inner' => 'cloudpush.aliyuncs.com', + 'cn-hangzhou' => 'cloudpush.aliyuncs.com', + 'cn-beijing-inner' => 'cloudpush.aliyuncs.com', + 'cn-shenzhen' => 'cloudpush.aliyuncs.com', + 'cn-qingdao' => 'cloudpush.aliyuncs.com', + 'cn-beijing' => 'cloudpush.aliyuncs.com', + 'cn-hangzhou-d' => 'cloudpush.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'cloudpush.aliyuncs.com', + 'ap-southeast-1' => 'cloudpush.aliyuncs.com', + ], + 'cos' => + [ + 'us-east-1' => 'cos.aliyuncs.com', + 'cn-hongkong' => 'cos.aliyuncs.com', + 'cn-qingdao-cm9' => 'cos.aliyuncs.com', + 'cn-shanghai' => 'cos.aliyuncs.com', + 'cn-shenzhen-inner' => 'cos.aliyuncs.com', + 'us-west-1' => 'cos.aliyuncs.com', + 'cn-shanghai-inner' => 'cos.aliyuncs.com', + 'cn-hangzhou' => 'cos.aliyuncs.com', + 'cn-beijing-inner' => 'cos.aliyuncs.com', + 'cn-shenzhen' => 'cos.aliyuncs.com', + 'cn-qingdao' => 'cos.aliyuncs.com', + 'cn-beijing' => 'cos.aliyuncs.com', + 'cn-hangzhou-d' => 'cos.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'cos.aliyuncs.com', + 'ap-southeast-1' => 'cos.aliyuncs.com', + ], + 'ess' => + [ + 'us-east-1' => 'ess.aliyuncs.com', + 'cn-hongkong' => 'ess.aliyuncs.com', + 'cn-qingdao-cm9' => 'ess.aliyuncs.com', + 'cn-shanghai' => 'ess.aliyuncs.com', + 'cn-shenzhen-inner' => 'ess.aliyuncs.com', + 'us-west-1' => 'ess.aliyuncs.com', + 'cn-shanghai-inner' => 'ess.aliyuncs.com', + 'cn-hangzhou' => 'ess.aliyuncs.com', + 'cn-beijing-inner' => 'ess.aliyuncs.com', + 'cn-shenzhen' => 'ess.aliyuncs.com', + 'cn-qingdao' => 'ess.aliyuncs.com', + 'cn-beijing' => 'ess.aliyuncs.com', + 'cn-hangzhou-d' => 'ess.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'ess.aliyuncs.com', + 'ap-southeast-1' => 'ess.aliyuncs.com', + 'cn-zhangjiakou' => 'ess.cn-zhangjiakou.aliyuncs.com', + 'cn-huhehaote' => 'ess.cn-huhehaote.aliyuncs.com', + 'ap-southeast-2' => 'ess.ap-southeast-2.aliyuncs.com', + 'ap-southeast-3' => 'ess.ap-southeast-3.aliyuncs.com', + 'ap-southeast-5' => 'ess.ap-southeast-5.aliyuncs.com', + 'ap-northeast-1' => 'ess.ap-northeast-1.aliyuncs.com', + 'eu-west-1' => 'ess.eu-west-1.aliyuncs.com', + 'eu-central-1' => 'ess.eu-central-1.aliyuncs.com', + 'me-east-1' => 'ess.me-east-1.aliyuncs.com', + 'ap-south-1' => 'ess.ap-south-1.aliyuncs.com', + 'cn-shanghai-finance-1' => 'ess.aliyuncs.com', + 'cn-shenzhen-finance-1' => 'ess.aliyuncs.com', + 'cn-north-2-gov-1' => 'ess.aliyuncs.com', + ], + 'ace-ops' => + [ + 'us-east-1' => 'ace-ops.cn-hangzhou.aliyuncs.com', + 'cn-hongkong' => 'ace-ops.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'ace-ops.cn-hangzhou.aliyuncs.com', + 'us-west-1' => 'ace-ops.cn-hangzhou.aliyuncs.com', + 'cn-hangzhou' => 'ace-ops.cn-hangzhou.aliyuncs.com', + 'cn-shenzhen' => 'ace-ops.cn-hangzhou.aliyuncs.com', + 'cn-qingdao' => 'ace-ops.cn-hangzhou.aliyuncs.com', + 'cn-beijing' => 'ace-ops.cn-hangzhou.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'ace-ops.cn-hangzhou.aliyuncs.com', + ], + 'billing' => + [ + 'us-east-1' => 'billing.aliyuncs.com', + 'cn-hongkong' => 'billing.aliyuncs.com', + 'cn-qingdao-cm9' => 'billing.aliyuncs.com', + 'cn-shanghai' => 'billing.aliyuncs.com', + 'cn-shenzhen-inner' => 'billing.aliyuncs.com', + 'us-west-1' => 'billing.aliyuncs.com', + 'cn-shanghai-inner' => 'billing.aliyuncs.com', + 'cn-hangzhou' => 'billing.aliyuncs.com', + 'cn-beijing-inner' => 'billing.aliyuncs.com', + 'cn-beijing' => 'billing.aliyuncs.com', + 'cn-hangzhou-d' => 'billing.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'billing.aliyuncs.com', + 'ap-southeast-1' => 'billing.aliyuncs.com', + ], + 'dqs' => + [ + 'us-east-1' => 'dqs.aliyuncs.com', + 'cn-hongkong' => 'dqs.aliyuncs.com', + 'cn-qingdao-cm9' => 'dqs.aliyuncs.com', + 'cn-shanghai' => 'dqs.aliyuncs.com', + 'cn-shenzhen-inner' => 'dqs.aliyuncs.com', + 'us-west-1' => 'dqs.aliyuncs.com', + 'cn-shanghai-inner' => 'dqs.aliyuncs.com', + 'cn-hangzhou' => 'dqs.aliyuncs.com', + 'cn-beijing-inner' => 'dqs.aliyuncs.com', + 'cn-shenzhen' => 'dqs.aliyuncs.com', + 'cn-qingdao' => 'dqs.aliyuncs.com', + 'cn-beijing' => 'dqs.aliyuncs.com', + 'cn-hangzhou-d' => 'dqs.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'dqs.aliyuncs.com', + 'ap-southeast-1' => 'dqs.aliyuncs.com', + ], + 'dds' => + [ + 'us-east-1' => 'mongodb.aliyuncs.com', + 'cn-hongkong' => 'mongodb.aliyuncs.com', + 'cn-qingdao-cm9' => 'mongodb.aliyuncs.com', + 'cn-shanghai' => 'mongodb.aliyuncs.com', + 'cn-shenzhen-inner' => 'mongodb.aliyuncs.com', + 'us-west-1' => 'mongodb.aliyuncs.com', + 'cn-shanghai-inner' => 'mongodb.aliyuncs.com', + 'cn-hangzhou' => 'mongodb.aliyuncs.com', + 'cn-beijing-inner' => 'mongodb.aliyuncs.com', + 'cn-shenzhen' => 'mongodb.aliyuncs.com', + 'cn-qingdao' => 'mongodb.aliyuncs.com', + 'cn-beijing' => 'mongodb.aliyuncs.com', + 'cn-hangzhou-d' => 'mongodb.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'mongodb.aliyuncs.com', + 'ap-southeast-1' => 'mongodb.aliyuncs.com', + 'cn-zhangjiakou' => 'mongodb.cn-zhangjiakou.aliyuncs.com', + 'cn-huhehaote' => 'mongodb.cn-huhehaote.aliyuncs.com', + 'ap-southeast-2' => 'mongodb.ap-southeast-2.aliyuncs.com', + 'ap-southeast-3' => 'mongodb.ap-southeast-3.aliyuncs.com', + 'ap-southeast-5' => 'mongodb.ap-southeast-5.aliyuncs.com', + 'ap-northeast-1' => 'mongodb.ap-northeast-1.aliyuncs.com', + 'eu-west-1' => 'mongodb.eu-west-1.aliyuncs.com', + 'eu-central-1' => 'mongodb.eu-central-1.aliyuncs.com', + 'me-east-1' => 'mongodb.me-east-1.aliyuncs.com', + 'ap-south-1' => 'mongodb.ap-south-1.aliyuncs.com', + 'cn-chengdu' => 'mongodb.cn-chengdu.aliyuncs.com', + 'cn-hangzhou-finance' => 'mongodb.aliyuncs.com', + 'cn-shanghai-finance-1' => 'mongodb.aliyuncs.com', + 'cn-shenzhen-finance-1' => 'mongodb.aliyuncs.com', + 'cn-north-2-gov-1' => 'mongodb.aliyuncs.com', + ], + 'emr' => + [ + 'us-east-1' => 'emr.us-east-1.aliyuncs.com', + 'cn-hongkong' => 'emr.cn-hongkong.aliyuncs.com', + 'cn-qingdao-cm9' => 'emr.aliyuncs.com', + 'cn-shanghai' => 'emr.aliyuncs.com', + 'cn-shenzhen-inner' => 'emr.aliyuncs.com', + 'us-west-1' => 'emr.aliyuncs.com', + 'cn-shanghai-inner' => 'emr.aliyuncs.com', + 'cn-hangzhou' => 'emr.aliyuncs.com', + 'cn-beijing-inner' => 'emr.aliyuncs.com', + 'cn-shenzhen' => 'emr.aliyuncs.com', + 'cn-qingdao' => 'emr.cn-qingdao.aliyuncs.com', + 'cn-beijing' => 'emr.aliyuncs.com', + 'cn-hangzhou-d' => 'emr.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'emr.aliyuncs.com', + 'ap-southeast-1' => 'emr.aliyuncs.com', + 'cn-zhangjiakou' => 'emr.cn-zhangjiakou.aliyuncs.com', + 'cn-huhehaote' => 'emr.cn-huhehaote.aliyuncs.com', + 'ap-southeast-2' => 'emr.ap-southeast-2.aliyuncs.com', + 'ap-southeast-3' => 'emr.ap-southeast-3.aliyuncs.com', + 'ap-southeast-5' => 'emr.ap-southeast-5.aliyuncs.com', + 'ap-northeast-1' => 'emr.ap-northeast-1.aliyuncs.com', + 'eu-west-1' => 'emr.eu-west-1.aliyuncs.com', + 'eu-central-1' => 'emr.eu-central-1.aliyuncs.com', + 'me-east-1' => 'emr.me-east-1.aliyuncs.com', + 'ap-south-1' => 'emr.ap-south-1.aliyuncs.com', + 'cn-chengdu' => 'emr.cn-chengdu.aliyuncs.com', + ], + 'sms' => + [ + 'us-east-1' => 'sms.aliyuncs.com', + 'cn-hongkong' => 'sms.aliyuncs.com', + 'cn-qingdao-cm9' => 'sms.aliyuncs.com', + 'cn-shanghai' => 'sms.aliyuncs.com', + 'cn-shenzhen-inner' => 'sms.aliyuncs.com', + 'us-west-1' => 'sms.aliyuncs.com', + 'cn-shanghai-inner' => 'sms.aliyuncs.com', + 'cn-hangzhou' => 'sms.aliyuncs.com', + 'cn-beijing-inner' => 'sms.aliyuncs.com', + 'cn-shenzhen' => 'sms.aliyuncs.com', + 'cn-qingdao' => 'sms.aliyuncs.com', + 'cn-beijing' => 'sms.aliyuncs.com', + 'cn-hangzhou-d' => 'sms.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'sms.aliyuncs.com', + 'ap-southeast-1' => 'sms.aliyuncs.com', + ], + 'jaq' => + [ + 'us-east-1' => 'jaq.aliyuncs.com', + 'cn-hongkong' => 'jaq.aliyuncs.com', + 'cn-qingdao-cm9' => 'jaq.aliyuncs.com', + 'cn-shanghai' => 'jaq.aliyuncs.com', + 'cn-shenzhen-inner' => 'jaq.aliyuncs.com', + 'us-west-1' => 'jaq.aliyuncs.com', + 'cn-shanghai-inner' => 'jaq.aliyuncs.com', + 'cn-hangzhou' => 'jaq.aliyuncs.com', + 'cn-beijing-inner' => 'jaq.aliyuncs.com', + 'cn-shenzhen' => 'jaq.aliyuncs.com', + 'cn-qingdao' => 'jaq.aliyuncs.com', + 'cn-beijing' => 'jaq.aliyuncs.com', + 'cn-hangzhou-d' => 'jaq.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'jaq.aliyuncs.com', + 'ap-southeast-1' => 'jaq.aliyuncs.com', + ], + 'hpc' => + [ + 'us-east-1' => 'hpc.aliyuncs.com', + 'cn-hongkong' => 'hpc.aliyuncs.com', + 'cn-qingdao-cm9' => 'hpc.aliyuncs.com', + 'cn-shanghai' => 'hpc.aliyuncs.com', + 'cn-shenzhen-inner' => 'hpc.aliyuncs.com', + 'us-west-1' => 'hpc.aliyuncs.com', + 'cn-shanghai-inner' => 'hpc.aliyuncs.com', + 'cn-hangzhou' => 'hpc.aliyuncs.com', + 'cn-beijing-inner' => 'hpc.aliyuncs.com', + 'cn-shenzhen' => 'hpc.aliyuncs.com', + 'cn-qingdao' => 'hpc.aliyuncs.com', + 'cn-beijing' => 'hpc.aliyuncs.com', + 'cn-hangzhou-d' => 'hpc.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'hpc.aliyuncs.com', + 'ap-southeast-1' => 'hpc.aliyuncs.com', + ], + 'location' => + [ + 'us-east-1' => 'location.aliyuncs.com', + 'cn-hongkong' => 'location.aliyuncs.com', + 'cn-qingdao-cm9' => 'location.aliyuncs.com', + 'cn-shanghai' => 'location.aliyuncs.com', + 'cn-shenzhen-inner' => 'location.aliyuncs.com', + 'us-west-1' => 'location.aliyuncs.com', + 'cn-shanghai-inner' => 'location.aliyuncs.com', + 'cn-hangzhou' => 'location.aliyuncs.com', + 'cn-beijing-inner' => 'location.aliyuncs.com', + 'cn-shenzhen' => 'location.aliyuncs.com', + 'cn-qingdao' => 'location.aliyuncs.com', + 'cn-beijing' => 'location.aliyuncs.com', + 'cn-hangzhou-d' => 'location.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'location.aliyuncs.com', + 'ap-southeast-1' => 'location.aliyuncs.com', + ], + 'chargingservice' => + [ + 'us-east-1' => 'chargingservice.aliyuncs.com', + 'cn-hongkong' => 'chargingservice.aliyuncs.com', + 'cn-qingdao-cm9' => 'chargingservice.aliyuncs.com', + 'cn-shanghai' => 'chargingservice.aliyuncs.com', + 'cn-shenzhen-inner' => 'chargingservice.aliyuncs.com', + 'us-west-1' => 'chargingservice.aliyuncs.com', + 'cn-shanghai-inner' => 'chargingservice.aliyuncs.com', + 'cn-hangzhou' => 'chargingservice.aliyuncs.com', + 'cn-beijing-inner' => 'chargingservice.aliyuncs.com', + 'cn-beijing' => 'chargingservice.aliyuncs.com', + 'cn-hangzhou-d' => 'chargingservice.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'chargingservice.aliyuncs.com', + 'ap-southeast-1' => 'chargingservice.aliyuncs.com', + ], + 'msg' => + [ + 'us-east-1' => 'msg-inner.aliyuncs.com', + 'cn-hongkong' => 'msg-inner.aliyuncs.com', + 'cn-qingdao-cm9' => 'msg-inner.aliyuncs.com', + 'cn-shanghai' => 'msg-inner.aliyuncs.com', + 'cn-shenzhen-inner' => 'msg-inner.aliyuncs.com', + 'us-west-1' => 'msg-inner.aliyuncs.com', + 'cn-shanghai-inner' => 'msg-inner.aliyuncs.com', + 'cn-hangzhou' => 'msg-inner.aliyuncs.com', + 'cn-beijing-inner' => 'msg-inner.aliyuncs.com', + 'cn-beijing' => 'msg-inner.aliyuncs.com', + 'cn-hangzhou-d' => 'msg-inner.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'msg-inner.aliyuncs.com', + 'ap-southeast-1' => 'msg-inner.aliyuncs.com', + ], + 'commondriver' => + [ + 'us-east-1' => 'common.driver.aliyuncs.com', + 'cn-hongkong' => 'common.driver.aliyuncs.com', + 'cn-qingdao-cm9' => 'common.driver.aliyuncs.com', + 'cn-shanghai' => 'common.driver.aliyuncs.com', + 'cn-shenzhen-inner' => 'common.driver.aliyuncs.com', + 'us-west-1' => 'common.driver.aliyuncs.com', + 'cn-shanghai-inner' => 'common.driver.aliyuncs.com', + 'cn-hangzhou' => 'common.driver.aliyuncs.com', + 'cn-beijing-inner' => 'common.driver.aliyuncs.com', + 'cn-shenzhen' => 'common.driver.aliyuncs.com', + 'cn-qingdao' => 'common.driver.aliyuncs.com', + 'cn-beijing' => 'common.driver.aliyuncs.com', + 'cn-hangzhou-d' => 'common.driver.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'common.driver.aliyuncs.com', + 'ap-southeast-1' => 'common.driver.aliyuncs.com', + ], + 'r-kvstore' => + [ + 'us-east-1' => 'r-kvstore-cn-hangzhou.aliyuncs.com', + 'cn-hongkong' => 'r-kvstore-cn-hangzhou.aliyuncs.com', + 'cn-qingdao-cm9' => 'r-kvstore-cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'r-kvstore-cn-hangzhou.aliyuncs.com', + 'cn-shenzhen-inner' => 'r-kvstore-cn-hangzhou.aliyuncs.com', + 'us-west-1' => 'r-kvstore-cn-hangzhou.aliyuncs.com', + 'cn-shanghai-inner' => 'r-kvstore-cn-hangzhou.aliyuncs.com', + 'cn-hangzhou' => 'r-kvstore-cn-hangzhou.aliyuncs.com', + 'cn-beijing-inner' => 'r-kvstore-cn-hangzhou.aliyuncs.com', + 'cn-shenzhen' => 'r-kvstore-cn-hangzhou.aliyuncs.com', + 'cn-qingdao' => 'r-kvstore-cn-hangzhou.aliyuncs.com', + 'cn-beijing' => 'r-kvstore-cn-hangzhou.aliyuncs.com', + 'cn-hangzhou-d' => 'r-kvstore-cn-hangzhou.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'r-kvstore-cn-hangzhou.aliyuncs.com', + 'ap-southeast-1' => 'r-kvstore-cn-hangzhou.aliyuncs.com', + ], + 'bss' => + [ + 'us-east-1' => 'bss.aliyuncs.com', + 'cn-hongkong' => 'bss.aliyuncs.com', + 'cn-qingdao-cm9' => 'bss.aliyuncs.com', + 'cn-shanghai' => 'bss.aliyuncs.com', + 'cn-shenzhen-inner' => 'bss.aliyuncs.com', + 'us-west-1' => 'bss.aliyuncs.com', + 'cn-shanghai-inner' => 'bss.aliyuncs.com', + 'cn-hangzhou' => 'bss.aliyuncs.com', + 'cn-beijing-inner' => 'bss.aliyuncs.com', + 'cn-shenzhen' => 'bss.aliyuncs.com', + 'cn-qingdao' => 'bss.aliyuncs.com', + 'cn-beijing' => 'bss.aliyuncs.com', + 'cn-hangzhou-d' => 'bss.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'bss.aliyuncs.com', + 'ap-southeast-1' => 'bss.aliyuncs.com', + ], + 'workorder' => + [ + 'us-east-1' => 'workorder.aliyuncs.com', + 'cn-hongkong' => 'workorder.aliyuncs.com', + 'cn-qingdao-cm9' => 'workorder.aliyuncs.com', + 'cn-shanghai' => 'workorder.aliyuncs.com', + 'cn-shenzhen-inner' => 'workorder.aliyuncs.com', + 'us-west-1' => 'workorder.aliyuncs.com', + 'cn-shanghai-inner' => 'workorder.aliyuncs.com', + 'cn-hangzhou' => 'workorder.aliyuncs.com', + 'cn-beijing-inner' => 'workorder.aliyuncs.com', + 'cn-beijing' => 'workorder.aliyuncs.com', + 'cn-hangzhou-d' => 'workorder.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'workorder.aliyuncs.com', + 'ap-southeast-1' => 'workorder.aliyuncs.com', + ], + 'ocs' => + [ + 'us-east-1' => 'm-kvstore.aliyuncs.com', + 'cn-hongkong' => 'm-kvstore.aliyuncs.com', + 'cn-qingdao-cm9' => 'm-kvstore.aliyuncs.com', + 'cn-shanghai' => 'm-kvstore.aliyuncs.com', + 'cn-shenzhen-inner' => 'm-kvstore.aliyuncs.com', + 'us-west-1' => 'm-kvstore.aliyuncs.com', + 'cn-shanghai-inner' => 'm-kvstore.aliyuncs.com', + 'cn-hangzhou' => 'm-kvstore.aliyuncs.com', + 'cn-beijing-inner' => 'm-kvstore.aliyuncs.com', + 'cn-shenzhen' => 'm-kvstore.aliyuncs.com', + 'cn-qingdao' => 'm-kvstore.aliyuncs.com', + 'cn-beijing' => 'm-kvstore.aliyuncs.com', + 'cn-hangzhou-d' => 'm-kvstore.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'm-kvstore.aliyuncs.com', + 'ap-southeast-1' => 'm-kvstore.aliyuncs.com', + ], + 'yundun' => + [ + 'us-east-1' => 'yundun-cn-hangzhou.aliyuncs.com', + 'cn-hongkong' => 'yundun-cn-hangzhou.aliyuncs.com', + 'cn-qingdao-cm9' => 'yundun-cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'yundun-cn-hangzhou.aliyuncs.com', + 'cn-shenzhen-inner' => 'yundun-cn-hangzhou.aliyuncs.com', + 'us-west-1' => 'yundun-cn-hangzhou.aliyuncs.com', + 'cn-shanghai-inner' => 'yundun-cn-hangzhou.aliyuncs.com', + 'cn-hangzhou' => 'yundun-cn-hangzhou.aliyuncs.com', + 'cn-beijing-inner' => 'yundun-cn-hangzhou.aliyuncs.com', + 'cn-shenzhen' => 'yundun-cn-hangzhou.aliyuncs.com', + 'cn-qingdao' => 'yundun-cn-hangzhou.aliyuncs.com', + 'cn-beijing' => 'yundun-cn-hangzhou.aliyuncs.com', + 'cn-hangzhou-d' => 'yundun-cn-hangzhou.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'yundun-cn-hangzhou.aliyuncs.com', + 'ap-southeast-1' => 'yundun-cn-hangzhou.aliyuncs.com', + ], + 'ubsms-inner' => + [ + 'us-east-1' => 'ubsms-inner.aliyuncs.com', + 'cn-hongkong' => 'ubsms-inner.aliyuncs.com', + 'cn-qingdao-cm9' => 'ubsms-inner.aliyuncs.com', + 'cn-shanghai' => 'ubsms-inner.aliyuncs.com', + 'cn-shenzhen-inner' => 'ubsms-inner.aliyuncs.com', + 'us-west-1' => 'ubsms-inner.aliyuncs.com', + 'cn-shanghai-inner' => 'ubsms-inner.aliyuncs.com', + 'cn-hangzhou' => 'ubsms-inner.aliyuncs.com', + 'cn-beijing-inner' => 'ubsms-inner.aliyuncs.com', + 'cn-shenzhen' => 'ubsms-inner.aliyuncs.com', + 'cn-qingdao' => 'ubsms-inner.cn-qingdao.aliyuncs.com', + 'cn-beijing' => 'ubsms-inner.aliyuncs.com', + 'cn-hangzhou-d' => 'ubsms-inner.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'ubsms-inner.aliyuncs.com', + 'ap-southeast-1' => 'ubsms-inner.aliyuncs.com', + ], + 'dm' => + [ + 'us-east-1' => 'dm.aliyuncs.com', + 'cn-hongkong' => 'dm.aliyuncs.com', + 'cn-qingdao-cm9' => 'dm.aliyuncs.com', + 'cn-shanghai' => 'dm.aliyuncs.com', + 'cn-shenzhen-inner' => 'dm.aliyuncs.com', + 'us-west-1' => 'dm.aliyuncs.com', + 'cn-shanghai-inner' => 'dm.aliyuncs.com', + 'cn-hangzhou' => 'dm.aliyuncs.com', + 'cn-beijing-inner' => 'dm.aliyuncs.com', + 'cn-shenzhen' => 'dm.aliyuncs.com', + 'cn-qingdao' => 'dm.aliyuncs.com', + 'cn-beijing' => 'dm.aliyuncs.com', + 'cn-hangzhou-d' => 'dm.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'dm.aliyuncs.com', + 'ap-southeast-1' => 'dm.aliyuncs.com', + ], + 'green' => + [ + 'us-east-1' => 'green.aliyuncs.com', + 'cn-hongkong' => 'green.aliyuncs.com', + 'cn-qingdao-cm9' => 'green.aliyuncs.com', + 'cn-shanghai' => 'green.cn-shanghai.aliyuncs.com', + 'cn-shenzhen-inner' => 'green.aliyuncs.com', + 'us-west-1' => 'green.us-west-1.aliyuncs.com', + 'cn-shanghai-inner' => 'green.aliyuncs.com', + 'cn-hangzhou' => 'green.cn-hangzhou.aliyuncs.com', + 'cn-beijing-inner' => 'green.aliyuncs.com', + 'cn-shenzhen' => 'green.cn-shenzhen.aliyuncs.com', + 'cn-qingdao' => 'green.aliyuncs.com', + 'cn-beijing' => 'green.cn-beijing.aliyuncs.com', + 'cn-hangzhou-d' => 'green.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'green.aliyuncs.com', + 'ap-southeast-1' => 'green.ap-southeast-1.aliyuncs.com', + ], + 'risk' => + [ + 'us-east-1' => 'risk-cn-hangzhou.aliyuncs.com', + 'cn-hongkong' => 'risk-cn-hangzhou.aliyuncs.com', + 'cn-qingdao-cm9' => 'risk-cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'risk-cn-hangzhou.aliyuncs.com', + 'cn-shenzhen-inner' => 'risk-cn-hangzhou.aliyuncs.com', + 'us-west-1' => 'risk-cn-hangzhou.aliyuncs.com', + 'cn-shanghai-inner' => 'risk-cn-hangzhou.aliyuncs.com', + 'cn-hangzhou' => 'risk-cn-hangzhou.aliyuncs.com', + 'cn-beijing-inner' => 'risk-cn-hangzhou.aliyuncs.com', + 'cn-shenzhen' => 'risk-cn-hangzhou.aliyuncs.com', + 'cn-qingdao' => 'risk-cn-hangzhou.aliyuncs.com', + 'cn-beijing' => 'risk-cn-hangzhou.aliyuncs.com', + 'cn-hangzhou-d' => 'risk-cn-hangzhou.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'risk-cn-hangzhou.aliyuncs.com', + 'ap-southeast-1' => 'risk-cn-hangzhou.aliyuncs.com', + ], + 'oceanbase' => + [ + 'us-east-1' => 'oceanbase.aliyuncs.com', + 'cn-hongkong' => 'oceanbase.aliyuncs.com', + 'cn-qingdao-cm9' => 'oceanbase.aliyuncs.com', + 'cn-shanghai' => 'oceanbasepro-share.cn-shanghai.aliyuncs.com', + 'cn-shenzhen-inner' => 'oceanbase.aliyuncs.com', + 'us-west-1' => 'oceanbase.aliyuncs.com', + 'cn-shanghai-inner' => 'oceanbase.aliyuncs.com', + 'cn-hangzhou' => 'ob.cn-hangzhou.aliyuncs.com', + 'cn-beijing-inner' => 'oceanbase.aliyuncs.com', + 'cn-shenzhen' => 'oceanbase.aliyuncs.com', + 'cn-qingdao' => 'oceanbase.aliyuncs.com', + 'cn-beijing' => 'oceanbase.aliyuncs.com', + 'cn-hangzhou-d' => 'oceanbase.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'oceanbase.aliyuncs.com', + 'ap-southeast-1' => 'oceanbase.aliyuncs.com', + ], + 'msc' => + [ + 'us-east-1' => 'msc-inner.aliyuncs.com', + 'cn-hongkong' => 'msc-inner.aliyuncs.com', + 'cn-qingdao-cm9' => 'msc-inner.aliyuncs.com', + 'cn-shanghai' => 'msc-inner.aliyuncs.com', + 'cn-shenzhen-inner' => 'msc-inner.aliyuncs.com', + 'us-west-1' => 'msc-inner.aliyuncs.com', + 'cn-shanghai-inner' => 'msc-inner.aliyuncs.com', + 'cn-hangzhou' => 'msc-inner.aliyuncs.com', + 'cn-beijing-inner' => 'msc-inner.aliyuncs.com', + 'cn-beijing' => 'msc-inner.aliyuncs.com', + 'cn-hangzhou-d' => 'msc-inner.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'msc-inner.aliyuncs.com', + 'ap-southeast-1' => 'msc-inner.aliyuncs.com', + ], + 'yundunhsm' => + [ + 'us-east-1' => 'yundunhsm.aliyuncs.com', + 'cn-hongkong' => 'yundunhsm.aliyuncs.com', + 'cn-qingdao-cm9' => 'yundunhsm.aliyuncs.com', + 'cn-shanghai' => 'yundunhsm.aliyuncs.com', + 'cn-shenzhen-inner' => 'yundunhsm.aliyuncs.com', + 'us-west-1' => 'yundunhsm.aliyuncs.com', + 'cn-shanghai-inner' => 'yundunhsm.aliyuncs.com', + 'cn-hangzhou' => 'yundunhsm.aliyuncs.com', + 'cn-beijing-inner' => 'yundunhsm.aliyuncs.com', + 'cn-beijing' => 'yundunhsm.aliyuncs.com', + 'cn-hangzhou-d' => 'yundunhsm.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'yundunhsm.aliyuncs.com', + 'ap-southeast-1' => 'yundunhsm.aliyuncs.com', + ], + 'iot' => + [ + 'cn-hongkong' => 'iot.aliyuncs.com', + 'cn-qingdao-cm9' => 'iot.aliyuncs.com', + 'cn-shanghai' => 'iot.cn-shanghai.aliyuncs.com', + 'cn-shenzhen-inner' => 'iot.aliyuncs.com', + 'us-west-1' => 'iot.us-west-1.aliyuncs.com', + 'cn-shanghai-inner' => 'iot.aliyuncs.com', + 'cn-hangzhou' => 'iot.aliyuncs.com', + 'cn-beijing-inner' => 'iot.aliyuncs.com', + 'cn-shenzhen' => 'iot.aliyuncs.com', + 'cn-qingdao' => 'iot.aliyuncs.com', + 'cn-beijing' => 'iot.aliyuncs.com', + 'cn-hangzhou-d' => 'iot.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'iot.aliyuncs.com', + 'ap-southeast-1' => 'iot.ap-southeast-1.aliyuncs.com', + 'ap-northeast-1' => 'iot.ap-northeast-1.aliyuncs.com', + 'us-east-1' => 'iot.us-east-1.aliyuncs.com', + 'eu-central-1' => 'iot.eu-central-1.aliyuncs.com', + ], + 'oms' => + [ + 'us-east-1' => 'oms.aliyuncs.com', + 'cn-hongkong' => 'oms.aliyuncs.com', + 'cn-qingdao-cm9' => 'oms.aliyuncs.com', + 'cn-shanghai' => 'oms.aliyuncs.com', + 'cn-shenzhen-inner' => 'oms.aliyuncs.com', + 'us-west-1' => 'oms.aliyuncs.com', + 'cn-shanghai-inner' => 'oms.aliyuncs.com', + 'cn-hangzhou' => 'oms.aliyuncs.com', + 'cn-beijing-inner' => 'oms.aliyuncs.com', + 'cn-shenzhen' => 'oms.aliyuncs.com', + 'cn-qingdao' => 'oms.aliyuncs.com', + 'cn-beijing' => 'oms.aliyuncs.com', + 'cn-hangzhou-d' => 'oms.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'oms.aliyuncs.com', + 'ap-southeast-1' => 'oms.aliyuncs.com', + ], + 'live' => + [ + 'us-east-1' => 'live.aliyuncs.com', + 'cn-hongkong' => 'live.aliyuncs.com', + 'cn-qingdao-cm9' => 'live.aliyuncs.com', + 'cn-shanghai' => 'live.aliyuncs.com', + 'cn-shenzhen-inner' => 'live.aliyuncs.com', + 'us-west-1' => 'live.aliyuncs.com', + 'cn-shanghai-inner' => 'live.aliyuncs.com', + 'cn-hangzhou' => 'live.aliyuncs.com', + 'cn-beijing-inner' => 'live.aliyuncs.com', + 'cn-shenzhen' => 'live.aliyuncs.com', + 'cn-qingdao' => 'live.aliyuncs.com', + 'cn-beijing' => 'live.aliyuncs.com', + 'cn-hangzhou-d' => 'live.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'live.aliyuncs.com', + 'ap-southeast-1' => 'live.aliyuncs.com', + 'ap-northeast-1' => 'live.aliyuncs.com', + 'eu-central-1' => 'live.aliyuncs.com', + 'ap-southeast-5' => 'live.aliyuncs.com', + 'ap-south-1' => 'live.aliyuncs.com', + ], + 'ubsms' => + [ + 'us-east-1' => 'ubsms.aliyuncs.com', + 'cn-hongkong' => 'ubsms.aliyuncs.com', + 'cn-qingdao-cm9' => 'ubsms.aliyuncs.com', + 'cn-shanghai' => 'ubsms.aliyuncs.com', + 'cn-shenzhen-inner' => 'ubsms.aliyuncs.com', + 'us-west-1' => 'ubsms.aliyuncs.com', + 'cn-shanghai-inner' => 'ubsms.aliyuncs.com', + 'cn-hangzhou' => 'ubsms.aliyuncs.com', + 'cn-beijing-inner' => 'ubsms.aliyuncs.com', + 'cn-shenzhen' => 'ubsms.aliyuncs.com', + 'cn-qingdao' => 'ubsms.cn-qingdao.aliyuncs.com', + 'cn-beijing' => 'ubsms.aliyuncs.com', + 'cn-hangzhou-d' => 'ubsms.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'ubsms.aliyuncs.com', + 'ap-southeast-1' => 'ubsms.aliyuncs.com', + ], + 'alert' => + [ + 'us-east-1' => 'alert.aliyuncs.com', + 'cn-hongkong' => 'alert.aliyuncs.com', + 'cn-qingdao-cm9' => 'alert.aliyuncs.com', + 'cn-shanghai' => 'alert.aliyuncs.com', + 'cn-shenzhen-inner' => 'alert.aliyuncs.com', + 'us-west-1' => 'alert.aliyuncs.com', + 'cn-shanghai-inner' => 'alert.aliyuncs.com', + 'cn-hangzhou' => 'alert.aliyuncs.com', + 'cn-beijing-inner' => 'alert.aliyuncs.com', + 'cn-shenzhen' => 'alert.aliyuncs.com', + 'cn-qingdao' => 'alert.aliyuncs.com', + 'cn-beijing' => 'alert.aliyuncs.com', + 'cn-hangzhou-d' => 'alert.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'alert.aliyuncs.com', + 'ap-southeast-1' => 'alert.aliyuncs.com', + ], + 'ace' => + [ + 'us-east-1' => 'ace.cn-hangzhou.aliyuncs.com', + 'cn-hongkong' => 'ace.cn-hangzhou.aliyuncs.com', + 'cn-qingdao-cm9' => 'ace.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'ace.cn-hangzhou.aliyuncs.com', + 'cn-shenzhen-inner' => 'ace.cn-hangzhou.aliyuncs.com', + 'us-west-1' => 'ace.cn-hangzhou.aliyuncs.com', + 'cn-shanghai-inner' => 'ace.cn-hangzhou.aliyuncs.com', + 'cn-hangzhou' => 'ace.cn-hangzhou.aliyuncs.com', + 'cn-beijing-inner' => 'ace.cn-hangzhou.aliyuncs.com', + 'cn-shenzhen' => 'ace.cn-hangzhou.aliyuncs.com', + 'cn-qingdao' => 'ace.cn-hangzhou.aliyuncs.com', + 'cn-beijing' => 'ace.cn-hangzhou.aliyuncs.com', + 'cn-hangzhou-d' => 'ace.cn-hangzhou.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'ace.cn-hangzhou.aliyuncs.com', + 'ap-southeast-1' => 'ace.cn-hangzhou.aliyuncs.com', + ], + 'ams' => + [ + 'us-east-1' => 'ams.aliyuncs.com', + 'cn-hongkong' => 'ams.aliyuncs.com', + 'cn-qingdao-cm9' => 'ams.aliyuncs.com', + 'cn-shanghai' => 'ams.aliyuncs.com', + 'cn-shenzhen-inner' => 'ams.aliyuncs.com', + 'us-west-1' => 'ams.aliyuncs.com', + 'cn-shanghai-inner' => 'ams.aliyuncs.com', + 'cn-hangzhou' => 'ams.aliyuncs.com', + 'cn-beijing-inner' => 'ams.aliyuncs.com', + 'cn-beijing' => 'ams.aliyuncs.com', + 'cn-hangzhou-d' => 'ams.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'ams.aliyuncs.com', + 'ap-southeast-1' => 'ams.aliyuncs.com', + ], + 'ros' => + [ + 'us-east-1' => 'ros.aliyuncs.com', + 'cn-hongkong' => 'ros.aliyuncs.com', + 'cn-qingdao-cm9' => 'ros.aliyuncs.com', + 'cn-shanghai' => 'ros.aliyuncs.com', + 'cn-shenzhen-inner' => 'ros.aliyuncs.com', + 'us-west-1' => 'ros.aliyuncs.com', + 'cn-shanghai-inner' => 'ros.aliyuncs.com', + 'cn-hangzhou' => 'ros.aliyuncs.com', + 'cn-beijing-inner' => 'ros.aliyuncs.com', + 'cn-shenzhen' => 'ros.aliyuncs.com', + 'cn-qingdao' => 'ros.aliyuncs.com', + 'cn-beijing' => 'ros.aliyuncs.com', + 'cn-hangzhou-d' => 'ros.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'ros.aliyuncs.com', + 'ap-southeast-1' => 'ros.aliyuncs.com', + ], + 'pts' => + [ + 'us-east-1' => 'pts.aliyuncs.com', + 'cn-hongkong' => 'pts.aliyuncs.com', + 'cn-qingdao-cm9' => 'pts.aliyuncs.com', + 'cn-shanghai' => 'pts.aliyuncs.com', + 'cn-shenzhen-inner' => 'pts.aliyuncs.com', + 'us-west-1' => 'pts.aliyuncs.com', + 'cn-shanghai-inner' => 'pts.aliyuncs.com', + 'cn-hangzhou' => 'pts.aliyuncs.com', + 'cn-beijing-inner' => 'pts.aliyuncs.com', + 'cn-shenzhen' => 'pts.aliyuncs.com', + 'cn-qingdao' => 'pts.aliyuncs.com', + 'cn-beijing' => 'pts.aliyuncs.com', + 'cn-hangzhou-d' => 'pts.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'pts.aliyuncs.com', + 'ap-southeast-1' => 'pts.aliyuncs.com', + ], + 'qualitycheck' => + [ + 'us-east-1' => 'qualitycheck.aliyuncs.com', + 'cn-hongkong' => 'qualitycheck.aliyuncs.com', + 'cn-qingdao-cm9' => 'qualitycheck.aliyuncs.com', + 'cn-shanghai' => 'qualitycheck.aliyuncs.com', + 'cn-shenzhen-inner' => 'qualitycheck.aliyuncs.com', + 'us-west-1' => 'qualitycheck.aliyuncs.com', + 'cn-shanghai-inner' => 'qualitycheck.aliyuncs.com', + 'cn-hangzhou' => 'qualitycheck.aliyuncs.com', + 'cn-beijing-inner' => 'qualitycheck.aliyuncs.com', + 'cn-hangzhou-d' => 'qualitycheck.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'qualitycheck.aliyuncs.com', + 'ap-southeast-1' => 'qualitycheck.aliyuncs.com', + ], + 'm-kvstore' => + [ + 'us-east-1' => 'm-kvstore.aliyuncs.com', + 'cn-hongkong' => 'm-kvstore.aliyuncs.com', + 'cn-qingdao-cm9' => 'm-kvstore.aliyuncs.com', + 'cn-shanghai' => 'm-kvstore.aliyuncs.com', + 'cn-shenzhen-inner' => 'm-kvstore.aliyuncs.com', + 'us-west-1' => 'm-kvstore.aliyuncs.com', + 'cn-shanghai-inner' => 'm-kvstore.aliyuncs.com', + 'cn-hangzhou' => 'm-kvstore.aliyuncs.com', + 'cn-beijing-inner' => 'm-kvstore.aliyuncs.com', + 'cn-shenzhen' => 'm-kvstore.aliyuncs.com', + 'cn-qingdao' => 'm-kvstore.aliyuncs.com', + 'cn-beijing' => 'm-kvstore.aliyuncs.com', + 'cn-hangzhou-d' => 'm-kvstore.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'm-kvstore.aliyuncs.com', + 'ap-southeast-1' => 'm-kvstore.aliyuncs.com', + ], + 'highddos' => + [ + 'us-east-1' => 'yd-highddos-cn-hangzhou.aliyuncs.com', + 'cn-hongkong' => 'yd-highddos-cn-hangzhou.aliyuncs.com', + 'cn-qingdao-cm9' => 'yd-highddos-cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'yd-highddos-cn-hangzhou.aliyuncs.com', + 'cn-shenzhen-inner' => 'yd-highddos-cn-hangzhou.aliyuncs.com', + 'us-west-1' => 'yd-highddos-cn-hangzhou.aliyuncs.com', + 'cn-shanghai-inner' => 'yd-highddos-cn-hangzhou.aliyuncs.com', + 'cn-hangzhou' => 'yd-highddos-cn-hangzhou.aliyuncs.com', + 'cn-beijing-inner' => 'yd-highddos-cn-hangzhou.aliyuncs.com', + 'cn-shenzhen' => 'yd-highddos-cn-hangzhou.aliyuncs.com', + 'cn-qingdao' => 'yd-highddos-cn-hangzhou.aliyuncs.com', + 'cn-beijing' => 'yd-highddos-cn-hangzhou.aliyuncs.com', + 'cn-hangzhou-d' => 'yd-highddos-cn-hangzhou.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'yd-highddos-cn-hangzhou.aliyuncs.com', + 'ap-southeast-1' => 'yd-highddos-cn-hangzhou.aliyuncs.com', + ], + 'cmssitemonitor' => + [ + 'us-east-1' => 'sitemonitor.aliyuncs.com', + 'cn-hongkong' => 'sitemonitor.aliyuncs.com', + 'cn-qingdao-cm9' => 'sitemonitor.aliyuncs.com', + 'cn-shanghai' => 'sitemonitor.aliyuncs.com', + 'cn-shenzhen-inner' => 'sitemonitor.aliyuncs.com', + 'us-west-1' => 'sitemonitor.aliyuncs.com', + 'cn-shanghai-inner' => 'sitemonitor.aliyuncs.com', + 'cn-hangzhou' => 'sitemonitor.aliyuncs.com', + 'cn-beijing-inner' => 'sitemonitor.aliyuncs.com', + 'cn-shenzhen' => 'sitemonitor.aliyuncs.com', + 'cn-qingdao' => 'sitemonitor.aliyuncs.com', + 'cn-beijing' => 'sitemonitor.aliyuncs.com', + 'cn-hangzhou-d' => 'sitemonitor.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'sitemonitor.aliyuncs.com', + 'ap-southeast-1' => 'sitemonitor.aliyuncs.com', + ], + 'batchcompute' => + [ + 'us-east-1' => 'batchCompute.us-east-1.aliyuncs.com', + 'cn-hongkong' => 'batchCompute.cn-hongkong.aliyuncs.com', + 'cn-shanghai' => 'batchCompute.cn-shanghai.aliyuncs.com', + 'us-west-1' => 'batchCompute.us-west-1.aliyuncs.com', + 'cn-hangzhou' => 'batchCompute.cn-hangzhou.aliyuncs.com', + 'cn-shenzhen' => 'batchcompute.cn-shenzhen.aliyuncs.com', + 'cn-qingdao' => 'batchcompute.cn-qingdao.aliyuncs.com', + 'cn-beijing' => 'batchCompute.cn-beijing.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'batchCompute.cn-shanghai-et2-b01.aliyuncs.com', + 'ap-southeast-1' => 'batchCompute.ap-southeast-1.aliyuncs.com', + ], + 'cf' => + [ + 'us-east-1' => 'cf.aliyuncs.com', + 'cn-hongkong' => 'cf.aliyuncs.com', + 'cn-qingdao-cm9' => 'cf.aliyuncs.com', + 'cn-shanghai' => 'cf.aliyuncs.com', + 'cn-shenzhen-inner' => 'cf.aliyuncs.com', + 'us-west-1' => 'cf.aliyuncs.com', + 'cn-shanghai-inner' => 'cf.aliyuncs.com', + 'cn-hangzhou' => 'cf.aliyuncs.com', + 'cn-beijing-inner' => 'cf.aliyuncs.com', + 'cn-shenzhen' => 'cf.aliyuncs.com', + 'cn-qingdao' => 'cf.aliyuncs.com', + 'cn-beijing' => 'cf.aliyuncs.com', + 'cn-hangzhou-d' => 'cf.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'cf.aliyuncs.com', + 'ap-southeast-1' => 'cf.aliyuncs.com', + ], + 'drds' => + [ + 'us-east-1' => 'drds.aliyuncs.com', + 'cn-hongkong' => 'drds.aliyuncs.com', + 'cn-qingdao-cm9' => 'drds.aliyuncs.com', + 'cn-shanghai' => 'drds.aliyuncs.com', + 'cn-shenzhen-inner' => 'drds.aliyuncs.com', + 'us-west-1' => 'drds.aliyuncs.com', + 'cn-shanghai-inner' => 'drds.aliyuncs.com', + 'cn-hangzhou' => 'drds.cn-hangzhou.aliyuncs.com', + 'cn-beijing-inner' => 'drds.aliyuncs.com', + 'cn-shenzhen' => 'drds.aliyuncs.com', + 'cn-qingdao' => 'drds.aliyuncs.com', + 'cn-beijing' => 'drds.aliyuncs.com', + 'cn-hangzhou-d' => 'drds.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'drds.aliyuncs.com', + 'ap-southeast-1' => 'drds.aliyuncs.com', + ], + 'acs' => + [ + 'us-east-1' => 'acs.aliyun-inc.com', + 'cn-hongkong' => 'acs.aliyun-inc.com', + 'cn-shanghai' => 'acs.aliyun-inc.com', + 'us-west-1' => 'acs.aliyun-inc.com', + 'cn-hangzhou' => 'acs.aliyun-inc.com', + 'cn-shenzhen' => 'acs.aliyun-inc.com', + 'cn-qingdao' => 'acs.aliyun-inc.com', + 'cn-beijing' => 'acs.aliyun-inc.com', + 'cn-shanghai-et2-b01' => 'acs.aliyun-inc.com', + ], + 'httpdns' => + [ + 'us-east-1' => 'httpdns-api.aliyuncs.com', + 'cn-hongkong' => 'httpdns-api.aliyuncs.com', + 'cn-qingdao-cm9' => 'httpdns-api.aliyuncs.com', + 'cn-shanghai' => 'httpdns-api.aliyuncs.com', + 'cn-shenzhen-inner' => 'httpdns-api.aliyuncs.com', + 'us-west-1' => 'httpdns-api.aliyuncs.com', + 'cn-shanghai-inner' => 'httpdns-api.aliyuncs.com', + 'cn-hangzhou' => 'httpdns-api.aliyuncs.com', + 'cn-beijing-inner' => 'httpdns-api.aliyuncs.com', + 'cn-shenzhen' => 'httpdns-api.aliyuncs.com', + 'cn-qingdao' => 'httpdns-api.aliyuncs.com', + 'cn-beijing' => 'httpdns-api.aliyuncs.com', + 'cn-hangzhou-d' => 'httpdns-api.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'httpdns-api.aliyuncs.com', + 'ap-southeast-1' => 'httpdns-api.aliyuncs.com', + ], + 'location-inner' => + [ + 'us-east-1' => 'location-inner.aliyuncs.com', + 'cn-hongkong' => 'location-inner.aliyuncs.com', + 'cn-qingdao-cm9' => 'location-inner.aliyuncs.com', + 'cn-shanghai' => 'location-inner.aliyuncs.com', + 'cn-shenzhen-inner' => 'location-inner.aliyuncs.com', + 'us-west-1' => 'location-inner.aliyuncs.com', + 'cn-shanghai-inner' => 'location-inner.aliyuncs.com', + 'cn-hangzhou' => 'location-inner.aliyuncs.com', + 'cn-beijing-inner' => 'location-inner.aliyuncs.com', + 'cn-shenzhen' => 'location-inner.aliyuncs.com', + 'cn-qingdao' => 'location-inner.aliyuncs.com', + 'cn-beijing' => 'location-inner.aliyuncs.com', + 'cn-hangzhou-d' => 'location-inner.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'location-inner.aliyuncs.com', + 'ap-southeast-1' => 'location-inner.aliyuncs.com', + ], + 'aas' => + [ + 'us-east-1' => 'aas.aliyuncs.com', + 'cn-hongkong' => 'aas.aliyuncs.com', + 'cn-qingdao-cm9' => 'aas.aliyuncs.com', + 'cn-shanghai' => 'aas.aliyuncs.com', + 'cn-shenzhen-inner' => 'aas.aliyuncs.com', + 'us-west-1' => 'aas.aliyuncs.com', + 'cn-shanghai-inner' => 'aas.aliyuncs.com', + 'cn-hangzhou' => 'aas.aliyuncs.com', + 'cn-beijing-inner' => 'aas.aliyuncs.com', + 'cn-shenzhen' => 'aas.aliyuncs.com', + 'cn-qingdao' => 'aas.aliyuncs.com', + 'cn-beijing' => 'aas.aliyuncs.com', + 'cn-hangzhou-d' => 'aas.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'aas.aliyuncs.com', + 'ap-southeast-1' => 'aas.aliyuncs.com', + ], + 'sts' => + [ + 'cn-hangzhou' => 'sts.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'sts.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'sts.cn-shenzhen.aliyuncs.com', + 'cn-qingdao' => 'sts.cn-qingdao.aliyuncs.com', + 'cn-beijing' => 'sts.cn-beijing.aliyuncs.com', + 'cn-zhangjiakou' => 'sts.cn-zhangjiakou.aliyuncs.com', + 'cn-huhehaote' => 'sts.cn-huhehaote.aliyuncs.com', + 'cn-hongkong' => 'sts.cn-hongkong.aliyuncs.com', + 'cn-chengdu' => 'sts.cn-chengdu.aliyuncs.com', + 'ap-southeast-1' => 'sts.ap-southeast-1.aliyuncs.com', + 'ap-southeast-2' => 'sts.ap-southeast-2.aliyuncs.com', + 'ap-southeast-3' => 'sts.ap-southeast-3.aliyuncs.com', + 'ap-southeast-5' => 'sts.ap-southeast-5.aliyuncs.com', + 'ap-northeast-1' => 'sts.ap-northeast-1.aliyuncs.com', + 'ap-south-1' => 'sts.ap-south-1.aliyuncs.com', + 'us-west-1' => 'sts.us-west-1.aliyuncs.com', + 'us-east-1' => 'sts.us-east-1.aliyuncs.com', + 'eu-central-1' => 'sts.eu-central-1.aliyuncs.com', + 'me-east-1' => 'sts.me-east-1.aliyuncs.com', + 'eu-west-1' => 'sts.eu-west-1.aliyuncs.com', + ], + 'dts' => + [ + 'us-east-1' => 'dts.aliyuncs.com', + 'cn-hongkong' => 'dts.aliyuncs.com', + 'cn-qingdao-cm9' => 'dts.aliyuncs.com', + 'cn-shanghai' => 'dts.aliyuncs.com', + 'cn-shenzhen-inner' => 'dts.aliyuncs.com', + 'us-west-1' => 'dts.aliyuncs.com', + 'cn-shanghai-inner' => 'dts.aliyuncs.com', + 'cn-hangzhou' => 'dts.aliyuncs.com', + 'cn-beijing-inner' => 'dts.aliyuncs.com', + 'cn-shenzhen' => 'dts.aliyuncs.com', + 'cn-qingdao' => 'dts.aliyuncs.com', + 'cn-beijing' => 'dts.aliyuncs.com', + 'cn-hangzhou-d' => 'dts.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'dts.aliyuncs.com', + 'ap-southeast-1' => 'dts.aliyuncs.com', + ], + 'drc' => + [ + 'us-east-1' => 'drc.aliyuncs.com', + 'cn-hongkong' => 'drc.aliyuncs.com', + 'cn-qingdao-cm9' => 'drc.aliyuncs.com', + 'cn-shanghai' => 'drc.aliyuncs.com', + 'cn-shenzhen-inner' => 'drc.aliyuncs.com', + 'us-west-1' => 'drc.aliyuncs.com', + 'cn-shanghai-inner' => 'drc.aliyuncs.com', + 'cn-hangzhou' => 'drc.aliyuncs.com', + 'cn-beijing-inner' => 'drc.aliyuncs.com', + 'cn-shenzhen' => 'drc.aliyuncs.com', + 'cn-qingdao' => 'drc.aliyuncs.com', + 'cn-beijing' => 'drc.aliyuncs.com', + 'cn-hangzhou-d' => 'drc.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'drc.aliyuncs.com', + 'ap-southeast-1' => 'drc.aliyuncs.com', + ], + 'vpc-inner' => + [ + 'us-east-1' => 'vpc-inner.aliyuncs.com', + 'cn-hongkong' => 'vpc-inner.aliyuncs.com', + 'cn-shanghai' => 'vpc-inner.aliyuncs.com', + 'us-west-1' => 'vpc-inner.aliyuncs.com', + 'cn-hangzhou' => 'vpc-inner.aliyuncs.com', + 'cn-shenzhen' => 'vpc-inner.aliyuncs.com', + 'cn-qingdao' => 'vpc-inner.aliyuncs.com', + 'cn-beijing' => 'vpc-inner.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'vpc-inner.aliyuncs.com', + ], + 'crm' => + [ + 'us-east-1' => 'crm-cn-hangzhou.aliyuncs.com', + 'cn-hongkong' => 'crm-cn-hangzhou.aliyuncs.com', + 'cn-qingdao-cm9' => 'crm-cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'crm-cn-hangzhou.aliyuncs.com', + 'cn-shenzhen-inner' => 'crm-cn-hangzhou.aliyuncs.com', + 'us-west-1' => 'crm-cn-hangzhou.aliyuncs.com', + 'cn-shanghai-inner' => 'crm-cn-hangzhou.aliyuncs.com', + 'cn-hangzhou' => 'crm-cn-hangzhou.aliyuncs.com', + 'cn-beijing-inner' => 'crm-cn-hangzhou.aliyuncs.com', + 'cn-shenzhen' => 'crm-cn-hangzhou.aliyuncs.com', + 'cn-qingdao' => 'crm-cn-hangzhou.aliyuncs.com', + 'cn-beijing' => 'crm-cn-hangzhou.aliyuncs.com', + 'cn-hangzhou-d' => 'crm-cn-hangzhou.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'crm-cn-hangzhou.aliyuncs.com', + 'ap-southeast-1' => 'crm-cn-hangzhou.aliyuncs.com', + ], + 'domain' => + [ + 'us-east-1' => 'domain.aliyuncs.com', + 'cn-hongkong' => 'domain.aliyuncs.com', + 'cn-qingdao-cm9' => 'domain.aliyuncs.com', + 'cn-shanghai' => 'domain.aliyuncs.com', + 'cn-shenzhen-inner' => 'domain.aliyuncs.com', + 'us-west-1' => 'domain.aliyuncs.com', + 'cn-shanghai-inner' => 'domain.aliyuncs.com', + 'cn-hangzhou' => 'domain.aliyuncs.com', + 'cn-beijing-inner' => 'domain.aliyuncs.com', + 'cn-shenzhen' => 'domain.aliyuncs.com', + 'cn-qingdao' => 'domain.aliyuncs.com', + 'cn-beijing' => 'domain.aliyuncs.com', + 'cn-hangzhou-d' => 'domain.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'domain.aliyuncs.com', + 'ap-southeast-1' => 'domain.aliyuncs.com', + ], + 'ots' => + [ + 'us-east-1' => 'ots.us-east-1.aliyuncs.com', + 'cn-hongkong' => 'ots-pop.aliyuncs.com', + 'cn-qingdao-cm9' => 'ots-pop.aliyuncs.com', + 'cn-shanghai' => 'ots.cn-shanghai.aliyuncs.com', + 'cn-shenzhen-inner' => 'ots-pop.aliyuncs.com', + 'us-west-1' => 'ots.us-west-1.aliyuncs.com', + 'cn-shanghai-inner' => 'ots-pop.aliyuncs.com', + 'cn-hangzhou' => 'ots.cn-hangzhou.aliyuncs.com', + 'cn-beijing-inner' => 'ots-pop.aliyuncs.com', + 'cn-shenzhen' => 'ots.cn-shenzhen.aliyuncs.com', + 'cn-qingdao' => 'ots-pop.aliyuncs.com', + 'cn-beijing' => 'ots.cn-beijing.aliyuncs.com', + 'cn-hangzhou-d' => 'ots-pop.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'ots-pop.aliyuncs.com', + 'ap-southeast-1' => 'ots.ap-southeast-1.aliyuncs.com', + 'cn-zhangjiakou' => 'ots.cn-zhangjiakou.aliyuncs.com', + 'cn-huhehaote' => 'ots.cn-huhehaote.aliyuncs.com', + 'ap-southeast-2' => 'ots.ap-southeast-2.aliyuncs.com', + 'ap-southeast-3' => 'ots.ap-southeast-3.aliyuncs.com', + 'ap-southeast-5' => 'ots.ap-southeast-5.aliyuncs.com', + 'ap-northeast-1' => 'ots.ap-northeast-1.aliyuncs.com', + 'eu-west-1' => 'ots.eu-west-1.aliyuncs.com', + 'eu-central-1' => 'ots.eu-central-1.aliyuncs.com', + 'me-east-1' => 'ots.me-east-1.aliyuncs.com', + 'ap-south-1' => 'ots.ap-south-1.aliyuncs.com', + ], + 'oss' => + [ + 'us-east-1' => 'oss-cn-hangzhou.aliyuncs.com', + 'cn-hongkong' => 'oss-cn-hongkong.aliyuncs.com', + 'cn-qingdao-cm9' => 'oss-cn-hangzhou.aliyuncs.com', + 'cn-qingdao-finance' => 'oss-cn-qdjbp-a.aliyuncs.com', + 'cn-beijing-gov-1' => 'oss-cn-haidian-a.aliyuncs.com', + 'cn-shanghai' => 'oss-cn-shanghai.aliyuncs.com', + 'cn-shenzhen-inner' => 'oss-cn-hangzhou.aliyuncs.com', + 'us-west-1' => 'oss-us-west-1.aliyuncs.com', + 'cn-shanghai-inner' => 'oss-cn-hangzhou.aliyuncs.com', + 'cn-hangzhou-finance' => 'oss-cn-hzjbp-b-console.aliyuncs.com', + 'cn-hangzhou' => 'oss-cn-hangzhou.aliyuncs.com', + 'cn-beijing-inner' => 'oss-cn-hangzhou.aliyuncs.com', + 'cn-shenzhen' => 'oss-cn-shenzhen.aliyuncs.com', + 'cn-qingdao' => 'oss-cn-qingdao.aliyuncs.com', + 'oss-cn-bjzwy' => 'oss-cn-bjzwy.aliyuncs.com', + 'cn-beijing' => 'oss-cn-beijing.aliyuncs.com', + 'cn-hangzhou-d' => 'oss-cn-hangzhou.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'oss-cn-hangzhou.aliyuncs.com', + 'ap-southeast-1' => 'oss-ap-southeast-1.aliyuncs.com', + ], + 'ram' => + [ + 'global' => 'ram.aliyuncs.com', + 'us-east-1' => 'ram.aliyuncs.com', + 'cn-hongkong' => 'ram.aliyuncs.com', + 'cn-qingdao-cm9' => 'ram.aliyuncs.com', + 'cn-shanghai' => 'ram.aliyuncs.com', + 'cn-shenzhen-inner' => 'ram.aliyuncs.com', + 'us-west-1' => 'ram.aliyuncs.com', + 'cn-shanghai-inner' => 'ram.aliyuncs.com', + 'cn-hangzhou' => 'ram.aliyuncs.com', + 'cn-beijing-inner' => 'ram.aliyuncs.com', + 'cn-shenzhen' => 'ram.aliyuncs.com', + 'cn-qingdao' => 'ram.aliyuncs.com', + 'cn-beijing' => 'ram.aliyuncs.com', + 'cn-hangzhou-d' => 'ram.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'ram.aliyuncs.com', + 'ap-southeast-1' => 'ram.aliyuncs.com', + ], + 'sales' => + [ + 'us-east-1' => 'sales.cn-hangzhou.aliyuncs.com', + 'cn-hongkong' => 'sales.cn-hangzhou.aliyuncs.com', + 'cn-qingdao-cm9' => 'sales.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'sales.cn-hangzhou.aliyuncs.com', + 'cn-shenzhen-inner' => 'sales.cn-hangzhou.aliyuncs.com', + 'us-west-1' => 'sales.cn-hangzhou.aliyuncs.com', + 'cn-shanghai-inner' => 'sales.cn-hangzhou.aliyuncs.com', + 'cn-hangzhou' => 'sales.cn-hangzhou.aliyuncs.com', + 'cn-beijing-inner' => 'sales.cn-hangzhou.aliyuncs.com', + 'cn-beijing' => 'sales.cn-hangzhou.aliyuncs.com', + 'cn-hangzhou-d' => 'sales.cn-hangzhou.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'sales.cn-hangzhou.aliyuncs.com', + 'ap-southeast-1' => 'sales.cn-hangzhou.aliyuncs.com', + ], + 'ossadmin' => + [ + 'us-east-1' => 'oss-admin.aliyuncs.com', + 'cn-hongkong' => 'oss-admin.aliyuncs.com', + 'cn-qingdao-cm9' => 'oss-admin.aliyuncs.com', + 'cn-shanghai' => 'oss-admin.aliyuncs.com', + 'cn-shenzhen-inner' => 'oss-admin.aliyuncs.com', + 'us-west-1' => 'oss-admin.aliyuncs.com', + 'cn-shanghai-inner' => 'oss-admin.aliyuncs.com', + 'cn-hangzhou' => 'oss-admin.aliyuncs.com', + 'cn-beijing-inner' => 'oss-admin.aliyuncs.com', + 'cn-shenzhen' => 'oss-admin.aliyuncs.com', + 'cn-qingdao' => 'oss-admin.aliyuncs.com', + 'cn-beijing' => 'oss-admin.aliyuncs.com', + 'cn-hangzhou-d' => 'oss-admin.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'oss-admin.aliyuncs.com', + 'ap-southeast-1' => 'oss-admin.aliyuncs.com', + ], + 'alidns' => + [ + 'us-east-1' => 'alidns.aliyuncs.com', + 'cn-hongkong' => 'alidns.aliyuncs.com', + 'cn-qingdao-cm9' => 'alidns.aliyuncs.com', + 'cn-shanghai' => 'alidns.aliyuncs.com', + 'cn-shenzhen-inner' => 'alidns.aliyuncs.com', + 'us-west-1' => 'alidns.aliyuncs.com', + 'cn-shanghai-inner' => 'alidns.aliyuncs.com', + 'cn-hangzhou' => 'alidns.aliyuncs.com', + 'cn-beijing-inner' => 'alidns.aliyuncs.com', + 'cn-shenzhen' => 'alidns.aliyuncs.com', + 'cn-qingdao' => 'alidns.aliyuncs.com', + 'cn-beijing' => 'alidns.aliyuncs.com', + 'cn-hangzhou-d' => 'alidns.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'alidns.aliyuncs.com', + 'ap-southeast-1' => 'alidns.aliyuncs.com', + ], + 'ons' => + [ + 'us-east-1' => 'ons.us-east-1.aliyuncs.com', + 'cn-hongkong' => 'ons.cn-hongkong.aliyuncs.com', + 'cn-qingdao-cm9' => 'ons.aliyuncs.com', + 'cn-shanghai' => 'ons.cn-shanghai.aliyuncs.com', + 'cn-shenzhen-inner' => 'ons.aliyuncs.com', + 'us-west-1' => 'ons.us-west-1.aliyuncs.com', + 'cn-shanghai-inner' => 'ons.aliyuncs.com', + 'cn-hangzhou' => 'ons.cn-hangzhou.aliyuncs.com', + 'cn-beijing-inner' => 'ons.aliyuncs.com', + 'cn-shenzhen' => 'ons.cn-shenzhen.aliyuncs.com', + 'cn-qingdao' => 'ons.cn-qingdao.aliyuncs.com', + 'cn-beijing' => 'ons.cn-beijing.aliyuncs.com', + 'cn-hangzhou-d' => 'ons.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'ons.aliyuncs.com', + 'ap-southeast-1' => 'ons.ap-southeast-1.aliyuncs.com', + 'cn-zhangjiakou' => 'ons.cn-zhangjiakou.aliyuncs.com', + 'cn-huhehaote' => 'ons.cn-huhehaote.aliyuncs.com', + 'ap-southeast-2' => 'ons.ap-southeast-2.aliyuncs.com', + 'ap-southeast-3' => 'ons.ap-southeast-3.aliyuncs.com', + 'ap-northeast-1' => 'ons.ap-northeast-1.aliyuncs.com', + 'eu-west-1' => 'ons.eu-west-1.aliyuncs.com', + 'eu-central-1' => 'ons.eu-central-1.aliyuncs.com', + 'me-east-1' => 'ons.me-east-1.aliyuncs.com', + 'ap-south-1' => 'ons.ap-south-1.aliyuncs.com', + 'cn-chengdu' => 'ons.cn-chengdu.aliyuncs.com', + 'cn-hangzhou-finance' => 'ons.cn-hangzhou-finance.aliyuncs.com', + 'cn-shanghai-finance-1' => 'ons.cn-shanghai-finance-1.aliyuncs.com', + 'cn-shenzhen-finance-1' => 'ons.cn-shenzhen-finance-1.aliyuncs.com', + 'cn-north-2-gov-1' => 'ons.cn-north-2-gov-1.aliyuncs.com', + ], + 'cdn' => + [ + 'global' => 'cdn.aliyuncs.com', + 'us-east-1' => 'cdn.aliyuncs.com', + 'cn-hongkong' => 'cdn.aliyuncs.com', + 'cn-qingdao-cm9' => 'cdn.aliyuncs.com', + 'cn-shanghai' => 'cdn.aliyuncs.com', + 'cn-shenzhen-inner' => 'cdn.aliyuncs.com', + 'us-west-1' => 'cdn.aliyuncs.com', + 'cn-shanghai-inner' => 'cdn.aliyuncs.com', + 'cn-hangzhou' => 'cdn.aliyuncs.com', + 'cn-beijing-inner' => 'cdn.aliyuncs.com', + 'cn-shenzhen' => 'cdn.aliyuncs.com', + 'cn-qingdao' => 'cdn.aliyuncs.com', + 'cn-beijing' => 'cdn.aliyuncs.com', + 'cn-hangzhou-d' => 'cdn.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'cdn.aliyuncs.com', + 'ap-southeast-1' => 'cdn.aliyuncs.com', + ], + 'yundunddos' => + [ + 'us-east-1' => 'inner-yundun-ddos.cn-hangzhou.aliyuncs.com', + 'cn-hongkong' => 'inner-yundun-ddos.cn-hangzhou.aliyuncs.com', + 'cn-qingdao-cm9' => 'inner-yundun-ddos.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'inner-yundun-ddos.cn-hangzhou.aliyuncs.com', + 'cn-shenzhen-inner' => 'inner-yundun-ddos.cn-hangzhou.aliyuncs.com', + 'us-west-1' => 'inner-yundun-ddos.cn-hangzhou.aliyuncs.com', + 'cn-shanghai-inner' => 'inner-yundun-ddos.cn-hangzhou.aliyuncs.com', + 'cn-hangzhou' => 'inner-yundun-ddos.cn-hangzhou.aliyuncs.com', + 'cn-beijing-inner' => 'inner-yundun-ddos.cn-hangzhou.aliyuncs.com', + 'cn-beijing' => 'inner-yundun-ddos.cn-hangzhou.aliyuncs.com', + 'cn-hangzhou-d' => 'inner-yundun-ddos.cn-hangzhou.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'inner-yundun-ddos.cn-hangzhou.aliyuncs.com', + 'ap-southeast-1' => 'inner-yundun-ddos.cn-hangzhou.aliyuncs.com', + ], + 'kvstore' => + [ + 'ap-northeast-1' => 'r-kvstore.ap-northeast-1.aliyuncs.com', + ], + 'cloudapi' => + [ + 'cn-hongkong' => 'apigateway.cn-hongkong.aliyuncs.com', + 'cn-shanghai' => 'apigateway.cn-shanghai.aliyuncs.com', + 'cn-hangzhou' => 'apigateway.cn-hangzhou.aliyuncs.com', + 'cn-shenzhen' => 'apigateway.cn-shenzhen.aliyuncs.com', + 'cn-qingdao' => 'apigateway.cn-qingdao.aliyuncs.com', + 'cn-beijing' => 'apigateway.cn-beijing.aliyuncs.com', + 'ap-southeast-1' => 'apigateway.ap-southeast-1.aliyuncs.com', + ], + 'mts' => + [ + 'cn-hongkong' => 'mts.cn-hongkong.aliyuncs.com', + 'cn-qingdao-cm9' => 'mts.cn-qingdao.aliyuncs.com', + 'cn-shanghai' => 'mts.cn-shanghai.aliyuncs.com', + 'cn-shenzhen-inner' => 'mts.cn-shenzhen.aliyuncs.com', + 'us-west-1' => 'mts.us-west-1.aliyuncs.com', + 'cn-shanghai-inner' => 'mts.cn-shanghai.aliyuncs.com', + 'cn-hangzhou' => 'mts.cn-hangzhou.aliyuncs.com', + 'cn-beijing-inner' => 'mts.cn-beijing.aliyuncs.com', + 'cn-shenzhen' => 'mts.cn-shenzhen.aliyuncs.com', + 'cn-qingdao' => 'mts.cn-qingdao.aliyuncs.com', + 'cn-beijing' => 'mts.cn-beijing.aliyuncs.com', + 'cn-hangzhou-d' => 'mts.cn-hangzhou.aliyuncs.com', + 'cn-shanghai-et2-b01' => 'mts.cn-hangzhou.aliyuncs.com', + 'ap-southeast-1' => 'mts.ap-southeast-1.aliyuncs.com', + 'cn-zhangjiakou' => 'mts.cn-zhangjiakou.aliyuncs.com', + 'ap-northeast-1' => 'mts.ap-northeast-1.aliyuncs.com', + 'eu-west-1' => 'mts.eu-west-1.aliyuncs.com', + 'eu-central-1' => 'mts.eu-central-1.aliyuncs.com', + 'ap-south-1' => 'mts.ap-south-1.aliyuncs.com', + 'ap-southeast-5' => 'mts.ap-southeast-5.aliyuncs.com', + ], + 'saf' => + [ + 'cn-shanghai' => 'saf.cn-shanghai.aliyuncs.com', + 'cn-hangzhou' => 'saf.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'saf.cn-shenzhen.aliyuncs.com', + 'ap-southeast-1' => 'riskcontrol-share.aliyuncs.com', + 'cn-north-2-gov-1' => 'saf.cn-north-2-gov-1.aliyuncs.com', + ], + 'arms' => + [ + 'cn-shanghai' => 'arms.cn-shanghai.aliyuncs.com', + 'cn-hangzhou' => 'arms.cn-hangzhou.aliyuncs.com', + 'cn-shenzhen' => 'arms.cn-shenzhen.aliyuncs.com', + 'cn-beijing' => 'arms.cn-beijing.aliyuncs.com', + 'cn-qingdao' => 'arms.cn-qingdao.aliyuncs.com', + 'cn-zhangjiakou' => 'arms.cn-zhangjiakou.aliyuncs.com', + 'cn-hongkong' => 'arms.cn-hongkong.aliyuncs.com', + 'ap-southeast-1' => 'arms.ap-southeast-1.aliyuncs.com', + 'ap-south-1' => 'arms.ap-south-1.aliyuncs.com', + ], + 'apigateway' => + [ + 'cn-shanghai' => 'apigateway.cn-shanghai.aliyuncs.com', + 'cn-hangzhou' => 'apigateway.cn-hangzhou.aliyuncs.com', + 'cn-shenzhen' => 'apigateway.cn-shenzhen.aliyuncs.com', + 'cn-qingdao' => 'apigateway.cn-qingdao.aliyuncs.com', + 'cn-beijing' => 'apigateway.cn-beijing.aliyuncs.com', + 'ap-southeast-1' => 'apigateway.ap-southeast-1.aliyuncs.com', + 'cn-hongkong' => 'apigateway.cn-hongkong.aliyuncs.com', + 'ap-southeast-2' => 'apigateway.ap-southeast-2.aliyuncs.com', + 'ap-southeast-3' => 'apigateway.ap-southeast-3.aliyuncs.com', + 'ap-southeast-5' => 'apigateway.ap-southeast-5.aliyuncs.com', + 'ap-northeast-1' => 'apigateway.ap-northeast-1.aliyuncs.com', + 'eu-central-1' => 'apigateway.eu-central-1.aliyuncs.com', + 'ap-south-1' => 'apigateway.ap-south-1.aliyuncs.com', + 'eu-west-1' => 'apigateway.eu-west-1.aliyuncs.com', + 'me-east-1' => 'apigateway.me-east-1.aliyuncs.com', + 'us-east-1' => 'apigateway.us-east-1.aliyuncs.com', + 'us-west-1' => 'apigateway.us-west-1.aliyuncs.com', + 'cn-zhangjiakou' => 'apigateway.cn-zhangjiakou.aliyuncs.com', + 'cn-huhehaote' => 'apigateway.cn-huhehaote.aliyuncs.com', + 'cn-chengdu' => 'apigateway.cn-chengdu.aliyuncs.com', + 'cn-north-2-gov-1' => 'apigateway.cn-north-2-gov-1.aliyuncs.com', + ], + 'vod' => + [ + 'cn-shanghai' => 'vod.cn-shanghai.aliyuncs.com', + 'cn-beijing' => 'vod.cn-shanghai.aliyuncs.com', + 'cn-hangzhou' => 'vod.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'vod.cn-shanghai.aliyuncs.com', + 'ap-southeast-1' => 'vod.ap-southeast-1.aliyuncs.com', + 'eu-central-1' => 'vod.eu-central-1.aliyuncs.com', + 'cn-zhangjiakou' => 'vod.cn-zhangjiakou.aliyuncs.com', + 'cn-hongkong' => 'vod.cn-hongkong.aliyuncs.com', + 'ap-southeast-5' => 'vod.ap-southeast-5.aliyuncs.com', + 'ap-northeast-1' => 'vod.ap-northeast-1.aliyuncs.com', + 'eu-west-1' => 'vod.eu-west-1.aliyuncs.com', + 'us-west-1' => 'vod.us-west-1.aliyuncs.com', + 'ap-south-1' => 'vod.ap-south-1.aliyuncs.com', + 'cn-north-2-gov-1' => 'vod.cn-north-2-gov-1.aliyuncs.com', + ], + 'afs' => + [ + 'cn-hangzhou' => 'afs.aliyuncs.com', + ], + 'oas' => + [ + 'cn-hangzhou' => 'cn-hangzhou.oas.aliyuncs.com', + 'cn-shenzhen' => 'cn-shenzhen.oas.aliyuncs.com', + 'cn-beijing' => 'cn-beijing.oas.aliyuncs.com', + ], + 'alikafka' => + [ + 'cn-qingdao' => 'alikafka.cn-qingdao.aliyuncs.com', + 'cn-beijing' => 'alikafka.cn-beijing.aliyuncs.com', + 'cn-hangzhou' => 'alikafka.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'alikafka.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'alikafka.cn-shenzhen.aliyuncs.com', + 'cn-zhangjiakou' => 'alikafka.cn-zhangjiakou.aliyuncs.com', + 'cn-huhehaote' => 'alikafka.cn-huhehaote.aliyuncs.com', + 'cn-hongkong' => 'alikafka.cn-hongkong.aliyuncs.com', + 'ap-southeast-1' => 'alikafka.ap-southeast-1.aliyuncs.com', + 'ap-southeast-5' => 'alikafka.ap-southeast-5.aliyuncs.com', + 'ap-south-1' => 'alikafka.ap-south-1.aliyuncs.com', + 'cn-hangzhou-finance' => 'alikafka.cn-hangzhou-finance.aliyuncs.com', + 'cn-shanghai-finance-1' => 'alikafka.cn-shanghai-finance-1.aliyuncs.com', + 'cn-shenzhen-finance-1' => 'alikafka.cn-shenzhen-finance-1.aliyuncs.com', + ], + 'cbn' => + [ + 'cn-qingdao' => 'cbn.aliyuncs.com', + 'cn-beijing' => 'cbn.aliyuncs.com', + 'cn-zhangjiakou' => 'cbn.aliyuncs.com', + 'cn-huhehaote' => 'cbn.aliyuncs.com', + 'cn-hangzhou' => 'cbn.aliyuncs.com', + 'cn-shanghai' => 'cbn.aliyuncs.com', + 'cn-shenzhen' => 'cbn.aliyuncs.com', + 'cn-hongkong' => 'cbn.aliyuncs.com', + 'ap-southeast-1' => 'cbn.aliyuncs.com', + 'ap-southeast-2' => 'cbn.aliyuncs.com', + 'ap-southeast-3' => 'cbn.aliyuncs.com', + 'ap-southeast-5' => 'cbn.aliyuncs.com', + 'ap-northeast-1' => 'cbn.aliyuncs.com', + 'eu-west-1' => 'cbn.aliyuncs.com', + 'us-west-1' => 'cbn.aliyuncs.com', + 'us-east-1' => 'cbn.aliyuncs.com', + 'eu-central-1' => 'cbn.aliyuncs.com', + 'me-east-1' => 'cbn.aliyuncs.com', + 'ap-south-1' => 'cbn.aliyuncs.com', + 'cn-chengdu' => 'cbn.aliyuncs.com', + 'cn-shanghai-finance-1' => 'cbn.aliyuncs.com', + 'cn-shenzhen-finance-1' => 'cbn.aliyuncs.com', + ], + 'onsvip' => + [ + 'cn-qingdao' => 'ons.cn-qingdao.aliyuncs.com', + 'cn-beijing' => 'ons.cn-beijing.aliyuncs.com', + 'cn-hangzhou' => 'ons.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'ons.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'ons.cn-shenzhen.aliyuncs.com', + 'ap-southeast-1' => 'ons.ap-southeast-1.aliyuncs.com', + 'cn-hangzhou-finance' => 'ons.cn-hangzhou-finance.aliyuncs.com', + 'cn-shanghai-finance-1' => 'ons.cn-shanghai-finance.aliyuncs.com', + 'cn-shenzhen-finance-1' => 'ons.cn-shenzhen-finance.aliyuncs.com', + ], + 'ddosbgp' => + [ + 'cn-qingdao' => 'ddosbgp.aliyuncs.com', + 'cn-beijing' => 'ddosbgp.aliyuncs.com', + 'cn-zhangjiakou' => 'ddosbgp.aliyuncs.com', + 'cn-huhehaote' => 'ddosbgp.aliyuncs.com', + 'cn-hangzhou' => 'ddosbgp.aliyuncs.com', + 'cn-shanghai' => 'ddosbgp.aliyuncs.com', + 'cn-shenzhen' => 'ddosbgp.aliyuncs.com', + 'cn-hongkong' => 'ddosbgp.cn-hongkong.aliyuncs.com', + 'us-west-1' => 'ddosbgp.us-west-1.aliyuncs.com', + 'ap-southeast-1' => 'ddosbgp.ap-southeast-1.aliyuncs.com', + 'us-east-1' => 'ddosbgp.us-east-1.aliyuncs.com', + ], + 'ehs' => + [ + 'cn-qingdao' => 'ehpc.cn-qingdao.aliyuncs.com', + 'cn-beijing' => 'ehpc.cn-beijing.aliyuncs.com', + 'cn-zhangjiakou' => 'ehpc.cn-zhangjiakou.aliyuncs.com', + 'cn-huhehaote' => 'ehpc.cn-huhehaote.aliyuncs.com', + 'cn-hangzhou' => 'ehpc.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'ehpc.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'ehpc.cn-shenzhen.aliyuncs.com', + 'cn-hongkong' => 'ehpc.cn-hongkong.aliyuncs.com', + 'ap-southeast-1' => 'ehpc.ap-southeast-1.aliyuncs.com', + 'ap-southeast-2' => 'ehpc.ap-southeast-2.aliyuncs.com', + 'eu-central-1' => 'ehpc.eu-central-1.aliyuncs.com', + 'ap-northeast-1' => 'ehpc.ap-northeast-1.aliyuncs.com', + ], + 'redisa' => + [ + 'cn-qingdao' => 'r-kvstore.aliyuncs.com', + 'cn-beijing' => 'r-kvstore.aliyuncs.com', + 'cn-zhangjiakou' => 'r-kvstore.cn-zhangjiakou.aliyuncs.com', + 'cn-huhehaote' => 'r-kvstore.cn-huhehaote.aliyuncs.com', + 'cn-hangzhou' => 'r-kvstore.aliyuncs.com', + 'cn-shanghai' => 'r-kvstore.aliyuncs.com', + 'cn-shenzhen' => 'r-kvstore.aliyuncs.com', + 'cn-hongkong' => 'r-kvstore.cn-hongkong.aliyuncs.com', + 'ap-southeast-1' => 'r-kvstore.aliyuncs.com', + 'ap-southeast-2' => 'r-kvstore.ap-southeast-2.aliyuncs.com', + 'ap-southeast-3' => 'r-kvstore.ap-southeast-3.aliyuncs.com', + 'ap-southeast-5' => 'r-kvstore.ap-southeast-5.aliyuncs.com', + 'ap-northeast-1' => 'r-kvstore.ap-northeast-1.aliyuncs.com', + 'eu-west-1' => 'r-kvstore.eu-west-1.aliyuncs.com', + 'us-west-1' => 'r-kvstore.aliyuncs.com', + 'us-east-1' => 'r-kvstore.aliyuncs.com', + 'eu-central-1' => 'r-kvstore.eu-central-1.aliyuncs.com', + 'me-east-1' => 'r-kvstore.me-east-1.aliyuncs.com', + 'ap-south-1' => 'r-kvstore.ap-south-1.aliyuncs.com', + 'cn-chengdu' => 'r-kvstore.cn-chengdu.aliyuncs.com', + 'cn-hangzhou-finance' => 'r-kvstore.aliyuncs.com', + 'cn-shanghai-finance-1' => 'r-kvstore.aliyuncs.com', + 'cn-shenzhen-finance-1' => 'r-kvstore.aliyuncs.com', + 'cn-north-2-gov-1' => 'r-kvstore.aliyuncs.com', + ], + 'nas' => + [ + 'cn-qingdao' => 'nas.cn-qingdao.aliyuncs.com', + 'cn-beijing' => 'nas.cn-beijing.aliyuncs.com', + 'cn-zhangjiakou' => 'nas.cn-zhangjiakou.aliyuncs.com', + 'cn-huhehaote' => 'nas.cn-huhehaote.aliyuncs.com', + 'cn-hangzhou' => 'nas.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'nas.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'nas.cn-shenzhen.aliyuncs.com', + 'cn-hongkong' => 'nas.cn-hongkong.aliyuncs.com', + 'ap-southeast-1' => 'nas.ap-southeast-1.aliyuncs.com', + 'ap-southeast-2' => 'nas.ap-southeast-2.aliyuncs.com', + 'ap-southeast-3' => 'nas.ap-southeast-3.aliyuncs.com', + 'ap-southeast-5' => 'nas.ap-southeast-5.aliyuncs.com', + 'us-east-1' => 'nas.us-east-1.aliyuncs.com', + 'eu-central-1' => 'nas.eu-central-1.aliyuncs.com', + 'ap-south-1' => 'nas.ap-south-1.aliyuncs.com', + 'ap-northeast-1' => 'nas.ap-northeast-1.aliyuncs.com', + 'us-west-1' => 'nas.us-west-1.aliyuncs.com', + 'cn-shanghai-finance-1' => 'nas.cn-shanghai-finance-1.aliyuncs.com', + 'cn-shenzhen-finance-1' => 'nas.cn-shenzhen-finance-1.aliyuncs.com', + 'cn-north-2-gov-1' => 'nas.cn-north-2-gov-1.aliyuncs.com', + ], + 'hbase' => + [ + 'cn-qingdao' => 'hbase.aliyuncs.com', + 'cn-beijing' => 'hbase.aliyuncs.com', + 'cn-huhehaote' => 'hbase.cn-huhehaote.aliyuncs.com', + 'cn-hangzhou' => 'hbase.aliyuncs.com', + 'cn-shanghai' => 'hbase.aliyuncs.com', + 'cn-shenzhen' => 'hbase.aliyuncs.com', + 'ap-southeast-1' => 'hbase.aliyuncs.com', + 'ap-southeast-2' => 'hbase.ap-southeast-2.aliyuncs.com', + 'ap-southeast-3' => 'hbase.ap-southeast-3.aliyuncs.com', + 'ap-southeast-5' => 'hbase.ap-southeast-5.aliyuncs.com', + 'us-west-1' => 'hbase.aliyuncs.com', + 'us-east-1' => 'hbase.aliyuncs.com', + 'eu-central-1' => 'hbase.eu-central-1.aliyuncs.com', + 'me-east-1' => 'hbase.me-east-1.aliyuncs.com', + 'ap-south-1' => 'hbase.ap-south-1.aliyuncs.com', + 'eu-west-1' => 'hbase.eu-west-1.aliyuncs.com', + 'cn-hangzhou-finance' => 'hbase.aliyuncs.com', + 'cn-shanghai-finance-1' => 'hbase.aliyuncs.com', + 'cn-shenzhen-finance-1' => 'hbase.aliyuncs.com', + 'cn-north-2-gov-1' => 'hbase.aliyuncs.com', + ], + 'ddosbasic' => + [ + 'cn-qingdao' => 'antiddos.aliyuncs.com', + 'cn-beijing' => 'antiddos.aliyuncs.com', + 'cn-zhangjiakou' => 'antiddos-openapi.cn-zhangjiakou.aliyuncs.com', + 'cn-huhehaote' => 'antiddos-openapi.cn-huhehaote.aliyuncs.com', + 'cn-hangzhou' => 'antiddos.aliyuncs.com', + 'cn-shanghai' => 'antiddos.aliyuncs.com', + 'cn-shenzhen' => 'antiddos.aliyuncs.com', + 'cn-hongkong' => 'antiddos.aliyuncs.com', + 'ap-southeast-1' => 'antiddos.aliyuncs.com', + 'ap-southeast-2' => 'antiddos-openapi.ap-southeast-2.aliyuncs.com', + 'ap-southeast-3' => 'antiddos-openapi.ap-southeast-3.aliyuncs.com', + 'ap-southeast-5' => 'antiddos-openapi.ap-southeast-5.aliyuncs.com', + 'ap-northeast-1' => 'antiddos-openapi.ap-northeast-1.aliyuncs.com', + 'eu-west-1' => 'antiddos-openapi.eu-west-1.aliyuncs.com', + 'us-west-1' => 'antiddos.aliyuncs.com', + 'us-east-1' => 'antiddos.aliyuncs.com', + 'eu-central-1' => 'antiddos-openapi.eu-central-1.aliyuncs.com', + 'me-east-1' => 'antiddos-openapi.me-east-1.aliyuncs.com', + 'ap-south-1' => 'antiddos-openapi.ap-south-1.aliyuncs.com', + 'cn-chengdu' => 'antiddos-openapi.cn-chengdu.aliyuncs.com', + 'cn-shanghai-finance-1' => 'antiddos.aliyuncs.com', + 'cn-shenzhen-finance-1' => 'antiddos.aliyuncs.com', + 'cn-north-2-gov-1' => 'antiddos.aliyuncs.com', + ], + 'polardb' => + [ + 'cn-qingdao' => 'polardb.aliyuncs.com', + 'cn-beijing' => 'polardb.aliyuncs.com', + 'cn-huhehaote' => 'polardb.cn-huhehaote.aliyuncs.com', + 'cn-hangzhou' => 'polardb.aliyuncs.com', + 'cn-shanghai' => 'polardb.aliyuncs.com', + 'cn-shenzhen' => 'polardb.aliyuncs.com', + 'cn-hongkong' => 'polardb.aliyuncs.com', + 'cn-zhangjiakou' => 'polardb.cn-zhangjiakou.aliyuncs.com', + 'ap-southeast-1' => 'polardb.aliyuncs.com', + 'ap-southeast-3' => 'polardb.ap-southeast-3.aliyuncs.com', + 'ap-southeast-5' => 'polardb.ap-southeast-5.aliyuncs.com', + 'us-west-1' => 'polardb.aliyuncs.com', + 'cn-hangzhou-finance' => 'polardb.aliyuncs.com', + 'cn-shanghai-finance-1' => 'polardb.aliyuncs.com', + ], + 'actiontrail' => + [ + 'cn-qingdao' => 'actiontrail.cn-qingdao.aliyuncs.com', + 'cn-beijing' => 'actiontrail.cn-beijing.aliyuncs.com', + 'cn-zhangjiakou' => 'actiontrail.cn-zhangjiakou.aliyuncs.com', + 'cn-huhehaote' => 'actiontrail.cn-huhehaote.aliyuncs.com', + 'cn-hangzhou' => 'actiontrail.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'actiontrail.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'actiontrail.cn-shenzhen.aliyuncs.com', + 'cn-hongkong' => 'actiontrail.cn-hongkong.aliyuncs.com', + 'ap-southeast-1' => 'actiontrail.ap-southeast-1.aliyuncs.com', + 'ap-southeast-2' => 'actiontrail.ap-southeast-2.aliyuncs.com', + 'ap-southeast-3' => 'actiontrail.ap-southeast-3.aliyuncs.com', + 'ap-southeast-5' => 'actiontrail.ap-southeast-5.aliyuncs.com', + 'ap-northeast-1' => 'actiontrail.ap-northeast-1.aliyuncs.com', + 'eu-west-1' => 'actiontrail.eu-west-1.aliyuncs.com', + 'us-west-1' => 'actiontrail.us-west-1.aliyuncs.com', + 'us-east-1' => 'actiontrail.us-east-1.aliyuncs.com', + 'eu-central-1' => 'actiontrail.eu-central-1.aliyuncs.com', + 'me-east-1' => 'actiontrail.me-east-1.aliyuncs.com', + 'ap-south-1' => 'actiontrail.ap-south-1.aliyuncs.com', + 'cn-chengdu' => 'actiontrail.cn-chengdu.aliyuncs.com', + 'cn-shanghai-finance-1' => 'actiontrail.cn-shanghai-finance-1.aliyuncs.com', + 'cn-north-2-gov-1' => 'actiontrail.cn-north-2-gov-1.aliyuncs.com', + ], + 'codepipeline' => + [ + 'cn-beijing' => 'cds.cn-beijing.aliyuncs.com', + ], + 'hcs_sgw' => + [ + 'cn-beijing' => 'sgw.cn-shanghai.aliyuncs.com', + 'cn-zhangjiakou' => 'sgw.cn-shanghai.aliyuncs.com', + 'cn-hangzhou' => 'sgw.cn-shanghai.aliyuncs.com', + 'cn-shanghai' => 'sgw.cn-shanghai.aliyuncs.com', + 'cn-hongkong' => 'sgw.cn-shanghai.aliyuncs.com', + 'ap-southeast-1' => 'sgw.ap-southeast-1.aliyuncs.com', + 'ap-southeast-2' => 'sgw.ap-southeast-2.aliyuncs.com', + 'eu-central-1' => 'sgw.eu-central-1.aliyuncs.com', + 'cn-qingdao' => 'sgw.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'sgw.cn-shanghai.aliyuncs.com', + 'cn-huhehaote' => 'sgw.cn-shanghai.aliyuncs.com', + ], + 'openanalytics' => + [ + 'cn-beijing' => 'openanalytics.cn-beijing.aliyuncs.com', + 'cn-zhangjiakou' => 'openanalytics.cn-zhangjiakou.aliyuncs.com', + 'cn-hangzhou' => 'openanalytics.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'openanalytics.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'openanalytics.cn-shenzhen.aliyuncs.com', + 'ap-southeast-1' => 'openanalytics.ap-southeast-1.aliyuncs.com', + 'ap-southeast-3' => 'openanalytics.ap-southeast-3.aliyuncs.com', + 'eu-west-1' => 'openanalytics.eu-west-1.aliyuncs.com', + 'cn-hongkong' => 'openanalytics.cn-hongkong.aliyuncs.com', + 'us-west-1' => 'openanalytics.us-west-1.aliyuncs.com', + 'ap-southeast-2' => 'datalakeanalytics.ap-southeast-2.aliyuncs.com', + 'ap-northeast-1' => 'datalakeanalytics.ap-northeast-1.aliyuncs.com', + 'us-east-1' => 'datalakeanalytics.us-east-1.aliyuncs.com', + 'eu-central-1' => 'datalakeanalytics.eu-central-1.aliyuncs.com', + ], + 'clouddesktop' => + [ + 'cn-beijing' => 'clouddesktop.cn-beijing.aliyuncs.com', + 'cn-hangzhou' => 'clouddesktop.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'clouddesktop.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'clouddesktop.cn-shenzhen.aliyuncs.com', + ], + 'ivision' => + [ + 'cn-beijing' => 'ivision.cn-beijing.aliyuncs.com', + 'cn-hangzhou' => 'ivision.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'ivision.cn-shanghai.aliyuncs.com', + ], + 'fc' => + [ + 'cn-beijing' => 'cn-beijing.fc.aliyuncs.com', + 'cn-hangzhou' => 'cn-hangzhou.fc.aliyuncs.com', + 'cn-shanghai' => 'cn-shanghai.fc.aliyuncs.com', + 'cn-shenzhen' => 'cn-shenzhen.fc.aliyuncs.com', + 'ap-southeast-2' => 'ap-southeast-2.fc.aliyuncs.com', + 'cn-huhehaote' => 'cn-huhehaote.fc.aliyuncs.com', + ], + 'hsm' => + [ + 'cn-beijing' => 'hsm.aliyuncs.com', + 'cn-hangzhou' => 'hsm.aliyuncs.com', + 'cn-shanghai' => 'hsm.aliyuncs.com', + 'cn-shenzhen' => 'hsm.aliyuncs.com', + 'cn-hongkong' => 'hsm.aliyuncs.com', + 'ap-southeast-1' => 'hsm.aliyuncs.com', + 'cn-shanghai-finance-1' => 'hsm.aliyuncs.com', + 'cn-shenzhen-finance-1' => 'hsm.aliyuncs.com', + ], + 'petadata' => + [ + 'cn-beijing' => 'petadata.aliyuncs.com', + 'cn-zhangjiakou' => 'petadata.cn-zhangjiakou.aliyuncs.com', + 'cn-huhehaote' => 'petadata.cn-huhehaote.aliyuncs.com', + 'cn-hangzhou' => 'petadata.aliyuncs.com', + 'cn-shanghai' => 'petadata.aliyuncs.com', + 'cn-shenzhen' => 'petadata.aliyuncs.com', + 'ap-southeast-1' => 'petadata.aliyuncs.com', + 'ap-southeast-2' => 'petadata.ap-southeast-2.aliyuncs.com', + 'ap-southeast-5' => 'petadata.ap-southeast-5.aliyuncs.com', + 'us-west-1' => 'petadata.aliyuncs.com', + 'us-east-1' => 'petadata.aliyuncs.com', + 'eu-central-1' => 'petadata.eu-central-1.aliyuncs.com', + 'me-east-1' => 'petadata.me-east-1.aliyuncs.com', + 'cn-hongkong' => 'petadata.aliyuncs.com', + 'cn-qingdao' => 'petadata.aliyuncs.com', + ], + 'gpdb' => + [ + 'cn-beijing' => 'gpdb.aliyuncs.com', + 'cn-zhangjiakou' => 'gpdb.cn-zhangjiakou.aliyuncs.com', + 'cn-huhehaote' => 'gpdb.cn-huhehaote.aliyuncs.com', + 'cn-hangzhou' => 'gpdb.aliyuncs.com', + 'cn-shanghai' => 'gpdb.aliyuncs.com', + 'cn-shenzhen' => 'gpdb.aliyuncs.com', + 'ap-southeast-1' => 'gpdb.aliyuncs.com', + 'ap-southeast-2' => 'gpdb.ap-southeast-2.aliyuncs.com', + 'ap-southeast-3' => 'gpdb.ap-southeast-3.aliyuncs.com', + 'ap-southeast-5' => 'gpdb.ap-southeast-5.aliyuncs.com', + 'eu-west-1' => 'gpdb.eu-west-1.aliyuncs.com', + 'us-west-1' => 'gpdb.aliyuncs.com', + 'us-east-1' => 'gpdb.aliyuncs.com', + 'eu-central-1' => 'gpdb.eu-central-1.aliyuncs.com', + 'ap-south-1' => 'gpdb.ap-south-1.aliyuncs.com', + 'ap-northeast-1' => 'gpdb.ap-northeast-1.aliyuncs.com', + 'cn-hongkong' => 'gpdb.aliyuncs.com', + 'cn-chengdu' => 'gpdb.cn-chengdu.aliyuncs.com', + 'cn-hangzhou-finance' => 'gpdb.aliyuncs.com', + 'cn-shanghai-finance-1' => 'gpdb.aliyuncs.com', + 'cn-shenzhen-finance-1' => 'gpdb.aliyuncs.com', + ], + 'eci' => + [ + 'cn-beijing' => 'eci.aliyuncs.com', + 'cn-hangzhou' => 'eci.aliyuncs.com', + 'cn-shanghai' => 'eci.aliyuncs.com', + 'cn-shenzhen' => 'eci.aliyuncs.com', + 'ap-southeast-1' => 'eci.aliyuncs.com', + 'us-west-1' => 'eci.aliyuncs.com', + 'cn-hongkong' => 'eci.aliyuncs.com', + 'cn-zhangjiakou' => 'eci.cn-zhangjiakou.aliyuncs.com', + 'cn-huhehaote' => 'eci.cn-huhehaote.aliyuncs.com', + 'ap-southeast-2' => 'eci.ap-southeast-2.aliyuncs.com', + 'eu-west-1' => 'eci.eu-west-1.aliyuncs.com', + 'us-east-1' => 'eci.aliyuncs.com', + 'eu-central-1' => 'eci.eu-central-1.aliyuncs.com', + 'cn-chengdu' => 'eci.cn-chengdu.aliyuncs.com', + ], + 'airec' => + [ + 'cn-beijing' => 'airec.cn-beijing.aliyuncs.com', + 'cn-hangzhou' => 'airec.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'airec.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'airec.cn-shenzhen.aliyuncs.com', + ], + 'imm' => + [ + 'cn-beijing' => 'imm.cn-beijing.aliyuncs.com', + 'cn-zhangjiakou' => 'imm.cn-zhangjiakou.aliyuncs.com', + 'cn-hangzhou' => 'imm.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'imm.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'imm.cn-shenzhen.aliyuncs.com', + 'ap-southeast-1' => 'imm.ap-southeast-1.aliyuncs.com', + ], + 'gameshield' => + [ + 'cn-zhangjiakou' => 'gameshield.cn-zhangjiakou.aliyuncs.com', + 'cn-hangzhou' => 'gameshield.aliyuncs.com', + ], + 'ims' => + [ + 'cn-hangzhou' => 'ims.aliyuncs.com', + ], + 'cloudfirewall' => + [ + 'cn-hangzhou' => 'cloudfw.cn-hangzhou.aliyuncs.com', + 'ap-southeast-1' => 'cloudfw.ap-southeast-1.aliyuncs.com', + ], + 'ens' => + [ + 'cn-hangzhou' => 'ens.aliyuncs.com', + 'ap-southeast-1' => 'ens.ap-southeast-1.aliyuncs.com', + ], + 'hitsdb' => + [ + 'cn-hangzhou' => 'hitsdb.aliyuncs.com', + ], + 'ddos' => + [ + 'cn-hangzhou' => 'ddospro.cn-hangzhou.aliyuncs.com', + 'cn-hongkong' => 'ddospro.cn-hongkong.aliyuncs.com', + ], + 'rtc' => + [ + 'cn-hangzhou' => 'rtc.aliyuncs.com', + ], + 'emas' => + [ + 'cn-hangzhou' => 'mhub.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'mhub.cn-shanghai.aliyuncs.com', + ], + 'vipaegis' => + [ + 'cn-hangzhou' => 'aegis.cn-hangzhou.aliyuncs.com', + 'ap-southeast-3' => 'aegis.ap-southeast-3.aliyuncs.com', + ], + 'ddosrewards' => + [ + 'cn-hangzhou' => 'ddosright.cn-hangzhou.aliyuncs.com', + ], + 'cloudap' => + [ + 'cn-hangzhou' => 'cloudwf.aliyuncs.com', + ], + 'ensdisk' => + [ + 'cn-hangzhou' => 'ens.aliyuncs.com', + ], + 'bastionhost' => + [ + 'cn-hangzhou' => 'yundun-bastionhost.aliyuncs.com', + ], + 'pvtz' => + [ + 'cn-hangzhou' => 'pvtz.aliyuncs.com', + ], + 'ccs' => + [ + 'cn-hangzhou' => 'ccs.aliyuncs.com', + ], + 'yunmarket' => + [ + 'cn-hangzhou' => 'market.aliyuncs.com', + ], + 'cas' => + [ + 'cn-hangzhou' => 'cas.aliyuncs.com', + 'ap-southeast-2' => 'cas.ap-southeast-2.aliyuncs.com', + 'ap-northeast-1' => 'cas.ap-northeast-1.aliyuncs.com', + 'eu-central-1' => 'cas.eu-central-1.aliyuncs.com', + 'me-east-1' => 'cas.me-east-1.aliyuncs.com', + 'ap-south-1' => 'cas.ap-south-1.aliyuncs.com', + ], + 'ddoscoo' => + [ + 'cn-hangzhou' => 'ddoscoo.cn-hangzhou.aliyuncs.com', + 'ap-southeast-1' => 'ddoscoo.ap-southeast-1.aliyuncs.com', + ], + 'waf' => + [ + 'cn-hangzhou' => 'wafopenapi.cn-hangzhou.aliyuncs.com', + 'ap-southeast-1' => 'wafopenapi.ap-southeast-1.aliyuncs.com', + ], + 'xianzhi' => + [ + 'cn-hangzhou' => 'xianzhi.aliyuncs.com', + ], + 'sas' => + [ + 'cn-hangzhou' => 'sas.aliyuncs.com', + ], + 'cloudauth' => + [ + 'cn-hangzhou' => 'cloudauth.aliyuncs.com', + ], + 'dmsenterprise' => + [ + 'cn-hangzhou' => 'dms-enterprise.aliyuncs.com', + 'cn-shanghai' => 'dms-enterprise.aliyuncs.com', + 'cn-shenzhen' => 'dms-enterprise.aliyuncs.com', + 'cn-beijing' => 'dms-enterprise.aliyuncs.com', + 'cn-qingdao' => 'dms-enterprise.aliyuncs.com', + 'ap-northeast-1' => 'dms-enterprise.aliyuncs.com', + ], + 'baas' => + [ + 'cn-hangzhou' => 'baas.cn-hangzhou.aliyuncs.com', + 'ap-southeast-1' => 'baas.ap-southeast-1.aliyuncs.com', + 'ap-northeast-1' => 'baas.ap-northeast-1.aliyuncs.com', + 'cn-beijing' => 'baas.aliyuncs.com', + 'cn-shanghai' => 'baas.aliyuncs.com', + 'cn-shenzhen' => 'baas.aliyuncs.com', + 'cn-hongkong' => 'baas.cn-hongkong.aliyuncs.com', + 'ap-southeast-2' => 'baas.ap-southeast-2.aliyuncs.com', + 'us-east-1' => 'baas.us-east-1.aliyuncs.com', + 'eu-central-1' => 'baas.aliyuncs.com', + 'cn-qingdao' => 'baas.aliyuncs.com', + 'cn-zhangjiakou' => 'baas.aliyuncs.com', + 'cn-huhehaote' => 'baas.aliyuncs.com', + 'eu-west-1' => 'baas.eu-west-1.aliyuncs.com', + 'us-west-1' => 'baas.aliyuncs.com', + 'ap-south-1' => 'baas.aliyuncs.com', + 'cn-north-2-gov-1' => 'baas.cn-north-2-gov-1.aliyuncs.com', + ], + 'alimt' => + [ + 'cn-hangzhou' => 'mt.cn-hangzhou.aliyuncs.com', + ], + 'dcdn' => + [ + 'cn-hangzhou' => 'dcdn.aliyuncs.com', + ], + 'hcs_mgw' => + [ + 'cn-hangzhou' => 'mgw.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'mgw.cn-shanghai.aliyuncs.com', + 'ap-southeast-1' => 'mgw.ap-southeast-1.aliyuncs.com', + ], + 'linkedmall' => + [ + 'cn-hangzhou' => 'linkedmall.aliyuncs.com', + 'cn-shanghai' => 'linkedmall.aliyuncs.com', + ], + 'cps' => + [ + 'cn-hangzhou' => 'cloudpush.aliyuncs.com', + ], + 'scdn' => + [ + 'cn-hangzhou' => 'scdn.aliyuncs.com', + ], + 'trademark' => + [ + 'cn-hangzhou' => 'trademark.aliyuncs.com', + ], + 'elasticsearch' => + [ + 'cn-hangzhou' => 'elasticsearch.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'elasticsearch.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'elasticsearch.cn-shenzhen.aliyuncs.com', + 'cn-hongkong' => 'elasticsearch.cn-hongkong.aliyuncs.com', + 'ap-southeast-1' => 'elasticsearch.ap-southeast-1.aliyuncs.com', + 'ap-southeast-2' => 'elasticsearch.ap-southeast-2.aliyuncs.com', + 'ap-southeast-3' => 'elasticsearch.ap-southeast-3.aliyuncs.com', + 'ap-northeast-1' => 'elasticsearch.ap-northeast-1.aliyuncs.com', + 'us-west-1' => 'elasticsearch.us-west-1.aliyuncs.com', + 'eu-central-1' => 'elasticsearch.eu-central-1.aliyuncs.com', + 'ap-south-1' => 'elasticsearch.ap-south-1.aliyuncs.com', + 'cn-qingdao' => 'elasticsearch.cn-qingdao.aliyuncs.com', + 'ap-southeast-5' => 'elasticsearch.ap-southeast-5.aliyuncs.com', + 'cn-beijing' => 'elasticsearch.cn-beijing.aliyuncs.com', + 'cn-zhangjiakou' => 'elasticsearch.cn-zhangjiakou.aliyuncs.com', + 'cn-hangzhou-finance' => 'elasticsearch.cn-hangzhou-finance.aliyuncs.com', + 'cn-shanghai-finance-1' => 'elasticsearch.cn-shanghai-finance-1.aliyuncs.com', + ], + 'luban' => + [ + 'cn-hangzhou' => 'luban.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'luban.cn-shanghai.aliyuncs.com', + ], + 'pcdn' => + [ + 'cn-hangzhou' => 'pcdn.aliyuncs.com', + ], + 'uis' => + [ + 'cn-hangzhou' => 'uis.cn-hangzhou.aliyuncs.com', + 'cn-north-2-gov-1' => 'uis.cn-hangzhou.aliyuncs.com', + ], + 'beebot' => + [ + 'cn-hangzhou' => 'chatbot.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'chatbot.cn-shanghai.aliyuncs.com', + ], + 'chatbot' => + [ + 'global' => 'chatbot.cn-shanghai.aliyuncs.com', + 'cn-shanghai' => 'chatbot.cn-shanghai.aliyuncs.com', + ], + 'alidnsgtm' => + [ + 'cn-hangzhou' => 'alidns.aliyuncs.com', + ], + 'sca' => + [ + 'cn-hangzhou' => 'qualitycheck.cn-hangzhou.aliyuncs.com', + ], + 'cccvn' => + [ + 'cn-shanghai' => 'voicenavigator.cn-shanghai.aliyuncs.com', + ], + 'cloudphoto' => + [ + 'cn-shanghai' => 'cloudphoto.cn-shanghai.aliyuncs.com', + ], + 'smartag' => + [ + 'cn-shanghai' => 'smartag.cn-shanghai.aliyuncs.com', + 'cn-hongkong' => 'smartag.cn-hongkong.aliyuncs.com', + 'ap-southeast-1' => 'smartag.ap-southeast-1.aliyuncs.com', + 'ap-southeast-2' => 'smartag.ap-southeast-2.aliyuncs.com', + 'ap-southeast-3' => 'smartag.ap-southeast-3.aliyuncs.com', + 'ap-southeast-5' => 'smartag.ap-southeast-5.aliyuncs.com', + 'eu-central-1' => 'smartag.eu-central-1.aliyuncs.com', + 'ap-northeast-1' => 'smartag.ap-northeast-1.aliyuncs.com', + 'cn-shanghai-finance-1' => 'smartag.cn-shanghai-finance-1.aliyuncs.com', + ], + 'nlp' => + [ + 'cn-shanghai' => 'nlp.cn-shanghai.aliyuncs.com', + ], + 'nls-cloud-meta' => + [ + 'cn-shanghai' => 'nls-meta.cn-shanghai.aliyuncs.com', + ], + 'nls-filetrans' => + [ + 'cn-shanghai' => 'filetrans.cn-shanghai.aliyuncs.com', + ], + 'linkwan' => + [ + 'cn-shanghai' => 'linkwan.cn-shanghai.aliyuncs.com', + 'cn-hangzhou' => 'linkwan.cn-hangzhou.aliyuncs.com', + ], + 'hdm' => + [ + 'cn-shanghai' => 'hdm-api.aliyuncs.com', + ], + 'iovcc' => + [ + 'cn-shanghai' => 'iovcc.cn-shanghai.aliyuncs.com', + ], + 'ddosdip' => + [ + 'ap-southeast-1' => 'ddosdip.ap-southeast-1.aliyuncs.com', + ], + 'imagesearch' => + [ + 'ap-southeast-1' => 'imagesearch.ap-southeast-1.aliyuncs.com', + 'ap-southeast-2' => 'imagesearch.ap-southeast-2.aliyuncs.com', + 'ap-northeast-1' => 'imagesearch.ap-northeast-1.aliyuncs.com', + 'cn-shanghai' => 'imagesearch.cn-shanghai.aliyuncs.com', + ], + 'alidfs' => + [ + 'cn-beijing' => 'dfs.cn-beijing.aliyuncs.com', + 'cn-shanghai' => 'dfs.cn-shanghai.aliyuncs.com', + 'cn-hangzhou' => 'dfs.cn-hangzhou.aliyuncs.com', + 'cn-zhangjiakou' => 'dfs.cn-zhangjiakou.aliyuncs.com', + ], + 'vs' => + [ + 'cn-hangzhou' => 'vs.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'vs.cn-shanghai.aliyuncs.com', + 'cn-qingdao' => 'vs.cn-qingdao.aliyuncs.com', + 'cn-beijing' => 'vs.cn-beijing.aliyuncs.com', + 'cn-shenzhen' => 'vs.cn-shenzhen.aliyuncs.com', + ], + 'foas' => + [ + 'cn-qingdao' => 'foas.cn-qingdao.aliyuncs.com', + 'cn-beijing' => 'foas.cn-beijing.aliyuncs.com', + 'cn-zhangjiakou' => 'foas.cn-zhangjiakou.aliyuncs.com', + 'cn-hangzhou' => 'foas.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'foas.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'foas.cn-shenzhen.aliyuncs.com', + 'ap-northeast-1' => 'foas.ap-northeast-1.aliyuncs.com', + 'ap-southeast-1' => 'foas.ap-southeast-1.aliyuncs.com', + 'ap-southeast-3' => 'foas.ap-southeast-3.aliyuncs.com', + 'cn-hangzhou-finance' => 'foas.cn-hangzhou-finance.aliyuncs.com', + 'cn-shanghai-finance-1' => 'foas.cn-shanghai-finance-1.aliyuncs.com', + 'cn-north-2-gov-1' => 'foas.cn-north-2-gov-1.aliyuncs.com', + ], + 'iotid' => + [ + 'cn-hangzhou' => 'iotid.cn-hangzhou.aliyuncs.com', + ], + 'drdspost' => + [ + 'ap-southeast-1' => 'drds.ap-southeast-1.aliyuncs.com', + 'cn-shanghai' => 'drds.cn-shanghai.aliyuncs.com', + 'cn-hongkong' => 'drds.cn-hangzhou.aliyuncs.com', + 'cn-huhehaote' => 'drds.cn-huhehaote.aliyuncs.com', + 'us-east-1' => 'drds.us-east-1.aliyuncs.com', + ], + 'drdspre' => + [ + 'cn-qingdao' => 'drds.cn-qingdao.aliyuncs.com', + 'cn-beijing' => 'drds.cn-beijing.aliyuncs.com', + 'cn-hangzhou' => 'drds.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'drds.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'drds.cn-shenzhen.aliyuncs.com', + 'cn-hongkong' => 'drds.cn-hangzhou.aliyuncs.com', + 'cn-huhehaote' => 'drds.cn-huhehaote.aliyuncs.com', + 'us-east-1' => 'drds.us-east-1.aliyuncs.com', + ], + 'acr' => + [ + 'cn-qingdao' => 'cr.cn-qingdao.aliyuncs.com', + 'cn-beijing' => 'cr.cn-beijing.aliyuncs.com', + 'cn-zhangjiakou' => 'cr.cn-zhangjiakou.aliyuncs.com', + 'cn-huhehaote' => 'cr.cn-huhehaote.aliyuncs.com', + 'cn-hangzhou' => 'cr.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'cr.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'cr.cn-shenzhen.aliyuncs.com', + 'cn-hongkong' => 'cr.cn-hongkong.aliyuncs.com', + 'ap-southeast-1' => 'cr.ap-southeast-1.aliyuncs.com', + 'ap-southeast-2' => 'cr.ap-southeast-2.aliyuncs.com', + 'ap-southeast-3' => 'cr.ap-southeast-3.aliyuncs.com', + 'ap-southeast-5' => 'cr.ap-southeast-5.aliyuncs.com', + 'ap-northeast-1' => 'cr.ap-northeast-1.aliyuncs.com', + 'eu-west-1' => 'cr.eu-west-1.aliyuncs.com', + 'us-west-1' => 'cr.us-west-1.aliyuncs.com', + 'us-east-1' => 'cr.us-east-1.aliyuncs.com', + 'eu-central-1' => 'cr.eu-central-1.aliyuncs.com', + 'me-east-1' => 'cr.me-east-1.aliyuncs.com', + 'ap-south-1' => 'cr.ap-south-1.aliyuncs.com', + 'cn-hangzhou-finance' => 'cr.cn-hangzhou-finance.aliyuncs.com', + 'cn-shanghai-finance-1' => 'cr.cn-shanghai-finance-1.aliyuncs.com', + 'cn-shenzhen-finance-1' => 'cr.cn-shenzhen-finance-1.aliyuncs.com', + 'cn-north-2-gov-1' => 'cr.cn-north-2-gov-1.aliyuncs.com', + ], + 'faas' => + [ + 'cn-beijing' => 'faas.cn-beijing.aliyuncs.com', + 'cn-zhangjiakou' => 'faas.cn-zhangjiakou.aliyuncs.com', + 'cn-hangzhou' => 'faas.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'faas.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'faas.cn-shenzhen.aliyuncs.com', + 'ap-southeast-5' => 'faas.ap-southeast-5.aliyuncs.com', + ], + 'idaas' => + [ + 'cn-hangzhou' => 'idaas.aliyuncs.com', + 'cn-qingdao' => 'idaas.aliyuncs.com', + 'cn-beijing' => 'idaas.aliyuncs.com', + 'cn-chengdu' => 'idaas.aliyuncs.com', + 'cn-zhangjiakou' => 'idaas.aliyuncs.com', + 'cn-huhehaote' => 'idaas.aliyuncs.com', + 'cn-shanghai' => 'idaas.aliyuncs.com', + 'cn-shenzhen' => 'idaas.aliyuncs.com', + 'cn-hongkong' => 'idaas.aliyuncs.com', + ], + 'privatelink' => + [ + 'cn-hangzhou' => 'privatelink.cn-hangzhou.aliyuncs.com', + 'cn-huhehaote' => 'privatelink.cn-huhehaote.aliyuncs.com', + 'eu-west-1' => 'privatelink.eu-west-1.aliyuncs.com', + ], + 'batchcomputenew' => + [ + 'cn-hongkong' => 'batchcompute.cn-hongkong.aliyuncs.com', + ], + 'vcs' => + [ + 'cn-hangzhou' => 'vcs.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'vcs.cn-shanghai.aliyuncs.com', + ], + 'vds' => + [ + 'cn-hangzhou' => 'vds.aliyuncs.com', + 'cn-shanghai' => 'vds.cn-shanghai.aliyuncs.com', + ], + 'vcsbasic' => + [ + 'cn-hangzhou' => 'vcsbasic.aliyuncs.com', + 'cn-shanghai' => 'vcs.cn-shanghai.aliyuncs.com', + ], + 'hbr' => + [ + 'cn-qingdao' => 'hbr.cn-shanghai.aliyuncs.com', + 'cn-beijing' => 'hbr.cn-beijing.aliyuncs.com', + 'cn-zhangjiakou' => 'hbr.cn-shanghai.aliyuncs.com', + 'cn-huhehaote' => 'hbr.cn-shanghai.aliyuncs.com', + 'cn-hangzhou' => 'hbr.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'hbr.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'hbr.cn-shenzhen.aliyuncs.com', + 'ap-southeast-1' => 'hbr.ap-southeast-1.aliyuncs.com', + 'ap-southeast-2' => 'hbr.ap-southeast-2.aliyuncs.com', + ], + 'image' => + [ + 'cn-shanghai' => 'image.cn-shanghai.aliyuncs.com', + ], + 'webx' => + [ + 'cn-shenzhen' => 'webplus.cn-hangzhou.aliyuncs.com', + 'cn-beijing' => 'webplus.cn-hangzhou.aliyuncs.com', + 'cn-zhangjiakou' => 'webplus.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'webplus.cn-hangzhou.aliyuncs.com', + 'cn-hangzhou' => 'webplus.cn-hangzhou.aliyuncs.com', + ], + 'sddp' => + [ + 'cn-zhangjiakou' => 'sddp.cn-zhangjiakou.aliyuncs.com', + 'cn-hangzhou' => 'sddp.cn-hangzhou.aliyuncs.com', + ], + 'oos' => + [ + 'cn-hangzhou' => 'oos.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'oos.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'oos.cn-shenzhen.aliyuncs.com', + 'cn-hongkong' => 'oos.cn-hongkong.aliyuncs.com', + 'us-east-1' => 'oos.us-east-1.aliyuncs.com', + 'cn-beijing' => 'oos.cn-beijing.aliyuncs.com', + 'cn-zhangjiakou' => 'oos.cn-zhangjakou.aliyuncs.com', + 'cn-huhehaote' => 'oos.cn-huhehaote.aliyuncs.com', + 'eu-west-1' => 'oos.eu-west-1.aliyuncs.com', + 'eu-central-1' => 'oos.eu-central-1.aliyuncs.com', + 'ap-south-1' => 'oos.ap-south-1.aliyuncs.com', + ], + 'fnf' => + [ + 'cn-hangzhou' => 'cn-hangzhou.fnf.aliyuncs.com', + 'cn-shanghai' => 'cn-shanghai.fnf.aliyuncs.com', + 'cn-shenzhen' => 'cn-shenzhen.fnf.aliyuncs.com', + ], + 'smc' => + [ + 'cn-huhehaote' => 'smc.aliyuncs.com', + 'cn-hangzhou' => 'smc.aliyuncs.com', + 'cn-qingdao' => 'smc.aliyuncs.com', + 'cn-beijing' => 'smc.aliyuncs.com', + 'cn-zhangjiakou' => 'smc.aliyuncs.com', + 'cn-shanghai' => 'smc.aliyuncs.com', + 'cn-shenzhen' => 'smc.aliyuncs.com', + 'cn-hongkong' => 'smc.aliyuncs.com', + 'ap-southeast-1' => 'smc.aliyuncs.com', + 'ap-southeast-2' => 'smc.aliyuncs.com', + 'ap-southeast-3' => 'smc.aliyuncs.com', + 'ap-southeast-5' => 'smc.aliyuncs.com', + 'ap-northeast-1' => 'smc.aliyuncs.com', + 'eu-west-1' => 'smc.aliyuncs.com', + 'us-west-1' => 'smc.aliyuncs.com', + 'us-east-1' => 'smc.aliyuncs.com', + 'eu-central-1' => 'smc.aliyuncs.com', + 'me-east-1' => 'smc.aliyuncs.com', + 'ap-south-1' => 'smc.aliyuncs.com', + 'cn-chengdu' => 'smc.aliyuncs.com', + ], + 'foasconsole' => + [ + 'cn-beijing' => 'foasconsole.aliyuncs.com', + 'cn-zhangjiakou' => 'foasconsole.aliyuncs.com', + 'cn-hangzhou' => 'foasconsole.aliyuncs.com', + 'cn-shanghai' => 'foasconsole.aliyuncs.com', + 'cn-shenzhen' => 'foasconsole.aliyuncs.com', + 'cn-hongkong' => 'foasconsole.aliyuncs.com', + 'ap-southeast-1' => 'foasconsole.aliyuncs.com', + 'ap-southeast-3' => 'foasconsole.aliyuncs.com', + 'ap-northeast-1' => 'foasconsole.aliyuncs.com', + 'cn-hangzhou-finance' => 'foasconsole.aliyuncs.com', + 'cn-shanghai-finance-1' => 'foasconsole.aliyuncs.com', + 'cn-north-2-gov-1' => 'foasconsole.aliyuncs.com', + ], + 'serverless' => + [ + 'cn-beijing' => 'sae.cn-beijing.aliyuncs.com', + 'cn-hangzhou' => 'sae.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'sae.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'sae.cn-shenzhen.aliyuncs.com', + ], + 'ivpd' => + [ + 'cn-huhehaote' => 'ivpd.cn-huhehaote.aliyuncs.com', + 'cn-shanghai' => 'ivpd.cn-shanghai.aliyuncs.com', + 'cn-hangzhou' => 'ivpd.cn-hangzhou.aliyuncs.com', + ], + 'hivisengine' => + [ + 'cn-huhehaote' => 'hivisengine.aliyuncs.com', + 'cn-shanghai' => 'hivisengine.cn-shanghai.aliyuncs.com', + 'cn-hangzhou' => 'hivisengine.cn-hangzhou.aliyuncs.com', + ], + 'hiknoengine' => + [ + 'cn-huhehaote' => 'hiknoengine.aliyuncs.com', + 'cn-shanghai' => 'hiknoengine.cn-shanghai.aliyuncs.com', + 'cn-hangzhou' => 'hiknoengine.cn-hangzhou.aliyuncs.com', + ], + 'clouddev' => + [ + 'cn-hangzhou' => 'mpserverless.aliyuncs.com', + 'cn-shanghai' => 'mpserverless.aliyuncs.com', + ], + 'premiumpics' => + [ + 'cn-hangzhou' => 'premiumpics.aliyuncs.com', + ], + 'composer' => + [ + 'cn-hangzhou' => 'composer.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'composer.cn-shanghai.aliyuncs.com', + ], + 'cloudesl' => + [ + 'cn-hangzhou' => 'cloudesl.cn-hangzhou.aliyuncs.com', + ], + 'amscloudapp' => + [ + 'cn-hangzhou' => 'mpca.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'mpca.cn-shanghai.aliyuncs.com', + ], + 'mse' => + [ + 'cn-hangzhou' => 'mse.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'mse.cn-shanghai.aliyuncs.com', + ], + 'dg' => + [ + 'cn-hangzhou' => 'dg.cn-hangzhou.aliyuncs.com', + ], + 'graphcompute' => + [ + 'cn-shanghai' => 'gcs.cn-shanghai.aliyuncs.com', + ], + 'cds' => + [ + 'ap-southeast-1' => 'cassandra.aliyuncs.com', + 'cn-qingdao' => 'cassandra.aliyuncs.com', + 'cn-beijing' => 'cassandra.aliyuncs.com', + 'cn-hangzhou' => 'cassandra.aliyuncs.com', + 'cn-shanghai' => 'cassandra.aliyuncs.com', + 'cn-shenzhen' => 'cassandra.aliyuncs.com', + ], + 'ads' => + [ + 'cn-qingdao' => 'adb.aliyuncs.com', + 'cn-beijing' => 'adb.aliyuncs.com', + 'cn-zhangjiakou' => 'adb.cn-zhangjiakou.aliyuncs.com', + 'cn-hangzhou' => 'adb.aliyuncs.com', + 'cn-shanghai' => 'adb.aliyuncs.com', + 'cn-shenzhen' => 'adb.aliyuncs.com', + 'cn-hongkong' => 'adb.aliyuncs.com', + 'ap-southeast-1' => 'adb.aliyuncs.com', + 'ap-northeast-1' => 'adb.ap-northeast-1.aliyuncs.com', + 'eu-west-1' => 'adb.eu-west-1.aliyuncs.com', + 'us-west-1' => 'adb.aliyuncs.com', + 'us-east-1' => 'adb.aliyuncs.com', + 'ap-southeast-2' => 'adb.ap-southeast-2.aliyuncs.com', + 'eu-central-1' => 'adb.eu-central-1.aliyuncs.com', + 'ap-south-1' => 'adb.ap-south-1.aliyuncs.com', + 'cn-north-2-gov-1' => 'adb.aliyuncs.com', + 'cn-chengdu' => 'adb.cn-chengdu.aliyuncs.com', + 'cn-huhehaote' => 'adb.cn-huhehaote.aliyuncs.com', + 'ap-southeast-3' => 'adb.ap-southeast-3.aliyuncs.com', + ], + 'csb' => + [ + 'cn-beijing' => 'csb.cn-beijing.aliyuncs.com', + 'cn-hangzhou' => 'csb.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'csb.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'csb.cn-shenzhen.aliyuncs.com', + 'cn-hongkong' => 'csb.cn-hongkong.aliyuncs.com', + ], + 'cityvisual' => + [ + 'cn-hangzhou' => 'cityvisual.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'cityvisual.cn-shanghai.aliyuncs.com', + ], + 'dbaudit' => + [ + 'cn-hangzhou' => 'yundun-dbaudit.aliyuncs.com', + ], + 'bssopenapi' => + [ + 'cn-hangzhou' => 'business.aliyuncs.com', + 'cn-shanghai' => 'business.aliyuncs.com', + 'ap-southeast-1' => 'business.ap-southeast-1.aliyuncs.com', + ], + 'indvi' => + [ + 'cn-hangzhou' => 'indvi.cn-hangzhou.aliyuncs.com', + ], + 'swcopyright' => + [ + 'cn-hangzhou' => 'copyright.aliyuncs.com', + ], + 'multimediaai' => + [ + 'cn-beijing' => 'multimediaai.cn-beijing.aliyuncs.com', + 'cn-hangzhou' => 'multimediaai.cn-hangzhou.aliyuncs.com', + ], + 'rsimganalys' => + [ + 'cn-hangzhou' => 'rsimganalys.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'rsimganalys.cn-shanghai.aliyuncs.com', + ], + 'tdsr' => + [ + 'cn-hangzhou' => 'lyj.cn-hangzhou.aliyuncs.com', + ], + 'eslogstash' => + [ + 'cn-qingdao' => 'elasticsearch.cn-qingdao.aliyuncs.com', + 'cn-beijing' => 'elasticsearch.cn-beijing.aliyuncs.com', + 'cn-zhangjiakou' => 'elasticsearch.cn-zhangjiakou.aliyuncs.com', + 'cn-hangzhou' => 'elasticsearch.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'elasticsearch.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'elasticsearch.cn-shenzhen.aliyuncs.com', + ], + 'vcoverimage' => + [ + 'cn-beijing' => 'vcoverimage.cn-beijing.aliyuncs.com', + 'cn-hangzhou' => 'vcoverimage.cn-hangzhou.aliyuncs.com', + ], + 'ahas' => + [ + 'cn-beijing' => 'ahas.cn-beijing.aliyuncs.com', + 'cn-hangzhou' => 'ahas.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'ahas.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'ahas.cn-shenzhen.aliyuncs.com', + ], + 'vstruction' => + [ + 'cn-beijing' => 'vstruction.cn-beijing.aliyuncs.com', + 'cn-hangzhou' => 'vstruction.cn-hangzhou.aliyuncs.com', + ], + 'vcovergif' => + [ + 'cn-beijing' => 'vcovergif.cn-beijing.aliyuncs.com', + 'cn-hangzhou' => 'vcovergif.cn-hangzhou.aliyuncs.com', + ], + 'aiccs' => + [ + 'cn-hangzhou' => 'aiccs.aliyuncs.com', + ], + 'nls' => + [ + 'cn-shanghai' => 'nls-slp.cn-shanghai.aliyuncs.com', + ], + 'antcloudauth' => + [ + 'cn-shanghai' => 'antcloudauth.aliyuncs.com', + ], + 'prepaid_ads' => + [ + 'cn-hangzhou-finance' => 'ads.cn-hangzhou-finance.aliyuncs.com', + ], + 'hdr' => + [ + 'cn-qingdao' => 'hdr.cn-shanghai.aliyuncs.com', + 'cn-beijing' => 'hdr.cn-shanghai.aliyuncs.com', + 'cn-zhangjiakou' => 'hdr.cn-shanghai.aliyuncs.com', + 'cn-hangzhou' => 'hdr.cn-shanghai.aliyuncs.com', + 'cn-shanghai' => 'hdr.cn-shanghai.aliyuncs.com', + 'cn-shenzhen' => 'hdr.cn-shanghai.aliyuncs.com', + 'cn-hongkong' => 'hdr.cn-shanghai.aliyuncs.com', + ], + 'cbs' => + [ + 'cn-qingdao' => 'dbs-api.cn-hangzhou.aliyuncs.com', + 'cn-beijing' => 'dbs-api.cn-hangzhou.aliyuncs.com', + 'cn-zhangjiakou' => 'dbs-api.cn-hangzhou.aliyuncs.com', + 'cn-huhehaote' => 'dbs-api.cn-huhehaote.aliyuncs.com', + 'cn-hangzhou' => 'dbs-api.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'dbs-api.cn-hangzhou.aliyuncs.com', + 'cn-shenzhen' => 'dbs-api.cn-hangzhou.aliyuncs.com', + 'cn-hongkong' => 'dbs-api.cn-hangzhou.aliyuncs.com', + 'ap-southeast-1' => 'dbs-api.ap-southeast-1.aliyuncs.com', + 'ap-northeast-1' => 'dbs-api.ap-northeast-1.aliyuncs.com', + 'cn-hangzhou-finance' => 'dbs-api.cn-hangzhou.aliyuncs.com', + 'cn-shanghai-finance-1' => 'dbs-api.cn-hangzhou.aliyuncs.com', + 'cn-shenzhen-finance-1' => 'dbs-api.cn-hangzhou.aliyuncs.com', + ], + 'datag' => + [ + 'cn-beijing' => 'datag.cn-beijing.aliyuncs.com', + ], + 'retailir' => + [ + 'cn-hangzhou' => 'retailir.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'retailir.cn-shanghai.aliyuncs.com', + ], + 'mpaas' => + [ + 'cn-hangzhou' => 'mpaas.aliyuncs.com', + ], + 'iqa' => + [ + 'cn-hangzhou' => 'iqa.aliyuncs.com', + ], + 'sofa' => + [ + 'cn-hangzhou' => 'sofa.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'sofa.cn-shanghai.aliyuncs.com', + 'cn-hangzhou-finance' => 'sofa.cn-shanghai.aliyuncs.com', + ], + 'edas' => + [ + 'cn-hangzhou' => 'edas.cn-hangzhou.aliyuncs.com', + 'cn-shanghai' => 'edas.cn-shanghai.aliyuncs.com', + ], + 'gwsservice' => + [ + 'cn-shanghai' => 'gws.cn-shanghai.aliyuncs.com', + ], + 'gds' => + [ + 'ap-southeast-1' => 'gdb.aliyuncs.com', + ], + ], +]; diff --git a/vendor/alibabacloud/client/src/Credentials/AccessKeyCredential.php b/vendor/alibabacloud/client/src/Credentials/AccessKeyCredential.php new file mode 100644 index 0000000..bacaecc --- /dev/null +++ b/vendor/alibabacloud/client/src/Credentials/AccessKeyCredential.php @@ -0,0 +1,65 @@ +accessKeyId = $accessKeyId; + $this->accessKeySecret = $accessKeySecret; + } + + /** + * @return string + */ + public function getAccessKeyId() + { + return $this->accessKeyId; + } + + /** + * @return string + */ + public function getAccessKeySecret() + { + return $this->accessKeySecret; + } + + /** + * @return string + */ + public function __toString() + { + return "$this->accessKeyId#$this->accessKeySecret"; + } +} diff --git a/vendor/alibabacloud/client/src/Credentials/BearerTokenCredential.php b/vendor/alibabacloud/client/src/Credentials/BearerTokenCredential.php new file mode 100644 index 0000000..db69a7c --- /dev/null +++ b/vendor/alibabacloud/client/src/Credentials/BearerTokenCredential.php @@ -0,0 +1,66 @@ +bearerToken = $bearerToken; + } + + /** + * @return string + */ + public function getBearerToken() + { + return $this->bearerToken; + } + + /** + * @return string + */ + public function getAccessKeyId() + { + return ''; + } + + /** + * @return string + */ + public function getAccessKeySecret() + { + return ''; + } + + /** + * @return string + */ + public function __toString() + { + return "bearerToken#$this->bearerToken"; + } +} diff --git a/vendor/alibabacloud/client/src/Credentials/CredentialsInterface.php b/vendor/alibabacloud/client/src/Credentials/CredentialsInterface.php new file mode 100644 index 0000000..96ee50a --- /dev/null +++ b/vendor/alibabacloud/client/src/Credentials/CredentialsInterface.php @@ -0,0 +1,18 @@ +roleName = $roleName; + } + + /** + * @return string + */ + public function getRoleName() + { + return $this->roleName; + } + + /** + * @return string + */ + public function __toString() + { + return "roleName#$this->roleName"; + } +} diff --git a/vendor/alibabacloud/client/src/Credentials/Ini/CreateTrait.php b/vendor/alibabacloud/client/src/Credentials/Ini/CreateTrait.php new file mode 100644 index 0000000..2ec7511 --- /dev/null +++ b/vendor/alibabacloud/client/src/Credentials/Ini/CreateTrait.php @@ -0,0 +1,181 @@ +missingRequired('type', $clientName); + } + + return $this->createClientByType($clientName, $credential)->name($clientName); + } + + /** + * @param string $clientName + * @param array $credential + * + * @return AccessKeyClient|BearerTokenClient|EcsRamRoleClient|RamRoleArnClient|RsaKeyPairClient + * @throws ClientException + */ + private function createClientByType($clientName, array $credential) + { + switch (\strtolower($credential['type'])) { + case 'access_key': + return $this->accessKeyClient($clientName, $credential); + case 'ecs_ram_role': + return $this->ecsRamRoleClient($clientName, $credential); + case 'ram_role_arn': + return $this->ramRoleArnClient($clientName, $credential); + case 'bearer_token': + return $this->bearerTokenClient($clientName, $credential); + case 'rsa_key_pair': + return $this->rsaKeyPairClient($clientName, $credential); + default: + throw new ClientException( + "Invalid type '{$credential['type']}' for '$clientName' in {$this->filename}", + SDK::INVALID_CREDENTIAL + ); + } + } + + /** + * @param array $credential + * @param string $clientName + * + * @return AccessKeyClient + * @throws ClientException + */ + private function accessKeyClient($clientName, array $credential) + { + if (!isset($credential['access_key_id'])) { + $this->missingRequired('access_key_id', $clientName); + } + + if (!isset($credential['access_key_secret'])) { + $this->missingRequired('access_key_secret', $clientName); + } + + return new AccessKeyClient( + $credential['access_key_id'], + $credential['access_key_secret'] + ); + } + + /** + * @param string $clientName + * @param array $credential + * + * @return EcsRamRoleClient + * @throws ClientException + */ + private function ecsRamRoleClient($clientName, array $credential) + { + if (!isset($credential['role_name'])) { + $this->missingRequired('role_name', $clientName); + } + + return new EcsRamRoleClient($credential['role_name']); + } + + /** + * @param string $clientName + * @param array $credential + * + * @return RamRoleArnClient + * @throws ClientException + */ + private function ramRoleArnClient($clientName, array $credential) + { + if (!isset($credential['access_key_id'])) { + $this->missingRequired('access_key_id', $clientName); + } + + if (!isset($credential['access_key_secret'])) { + $this->missingRequired('access_key_secret', $clientName); + } + + if (!isset($credential['role_arn'])) { + $this->missingRequired('role_arn', $clientName); + } + + if (!isset($credential['role_session_name'])) { + $this->missingRequired('role_session_name', $clientName); + } + + return new RamRoleArnClient( + $credential['access_key_id'], + $credential['access_key_secret'], + $credential['role_arn'], + $credential['role_session_name'] + ); + } + + /** + * @param string $clientName + * @param array $credential + * + * @return BearerTokenClient + * @throws ClientException + */ + private function bearerTokenClient($clientName, array $credential) + { + if (!isset($credential['bearer_token'])) { + $this->missingRequired('bearer_token', $clientName); + } + + return new BearerTokenClient($credential['bearer_token']); + } + + /** + * @param array $credential + * @param string $clientName + * + * @return RsaKeyPairClient + * @throws ClientException + */ + private function rsaKeyPairClient($clientName, array $credential) + { + if (!isset($credential['public_key_id'])) { + $this->missingRequired('public_key_id', $clientName); + } + + if (!isset($credential['private_key_file'])) { + $this->missingRequired('private_key_file', $clientName); + } + + return new RsaKeyPairClient( + $credential['public_key_id'], + $credential['private_key_file'] + ); + } +} diff --git a/vendor/alibabacloud/client/src/Credentials/Ini/IniCredential.php b/vendor/alibabacloud/client/src/Credentials/Ini/IniCredential.php new file mode 100644 index 0000000..94ec7fb --- /dev/null +++ b/vendor/alibabacloud/client/src/Credentials/Ini/IniCredential.php @@ -0,0 +1,209 @@ +filename = $filename ?: $this->getDefaultFile(); + } + + /** + * Get the default credential file. + * + * @return string + */ + public function getDefaultFile() + { + return self::getHomeDirectory() . DIRECTORY_SEPARATOR . '.alibabacloud' . DIRECTORY_SEPARATOR . 'credentials'; + } + + /** + * Gets the environment's HOME directory. + * + * @return null|string + */ + private static function getHomeDirectory() + { + if (getenv('HOME')) { + return getenv('HOME'); + } + + return (getenv('HOMEDRIVE') && getenv('HOMEPATH')) + ? getenv('HOMEDRIVE') . getenv('HOMEPATH') + : null; + } + + /** + * Clear credential cache. + * + * @return void + */ + public static function forgetLoadedCredentialsFile() + { + self::$hasLoaded = []; + } + + /** + * Get the credential file. + * + * @return string + */ + public function getFilename() + { + return $this->filename; + } + + /** + * @param array $array + * @param string $key + * + * @return bool + */ + protected static function isNotEmpty(array $array, $key) + { + return isset($array[$key]) && !empty($array[$key]); + } + + /** + * @param string $key + * @param string $clientName + * + * @throws ClientException + */ + public function missingRequired($key, $clientName) + { + throw new ClientException( + "Missing required '$key' option for '$clientName' in " . $this->getFilename(), + SDK::INVALID_CREDENTIAL + ); + } + + /** + * @return array|mixed + * @throws ClientException + */ + public function load() + { + // If it has been loaded, assign the client directly. + if (isset(self::$hasLoaded[$this->filename])) { + /** + * @var $client Client + */ + foreach (self::$hasLoaded[$this->filename] as $projectName => $client) { + $client->name($projectName); + } + + return self::$hasLoaded[$this->filename]; + } + + return $this->loadFile(); + } + + /** + * Exceptions will be thrown if the file is unreadable and not the default file. + * + * @return array|mixed + * @throws ClientException + */ + private function loadFile() + { + if (!\AlibabaCloud\Client\inOpenBasedir($this->filename)) { + return []; + } + + if (!\is_readable($this->filename) || !\is_file($this->filename)) { + if ($this->filename === $this->getDefaultFile()) { + // @codeCoverageIgnoreStart + return []; + // @codeCoverageIgnoreEnd + } + throw new ClientException( + 'Credential file is not readable: ' . $this->getFilename(), + SDK::INVALID_CREDENTIAL + ); + } + + return $this->parseFile(); + } + + /** + * Decode the ini file into an array. + * + * @return array|mixed + * @throws ClientException + */ + private function parseFile() + { + try { + $file = \parse_ini_file($this->filename, true); + if (\is_array($file) && $file !== []) { + return $this->initClients($file); + } + throw new ClientException( + 'Format error: ' . $this->getFilename(), + SDK::INVALID_CREDENTIAL + ); + } catch (\Exception $e) { + throw new ClientException( + $e->getMessage(), + SDK::INVALID_CREDENTIAL, + $e + ); + } + } + + /** + * Initialize clients. + * + * @param array $array + * + * @return array|mixed + * @throws ClientException + */ + private function initClients($array) + { + foreach (\array_change_key_case($array) as $clientName => $configures) { + $configures = \array_change_key_case($configures); + $clientInstance = $this->createClient($clientName, $configures); + if ($clientInstance instanceof Client) { + self::$hasLoaded[$this->filename][$clientName] = $clientInstance; + self::setClientAttributes($configures, $clientInstance); + self::setCert($configures, $clientInstance); + self::setProxy($configures, $clientInstance); + } + } + + return isset(self::$hasLoaded[$this->filename]) + ? self::$hasLoaded[$this->filename] + : []; + } +} diff --git a/vendor/alibabacloud/client/src/Credentials/Ini/OptionsTrait.php b/vendor/alibabacloud/client/src/Credentials/Ini/OptionsTrait.php new file mode 100644 index 0000000..192d494 --- /dev/null +++ b/vendor/alibabacloud/client/src/Credentials/Ini/OptionsTrait.php @@ -0,0 +1,111 @@ +regionId($configures['region_id']); + } + + if (isset($configures['debug'])) { + $client->options( + [ + 'debug' => (bool)$configures['debug'], + ] + ); + } + + if (self::isNotEmpty($configures, 'timeout')) { + $client->options( + [ + 'timeout' => $configures['timeout'], + ] + ); + } + + if (self::isNotEmpty($configures, 'connect_timeout')) { + $client->options( + [ + 'connect_timeout' => $configures['connect_timeout'], + ] + ); + } + } + + /** + * @param array $configures + * @param Client $client + */ + private static function setProxy($configures, Client $client) + { + if (self::isNotEmpty($configures, 'proxy')) { + $client->options( + [ + 'proxy' => $configures['proxy'], + ] + ); + } + $proxy = []; + if (self::isNotEmpty($configures, 'proxy_http')) { + $proxy['http'] = $configures['proxy_http']; + } + if (self::isNotEmpty($configures, 'proxy_https')) { + $proxy['https'] = $configures['proxy_https']; + } + if (self::isNotEmpty($configures, 'proxy_no')) { + $proxy['no'] = \explode(',', $configures['proxy_no']); + } + if ($proxy !== []) { + $client->options( + [ + 'proxy' => $proxy, + ] + ); + } + } + + /** + * @param array $configures + * @param Client $client + */ + private static function setCert($configures, Client $client) + { + if (self::isNotEmpty($configures, 'cert_file') && !self::isNotEmpty($configures, 'cert_password')) { + $client->options( + [ + 'cert' => $configures['cert_file'], + ] + ); + } + + if (self::isNotEmpty($configures, 'cert_file') && self::isNotEmpty($configures, 'cert_password')) { + $client->options( + [ + 'cert' => [ + $configures['cert_file'], + $configures['cert_password'], + ], + ] + ); + } + } +} diff --git a/vendor/alibabacloud/client/src/Credentials/Providers/CredentialsProvider.php b/vendor/alibabacloud/client/src/Credentials/Providers/CredentialsProvider.php new file mode 100644 index 0000000..21aec9b --- /dev/null +++ b/vendor/alibabacloud/client/src/Credentials/Providers/CredentialsProvider.php @@ -0,0 +1,170 @@ +asDefaultClient(); + } + }; + } + + /** + * @return Closure + */ + public static function ini() + { + return static function () { + $ini = \AlibabaCloud\Client\envNotEmpty('ALIBABA_CLOUD_CREDENTIALS_FILE'); + + if ($ini) { + AlibabaCloud::load($ini); + } else { + // @codeCoverageIgnoreStart + AlibabaCloud::load(); + // @codeCoverageIgnoreEnd + } + + self::compatibleWithGlobal(); + }; + } + + /** + * @codeCoverageIgnore + * + * Compatible with global + * + * @throws ClientException + */ + private static function compatibleWithGlobal() + { + if (AlibabaCloud::has('global') && !AlibabaCloud::has(self::getDefaultName())) { + AlibabaCloud::get('global')->name(self::getDefaultName()); + } + } + + /** + * @return array|false|string + * @throws ClientException + */ + public static function getDefaultName() + { + $name = \AlibabaCloud\Client\envNotEmpty('ALIBABA_CLOUD_PROFILE'); + + if ($name) { + return $name; + } + + return 'default'; + } + + /** + * @return Closure + */ + public static function instance() + { + return static function () { + $instance = \AlibabaCloud\Client\envNotEmpty('ALIBABA_CLOUD_ECS_METADATA'); + if ($instance) { + AlibabaCloud::ecsRamRoleClient($instance)->asDefaultClient(); + } + }; + } +} diff --git a/vendor/alibabacloud/client/src/Credentials/Providers/EcsRamRoleProvider.php b/vendor/alibabacloud/client/src/Credentials/Providers/EcsRamRoleProvider.php new file mode 100644 index 0000000..26bb675 --- /dev/null +++ b/vendor/alibabacloud/client/src/Credentials/Providers/EcsRamRoleProvider.php @@ -0,0 +1,128 @@ +getCredentialsInCache(); + + if ($result === null) { + $result = $this->request(); + + if (!isset($result['AccessKeyId'], $result['AccessKeySecret'], $result['SecurityToken'])) { + throw new ServerException($result, $this->error, SDK::INVALID_CREDENTIAL); + } + + $this->cache($result->toArray()); + } + + return new StsCredential( + $result['AccessKeyId'], + $result['AccessKeySecret'], + $result['SecurityToken'] + ); + } + + /** + * Get credentials by request. + * + * @return Result + * @throws ClientException + * @throws ServerException + */ + public function request() + { + $result = $this->getResponse(); + + if ($result->getStatusCode() === 404) { + $message = 'The role was not found in the instance'; + throw new ClientException($message, SDK::INVALID_CREDENTIAL); + } + + if (!$result->isSuccess()) { + $message = 'Error retrieving credentials from result'; + throw new ServerException($result, $message, SDK::INVALID_CREDENTIAL); + } + + return $result; + } + + /** + * Get data from meta. + * + * @return mixed|ResponseInterface + * @throws ClientException + * @throws Exception + */ + public function getResponse() + { + /** + * @var EcsRamRoleCredential $credential + */ + $credential = $this->client->getCredential(); + $url = $this->uri . $credential->getRoleName(); + + $options = [ + 'http_errors' => false, + 'timeout' => 1, + 'connect_timeout' => 1, + 'debug' => $this->client->isDebug(), + ]; + + try { + return RpcRequest::createClient()->request('GET', $url, $options); + } catch (GuzzleException $exception) { + if (Stringy::create($exception->getMessage())->contains('timed')) { + $message = 'Timeout or instance does not belong to Alibaba Cloud'; + } else { + $message = $exception->getMessage(); + } + + throw new ClientException( + $message, + SDK::SERVER_UNREACHABLE, + $exception + ); + } + } +} diff --git a/vendor/alibabacloud/client/src/Credentials/Providers/Provider.php b/vendor/alibabacloud/client/src/Credentials/Providers/Provider.php new file mode 100644 index 0000000..b64dab8 --- /dev/null +++ b/vendor/alibabacloud/client/src/Credentials/Providers/Provider.php @@ -0,0 +1,88 @@ +client = $client; + } + + /** + * Get the credentials from the cache in the validity period. + * + * @return array|null + */ + public function getCredentialsInCache() + { + if (isset(self::$credentialsCache[$this->key()])) { + $result = self::$credentialsCache[$this->key()]; + if (\strtotime($result['Expiration']) - \time() >= $this->expirationSlot) { + return $result; + } + unset(self::$credentialsCache[$this->key()]); + } + + return null; + } + + /** + * Get the toString of the credentials as the key. + * + * @return string + */ + protected function key() + { + return (string)$this->client->getCredential(); + } + + /** + * Cache credentials. + * + * @param array $credential + */ + protected function cache(array $credential) + { + self::$credentialsCache[$this->key()] = $credential; + } +} diff --git a/vendor/alibabacloud/client/src/Credentials/Providers/RamRoleArnProvider.php b/vendor/alibabacloud/client/src/Credentials/Providers/RamRoleArnProvider.php new file mode 100644 index 0000000..ce4de41 --- /dev/null +++ b/vendor/alibabacloud/client/src/Credentials/Providers/RamRoleArnProvider.php @@ -0,0 +1,84 @@ +getCredentialsInCache(); + + if (null === $credential) { + $result = $this->request($timeout, $connectTimeout); + + if (!isset($result['Credentials']['AccessKeyId'], + $result['Credentials']['AccessKeySecret'], + $result['Credentials']['SecurityToken'])) { + throw new ServerException($result, $this->error, SDK::INVALID_CREDENTIAL); + } + + $credential = $result['Credentials']; + $this->cache($credential); + } + + return new StsCredential( + $credential['AccessKeyId'], + $credential['AccessKeySecret'], + $credential['SecurityToken'] + ); + } + + /** + * Get credentials by request. + * + * @param $timeout + * @param $connectTimeout + * + * @return Result + * @throws ClientException + * @throws ServerException + */ + private function request($timeout, $connectTimeout) + { + $clientName = __CLASS__ . \uniqid('ak', true); + $credential = $this->client->getCredential(); + + AlibabaCloud::accessKeyClient( + $credential->getAccessKeyId(), + $credential->getAccessKeySecret() + )->name($clientName); + + return (new AssumeRole($credential)) + ->client($clientName) + ->timeout($timeout) + ->connectTimeout($connectTimeout) + ->debug($this->client->isDebug()) + ->request(); + } +} diff --git a/vendor/alibabacloud/client/src/Credentials/Providers/RsaKeyPairProvider.php b/vendor/alibabacloud/client/src/Credentials/Providers/RsaKeyPairProvider.php new file mode 100644 index 0000000..e78fc1c --- /dev/null +++ b/vendor/alibabacloud/client/src/Credentials/Providers/RsaKeyPairProvider.php @@ -0,0 +1,86 @@ +getCredentialsInCache(); + + if ($credential === null) { + $result = $this->request($timeout, $connectTimeout); + + if (!isset($result['SessionAccessKey']['SessionAccessKeyId'], + $result['SessionAccessKey']['SessionAccessKeySecret'])) { + throw new ServerException($result, $this->error, SDK::INVALID_CREDENTIAL); + } + + $credential = $result['SessionAccessKey']; + $this->cache($credential); + } + + return new StsCredential( + $credential['SessionAccessKeyId'], + $credential['SessionAccessKeySecret'] + ); + } + + /** + * Get credentials by request. + * + * @param $timeout + * @param $connectTimeout + * + * @return Result + * @throws ClientException + * @throws ServerException + */ + private function request($timeout, $connectTimeout) + { + $clientName = __CLASS__ . \uniqid('rsa', true); + $credential = $this->client->getCredential(); + + AlibabaCloud::client( + new AccessKeyCredential( + $credential->getPublicKeyId(), + $credential->getPrivateKey() + ), + new ShaHmac256WithRsaSignature() + )->name($clientName); + + return (new GenerateSessionAccessKey($credential->getPublicKeyId())) + ->client($clientName) + ->timeout($timeout) + ->connectTimeout($connectTimeout) + ->debug($this->client->isDebug()) + ->request(); + } +} diff --git a/vendor/alibabacloud/client/src/Credentials/RamRoleArnCredential.php b/vendor/alibabacloud/client/src/Credentials/RamRoleArnCredential.php new file mode 100644 index 0000000..6bdf5be --- /dev/null +++ b/vendor/alibabacloud/client/src/Credentials/RamRoleArnCredential.php @@ -0,0 +1,110 @@ +accessKeyId = $accessKeyId; + $this->accessKeySecret = $accessKeySecret; + $this->roleArn = $roleArn; + $this->roleSessionName = $roleSessionName; + $this->policy = $policy; + } + + /** + * @return string + */ + public function getAccessKeyId() + { + return $this->accessKeyId; + } + + /** + * @return string + */ + public function getAccessKeySecret() + { + return $this->accessKeySecret; + } + + /** + * @return string + */ + public function getRoleArn() + { + return $this->roleArn; + } + + /** + * @return string + */ + public function getRoleSessionName() + { + return $this->roleSessionName; + } + + /** + * @return string + */ + public function getPolicy() + { + return $this->policy; + } + + /** + * @return string + */ + public function __toString() + { + return "$this->accessKeyId#$this->accessKeySecret#$this->roleArn#$this->roleSessionName"; + } +} diff --git a/vendor/alibabacloud/client/src/Credentials/Requests/AssumeRole.php b/vendor/alibabacloud/client/src/Credentials/Requests/AssumeRole.php new file mode 100644 index 0000000..a3935aa --- /dev/null +++ b/vendor/alibabacloud/client/src/Credentials/Requests/AssumeRole.php @@ -0,0 +1,47 @@ +product('Sts'); + $this->version('2015-04-01'); + $this->action('AssumeRole'); + $this->host('sts.aliyuncs.com'); + $this->scheme('https'); + $this->regionId('cn-hangzhou'); + $this->options['verify'] = false; + $this->options['query']['RoleArn'] = $arnCredential->getRoleArn(); + $this->options['query']['RoleSessionName'] = $arnCredential->getRoleSessionName(); + $this->options['query']['DurationSeconds'] = Provider::DURATION_SECONDS; + if ($arnCredential->getPolicy()) { + if (is_array($arnCredential->getPolicy())) { + $this->options['query']['Policy'] = json_encode($arnCredential->getPolicy()); + } + if (is_string($arnCredential->getPolicy())) { + $this->options['query']['Policy'] = $arnCredential->getPolicy(); + } + } + } +} diff --git a/vendor/alibabacloud/client/src/Credentials/Requests/GenerateSessionAccessKey.php b/vendor/alibabacloud/client/src/Credentials/Requests/GenerateSessionAccessKey.php new file mode 100644 index 0000000..4ac1ee1 --- /dev/null +++ b/vendor/alibabacloud/client/src/Credentials/Requests/GenerateSessionAccessKey.php @@ -0,0 +1,37 @@ +product('Sts'); + $this->version('2015-04-01'); + $this->action('GenerateSessionAccessKey'); + $this->host('sts.ap-northeast-1.aliyuncs.com'); + $this->scheme('https'); + $this->regionId('cn-hangzhou'); + $this->options['verify'] = false; + $this->options['query']['PublicKeyId'] = $publicKeyId; + $this->options['query']['DurationSeconds'] = Provider::DURATION_SECONDS; + } +} diff --git a/vendor/alibabacloud/client/src/Credentials/RsaKeyPairCredential.php b/vendor/alibabacloud/client/src/Credentials/RsaKeyPairCredential.php new file mode 100644 index 0000000..876909e --- /dev/null +++ b/vendor/alibabacloud/client/src/Credentials/RsaKeyPairCredential.php @@ -0,0 +1,75 @@ +publicKeyId = $publicKeyId; + try { + $this->privateKey = file_get_contents($privateKeyFile); + } catch (Exception $exception) { + throw new ClientException( + $exception->getMessage(), + SDK::INVALID_CREDENTIAL + ); + } + } + + /** + * @return mixed + */ + public function getPrivateKey() + { + return $this->privateKey; + } + + /** + * @return string + */ + public function getPublicKeyId() + { + return $this->publicKeyId; + } + + /** + * @return string + */ + public function __toString() + { + return "publicKeyId#$this->publicKeyId"; + } +} diff --git a/vendor/alibabacloud/client/src/Credentials/StsCredential.php b/vendor/alibabacloud/client/src/Credentials/StsCredential.php new file mode 100644 index 0000000..d333fa8 --- /dev/null +++ b/vendor/alibabacloud/client/src/Credentials/StsCredential.php @@ -0,0 +1,80 @@ +accessKeyId = $accessKeyId; + $this->accessKeySecret = $accessKeySecret; + $this->securityToken = $securityToken; + } + + /** + * @return string + */ + public function getAccessKeyId() + { + return $this->accessKeyId; + } + + /** + * @return string + */ + public function getAccessKeySecret() + { + return $this->accessKeySecret; + } + + /** + * @return string + */ + public function getSecurityToken() + { + return $this->securityToken; + } + + /** + * @return string + */ + public function __toString() + { + return "$this->accessKeyId#$this->accessKeySecret#$this->securityToken"; + } +} diff --git a/vendor/alibabacloud/client/src/DefaultAcsClient.php b/vendor/alibabacloud/client/src/DefaultAcsClient.php new file mode 100644 index 0000000..ff5ecd7 --- /dev/null +++ b/vendor/alibabacloud/client/src/DefaultAcsClient.php @@ -0,0 +1,55 @@ +randClientName = \uniqid('', true); + $client->name($this->randClientName); + } + + /** + * @param Request|Result $request + * + * @return Result|string + * @throws ClientException + * @throws ServerException + */ + public function getAcsResponse($request) + { + if ($request instanceof Result) { + return $request; + } + + return $request->client($this->randClientName)->request(); + } +} diff --git a/vendor/alibabacloud/client/src/Encode.php b/vendor/alibabacloud/client/src/Encode.php new file mode 100644 index 0000000..ef589d2 --- /dev/null +++ b/vendor/alibabacloud/client/src/Encode.php @@ -0,0 +1,64 @@ +data = $data; + } + + /** + * @return bool|string + */ + public function toString() + { + $string = ''; + foreach ($this->data as $key => $value) { + $encode = rawurlencode($value); + $string .= "$key=$encode&"; + } + + if (0 < count($this->data)) { + $string = substr($string, 0, -1); + } + + return $string; + } + + /** + * @return $this + */ + public function ksort() + { + ksort($this->data); + + return $this; + } +} diff --git a/vendor/alibabacloud/client/src/Exception/AlibabaCloudException.php b/vendor/alibabacloud/client/src/Exception/AlibabaCloudException.php new file mode 100644 index 0000000..cee21d8 --- /dev/null +++ b/vendor/alibabacloud/client/src/Exception/AlibabaCloudException.php @@ -0,0 +1,70 @@ +errorCode; + } + + /** + * @codeCoverageIgnore + * @deprecated + */ + public function setErrorCode() + { + throw new RuntimeException('deprecated since 2.0.'); + } + + /** + * @return string + */ + public function getErrorMessage() + { + return $this->errorMessage; + } + + /** + * @codeCoverageIgnore + * + * @param $errorMessage + * + * @deprecated + */ + public function setErrorMessage($errorMessage) + { + $this->errorMessage = $errorMessage; + } + + /** + * @codeCoverageIgnore + * @deprecated + */ + public function setErrorType() + { + } +} diff --git a/vendor/alibabacloud/client/src/Exception/ClientException.php b/vendor/alibabacloud/client/src/Exception/ClientException.php new file mode 100644 index 0000000..0877e87 --- /dev/null +++ b/vendor/alibabacloud/client/src/Exception/ClientException.php @@ -0,0 +1,38 @@ +errorMessage = $errorMessage; + $this->errorCode = $errorCode; + } + + /** + * @codeCoverageIgnore + * @deprecated + */ + public function getErrorType() + { + return 'Client'; + } +} diff --git a/vendor/alibabacloud/client/src/Exception/ServerException.php b/vendor/alibabacloud/client/src/Exception/ServerException.php new file mode 100644 index 0000000..37db53e --- /dev/null +++ b/vendor/alibabacloud/client/src/Exception/ServerException.php @@ -0,0 +1,158 @@ +result = $result; + $this->errorMessage = $errorMessage; + $this->errorCode = $errorCode; + $this->resolvePropertiesByReturn(); + $this->distinguishSignatureErrors(); + $this->bodyAsErrorMessage(); + + parent::__construct( + $this->getMessageString(), + $this->result->getStatusCode() + ); + } + + /** + * Resolve the error message based on the return of the server. + * + * @return void + */ + private function resolvePropertiesByReturn() + { + if (isset($this->result['message'])) { + $this->errorMessage = $this->result['message']; + $this->errorCode = $this->result['code']; + } + if (isset($this->result['Message'])) { + $this->errorMessage = $this->result['Message']; + $this->errorCode = $this->result['Code']; + } + if (isset($this->result['errorMsg'])) { + $this->errorMessage = $this->result['errorMsg']; + $this->errorCode = $this->result['errorCode']; + } + if (isset($this->result['requestId'])) { + $this->requestId = $this->result['requestId']; + } + if (isset($this->result['RequestId'])) { + $this->requestId = $this->result['RequestId']; + } + } + + /** + * If the string to be signed are the same with server's, it is considered a credential error. + */ + private function distinguishSignatureErrors() + { + if ($this->result->getRequest() + && Stringy::create($this->errorMessage)->contains($this->result->getRequest()->stringToSign())) { + $this->errorCode = 'InvalidAccessKeySecret'; + $this->errorMessage = 'Specified Access Key Secret is not valid.'; + } + } + + /** + * If the error message matches the default message and + * the server has returned content, use the return content + */ + private function bodyAsErrorMessage() + { + $body = (string)$this->result->getBody(); + if ($this->errorMessage === SDK::RESPONSE_EMPTY && $body) { + $this->errorMessage = $body; + } + } + + /** + * Get standard exception message. + * + * @return string + */ + private function getMessageString() + { + $message = "$this->errorCode: $this->errorMessage RequestId: $this->requestId"; + + if ($this->getResult()->getRequest()) { + $method = $this->getResult()->getRequest()->method; + $uri = (string)$this->getResult()->getRequest()->uri; + $message .= " $method \"$uri\""; + if ($this->result) { + $message .= ' ' . $this->result->getStatusCode(); + } + } + + return $message; + } + + /** + * @return Result + */ + public function getResult() + { + return $this->result; + } + + /** + * @return string + */ + public function getRequestId() + { + return $this->requestId; + } + + /** + * @codeCoverageIgnore + * @deprecated + */ + public function getErrorType() + { + return 'Server'; + } + + /** + * @codeCoverageIgnore + * @deprecated + */ + public function getHttpStatus() + { + return $this->getResult()->getStatusCode(); + } +} diff --git a/vendor/alibabacloud/client/src/Filter/ApiFilter.php b/vendor/alibabacloud/client/src/Filter/ApiFilter.php new file mode 100644 index 0000000..c12327f --- /dev/null +++ b/vendor/alibabacloud/client/src/Filter/ApiFilter.php @@ -0,0 +1,245 @@ +endsWith(DIRECTORY_SEPARATOR)) { + $dir .= DIRECTORY_SEPARATOR; + } + + if (0 === strpos($filename, $dir)) { + return true; + } + } + + return false; +} + +/** + * @return bool + */ +function isWindows() +{ + return PATH_SEPARATOR === ';'; +} + +/** + * @return CLImate + */ +function cliMate() +{ + return new CLImate(); +} + +/** + * @param string $string + * @param string|null $flank + * @param string|null $char + * @param int|null $length + * + * @return void + */ +function backgroundRed($string, $flank = null, $char = null, $length = null) +{ + cliMate()->br(); + if ($flank !== null) { + cliMate()->backgroundRed()->flank($flank, $char, $length); + cliMate()->br(); + } + cliMate()->backgroundRed($string); + cliMate()->br(); +} + +/** + * @param string $string + * @param string|null $flank + * @param string|null $char + * @param int|null $length + * + * @return void + */ +function backgroundGreen($string, $flank = null, $char = null, $length = null) +{ + cliMate()->br(); + if ($flank !== null) { + cliMate()->backgroundGreen()->flank($flank, $char, $length); + } + cliMate()->backgroundGreen($string); + cliMate()->br(); +} + +/** + * @param string $string + * @param string|null $flank + * @param string|null $char + * @param int|null $length + * + * @return void + */ +function backgroundBlue($string, $flank = null, $char = null, $length = null) +{ + cliMate()->br(); + if ($flank !== null) { + cliMate()->backgroundBlue()->flank($flank, $char, $length); + } + cliMate()->backgroundBlue($string); + cliMate()->br(); +} + +/** + * @param string $string + * @param string|null $flank + * @param string|null $char + * @param int|null $length + * + * @return void + */ +function backgroundMagenta($string, $flank = null, $char = null, $length = null) +{ + cliMate()->br(); + if ($flank !== null) { + cliMate()->backgroundMagenta()->flank($flank, $char, $length); + } + cliMate()->backgroundMagenta($string); + cliMate()->br(); +} + +/** + * @param array $array + */ +function json(array $array) +{ + cliMate()->br(); + cliMate()->backgroundGreen()->json($array); + cliMate()->br(); +} + +/** + * @param array $array + * + * @return void + */ +function redTable($array) +{ + /** + * @noinspection PhpUndefinedMethodInspection + */ + cliMate()->redTable($array); +} + +/** + * @param mixed $result + * @param string $title + * + * @return void + */ +function block($result, $title) +{ + cliMate()->backgroundGreen()->flank($title, '--', 20); + dump($result); +} + +/** + * Gets the value of an environment variable. + * + * @param string $key + * @param mixed $default + * + * @return mixed + */ +function env($key, $default = null) +{ + $value = getenv($key); + + if ($value === false) { + return value($default); + } + + if (envSubstr($value)) { + return substr($value, 1, -1); + } + + return envConversion($value); +} + +/** + * @param $value + * + * @return bool|string|null + */ +function envConversion($value) +{ + $key = strtolower($value); + + if ($key === 'null' || $key === '(null)') { + return null; + } + + $list = [ + 'true' => true, + '(true)' => true, + 'false' => false, + '(false)' => false, + 'empty' => '', + '(empty)' => '', + ]; + + return isset($list[$key]) ? $list[$key] : $value; +} + +/** + * @param $key + * + * @return bool|mixed + * @throws ClientException + */ +function envNotEmpty($key) +{ + $value = env($key, false); + if ($value !== false && !$value) { + throw new ClientException( + "Environment variable '$key' cannot be empty", + SDK::INVALID_ARGUMENT + ); + } + if ($value) { + return $value; + } + + return false; +} + +/** + * @param $value + * + * @return bool + */ +function envSubstr($value) +{ + return ($valueLength = strlen($value)) > 1 && strpos($value, '"') === 0 && $value[$valueLength - 1] === '"'; +} + +/** + * Return the default value of the given value. + * + * @param mixed $value + * + * @return mixed + */ +function value($value) +{ + return $value instanceof Closure ? $value() : $value; +} diff --git a/vendor/alibabacloud/client/src/Log/LogFormatter.php b/vendor/alibabacloud/client/src/Log/LogFormatter.php new file mode 100644 index 0000000..a17a1b3 --- /dev/null +++ b/vendor/alibabacloud/client/src/Log/LogFormatter.php @@ -0,0 +1,78 @@ +template = $template; + $timezone = new DateTimeZone(date_default_timezone_get() ?: 'UTC'); + if (PHP_VERSION_ID < 70100) { + self::$ts = DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)), $timezone); + } else { + self::$ts = new DateTime(null, $timezone); + } + } + + /** + * Returns a formatted message string. + * + * @param RequestInterface $request Request that was sent + * @param ResponseInterface $response Response that was received + * @param Exception $error Exception that was received + * + * @return string + */ + public function format( + RequestInterface $request, + ResponseInterface $response = null, + Exception $error = null + ) { + $this->template = str_replace('{pid}', getmypid(), $this->template); + $this->template = str_replace('{cost}', self::getCost(), $this->template); + $this->template = str_replace('{start_time}', self::$ts->format('Y-m-d H:i:s.u'), $this->template); + + return (new MessageFormatter($this->template))->format($request, $response, $error); + } + + /** + * @return float|mixed + */ + private static function getCost() + { + return microtime(true) - self::$logStartTime; + } +} diff --git a/vendor/alibabacloud/client/src/Profile/DefaultProfile.php b/vendor/alibabacloud/client/src/Profile/DefaultProfile.php new file mode 100644 index 0000000..b1b3707 --- /dev/null +++ b/vendor/alibabacloud/client/src/Profile/DefaultProfile.php @@ -0,0 +1,74 @@ +regionId($regionId); + } + + /** + * @param string $regionId + * @param string $accessKeyId + * @param string $accessKeySecret + * @param string $roleArn + * @param string $roleSessionName + * + * @return Client + * @throws ClientException + */ + public static function getRamRoleArnProfile($regionId, $accessKeyId, $accessKeySecret, $roleArn, $roleSessionName) + { + return AlibabaCloud::ramRoleArnClient($accessKeyId, $accessKeySecret, $roleArn, $roleSessionName) + ->regionId($regionId); + } + + /** + * @param string $regionId + * @param string $roleName + * + * @return Client + * @throws ClientException + */ + public static function getEcsRamRoleProfile($regionId, $roleName) + { + return AlibabaCloud::ecsRamRoleClient($roleName) + ->regionId($regionId); + } + + /** + * @param string $regionId + * @param string $bearerToken + * + * @return Client + * @throws ClientException + */ + public static function getBearerTokenProfile($regionId, $bearerToken) + { + return AlibabaCloud::bearerTokenClient($bearerToken) + ->regionId($regionId); + } +} diff --git a/vendor/alibabacloud/client/src/Regions/EndpointProvider.php b/vendor/alibabacloud/client/src/Regions/EndpointProvider.php new file mode 100644 index 0000000..5e8e555 --- /dev/null +++ b/vendor/alibabacloud/client/src/Regions/EndpointProvider.php @@ -0,0 +1,18 @@ +request = $request; + } + + /** + * @param Request $request + * @param string $domain + * + * @return string + * @throws ClientException + * @throws ServerException + * @deprecated + * @codeCoverageIgnore + */ + public static function findProductDomain(Request $request, $domain = 'location.aliyuncs.com') + { + return self::resolveHost($request, $domain); + } + + /** + * @param $regionId + * @param $product + * @param $domain + * + * @throws ClientException + * @deprecated + * @codeCoverageIgnore + */ + public static function addEndPoint($regionId, $product, $domain) + { + self::addHost($product, $domain, $regionId); + } + + + /** + * @param Request $request + * @param string $domain + * + * @return string + * @throws ClientException + * @throws ServerException + */ + public static function resolveHost(Request $request, $domain = 'location.aliyuncs.com') + { + $locationService = new static($request); + $product = $locationService->request->product; + $regionId = $locationService->request->realRegionId(); + + if (!isset(self::$hosts[$product][$regionId])) { + self::$hosts[$product][$regionId] = self::getResult($locationService, $domain); + } + + return self::$hosts[$product][$regionId]; + } + + /** + * @param static $locationService + * @param string $domain + * + * @return string + * @throws ClientException + * @throws ServerException + */ + private static function getResult($locationService, $domain) + { + $locationRequest = new LocationServiceRequest($locationService->request, $domain); + + $result = $locationRequest->request(); + + if (!isset($result['Endpoints']['Endpoint'][0]['Endpoint'])) { + throw new ClientException( + 'Not found Region ID in ' . $domain, + SDK::INVALID_REGION_ID + ); + } + + return $result['Endpoints']['Endpoint'][0]['Endpoint']; + } + + /** + * @param string $product + * @param string $host + * @param string $regionId + * + * @throws ClientException + */ + public static function addHost($product, $host, $regionId = self::GLOBAL_REGION) + { + ApiFilter::product($product); + + HttpFilter::host($host); + + ClientFilter::regionId($regionId); + + self::$hosts[$product][$regionId] = $host; + } + + /** + * Update endpoints from OSS. + * + * @codeCoverageIgnore + * @throws Exception + */ + public static function updateEndpoints() + { + $ossUrl = 'https://openapi-endpoints.oss-cn-hangzhou.aliyuncs.com/endpoints.json'; + $json = \file_get_contents($ossUrl); + $list = \json_decode($json, true); + + foreach ($list['endpoints'] as $endpoint) { + Config::set( + "endpoints.{$endpoint['service']}.{$endpoint['regionid']}", + \strtolower($endpoint['endpoint']) + ); + } + } +} diff --git a/vendor/alibabacloud/client/src/Regions/LocationServiceRequest.php b/vendor/alibabacloud/client/src/Regions/LocationServiceRequest.php new file mode 100644 index 0000000..94a267d --- /dev/null +++ b/vendor/alibabacloud/client/src/Regions/LocationServiceRequest.php @@ -0,0 +1,46 @@ +product('Location'); + $this->version('2015-06-12'); + $this->action('DescribeEndpoints'); + $this->regionId('cn-hangzhou'); + $this->format('JSON'); + $this->options['query']['Id'] = $request->realRegionId(); + $this->options['query']['ServiceCode'] = $request->serviceCode; + $this->options['query']['Type'] = $request->endpointType; + $this->client($request->client); + $this->host($domain); + if (isset($request->options['timeout'])) { + $this->timeout($request->options['timeout']); + } + + if (isset($request->options['connect_timeout'])) { + $this->connectTimeout($request->options['connect_timeout']); + } + } +} diff --git a/vendor/alibabacloud/client/src/Release.php b/vendor/alibabacloud/client/src/Release.php new file mode 100644 index 0000000..0be9c1b --- /dev/null +++ b/vendor/alibabacloud/client/src/Release.php @@ -0,0 +1,112 @@ +getArguments(); + if (count($arguments) <= 1) { + echo 'Missing ChangeLog'; + + return; + } + self::updateChangelogFile($arguments[0], $arguments[1]); + self::changeVersionInCode($arguments[0]); + } + + /** + * @param $version + * @param $changeLog + */ + private static function updateChangelogFile($version, $changeLog) + { + $content = preg_replace( + '/# CHANGELOG/', + '# CHANGELOG' + . "\n" + . "\n" + . "## $version - " . date('Y-m-d') + . self::log($changeLog), + self::getChangeLogContent() + ); + + file_put_contents(self::getChangeLogFile(), $content); + } + + /** + * @param $changeLog + * + * @return string + */ + private static function log($changeLog) + { + $logs = explode('|', $changeLog); + $string = "\n"; + foreach ($logs as $log) { + if ($log) { + $string .= "- $log." . "\n"; + } + } + + return $string; + } + + /** + * @return string + */ + private static function getChangeLogContent() + { + return file_get_contents(self::getChangeLogFile()); + } + + /** + * @return string + */ + private static function getChangeLogFile() + { + return __DIR__ . '/../CHANGELOG.md'; + } + + /** + * @param $version + */ + private static function changeVersionInCode($version) + { + $content = preg_replace( + "/const VERSION = \'(.*)\';/", + "const VERSION = '" . $version . "';", + self::getCodeContent() + ); + + file_put_contents(self::getCodeFile(), $content); + } + + /** + * @return string + */ + private static function getCodeContent() + { + return file_get_contents(self::getCodeFile()); + } + + /** + * @return string + */ + private static function getCodeFile() + { + return __DIR__ . '/AlibabaCloud.php'; + } +} diff --git a/vendor/alibabacloud/client/src/Request/Request.php b/vendor/alibabacloud/client/src/Request/Request.php new file mode 100644 index 0000000..94ec12c --- /dev/null +++ b/vendor/alibabacloud/client/src/Request/Request.php @@ -0,0 +1,445 @@ +client = CredentialsProvider::getDefaultName(); + $this->uri = new Uri(); + $this->uri = $this->uri->withScheme($this->scheme); + $this->options['http_errors'] = false; + $this->options['connect_timeout'] = self::CONNECT_TIMEOUT; + $this->options['timeout'] = self::TIMEOUT; + + // Turn on debug mode based on environment variable. + if (strtolower(\AlibabaCloud\Client\env('DEBUG')) === 'sdk') { + $this->options['debug'] = true; + } + + // Rewrite configuration if the user has a configuration. + if ($options !== []) { + $this->options($options); + } + } + + /** + * @param string $name + * @param string $value + * + * @return $this + * @throws ClientException + */ + public function appendUserAgent($name, $value) + { + $filter_name = Filter::name($name); + + if (!UserAgent::isGuarded($filter_name)) { + $this->userAgent[$filter_name] = Filter::value($value); + } + + return $this; + } + + /** + * @param array $userAgent + * + * @return $this + */ + public function withUserAgent(array $userAgent) + { + $this->userAgent = UserAgent::clean($userAgent); + + return $this; + } + + /** + * Set Accept format. + * + * @param string $format + * + * @return $this + * @throws ClientException + */ + public function format($format) + { + $this->format = ApiFilter::format($format); + + return $this; + } + + /** + * @param $contentType + * + * @return $this + * @throws ClientException + */ + public function contentType($contentType) + { + $this->options['headers']['Content-Type'] = HttpFilter::contentType($contentType); + + return $this; + } + + /** + * @param string $accept + * + * @return $this + * @throws ClientException + */ + public function accept($accept) + { + $this->options['headers']['Accept'] = HttpFilter::accept($accept); + + return $this; + } + + /** + * Set the request body. + * + * @param string $body + * + * @return $this + * @throws ClientException + */ + public function body($body) + { + $this->options['body'] = HttpFilter::body($body); + + return $this; + } + + /** + * Set the json as body. + * + * @param array|object $content + * + * @return $this + * @throws ClientException + */ + public function jsonBody($content) + { + if (!\is_array($content) && !\is_object($content)) { + throw new ClientException( + 'jsonBody only accepts an array or object', + SDK::INVALID_ARGUMENT + ); + } + + return $this->body(\json_encode($content)); + } + + /** + * Set the request scheme. + * + * @param string $scheme + * + * @return $this + * @throws ClientException + */ + public function scheme($scheme) + { + $this->scheme = HttpFilter::scheme($scheme); + $this->uri = $this->uri->withScheme($scheme); + + return $this; + } + + /** + * Set the request host. + * + * @param string $host + * + * @return $this + * @throws ClientException + */ + public function host($host) + { + $this->uri = $this->uri->withHost(HttpFilter::host($host)); + + return $this; + } + + /** + * @param string $method + * + * @return $this + * @throws ClientException + */ + public function method($method) + { + $this->method = HttpFilter::method($method); + + return $this; + } + + /** + * @param string $clientName + * + * @return $this + * @throws ClientException + */ + public function client($clientName) + { + $this->client = ClientFilter::clientName($clientName); + + return $this; + } + + /** + * @return bool + * @throws ClientException + */ + public function isDebug() + { + if (isset($this->options['debug'])) { + return $this->options['debug'] === true; + } + + if (isset($this->httpClient()->options['debug'])) { + return $this->httpClient()->options['debug'] === true; + } + + return false; + } + + /** + * @throws ClientException + * @throws ServerException + */ + public function resolveOption() + { + $this->options['headers']['User-Agent'] = UserAgent::toString($this->userAgent); + + $this->cleanQuery(); + $this->cleanFormParams(); + $this->resolveHost(); + $this->resolveParameter(); + + if (isset($this->options['form_params'])) { + $this->options['form_params'] = \GuzzleHttp\Psr7\parse_query( + Encode::create($this->options['form_params'])->toString() + ); + } + + $this->mergeOptionsIntoClient(); + } + + /** + * @return Result + * @throws ClientException + * @throws ServerException + */ + public function request() + { + $this->resolveOption(); + $result = $this->response(); + + if ($this->shouldServerRetry($result)) { + return $this->request(); + } + + if (!$result->isSuccess()) { + throw new ServerException($result); + } + + return $result; + } + + /*** + * @return PromiseInterface + * @throws Exception + */ + public function requestAsync() + { + $this->resolveOption(); + + return self::createClient($this)->requestAsync( + $this->method, + (string)$this->uri, + $this->options + ); + } + + /** + * @param Request $request + * + * @return Client + * @throws Exception + */ + public static function createClient(Request $request = null) + { + if (AlibabaCloud::hasMock()) { + $stack = HandlerStack::create(AlibabaCloud::getMock()); + } else { + $stack = HandlerStack::create(); + } + + if (AlibabaCloud::isRememberHistory()) { + $stack->push(Middleware::history(AlibabaCloud::referenceHistory())); + } + + if (AlibabaCloud::getLogger()) { + $stack->push(Middleware::log( + AlibabaCloud::getLogger(), + new LogFormatter(AlibabaCloud::getLogFormat()) + )); + } + + $stack->push(Middleware::mapResponse(static function (ResponseInterface $response) use ($request) { + return new Result($response, $request); + })); + + self::$config['handler'] = $stack; + + return new Client(self::$config); + } + + /** + * @throws ClientException + * @throws Exception + */ + private function response() + { + try { + return self::createClient($this)->request( + $this->method, + (string)$this->uri, + $this->options + ); + } catch (GuzzleException $exception) { + if ($this->shouldClientRetry($exception)) { + return $this->response(); + } + throw new ClientException( + $exception->getMessage(), + SDK::SERVER_UNREACHABLE, + $exception + ); + } + } + + /** + * Remove redundant Query + * + * @codeCoverageIgnore + */ + private function cleanQuery() + { + if (isset($this->options['query']) && $this->options['query'] === []) { + unset($this->options['query']); + } + } + + /** + * Remove redundant Headers + * + * @codeCoverageIgnore + */ + private function cleanFormParams() + { + if (isset($this->options['form_params']) && $this->options['form_params'] === []) { + unset($this->options['form_params']); + } + } +} diff --git a/vendor/alibabacloud/client/src/Request/RoaRequest.php b/vendor/alibabacloud/client/src/Request/RoaRequest.php new file mode 100644 index 0000000..a6af50e --- /dev/null +++ b/vendor/alibabacloud/client/src/Request/RoaRequest.php @@ -0,0 +1,335 @@ +resolveQuery(); + $this->resolveHeaders(); + $this->resolveBody(); + $this->resolveUri(); + $this->resolveSignature(); + } + + private function resolveQuery() + { + if (!isset($this->options['query']['Version'])) { + $this->options['query']['Version'] = $this->version; + } + } + + private function resolveBody() + { + // If the body has already been specified, it will not be resolved. + if (isset($this->options['body'])) { + return; + } + + if (!isset($this->options['form_params'])) { + return; + } + + // Merge data, compatible with parameters set from constructor. + $params = Arrays::merge( + [ + $this->data, + $this->options['form_params'] + ] + ); + + $this->encodeBody($params); + + unset($this->options['form_params']); + } + + /** + * Determine the body format based on the Content-Type and calculate the MD5 value. + * + * @param array $params + */ + private function encodeBody(array $params) + { + $stringy = Stringy::create($this->options['headers']['Content-Type']); + + if ($stringy->contains('application/json', false)) { + $this->options['body'] = json_encode($params); + $this->options['headers']['Content-MD5'] = base64_encode(md5($this->options['body'], true)); + + return; + } + + $this->options['body'] = Encode::create($params)->ksort()->toString(); + $this->options['headers']['Content-MD5'] = base64_encode(md5($this->options['body'], true)); + $this->options['headers']['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'; + } + + /** + * @throws ClientException + * @throws ServerException + * @throws Exception + */ + private function resolveHeaders() + { + $this->options['headers']['x-acs-version'] = $this->version; + $this->options['headers']['x-acs-region-id'] = $this->realRegionId(); + $this->options['headers']['Date'] = gmdate($this->dateTimeFormat); + + $signature = $this->httpClient()->getSignature(); + $this->options['headers']['x-acs-signature-method'] = $signature->getMethod(); + $this->options['headers']['x-acs-signature-nonce'] = Sign::uuid($this->product . $this->realRegionId()); + $this->options['headers']['x-acs-signature-version'] = $signature->getVersion(); + if ($signature->getType()) { + $this->options['headers']['x-acs-signature-type'] = $signature->getType(); + } + + $this->resolveAccept(); + $this->resolveContentType(); + $this->resolveSecurityToken(); + $this->resolveBearerToken(); + } + + /** + * @throws ClientException + * @throws Exception + */ + private function resolveSignature() + { + $this->options['headers']['Authorization'] = $this->signature(); + } + + /** + * If accept is not specified, it is determined by format. + */ + private function resolveAccept() + { + if (!isset($this->options['headers']['Accept'])) { + $this->options['headers']['Accept'] = Accept::create($this->format)->toString(); + } + } + + /** + * If the Content-Type is not specified, it is determined according to accept. + */ + private function resolveContentType() + { + if (!isset($this->options['headers']['Content-Type'])) { + $this->options['headers']['Content-Type'] = "{$this->options['headers']['Accept']}; charset=utf-8"; + } + } + + /** + * @throws ClientException + * @throws ServerException + */ + private function resolveSecurityToken() + { + if (!$this->credential() instanceof StsCredential) { + return; + } + + if (!$this->credential()->getSecurityToken()) { + return; + } + + $this->options['headers']['x-acs-security-token'] = $this->credential()->getSecurityToken(); + } + + /** + * @throws ClientException + * @throws ServerException + */ + private function resolveBearerToken() + { + if ($this->credential() instanceof BearerTokenCredential) { + $this->options['headers']['x-acs-bearer-token'] = $this->credential()->getBearerToken(); + } + } + + /** + * Sign the request message. + * + * @return string + * @throws ClientException + * @throws ServerException + */ + private function signature() + { + /** + * @var AccessKeyCredential $credential + */ + $credential = $this->credential(); + $access_key_id = $credential->getAccessKeyId(); + $signature = $this->httpClient() + ->getSignature() + ->sign( + $this->stringToSign(), + $credential->getAccessKeySecret() + ); + + return "acs $access_key_id:$signature"; + } + + /** + * @return void + */ + private function resolveUri() + { + $path = Path::assign($this->pathPattern, $this->pathParameters); + + $this->uri = $this->uri->withPath($path) + ->withQuery( + $this->queryString() + ); + } + + /** + * @return string + */ + public function stringToSign() + { + $request = new \GuzzleHttp\Psr7\Request( + $this->method, + $this->uri, + $this->options['headers'] + ); + + return Sign::roaString($request); + } + + /** + * @return bool|string + */ + private function queryString() + { + $query = isset($this->options['query']) + ? $this->options['query'] + : []; + + return Encode::create($query)->ksort()->toString(); + } + + /** + * Set path parameter by name. + * + * @param string $name + * @param string $value + * + * @return RoaRequest + * @throws ClientException + */ + public function pathParameter($name, $value) + { + Filter::name($name); + + if ($value === '') { + throw new ClientException( + 'Value cannot be empty', + SDK::INVALID_ARGUMENT + ); + } + + $this->pathParameters[$name] = $value; + + return $this; + } + + /** + * Set path pattern. + * + * @param string $pattern + * + * @return self + * @throws ClientException + */ + public function pathPattern($pattern) + { + ApiFilter::pattern($pattern); + + $this->pathPattern = $pattern; + + return $this; + } + + /** + * Magic method for set or get request parameters. + * + * @param string $name + * @param mixed $arguments + * + * @return $this + */ + public function __call($name, $arguments) + { + if (strncmp($name, 'get', 3) === 0) { + $parameter_name = \mb_strcut($name, 3); + + return $this->__get($parameter_name); + } + + if (strncmp($name, 'with', 4) === 0) { + $parameter_name = \mb_strcut($name, 4); + $this->__set($parameter_name, $arguments[0]); + $this->pathParameters[$parameter_name] = $arguments[0]; + + return $this; + } + + if (strncmp($name, 'set', 3) === 0) { + $parameter_name = \mb_strcut($name, 3); + $with_method = "with$parameter_name"; + + throw new RuntimeException("Please use $with_method instead of $name"); + } + + throw new RuntimeException('Call to undefined method ' . __CLASS__ . '::' . $name . '()'); + } +} diff --git a/vendor/alibabacloud/client/src/Request/RpcRequest.php b/vendor/alibabacloud/client/src/Request/RpcRequest.php new file mode 100644 index 0000000..b9d7369 --- /dev/null +++ b/vendor/alibabacloud/client/src/Request/RpcRequest.php @@ -0,0 +1,203 @@ +resolveBoolInParameters(); + $this->resolveCommonParameters(); + $this->repositionParameters(); + } + + /** + * Convert a Boolean value to a string + */ + private function resolveBoolInParameters() + { + if (isset($this->options['query'])) { + $this->options['query'] = array_map( + static function ($value) { + return self::boolToString($value); + }, + $this->options['query'] + ); + } + } + + /** + * Convert a Boolean value to a string. + * + * @param bool|string $value + * + * @return string + */ + public static function boolToString($value) + { + if (is_bool($value)) { + return $value ? 'true' : 'false'; + } + + return $value; + } + + /** + * Resolve Common Parameters. + * + * @throws ClientException + * @throws Exception + */ + private function resolveCommonParameters() + { + $signature = $this->httpClient()->getSignature(); + $this->options['query']['RegionId'] = $this->realRegionId(); + $this->options['query']['Format'] = $this->format; + $this->options['query']['SignatureMethod'] = $signature->getMethod(); + $this->options['query']['SignatureVersion'] = $signature->getVersion(); + $this->options['query']['SignatureNonce'] = Sign::uuid($this->product . $this->realRegionId()); + $this->options['query']['Timestamp'] = gmdate($this->dateTimeFormat); + $this->options['query']['Action'] = $this->action; + if ($this->credential()->getAccessKeyId()) { + $this->options['query']['AccessKeyId'] = $this->credential()->getAccessKeyId(); + } + if ($signature->getType()) { + $this->options['query']['SignatureType'] = $signature->getType(); + } + if (!isset($this->options['query']['Version'])) { + $this->options['query']['Version'] = $this->version; + } + $this->resolveSecurityToken(); + $this->resolveBearerToken(); + $this->options['query']['Signature'] = $this->signature(); + } + + /** + * @throws ClientException + * @throws ServerException + */ + private function resolveSecurityToken() + { + if (!$this->credential() instanceof StsCredential) { + return; + } + + if (!$this->credential()->getSecurityToken()) { + return; + } + + $this->options['query']['SecurityToken'] = $this->credential()->getSecurityToken(); + } + + /** + * @throws ClientException + * @throws ServerException + */ + private function resolveBearerToken() + { + if ($this->credential() instanceof BearerTokenCredential) { + $this->options['query']['BearerToken'] = $this->credential()->getBearerToken(); + } + } + + /** + * Sign the parameters. + * + * @return mixed + * @throws ClientException + * @throws ServerException + */ + private function signature() + { + return $this->httpClient() + ->getSignature() + ->sign( + $this->stringToSign(), + $this->credential()->getAccessKeySecret() . '&' + ); + } + + /** + * @return string + */ + public function stringToSign() + { + $query = isset($this->options['query']) ? $this->options['query'] : []; + $form_params = isset($this->options['form_params']) ? $this->options['form_params'] : []; + $parameters = Arrays::merge([$query, $form_params]); + + return Sign::rpcString($this->method, $parameters); + } + + /** + * Adjust parameter position + */ + private function repositionParameters() + { + if ($this->method === 'POST' || $this->method === 'PUT') { + foreach ($this->options['query'] as $api_key => $api_value) { + $this->options['form_params'][$api_key] = $api_value; + } + unset($this->options['query']); + } + } + + /** + * Magic method for set or get request parameters. + * + * @param string $name + * @param mixed $arguments + * + * @return $this + */ + public function __call($name, $arguments) + { + if (strncmp($name, 'get', 3) === 0) { + $parameter_name = \mb_strcut($name, 3); + + return $this->__get($parameter_name); + } + + if (strncmp($name, 'with', 4) === 0) { + $parameter_name = \mb_strcut($name, 4); + $this->__set($parameter_name, $arguments[0]); + $this->options['query'][$parameter_name] = $arguments[0]; + + return $this; + } + + if (strncmp($name, 'set', 3) === 0) { + $parameter_name = \mb_strcut($name, 3); + $with_method = "with$parameter_name"; + + throw new RuntimeException("Please use $with_method instead of $name"); + } + + throw new RuntimeException('Call to undefined method ' . __CLASS__ . '::' . $name . '()'); + } +} diff --git a/vendor/alibabacloud/client/src/Request/Traits/AcsTrait.php b/vendor/alibabacloud/client/src/Request/Traits/AcsTrait.php new file mode 100644 index 0000000..3b0aca0 --- /dev/null +++ b/vendor/alibabacloud/client/src/Request/Traits/AcsTrait.php @@ -0,0 +1,239 @@ +action = ApiFilter::action($action); + + return $this; + } + + /** + * @codeCoverageIgnore + * + * @param string $endpointSuffix + * + * @return AcsTrait + * @throws ClientException + */ + public function endpointSuffix($endpointSuffix) + { + $this->endpointSuffix = ApiFilter::endpointSuffix($endpointSuffix); + + return $this; + } + + /** + * @param string $network + */ + public function network($network) + { + $this->network = ApiFilter::network($network); + + return $this; + } + + /** + * @param string $version + * + * @return $this + * @throws ClientException + */ + public function version($version) + { + $this->version = ApiFilter::version($version); + + return $this; + } + + /** + * @param string $product + * + * @return $this + * @throws ClientException + */ + public function product($product) + { + $this->product = ApiFilter::product($product); + + return $this; + } + + /** + * @param string $endpointType + * + * @return $this + * @throws ClientException + */ + public function endpointType($endpointType) + { + $this->endpointType = ApiFilter::endpointType($endpointType); + + return $this; + } + + /** + * @param string $serviceCode + * + * @return $this + * @throws ClientException + */ + public function serviceCode($serviceCode) + { + $this->serviceCode = ApiFilter::serviceCode($serviceCode); + + return $this; + } + + /** + * Resolve Host. + * + * @throws ClientException + * @throws ServerException + */ + public function resolveHost() + { + // Return if specified + if ($this->uri->getHost() !== 'localhost') { + return; + } + + $region_id = $this->realRegionId(); + $host = ''; + + $this->resolveHostWays($host, $region_id); + + if (!$host) { + throw new ClientException( + "No host found for {$this->product} in the {$region_id}, you can specify host by host() method. " . + 'Like $request->host(\'xxx.xxx.aliyuncs.com\')', + SDK::HOST_NOT_FOUND + ); + } + + $this->uri = $this->uri->withHost($host); + } + + /** + * @param string $host + * @param string $region_id + * + * @throws ClientException + * @throws ServerException + */ + private function resolveHostWays(&$host, $region_id) + { + $host = AlibabaCloud::resolveHostByStatic($this->product, $region_id); + + // 1. Find host by map. + if (!$host && $this->network === 'public' && isset($this->endpointMap[$region_id])) { + $host = $this->endpointMap[$region_id]; + } + + // 2. Find host by rules. + if (!$host && $this->endpointRegional !== null) { + $host = AlibabaCloud::resolveHostByRule($this); + } + + // 3. Find in the local array file. + if (!$host) { + $host = AlibabaCloud::resolveHost($this->product, $region_id); + } + + // 4. Find in the Location service. + if (!$host && $this->serviceCode) { + $host = LocationService::resolveHost($this); + } + } + + /** + * @return string + * @throws ClientException + */ + public function realRegionId() + { + if ($this->regionId !== null) { + return $this->regionId; + } + + if ($this->httpClient()->regionId !== null) { + return $this->httpClient()->regionId; + } + + if (AlibabaCloud::getDefaultRegionId() !== null) { + return AlibabaCloud::getDefaultRegionId(); + } + + throw new ClientException("Missing required 'RegionId' for Request", SDK::INVALID_REGION_ID); + } +} diff --git a/vendor/alibabacloud/client/src/Request/Traits/ClientTrait.php b/vendor/alibabacloud/client/src/Request/Traits/ClientTrait.php new file mode 100644 index 0000000..37a2d22 --- /dev/null +++ b/vendor/alibabacloud/client/src/Request/Traits/ClientTrait.php @@ -0,0 +1,98 @@ +httpClient()->getCredential(); + } + + $timeout = isset($this->options['timeout']) + ? $this->options['timeout'] + : Request::TIMEOUT; + + $connectTimeout = isset($this->options['connect_timeout']) + ? $this->options['connect_timeout'] + : Request::CONNECT_TIMEOUT; + + return $this->httpClient()->getSessionCredential($timeout, $connectTimeout); + } + + /** + * Get the client based on the request's settings. + * + * @return Client + * @throws ClientException + */ + public function httpClient() + { + if (!AlibabaCloud::all()) { + if (CredentialsProvider::hasCustomChain()) { + CredentialsProvider::customProvider($this->client); + } else { + CredentialsProvider::defaultProvider($this->client); + } + } + + return AlibabaCloud::get($this->client); + } + + /** + * Merged with the client's options, the same name will be overwritten. + * + * @throws ClientException + */ + public function mergeOptionsIntoClient() + { + $this->options = Arrays::merge( + [ + $this->httpClient()->options, + $this->options + ] + ); + } +} diff --git a/vendor/alibabacloud/client/src/Request/Traits/DeprecatedRoaTrait.php b/vendor/alibabacloud/client/src/Request/Traits/DeprecatedRoaTrait.php new file mode 100644 index 0000000..ee64e52 --- /dev/null +++ b/vendor/alibabacloud/client/src/Request/Traits/DeprecatedRoaTrait.php @@ -0,0 +1,55 @@ +pathParameter($name, $value); + } + + /** + * @param $pathPattern + * + * @return $this + * @deprecated + * @codeCoverageIgnore + */ + public function setUriPattern($pathPattern) + { + return $this->pathPattern($pathPattern); + } + + /** + * @return string + * @deprecated + * @codeCoverageIgnore + */ + public function getUriPattern() + { + return $this->pathPattern; + } + + /** + * @return array + * @deprecated + * @codeCoverageIgnore + */ + public function getPathParameters() + { + return $this->pathParameters; + } +} diff --git a/vendor/alibabacloud/client/src/Request/Traits/DeprecatedTrait.php b/vendor/alibabacloud/client/src/Request/Traits/DeprecatedTrait.php new file mode 100644 index 0000000..406e6ed --- /dev/null +++ b/vendor/alibabacloud/client/src/Request/Traits/DeprecatedTrait.php @@ -0,0 +1,246 @@ +body($content); + } + + /** + * @param $method + * + * @return $this + * @throws ClientException + * @deprecated + * @codeCoverageIgnore + */ + public function setMethod($method) + { + return $this->method($method); + } + + /** + * @param $scheme + * + * @return $this + * @throws ClientException + * @deprecated + * @codeCoverageIgnore + */ + public function setProtocol($scheme) + { + return $this->scheme($scheme); + } + + /** + * @deprecated + * @codeCoverageIgnore + */ + public function getProtocolType() + { + return $this->uri->getScheme(); + } + + /** + * @param $scheme + * + * @return $this + * @throws ClientException + * @deprecated + * @codeCoverageIgnore + */ + public function setProtocolType($scheme) + { + return $this->scheme($scheme); + } + + /** + * @param $actionName + * + * @return $this + * @throws ClientException + * @deprecated + * @codeCoverageIgnore + */ + public function setActionName($actionName) + { + return $this->action($actionName); + } + + /** + * @param $format + * + * @return $this + * @throws ClientException + * @deprecated + * @codeCoverageIgnore + */ + public function setAcceptFormat($format) + { + return $this->format($format); + } + + /** + * @deprecated + * @codeCoverageIgnore + */ + public function getProtocol() + { + return $this->uri->getScheme(); + } + + /** + * @deprecated + * @codeCoverageIgnore + */ + public function getContent() + { + return isset($this->options['body']) + ? $this->options['body'] + : null; + } + + /** + * @deprecated + * @codeCoverageIgnore + */ + public function getMethod() + { + return $this->method; + } + + /** + * @deprecated + * @codeCoverageIgnore + */ + public function getHeaders() + { + return isset($this->options['headers']) + ? $this->options['headers'] + : []; + } + + /** + * @param $headerKey + * @param $headerValue + * + * @return $this + * @deprecated + * @codeCoverageIgnore + */ + public function addHeader($headerKey, $headerValue) + { + $this->options['headers'][$headerKey] = $headerValue; + + return $this; + } + + /** + * @deprecated + * @codeCoverageIgnore + */ + public function getQueryParameters() + { + return isset($this->options['query']) + ? $this->options['query'] + : []; + } + + /** + * @param $name + * @param $value + * + * @return $this + * @deprecated + * @codeCoverageIgnore + */ + public function setQueryParameters($name, $value) + { + $this->options['query'][$name] = $value; + + return $this; + } + + /** + * @deprecated + * @codeCoverageIgnore + */ + public function getDomainParameter() + { + return isset($this->options['form_params']) + ? $this->options['form_params'] + : []; + } + + /** + * @param $name + * @param $value + * + * @return $this + * @deprecated + * @codeCoverageIgnore + */ + public function putDomainParameters($name, $value) + { + $this->options['form_params'][$name] = $value; + + return $this; + } + + /** + * @deprecated + * @codeCoverageIgnore + */ + public function getActionName() + { + return $this->action; + } + + /** + * @deprecated + * @codeCoverageIgnore + */ + public function getAcceptFormat() + { + return $this->format; + } + + /** + * @deprecated + * @codeCoverageIgnore + */ + public function getLocationEndpointType() + { + return $this->endpointType; + } + + /** + * @deprecated + * @codeCoverageIgnore + */ + public function getLocationServiceCode() + { + return $this->serviceCode; + } +} diff --git a/vendor/alibabacloud/client/src/Request/Traits/RetryTrait.php b/vendor/alibabacloud/client/src/Request/Traits/RetryTrait.php new file mode 100644 index 0000000..ff35b64 --- /dev/null +++ b/vendor/alibabacloud/client/src/Request/Traits/RetryTrait.php @@ -0,0 +1,149 @@ +serverRetry = ClientFilter::retry($times); + $this->serverRetryStrings = $strings; + $this->serverRetryStatusCodes = $statusCodes; + + return $this; + } + + /** + * @param int $times + * @param array $strings + * @param array $codes + * + * @return $this + * @throws ClientException + */ + public function retryByClient($times, array $strings, array $codes = []) + { + $this->clientRetry = ClientFilter::retry($times); + $this->clientRetryStrings = $strings; + $this->clientRetryStatusCodes = $codes; + + return $this; + } + + /** + * @param Result $result + * + * @return bool + */ + private function shouldServerRetry(Result $result) + { + if ($this->serverRetry <= 0) { + return false; + } + + if (in_array($result->getStatusCode(), $this->serverRetryStatusCodes)) { + $this->serverRetry--; + + return true; + } + + foreach ($this->serverRetryStrings as $message) { + if (Stringy::create($result->getBody())->contains($message)) { + $this->serverRetry--; + + return true; + } + } + + return false; + } + + /** + * @param Exception $exception + * + * @return bool + */ + private function shouldClientRetry(Exception $exception) + { + if ($this->clientRetry <= 0) { + return false; + } + + if (in_array($exception->getCode(), $this->clientRetryStatusCodes, true)) { + $this->clientRetry--; + + return true; + } + + foreach ($this->clientRetryStrings as $message) { + if (Stringy::create($exception->getMessage())->contains($message)) { + $this->clientRetry--; + + return true; + } + } + + return false; + } +} diff --git a/vendor/alibabacloud/client/src/Request/UserAgent.php b/vendor/alibabacloud/client/src/Request/UserAgent.php new file mode 100644 index 0000000..beb3283 --- /dev/null +++ b/vendor/alibabacloud/client/src/Request/UserAgent.php @@ -0,0 +1,142 @@ + $value) { + if ($value === null) { + $newUserAgent[] = $key; + continue; + } + $newUserAgent[] = "$key/$value"; + } + + return $userAgent . \implode(' ', $newUserAgent); + } + + /** + * UserAgent constructor. + */ + private static function defaultFields() + { + if (self::$userAgent === []) { + self::$userAgent = [ + 'Client' => AlibabaCloud::VERSION, + 'PHP' => \PHP_VERSION, + ]; + } + } + + /** + * @param array $append + * + * @return array + */ + public static function clean(array $append) + { + foreach ($append as $key => $value) { + if (self::isGuarded($key)) { + unset($append[$key]); + continue; + } + } + + return $append; + } + + /** + * @param $name + * + * @return bool + */ + public static function isGuarded($name) + { + return in_array(strtolower($name), self::$guard, true); + } + + /** + * set User Agent of Alibaba Cloud. + * + * @param string $name + * @param string $value + * + * @throws ClientException + */ + public static function append($name, $value) + { + Filter::name($name); + Filter::value($value); + + self::defaultFields(); + + if (!self::isGuarded($name)) { + self::$userAgent[$name] = $value; + } + } + + /** + * @param array $userAgent + */ + public static function with(array $userAgent) + { + self::$userAgent = self::clean($userAgent); + } + + /** + * Clear all of the User Agent. + */ + public static function clear() + { + self::$userAgent = []; + } +} diff --git a/vendor/alibabacloud/client/src/Resolver/ActionResolverTrait.php b/vendor/alibabacloud/client/src/Resolver/ActionResolverTrait.php new file mode 100644 index 0000000..f375567 --- /dev/null +++ b/vendor/alibabacloud/client/src/Resolver/ActionResolverTrait.php @@ -0,0 +1,50 @@ +action) { + $array = explode('\\', get_class($this)); + $this->action = array_pop($array); + } + } + + /** + * Append SDK version into User-Agent + * + * @throws ClientException + * @throws ReflectionException + */ + private function appendSdkUA() + { + if (!(new ReflectionClass(AlibabaCloud::class))->hasMethod('appendUserAgent')) { + return; + } + + if (!class_exists('AlibabaCloud\Release')) { + return; + } + + AlibabaCloud::appendUserAgent('SDK', \AlibabaCloud\Release::VERSION); + } +} diff --git a/vendor/alibabacloud/client/src/Resolver/ApiResolver.php b/vendor/alibabacloud/client/src/Resolver/ApiResolver.php new file mode 100644 index 0000000..7a2bc2b --- /dev/null +++ b/vendor/alibabacloud/client/src/Resolver/ApiResolver.php @@ -0,0 +1,113 @@ +__call($name, $arguments); + } + + /** + * @param $api + * @param $arguments + * + * @return mixed + * @throws ClientException + */ + public function __call($api, $arguments) + { + $product_name = $this->getProductName(); + $class = $this->getNamespace() . '\\' . \ucfirst($api); + + if (\class_exists($class)) { + if (isset($arguments[0])) { + return $this->warpEndpoint(new $class($arguments[0])); + } + + return $this->warpEndpoint(new $class()); + } + + throw new ClientException( + "{$product_name} contains no $api", + 'SDK.ApiNotFound' + ); + } + + /** + * @param Request $request + * + * @return Request + */ + public function warpEndpoint(Request $request) + { + $reflect = new ReflectionObject($request); + $product_dir = dirname(dirname($reflect->getFileName())); + $endpoints_json = "$product_dir/endpoints.json"; + if (file_exists($endpoints_json)) { + $endpoints = json_decode(file_get_contents($endpoints_json), true); + if (isset($endpoints['endpoint_map'])) { + $request->endpointMap = $endpoints['endpoint_map']; + } + if (isset($endpoints['endpoint_regional'])) { + $request->endpointRegional = $endpoints['endpoint_regional']; + } + } + + return $request; + } + + /** + * @return mixed + * @throws ClientException + */ + private function getProductName() + { + $array = \explode('\\', \get_class($this)); + if (isset($array[3])) { + return str_replace('ApiResolver', '', $array[3]); + } + throw new ClientException( + 'Service name not found.', + 'SDK.ServiceNotFound' + ); + } + + /** + * @return string + * @throws ClientException + */ + private function getNamespace() + { + $array = \explode('\\', \get_class($this)); + + if (!isset($array[3])) { + throw new ClientException( + 'Get namespace error.', + 'SDK.ParseError' + ); + } + + unset($array[3]); + + return \implode('\\', $array); + } +} diff --git a/vendor/alibabacloud/client/src/Resolver/CallTrait.php b/vendor/alibabacloud/client/src/Resolver/CallTrait.php new file mode 100644 index 0000000..33afdce --- /dev/null +++ b/vendor/alibabacloud/client/src/Resolver/CallTrait.php @@ -0,0 +1,67 @@ +__get($parameter); + } + + if (strncmp($name, 'with', 4) === 0) { + $parameter = \mb_strcut($name, 4); + + $value = $this->getCallArguments($name, $arguments); + $this->data[$parameter] = $value; + $this->parameterPosition()[$parameter] = $value; + + return $this; + } + + if (strncmp($name, 'set', 3) === 0) { + $parameter = \mb_strcut($name, 3); + $with_method = "with$parameter"; + + return $this->$with_method($this->getCallArguments($name, $arguments)); + } + + throw new RuntimeException('Call to undefined method ' . __CLASS__ . '::' . $name . '()'); + } + + /** + * @param string $name + * @param array $arguments + * @param int $index + * + * @return mixed + */ + private function getCallArguments($name, array $arguments, $index = 0) + { + if (!isset($arguments[$index])) { + throw new ArgumentCountError("Missing arguments to method $name"); + } + + return $arguments[$index]; + } +} diff --git a/vendor/alibabacloud/client/src/Resolver/Roa.php b/vendor/alibabacloud/client/src/Resolver/Roa.php new file mode 100644 index 0000000..719cb0a --- /dev/null +++ b/vendor/alibabacloud/client/src/Resolver/Roa.php @@ -0,0 +1,43 @@ +resolveActionName(); + $this->appendSdkUA(); + } + + /** + * @return mixed + */ + private function ¶meterPosition() + { + return $this->pathParameters; + } +} diff --git a/vendor/alibabacloud/client/src/Resolver/Rpc.php b/vendor/alibabacloud/client/src/Resolver/Rpc.php new file mode 100644 index 0000000..0926ca4 --- /dev/null +++ b/vendor/alibabacloud/client/src/Resolver/Rpc.php @@ -0,0 +1,41 @@ +resolveActionName(); + $this->appendSdkUA(); + } + + /** + * @return mixed + */ + private function ¶meterPosition() + { + return $this->options['query']; + } +} diff --git a/vendor/alibabacloud/client/src/Resolver/VersionResolver.php b/vendor/alibabacloud/client/src/Resolver/VersionResolver.php new file mode 100644 index 0000000..cc66c64 --- /dev/null +++ b/vendor/alibabacloud/client/src/Resolver/VersionResolver.php @@ -0,0 +1,73 @@ +__call($name, $arguments); + } + + /** + * @param string $version + * @param array $arguments + * + * @return mixed + * @throws ClientException + */ + public function __call($version, $arguments) + { + $version = \ucfirst($version); + $product = $this->getProductName(); + + $position = strpos($product, 'Version'); + if ($position !== false && $position !== 0) { + $product = \str_replace('Version', '', $product); + } + + $class = "AlibabaCloud\\{$product}\\$version\\{$product}ApiResolver"; + + if (\class_exists($class)) { + return new $class(); + } + + throw new ClientException( + "$product Versions contains no {$version}", + 'SDK.VersionNotFound' + ); + } + + /** + * @return mixed + * @throws ClientException + */ + private function getProductName() + { + $array = \explode('\\', \get_class($this)); + + if (isset($array[1])) { + return $array[1]; + } + + throw new ClientException( + 'Service name not found.', + 'SDK.ServiceNotFound' + ); + } +} diff --git a/vendor/alibabacloud/client/src/Result/Result.php b/vendor/alibabacloud/client/src/Result/Result.php new file mode 100644 index 0000000..7c2910e --- /dev/null +++ b/vendor/alibabacloud/client/src/Result/Result.php @@ -0,0 +1,151 @@ +getStatusCode(), + $response->getHeaders(), + $response->getBody(), + $response->getProtocolVersion(), + $response->getReasonPhrase() + ); + + $this->request = $request; + + $this->resolveData(); + } + + private function resolveData() + { + $content = $this->getBody()->getContents(); + + switch ($this->getRequestFormat()) { + case 'JSON': + $result_data = $this->jsonToArray($content); + break; + case 'XML': + $result_data = $this->xmlToArray($content); + break; + case 'RAW': + $result_data = $this->jsonToArray($content); + break; + default: + $result_data = $this->jsonToArray($content); + } + + if (!$result_data) { + $result_data = []; + } + + $this->dot($result_data); + } + + /** + * @return string + */ + private function getRequestFormat() + { + return ($this->request instanceof Request) + ? \strtoupper($this->request->format) + : 'JSON'; + } + + /** + * @param string $response + * + * @return array + */ + private function jsonToArray($response) + { + try { + return \GuzzleHttp\json_decode($response, true); + } catch (InvalidArgumentException $exception) { + return []; + } + } + + /** + * @param string $string + * + * @return array + */ + private function xmlToArray($string) + { + try { + return json_decode(json_encode(simplexml_load_string($string)), true); + } catch (Exception $exception) { + return []; + } + } + + /** + * @return string + */ + public function __toString() + { + return (string)$this->getBody(); + } + + /** + * @return Request + */ + public function getRequest() + { + return $this->request; + } + + /** + * @codeCoverageIgnore + * @return Response + * @deprecated + */ + public function getResponse() + { + return $this; + } + + /** + * @return bool + */ + public function isSuccess() + { + return 200 <= $this->getStatusCode() + && 300 > $this->getStatusCode(); + } +} diff --git a/vendor/alibabacloud/client/src/SDK.php b/vendor/alibabacloud/client/src/SDK.php new file mode 100644 index 0000000..8976cd0 --- /dev/null +++ b/vendor/alibabacloud/client/src/SDK.php @@ -0,0 +1,57 @@ +getMessage(), + SDK::INVALID_CREDENTIAL + ); + } + + return base64_encode($binarySignature); + } +} diff --git a/vendor/alibabacloud/client/src/Signature/Signature.php b/vendor/alibabacloud/client/src/Signature/Signature.php new file mode 100644 index 0000000..3b01e69 --- /dev/null +++ b/vendor/alibabacloud/client/src/Signature/Signature.php @@ -0,0 +1,49 @@ +sign($string, $accessKeySecret); + + return "acs $accessKeyId:$signature"; + } + + /** + * @codeCoverageIgnore + * + * @param string $accessKeySecret + * @param string $method + * @param array $parameters + * + * @return string + */ + public function rpc($accessKeySecret, $method, array $parameters) + { + $string = Sign::rpcString($method, $parameters); + + return $this->sign($string, $accessKeySecret . '&'); + } +} diff --git a/vendor/alibabacloud/client/src/Signature/SignatureInterface.php b/vendor/alibabacloud/client/src/Signature/SignatureInterface.php new file mode 100644 index 0000000..afa82c8 --- /dev/null +++ b/vendor/alibabacloud/client/src/Signature/SignatureInterface.php @@ -0,0 +1,35 @@ + $value) { + if (is_int($key)) { + $result[] = $value; + continue; + } + + if (isset($result[$key]) && is_array($result[$key])) { + $result[$key] = self::merge( + [$result[$key], $value] + ); + continue; + } + + $result[$key] = $value; + } + } + + return $result; + } +} diff --git a/vendor/alibabacloud/client/src/Support/Path.php b/vendor/alibabacloud/client/src/Support/Path.php new file mode 100644 index 0000000..e1a6464 --- /dev/null +++ b/vendor/alibabacloud/client/src/Support/Path.php @@ -0,0 +1,28 @@ + $value) { + $pattern = str_replace("[$key]", $value, $pattern); + } + + return $pattern; + } +} diff --git a/vendor/alibabacloud/client/src/Support/Sign.php b/vendor/alibabacloud/client/src/Support/Sign.php new file mode 100644 index 0000000..450929f --- /dev/null +++ b/vendor/alibabacloud/client/src/Support/Sign.php @@ -0,0 +1,140 @@ + $headerValue) { + $key = strtolower($headerKey); + if (strncmp($key, 'x-acs-', 6) === 0) { + $array[$key] = $headerValue; + } + } + ksort($array); + $string = ''; + foreach ($array as $sortMapKey => $sortMapValue) { + $string .= $sortMapKey . ':' . $sortMapValue[0] . self::$headerSeparator; + } + + return $string; + } + + /** + * @param UriInterface $uri + * + * @return string + */ + private static function resourceString(UriInterface $uri) + { + return $uri->getPath() . '?' . rawurldecode($uri->getQuery()); + } + + /** + * @param string $method + * @param array $headers + * + * @return string + */ + private static function headerString($method, array $headers) + { + $string = $method . self::$headerSeparator; + if (isset($headers['Accept'][0])) { + $string .= $headers['Accept'][0]; + } + $string .= self::$headerSeparator; + + if (isset($headers['Content-MD5'][0])) { + $string .= $headers['Content-MD5'][0]; + } + $string .= self::$headerSeparator; + + if (isset($headers['Content-Type'][0])) { + $string .= $headers['Content-Type'][0]; + } + $string .= self::$headerSeparator; + + if (isset($headers['Date'][0])) { + $string .= $headers['Date'][0]; + } + $string .= self::$headerSeparator; + + $string .= self::acsHeaderString($headers); + + return $string; + } + + /** + * @param string $string + * + * @return null|string|string[] + */ + private static function percentEncode($string) + { + $result = urlencode($string); + $result = str_replace(['+', '*'], ['%20', '%2A'], $result); + $result = preg_replace('/%7E/', '~', $result); + + return $result; + } + + /** + * @param string $method + * @param array $parameters + * + * @return string + */ + public static function rpcString($method, array $parameters) + { + ksort($parameters); + $canonicalized = ''; + foreach ($parameters as $key => $value) { + $canonicalized .= '&' . self::percentEncode($key) . '=' . self::percentEncode($value); + } + + return $method . '&%2F&' . self::percentEncode(substr($canonicalized, 1)); + } + + /** + * @param Request $request + * + * @return string + */ + public static function roaString(Request $request) + { + return self::headerString($request->getMethod(), $request->getHeaders()) . + self::resourceString($request->getUri()); + } + + /** + * @param string $salt + * + * @return string + */ + public static function uuid($salt) + { + return md5($salt . uniqid(md5(microtime(true)), true)); + } +} diff --git a/vendor/alibabacloud/client/src/Traits/ArrayAccessTrait.php b/vendor/alibabacloud/client/src/Traits/ArrayAccessTrait.php new file mode 100644 index 0000000..d6f6908 --- /dev/null +++ b/vendor/alibabacloud/client/src/Traits/ArrayAccessTrait.php @@ -0,0 +1,57 @@ +data[$offset])) { + return $this->data[$offset]; + } + + $value = null; + + return $value; + } + + /** + * @param string $offset + * @param string|mixed $value + */ + public function offsetSet($offset, $value) + { + $this->data[$offset] = $value; + } + + /** + * @param string $offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->data[$offset]); + } + + /** + * @param string $offset + */ + public function offsetUnset($offset) + { + unset($this->data[$offset]); + } +} diff --git a/vendor/alibabacloud/client/src/Traits/ClientTrait.php b/vendor/alibabacloud/client/src/Traits/ClientTrait.php new file mode 100644 index 0000000..2336d17 --- /dev/null +++ b/vendor/alibabacloud/client/src/Traits/ClientTrait.php @@ -0,0 +1,273 @@ +load(); + } + $list = []; + foreach (\func_get_args() as $filename) { + $list[$filename] = (new IniCredential($filename))->load(); + } + + return $list; + } + + /** + * Custom Client. + * + * @param CredentialsInterface $credentials + * @param SignatureInterface $signature + * + * @return Client + */ + public static function client(CredentialsInterface $credentials, SignatureInterface $signature) + { + return new Client($credentials, $signature); + } + + /** + * Use the AccessKey to complete the authentication. + * + * @param string $accessKeyId + * @param string $accessKeySecret + * + * @return AccessKeyClient + * @throws ClientException + */ + public static function accessKeyClient($accessKeyId, $accessKeySecret) + { + if (strpos($accessKeyId, ' ') !== false) { + throw new ClientException( + 'AccessKey ID format is invalid', + SDK::INVALID_ARGUMENT + ); + } + + if (strpos($accessKeySecret, ' ') !== false) { + throw new ClientException( + 'AccessKey Secret format is invalid', + SDK::INVALID_ARGUMENT + ); + } + + return new AccessKeyClient($accessKeyId, $accessKeySecret); + } + + /** + * Use the AssumeRole of the RAM account to complete the authentication. + * + * @param string $accessKeyId + * @param string $accessKeySecret + * @param string $roleArn + * @param string $roleSessionName + * @param string|array $policy + * + * @return RamRoleArnClient + * @throws ClientException + */ + public static function ramRoleArnClient($accessKeyId, $accessKeySecret, $roleArn, $roleSessionName, $policy = '') + { + return new RamRoleArnClient($accessKeyId, $accessKeySecret, $roleArn, $roleSessionName, $policy); + } + + /** + * Use the RAM role of an ECS instance to complete the authentication. + * + * @param string $roleName + * + * @return EcsRamRoleClient + * @throws ClientException + */ + public static function ecsRamRoleClient($roleName) + { + return new EcsRamRoleClient($roleName); + } + + /** + * Use the Bearer Token to complete the authentication. + * + * @param string $bearerToken + * + * @return BearerTokenClient + * @throws ClientException + */ + public static function bearerTokenClient($bearerToken) + { + return new BearerTokenClient($bearerToken); + } + + /** + * Use the STS Token to complete the authentication. + * + * @param string $accessKeyId Access key ID + * @param string $accessKeySecret Access Key Secret + * @param string $securityToken Security Token + * + * @return StsClient + * @throws ClientException + */ + public static function stsClient($accessKeyId, $accessKeySecret, $securityToken = '') + { + return new StsClient($accessKeyId, $accessKeySecret, $securityToken); + } + + /** + * Use the RSA key pair to complete the authentication (supported only on Japanese site) + * + * @param string $publicKeyId + * @param string $privateKeyFile + * + * @return RsaKeyPairClient + * @throws ClientException + */ + public static function rsaKeyPairClient($publicKeyId, $privateKeyFile) + { + return new RsaKeyPairClient($publicKeyId, $privateKeyFile); + } +} diff --git a/vendor/alibabacloud/client/src/Traits/DefaultRegionTrait.php b/vendor/alibabacloud/client/src/Traits/DefaultRegionTrait.php new file mode 100644 index 0000000..5d5c75a --- /dev/null +++ b/vendor/alibabacloud/client/src/Traits/DefaultRegionTrait.php @@ -0,0 +1,66 @@ +realRegionId(); + $network = $request->network ?: 'public'; + $suffix = $request->endpointSuffix; + if ($network === 'public') { + $network = ''; + } + + if ($request->endpointRegional === 'regional') { + return "{$request->product}{$suffix}{$network}.{$regionId}.aliyuncs.com"; + } + + if ($request->endpointRegional === 'central') { + return "{$request->product}{$suffix}{$network}.aliyuncs.com"; + } + + throw new InvalidArgumentException('endpointRegional is invalid.'); + } +} diff --git a/vendor/alibabacloud/client/src/Traits/HasDataTrait.php b/vendor/alibabacloud/client/src/Traits/HasDataTrait.php new file mode 100644 index 0000000..81a03ea --- /dev/null +++ b/vendor/alibabacloud/client/src/Traits/HasDataTrait.php @@ -0,0 +1,317 @@ +dot->all()); + } + + /** + * Delete the contents of a given key or keys + * + * @param array|int|string|null $keys + */ + public function clear($keys = null) + { + $this->dot->clear($keys); + } + + /** + * Flatten an array with the given character as a key delimiter + * + * @param string $delimiter + * @param array|null $items + * @param string $prepend + * + * @return array + */ + public function flatten($delimiter = '.', $items = null, $prepend = '') + { + return $this->dot->flatten($delimiter, $items, $prepend); + } + + /** + * Return the value of a given key + * + * @param int|string|null $key + * @param mixed $default + * + * @return mixed + */ + public function get($key = null, $default = null) + { + return $this->dot->get($key, $default); + } + + /** + * Set a given key / value pair or pairs + * + * @param array|int|string $keys + * @param mixed $value + */ + public function set($keys, $value = null) + { + $this->dot->set($keys, $value); + } + + /** + * Check if a given key or keys are empty + * + * @param array|int|string|null $keys + * + * @return bool + */ + public function isEmpty($keys = null) + { + return $this->dot->isEmpty($keys); + } + + /** + * Replace all items with a given array as a reference + * + * @param array $items + */ + public function setReference(array &$items) + { + $this->dot->setReference($items); + } + + /** + * Return the value of a given key or all the values as JSON + * + * @param mixed $key + * @param int $options + * + * @return string + */ + public function toJson($key = null, $options = 0) + { + return $this->dot->toJson($key, $options); + } + + /** + * @return array + */ + public function toArray() + { + return $this->dot->all(); + } + + /** + * Check if a given key exists + * + * @param int|string $key + * + * @return bool + */ + public function offsetExists($key) + { + return $this->dot->has($key); + } + + /** + * Return the value of a given key + * + * @param int|string $key + * + * @return mixed + */ + public function offsetGet($key) + { + return $this->dot->offsetGet($key); + } + + /** + * Set a given value to the given key + * + * @param int|string|null $key + * @param mixed $value + */ + public function offsetSet($key, $value) + { + $this->dot->offsetSet($key, $value); + } + + /** + * Delete the given key + * + * @param int|string $key + */ + public function offsetUnset($key) + { + $this->delete($key); + } + + /** + * Delete the given key or keys + * + * @param array|int|string $keys + */ + public function delete($keys) + { + $this->dot->delete($keys); + } + + /* + * -------------------------------------------------------------- + * ArrayAccess interface + * -------------------------------------------------------------- + */ + + /** + * Return the number of items in a given key + * + * @param int|string|null $key + * + * @return int + */ + public function count($key = null) + { + return $this->dot->count($key); + } + + /** + * Get an iterator for the stored items + * + * @return ArrayIterator + */ + public function getIterator() + { + return $this->dot->getIterator(); + } + + /** + * Return items for JSON serialization + * + * @return array + */ + public function jsonSerialize() + { + return $this->dot->jsonSerialize(); + } + + /** + * @param string $name + * + * @return mixed|null + */ + public function __get($name) + { + if (!isset($this->all()[$name])) { + return null; + } + + return \json_decode(\json_encode($this->all()))->$name; + } + + /* + * -------------------------------------------------------------- + * Countable interface + * -------------------------------------------------------------- + */ + + /** + * Return all the stored items + * + * @return array + */ + public function all() + { + return $this->dot->all(); + } + + /** + * @param string $name + * @param mixed $value + */ + public function __set($name, $value) + { + $this->add($name, $value); + } + + /** + * Set a given key / value pair or pairs + * if the key doesn't exist already + * + * @param array|int|string $keys + * @param mixed $value + */ + public function add($keys, $value = null) + { + $this->dot->add($keys, $value); + } + + + /* + * -------------------------------------------------------------- + * ObjectAccess + * -------------------------------------------------------------- + */ + + /** + * @param string $name + * + * @return bool + */ + public function __isset($name) + { + return $this->has($name); + } + + /** + * Check if a given key or keys exists + * + * @param array|int|string $keys + * + * @return bool + */ + public function has($keys) + { + return $this->dot->has($keys); + } + + /** + * @param $name + * + * @return void + */ + public function __unset($name) + { + $this->delete($name); + } + + /** + * @param array $data + */ + protected function dot(array $data = []) + { + $this->dot = new Dot($data); + } +} diff --git a/vendor/alibabacloud/client/src/Traits/HistoryTrait.php b/vendor/alibabacloud/client/src/Traits/HistoryTrait.php new file mode 100644 index 0000000..f70bb1d --- /dev/null +++ b/vendor/alibabacloud/client/src/Traits/HistoryTrait.php @@ -0,0 +1,68 @@ +options['timeout'] = ClientFilter::timeout($seconds); + + return $this; + } + + /** + * @param int $milliseconds + * + * @return $this + * @throws ClientException + */ + public function timeoutMilliseconds($milliseconds) + { + ClientFilter::milliseconds($milliseconds); + $seconds = $milliseconds / 1000; + + return $this->timeout($seconds); + } + + /** + * @param int|float $seconds + * + * @return $this + * @throws ClientException + */ + public function connectTimeout($seconds) + { + $this->options['connect_timeout'] = ClientFilter::connectTimeout($seconds); + + return $this; + } + + /** + * @param int $milliseconds + * + * @return $this + * @throws ClientException + */ + public function connectTimeoutMilliseconds($milliseconds) + { + ClientFilter::milliseconds($milliseconds); + $seconds = $milliseconds / 1000; + + return $this->connectTimeout($seconds); + } + + /** + * @param bool $debug + * + * @return $this + */ + public function debug($debug) + { + $this->options['debug'] = $debug; + + return $this; + } + + /** + * @codeCoverageIgnore + * + * @param array $cert + * + * @return $this + */ + public function cert($cert) + { + $this->options['cert'] = $cert; + + return $this; + } + + /** + * @codeCoverageIgnore + * + * @param array|string $proxy + * + * @return $this + */ + public function proxy($proxy) + { + $this->options['proxy'] = $proxy; + + return $this; + } + + /** + * @param mixed $verify + * + * @return $this + */ + public function verify($verify) + { + $this->options['verify'] = $verify; + + return $this; + } + + /** + * @param array $options + * + * @return $this + */ + public function options(array $options) + { + if ($options !== []) { + $this->options = Arrays::merge([$this->options, $options]); + } + + return $this; + } +} diff --git a/vendor/alibabacloud/client/src/Traits/LogTrait.php b/vendor/alibabacloud/client/src/Traits/LogTrait.php new file mode 100644 index 0000000..c2b778f --- /dev/null +++ b/vendor/alibabacloud/client/src/Traits/LogTrait.php @@ -0,0 +1,64 @@ +data[$name])) { + return null; + } + + return \json_decode(\json_encode($this->data))->$name; + } + + /** + * @param string $name + * @param mixed $value + */ + public function __set($name, $value) + { + $this->data[$name] = $value; + } + + /** + * @param string $name + * + * @return bool + */ + public function __isset($name) + { + return isset($this->data[$name]); + } + + /** + * @param $name + * + * @return void + */ + public function __unset($name) + { + unset($this->data[$name]); + } +} diff --git a/vendor/alibabacloud/client/src/Traits/RegionTrait.php b/vendor/alibabacloud/client/src/Traits/RegionTrait.php new file mode 100644 index 0000000..da6bee4 --- /dev/null +++ b/vendor/alibabacloud/client/src/Traits/RegionTrait.php @@ -0,0 +1,33 @@ +regionId = ClientFilter::regionId($regionId); + + return $this; + } +} diff --git a/vendor/alibabacloud/client/src/Traits/RequestTrait.php b/vendor/alibabacloud/client/src/Traits/RequestTrait.php new file mode 100644 index 0000000..afcb9a4 --- /dev/null +++ b/vendor/alibabacloud/client/src/Traits/RequestTrait.php @@ -0,0 +1,90 @@ + 'app_name', + 'db' => + array ( + 'host' => 'localhost', + 'user' => 'sample_user', + 'pass' => 'sample_pass', + 'port' => 3306, + ), + 'other' => + array ( + 'multi' => + array ( + 'deep' => + array ( + 'nested' => 'config_value', + ), + ), + ), +); + +``` + +### Instance ConfigManager object + +```php +use clagiordano\weblibs\configmanager\ConfigManager; + +/** + * Instance object to read argument file + */ +$config = new ConfigManager("configfile.php"); +``` + +### Check if a value exists into config file + +```php +/** + * Check if a value exists into config file + */ +$value = $config->existValue('app'); +``` + +### Read a simple element from config file + +```php +/** + * Read a simple element from config file + */ +$value = $config->getValue('app'); +``` + +### Access to a nested element from config + +```php +/** + * Access to a nested element from config + */ +$nestedValue = $config->getValue('other.multi.deep.nested'); +``` + +### Change config value at runtime + +```php +/** + * Change config value at runtime + */ +$this->config->setValue('other.multi.deep.nested', "SUPERNESTED"); +``` + +### Save config file with original name (OVERWRITE) + +```php +/** + * Save config file with original name (OVERWRITE) + */ +$this->config->saveConfigFile(); +``` + +### Or save config file with a different name + +```php +/** + * Save config file with original name (OVERWRITE) + */ +$this->config->saveConfigFile('/new/file/name/or/path/test.php'); +``` + +### Optionally you can also reload config file from disk after save + +```php +/** + * Optionally you can also reload config file from disk after save + */ +$this->config->saveConfigFile('/new/file/name/or/path/test.php', true); +``` + +### Load another configuration file without reinstance ConfigManager + +```php +/** + * Load another configuration file without reinstance ConfigManager + */ +$this->config->loadConfig('another_config_file.php'); +``` + +## Legal +*Copyright (C) Claudio Giordano * diff --git a/vendor/clagiordano/weblibs-configmanager/composer.json b/vendor/clagiordano/weblibs-configmanager/composer.json new file mode 100644 index 0000000..f330d2b --- /dev/null +++ b/vendor/clagiordano/weblibs-configmanager/composer.json @@ -0,0 +1,36 @@ +{ + "name": "clagiordano/weblibs-configmanager", + "description": "weblibs-configmanager is a tool library for easily read and access to php config array file and direct read/write configuration file / object", + "type": "library", + "license": "LGPL-3.0-or-later", + "keywords": ["clagiordano", "weblibs", "configuration", "manager", "tool"], + "authors": [ + { + "name": "Claudio Giordano", + "email": "claudio.giordano@autistici.org", + "role": "Developer" + } + ], + "autoload": { + "psr-4": { + "clagiordano\\weblibs\\configmanager\\": "src/" + } + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "phpunit/phpunit": "^4.8", + "clagiordano/phpunit-result-printer": "^1" + }, + "autoload-dev": { + "psr-4": { + "clagiordano\\weblibs\\configmanager\\tests\\": "tests/", + "clagiordano\\weblibs\\configmanager\\testdata\\": "testdata/" + } + }, + "scripts": { + "test": "./vendor/bin/phpunit --no-coverage", + "coverage": "./vendor/bin/phpunit" + } +} diff --git a/vendor/clagiordano/weblibs-configmanager/composer.lock b/vendor/clagiordano/weblibs-configmanager/composer.lock new file mode 100644 index 0000000..f65537e --- /dev/null +++ b/vendor/clagiordano/weblibs-configmanager/composer.lock @@ -0,0 +1,1235 @@ +{ + "_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": "4891effe3d8ee390aa06d5a8dd37fb9c", + "packages": [], + "packages-dev": [ + { + "name": "clagiordano/phpunit-result-printer", + "version": "v1.0.4", + "source": { + "type": "git", + "url": "https://github.com/clagiordano/phpunit-result-printer.git", + "reference": "b4351f747af7964bcdb1cc0d1aa9fe007022b3ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clagiordano/phpunit-result-printer/zipball/b4351f747af7964bcdb1cc0d1aa9fe007022b3ac", + "reference": "b4351f747af7964bcdb1cc0d1aa9fe007022b3ac", + "shasum": "" + }, + "require": { + "phpunit/phpunit": "4.8.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "clagiordano\\PhpunitResultPrinter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Phpunit custom result printer class", + "time": "2019-07-16T10:33:26+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "a2c590166b2133a4633738648b6b064edae0814a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", + "reference": "a2c590166b2133a4633738648b6b064edae0814a", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-shim": "^0.11", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.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://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2019-03-17T17:37:11+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", + "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "~6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.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" + ], + "time": "2018-08-07T13:53:10+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "4.3.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e", + "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e", + "shasum": "" + }, + "require": { + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", + "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "doctrine/instantiator": "^1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.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" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2019-09-12T14:27:41+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "shasum": "" + }, + "require": { + "php": "^7.1", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "^7.1", + "mockery/mockery": "~1", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.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" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "time": "2019-08-22T18:11:29+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.8.1", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76", + "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.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.8.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" + ], + "time": "2019-06-13T12:50:23+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "2.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "^1.3.2", + "sebastian/version": "~1.0" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.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": "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" + ], + "time": "2015-10-06T15:47:00+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" + ], + "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" + ], + "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" + ], + "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" + ], + "time": "2017-12-04T08:55:13+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "4.8.36", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpspec/prophecy": "^1.3.1", + "phpunit/php-code-coverage": "~2.1", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.2.2", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.3", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.1|~3.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.8.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" + ], + "time": "2017-06-21T08:07:12+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "2.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3.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" + ], + "abandoned": true, + "time": "2015-10-02T06:51:40+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" + ], + "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" + ], + "time": "2017-05-22T07:24:03+00:00" + }, + { + "name": "sebastian/environment", + "version": "1.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.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" + ], + "time": "2016-08-18T05:49:44+00:00" + }, + { + "name": "sebastian/exporter", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.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" + ], + "time": "2016-06-17T09:04:28+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" + ], + "time": "2015-10-12T03:26:01+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "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": "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", + "time": "2016-10-03T07:41:43+00:00" + }, + { + "name": "sebastian/version", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "shasum": "" + }, + "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": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2015-06-21T13:59:46+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.12.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "550ebaac289296ce228a706d0867afc34687e3f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", + "reference": "550ebaac289296ce228a706d0867afc34687e3f4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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" + ], + "time": "2019-08-06T08:03:45+00:00" + }, + { + "name": "symfony/yaml", + "version": "v3.4.31", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "3dc414b7db30695bae671a1d86013d03f4ae9834" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/3dc414b7db30695bae671a1d86013d03f4ae9834", + "reference": "3dc414b7db30695bae671a1d86013d03f4ae9834", + "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", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "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", + "time": "2019-08-20T13:31:17+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4", + "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36 || ^7.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "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" + ], + "time": "2019-08-24T08:43:50+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.4" + }, + "platform-dev": [] +} diff --git a/vendor/clagiordano/weblibs-configmanager/phpunit.xml b/vendor/clagiordano/weblibs-configmanager/phpunit.xml new file mode 100644 index 0000000..25777b9 --- /dev/null +++ b/vendor/clagiordano/weblibs-configmanager/phpunit.xml @@ -0,0 +1,19 @@ + + + + + ./tests/ + + + diff --git a/vendor/clagiordano/weblibs-configmanager/src/ConfigManager.php b/vendor/clagiordano/weblibs-configmanager/src/ConfigManager.php new file mode 100644 index 0000000..58a44af --- /dev/null +++ b/vendor/clagiordano/weblibs-configmanager/src/ConfigManager.php @@ -0,0 +1,148 @@ +loadConfig($configFilePath); + } + + /** + * Load config data from file and store it into internal property + * + * @param null|string $configFilePath + * + * @return ConfigManager + */ + public function loadConfig($configFilePath = null) + { + if (!is_null($configFilePath)) { + $this->configFilePath = $configFilePath; + + if (file_exists($configFilePath)) { + $this->configData = require $configFilePath; + } + } + + return $this; + } + + /** + * Prepare and write config file on disk + * + * @param null|string $configFilePath + * @param bool $autoReloadConfig + * + * @return ConfigManager + * @throws \RuntimeException + */ + public function saveConfigFile($configFilePath = null, $autoReloadConfig = false) + { + if (is_null($configFilePath)) { + $configFilePath = $this->configFilePath; + } + + $configFileContent = "configData, true); + $configFileContent .= ";\n\n"; + + try { + file_put_contents($configFilePath, $configFileContent); + } catch (\Exception $exc) { + throw new \RuntimeException( + __METHOD__ . ": Failed to write config file to path '{$configFilePath}'" + ); + } + + if ($autoReloadConfig) { + $this->loadConfig($configFilePath); + } + + return $this; + } + + /** + * Get value pointer from config for get/set value + * + * @param string $configPath + * + * @return mixed + */ + private function & getValuePointer($configPath) + { + $configData =& $this->configData; + $parts = explode('.', $configPath); + $length = count($parts); + + for ($i = 0; $i < $length; $i++) { + if (!isset($configData[ $parts[ $i ] ])) { + $configData[ $parts[ $i ] ] = ($i === $length) ? [] : null; + } + $configData = &$configData[ $parts[ $i ] ]; + } + + return $configData; + } + + /** + * Get value from config data throught keyValue path + * + * @param string $configPath + * @param mixed $defaultValue + * + * @return mixed + */ + public function getValue($configPath, $defaultValue = null) + { + $stored = $this->getValuePointer($configPath); + + return is_null($stored) ? $defaultValue : $stored; + } + + /** + * Check if exist required config for keyValue + * + * @param string $keyValue + * + * @return mixed + */ + public function existValue($keyValue) + { + return !is_null($this->getValue($keyValue)); + } + + /** + * Set value in config path + * + * @param string $configPath + * @param mixed $newValue + * + * @return ConfigManager + */ + public function setValue($configPath, $newValue) + { + $configData = &$this->getValuePointer($configPath); + $configData = $newValue; + + return $this; + } +} diff --git a/vendor/clagiordano/weblibs-configmanager/tests/ConfigManagerTest.php b/vendor/clagiordano/weblibs-configmanager/tests/ConfigManagerTest.php new file mode 100644 index 0000000..1d12963 --- /dev/null +++ b/vendor/clagiordano/weblibs-configmanager/tests/ConfigManagerTest.php @@ -0,0 +1,113 @@ +config = new ConfigManager("TestConfigData.php"); + $this->assertInstanceOf('clagiordano\weblibs\configmanager\ConfigManager', $this->config); + + $this->assertFileExists($this->configFile); + $this->config->loadConfig($this->configFile); + } + + public function testBasicUsage() + { + $this->assertNotNull( + $this->config->getValue('app') + ); + } + + public function testFastUsage() + { + $this->assertNotNull( + $this->config->getValue('app') + ); + } + + public function testFastInvalidKey() + { + $this->assertNull( + $this->config->getValue('invalidKey') + ); + } + + public function testFastInvalidKeyWithDefault() + { + $this->assertEquals( + $this->config->getValue('invalidKey', 'defaultValue'), + 'defaultValue' + ); + } + + public function testFastNestedConfig() + { + $this->assertNotNull( + $this->config->getValue('other.multi.deep.nested') + ); + } + + public function testCheckExistConfig() + { + $this->assertTrue( + $this->config->existValue('other.multi.deep.nested') + ); + } + + public function testCheckNotExistConfig() + { + $this->assertFalse( + $this->config->existValue('invalid.config.path') + ); + } + + public function testSetValue() + { + $this->config->setValue('other.multi.deep.nested', __FUNCTION__); + + $this->assertEquals( + $this->config->getValue('other.multi.deep.nested'), + __FUNCTION__ + ); + } + + public function testFailedSaveConfig() + { + $this->setExpectedException('Exception'); + $this->config->saveConfigFile('/invalid/path'); + } + + public function testSuccessSaveConfigOnTempAndReload() + { + $this->config->setValue('other.multi.deep.nested', "SUPERNESTED"); + $this->config->saveConfigFile("/tmp/testconfig.php", true); + + $this->assertEquals( + $this->config->getValue('other.multi.deep.nested'), + "SUPERNESTED" + ); + } + + public function testOverwriteSameConfigFile() + { + $this->config->saveConfigFile(); + } + + public function testFailWriteConfig() + { + $this->setExpectedException('\RuntimeException'); + $this->config->saveConfigFile('/invalid/path/test.php'); + } +} \ No newline at end of file diff --git a/vendor/clagiordano/weblibs-configmanager/testsdata/sample_config_data.php b/vendor/clagiordano/weblibs-configmanager/testsdata/sample_config_data.php new file mode 100644 index 0000000..4a99ef0 --- /dev/null +++ b/vendor/clagiordano/weblibs-configmanager/testsdata/sample_config_data.php @@ -0,0 +1,23 @@ + 'app_name', + 'db' => + array ( + 'host' => 'localhost', + 'user' => 'sample_user', + 'pass' => 'sample_pass', + 'port' => 3306, + ), + 'other' => + array ( + 'multi' => + array ( + 'deep' => + array ( + 'nested' => 'config_value', + ), + ), + ), +); + diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php new file mode 100644 index 0000000..fce8549 --- /dev/null +++ b/vendor/composer/ClassLoader.php @@ -0,0 +1,445 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', $this->prefixesPsr0); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE new file mode 100644 index 0000000..f27399a --- /dev/null +++ b/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php new file mode 100644 index 0000000..7a91153 --- /dev/null +++ b/vendor/composer/autoload_classmap.php @@ -0,0 +1,9 @@ + $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', + 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', + 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', + 'd767e4fc2dc52fe66584ab8c6684783e' => $vendorDir . '/adbario/php-dot-notation/src/helpers.php', + '65fec9ebcfbb3cbb4fd0d519687aea01' => $vendorDir . '/danielstjules/stringy/src/Create.php', + '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', + 'b067bc7112e384b61c701452d53a14a8' => $vendorDir . '/mtdowling/jmespath.php/src/JmesPath.php', + '66453932bc1be9fb2f910a27947d11b6' => $vendorDir . '/alibabacloud/client/src/Functions.php', +); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php new file mode 100644 index 0000000..b7fc012 --- /dev/null +++ b/vendor/composer/autoload_namespaces.php @@ -0,0 +1,9 @@ + array($vendorDir . '/clagiordano/weblibs-configmanager/src'), + 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), + 'Stringy\\' => array($vendorDir . '/danielstjules/stringy/src'), + 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'), + 'JmesPath\\' => array($vendorDir . '/mtdowling/jmespath.php/src'), + 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'), + 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'), + 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'), + 'AlibabaCloud\\Client\\' => array($vendorDir . '/alibabacloud/client/src'), + 'Adbar\\' => array($vendorDir . '/adbario/php-dot-notation/src'), +); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php new file mode 100644 index 0000000..f3b794f --- /dev/null +++ b/vendor/composer/autoload_real.php @@ -0,0 +1,70 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit68c21b61f2d8e084d93227f75183f43b::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->register(true); + + if ($useStaticLoader) { + $includeFiles = Composer\Autoload\ComposerStaticInit68c21b61f2d8e084d93227f75183f43b::$files; + } else { + $includeFiles = require __DIR__ . '/autoload_files.php'; + } + foreach ($includeFiles as $fileIdentifier => $file) { + composerRequire68c21b61f2d8e084d93227f75183f43b($fileIdentifier, $file); + } + + return $loader; + } +} + +function composerRequire68c21b61f2d8e084d93227f75183f43b($fileIdentifier, $file) +{ + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + require $file; + + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + } +} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php new file mode 100644 index 0000000..4e20b48 --- /dev/null +++ b/vendor/composer/autoload_static.php @@ -0,0 +1,103 @@ + __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', + 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', + 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', + 'd767e4fc2dc52fe66584ab8c6684783e' => __DIR__ . '/..' . '/adbario/php-dot-notation/src/helpers.php', + '65fec9ebcfbb3cbb4fd0d519687aea01' => __DIR__ . '/..' . '/danielstjules/stringy/src/Create.php', + '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', + 'b067bc7112e384b61c701452d53a14a8' => __DIR__ . '/..' . '/mtdowling/jmespath.php/src/JmesPath.php', + '66453932bc1be9fb2f910a27947d11b6' => __DIR__ . '/..' . '/alibabacloud/client/src/Functions.php', + ); + + public static $prefixLengthsPsr4 = array ( + 'c' => + array ( + 'clagiordano\\weblibs\\configmanager\\' => 34, + ), + 'S' => + array ( + 'Symfony\\Polyfill\\Mbstring\\' => 26, + 'Stringy\\' => 8, + ), + 'P' => + array ( + 'Psr\\Http\\Message\\' => 17, + ), + 'J' => + array ( + 'JmesPath\\' => 9, + ), + 'G' => + array ( + 'GuzzleHttp\\Psr7\\' => 16, + 'GuzzleHttp\\Promise\\' => 19, + 'GuzzleHttp\\' => 11, + ), + 'A' => + array ( + 'AlibabaCloud\\Client\\' => 20, + 'Adbar\\' => 6, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'clagiordano\\weblibs\\configmanager\\' => + array ( + 0 => __DIR__ . '/..' . '/clagiordano/weblibs-configmanager/src', + ), + 'Symfony\\Polyfill\\Mbstring\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', + ), + 'Stringy\\' => + array ( + 0 => __DIR__ . '/..' . '/danielstjules/stringy/src', + ), + 'Psr\\Http\\Message\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/http-message/src', + ), + 'JmesPath\\' => + array ( + 0 => __DIR__ . '/..' . '/mtdowling/jmespath.php/src', + ), + 'GuzzleHttp\\Psr7\\' => + array ( + 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src', + ), + 'GuzzleHttp\\Promise\\' => + array ( + 0 => __DIR__ . '/..' . '/guzzlehttp/promises/src', + ), + 'GuzzleHttp\\' => + array ( + 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src', + ), + 'AlibabaCloud\\Client\\' => + array ( + 0 => __DIR__ . '/..' . '/alibabacloud/client/src', + ), + 'Adbar\\' => + array ( + 0 => __DIR__ . '/..' . '/adbario/php-dot-notation/src', + ), + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit68c21b61f2d8e084d93227f75183f43b::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit68c21b61f2d8e084d93227f75183f43b::$prefixDirsPsr4; + + }, null, ClassLoader::class); + } +} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json new file mode 100644 index 0000000..ddfcb6e --- /dev/null +++ b/vendor/composer/installed.json @@ -0,0 +1,716 @@ +[ + { + "name": "adbario/php-dot-notation", + "version": "2.2.0", + "version_normalized": "2.2.0.0", + "source": { + "type": "git", + "url": "https://github.com/adbario/php-dot-notation.git", + "reference": "eee4fc81296531e6aafba4c2bbccfc5adab1676e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/adbario/php-dot-notation/zipball/eee4fc81296531e6aafba4c2bbccfc5adab1676e", + "reference": "eee4fc81296531e6aafba4c2bbccfc5adab1676e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.0|^5.0|^6.0", + "squizlabs/php_codesniffer": "^3.0" + }, + "time": "2019-01-01T23:59:15+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Adbar\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Riku Särkinen", + "email": "riku@adbar.io" + } + ], + "description": "PHP dot notation access to arrays", + "homepage": "https://github.com/adbario/php-dot-notation", + "keywords": [ + "ArrayAccess", + "dotnotation" + ] + }, + { + "name": "alibabacloud/client", + "version": "1.5.18", + "version_normalized": "1.5.18.0", + "source": { + "type": "git", + "url": "https://github.com/aliyun/openapi-sdk-php-client.git", + "reference": "5dcf7b8fdfa64abdae7a5ca867289baf95e8e12a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aliyun/openapi-sdk-php-client/zipball/5dcf7b8fdfa64abdae7a5ca867289baf95e8e12a", + "reference": "5dcf7b8fdfa64abdae7a5ca867289baf95e8e12a", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "adbario/php-dot-notation": "^2.2", + "clagiordano/weblibs-configmanager": "^1.0", + "danielstjules/stringy": "^3.1", + "ext-curl": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-simplexml": "*", + "ext-xmlwriter": "*", + "guzzlehttp/guzzle": "^6.3", + "mtdowling/jmespath.php": "^2.4", + "php": ">=5.5" + }, + "require-dev": { + "composer/composer": "^1.8", + "drupal/coder": "^8.3", + "ext-dom": "*", + "ext-pcre": "*", + "ext-sockets": "*", + "ext-spl": "*", + "league/climate": "^3.2.4", + "mikey179/vfsstream": "^1.6", + "monolog/monolog": "^1.24", + "phpunit/phpunit": "^4.8.35|^5.4.3", + "psr/cache": "^1.0", + "symfony/dotenv": "^3.4", + "symfony/var-dumper": "^3.4" + }, + "suggest": { + "ext-sockets": "To use client-side monitoring" + }, + "time": "2019-10-11T11:09:47+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "AlibabaCloud\\Client\\": "src" + }, + "files": [ + "src/Functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Alibaba Cloud SDK", + "email": "sdk-team@alibabacloud.com", + "homepage": "http://www.alibabacloud.com" + } + ], + "description": "Alibaba Cloud Client for PHP - Use Alibaba Cloud in your PHP project", + "homepage": "https://www.alibabacloud.com/", + "keywords": [ + "alibaba", + "alibabacloud", + "aliyun", + "client", + "cloud", + "library", + "sdk", + "tool" + ] + }, + { + "name": "clagiordano/weblibs-configmanager", + "version": "v1.0.7", + "version_normalized": "1.0.7.0", + "source": { + "type": "git", + "url": "https://github.com/clagiordano/weblibs-configmanager.git", + "reference": "6ef4c27354368deb2f54b39bbe06601da8c873a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clagiordano/weblibs-configmanager/zipball/6ef4c27354368deb2f54b39bbe06601da8c873a0", + "reference": "6ef4c27354368deb2f54b39bbe06601da8c873a0", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "clagiordano/phpunit-result-printer": "^1", + "phpunit/phpunit": "^4.8" + }, + "time": "2019-09-25T22:10:10+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "clagiordano\\weblibs\\configmanager\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Claudio Giordano", + "email": "claudio.giordano@autistici.org", + "role": "Developer" + } + ], + "description": "weblibs-configmanager is a tool library for easily read and access to php config array file and direct read/write configuration file / object", + "keywords": [ + "clagiordano", + "configuration", + "manager", + "tool", + "weblibs" + ] + }, + { + "name": "danielstjules/stringy", + "version": "3.1.0", + "version_normalized": "3.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/danielstjules/Stringy.git", + "reference": "df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/danielstjules/Stringy/zipball/df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e", + "reference": "df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.4.0", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "time": "2017-06-12T01:10:27+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Stringy\\": "src/" + }, + "files": [ + "src/Create.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel St. Jules", + "email": "danielst.jules@gmail.com", + "homepage": "http://www.danielstjules.com" + } + ], + "description": "A string manipulation library with multibyte support", + "homepage": "https://github.com/danielstjules/Stringy", + "keywords": [ + "UTF", + "helpers", + "manipulation", + "methods", + "multibyte", + "string", + "utf-8", + "utility", + "utils" + ] + }, + { + "name": "guzzlehttp/guzzle", + "version": "6.4.1", + "version_normalized": "6.4.1.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "0895c932405407fd3a7368b6910c09a24d26db11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0895c932405407fd3a7368b6910c09a24d26db11", + "reference": "0895c932405407fd3a7368b6910c09a24d26db11", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.6.1", + "php": ">=5.5" + }, + "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" + }, + "time": "2019-10-23T15:58:00+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "GuzzleHttp\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "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" + ] + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "version_normalized": "1.3.1.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "time": "2016-12-20T10:07:11+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ] + }, + { + "name": "guzzlehttp/psr7", + "version": "1.6.1", + "version_normalized": "1.6.1.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "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.8" + }, + "suggest": { + "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + }, + "time": "2019-07-01T23:21:34+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "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" + ] + }, + { + "name": "mtdowling/jmespath.php", + "version": "2.4.0", + "version_normalized": "2.4.0.0", + "source": { + "type": "git", + "url": "https://github.com/jmespath/jmespath.php.git", + "reference": "adcc9531682cf87dfda21e1fd5d0e7a41d292fac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/adcc9531682cf87dfda21e1fd5d0e7a41d292fac", + "reference": "adcc9531682cf87dfda21e1fd5d0e7a41d292fac", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "time": "2016-12-03T22:08:25+00:00", + "bin": [ + "bin/jp.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "JmesPath\\": "src/" + }, + "files": [ + "src/JmesPath.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Declaratively specify how to extract elements from a JSON document", + "keywords": [ + "json", + "jsonpath" + ] + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "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": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2016-08-06T14:39:51+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "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" + ] + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "version_normalized": "3.0.3.0", + "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": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "time": "2019-03-08T08:55:37+00:00", + "type": "library", + "installation-source": "dist", + "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." + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.13.1", + "version_normalized": "1.13.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f", + "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "time": "2019-11-27T14:18:11+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.13-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ] + } +] diff --git a/vendor/danielstjules/stringy/CHANGELOG.md b/vendor/danielstjules/stringy/CHANGELOG.md new file mode 100644 index 0000000..3f13575 --- /dev/null +++ b/vendor/danielstjules/stringy/CHANGELOG.md @@ -0,0 +1,180 @@ +### 3.1.0 (2017-06-11) +* Add $language support to slugify +* Add bg specific transliteration +* ЬЪ/ьъ handling is now language-specific + +### 3.0.1 (2017-04-12) +* Don't replace @ in toAscii +* Use normal replacement for @ in slugify, e.g. user@home => user-home + +### 3.0.0 (2017-03-08) + +* Breaking change: added $language parameter to toAscii, before + $removeUnsupported +* Breaking change: dropped PHP 5.3 support +* Breaking change: any StaticStringy methods that previously returned instances + of Stringy now return strings + +### 2.4.0 (2017-03-02) + +* Add startsWithAny +* Add endsWithAny +* Add stripWhitespace +* Fix error handling for unsupported encodings +* Change private methods to protected for extending class +* Fix safeTruncate for strings without spaces +* Additional char support in toAscii, e.g. full width chars and wide + non-breaking space + +### 2.3.2 (2016-05-02) + +* Improve support without mbstring + +### 2.3.1 (2016-03-21) + +* Always use root namespace for mbstring functions + +### 2.3.0 (2016-03-19) + +* Add Persian characters in Stringy::charsArray() +* Use symfony/polyfill-mbstring to avoid dependency on ext-mbstring + +### 2.2.0 (2015-12-20) + +* isJSON now returns false for empty strings +* Update for German umlaut transformation +* Use reflection to generate method list for StaticStringy +* Added isBase64 method +* Improved toAscii char coverage + +### 2.1.0 (2015-09-02) + +* Added simplified StaticStringy class +* str in Stringy::create and constructor is now optional + +### 2.0.0 (2015-07-29) + + * Removed StaticStringy class + * Added append, prepend, toBoolean, repeat, between, slice, split, and lines + * camelize/upperCamelize now strip leading dashes and underscores + * titleize converts to lowercase, thus no longer preserving acronyms + +### 1.10.0 (2015-07-22) + + * Added trimLeft, trimRight + * Added support for unicode whitespace to trim + * Added delimit + * Added indexOf and indexOfLast + * Added htmlEncode and htmlDecode + * Added "Ç" in toAscii() + +### 1.9.0 (2015-02-09) + + * Added hasUpperCase and hasLowerCase + * Added $removeUnsupported parameter to toAscii() + * Improved toAscii support with additional Unicode spaces, Vietnamese chars, + and numerous other characters + * Separated the charsArray from toAscii as a protected method that may be + extended by inheriting classes + * Chars array is cached for better performance + +### 1.8.1 (2015-01-08) + + * Optimized chars() + * Added "ä Ä Ö Ü"" in toAscii() + * Added support for Unicode spaces in toAscii() + * Replaced instances of self::create() with static::create() + * Added missing test cases for safeTruncate() and longestCommonSuffix() + * Updated Stringy\create() to avoid collision when it already exists + +### 1.8.0 (2015-01-03) + + * Listed ext-mbstring in composer.json + * Added Stringy\create function for PHP 5.6 + +### 1.7.0 (2014-10-14) + + * Added containsAll and containsAny + * Light cleanup + +### 1.6.0 (2014-09-14) + + * Added toTitleCase + +### 1.5.2 (2014-07-09) + + * Announced support for HHVM + +### 1.5.1 (2014-04-19) + + * Fixed toAscii() failing to remove remaining non-ascii characters + * Updated slugify() to treat dash and underscore as delimiters by default + * Updated slugify() to remove leading and trailing delimiter, if present + +### 1.5.0 (2014-03-19) + + * Made both str and encoding protected, giving property access to subclasses + * Added getEncoding() + * Fixed isJSON() giving false negatives + * Cleaned up and simplified: replace(), collapseWhitespace(), underscored(), + dasherize(), pad(), padLeft(), padRight() and padBoth() + * Fixed handling consecutive invalid chars in slugify() + * Removed conflicting hard sign transliteration in toAscii() + +### 1.4.0 (2014-02-12) + + * Implemented the IteratorAggregate interface, added chars() + * Renamed count() to countSubstr() + * Updated count() to implement Countable interface + * Implemented the ArrayAccess interface with positive and negative indices + * Switched from PSR-0 to PSR-4 autoloading + +### 1.3.0 (2013-12-16) + + * Additional Bulgarian support for toAscii + * str property made private + * Constructor casts first argument to string + * Constructor throws an InvalidArgumentException when given an array + * Constructor throws an InvalidArgumentException when given an object without + a __toString method + +### 1.2.2 (2013-12-04) + + * Updated create function to use late static binding + * Added optional $replacement param to slugify + +### 1.2.1 (2013-10-11) + + * Cleaned up tests + * Added homepage to composer.json + +### 1.2.0 (2013-09-15) + + * Fixed pad's use of InvalidArgumentException + * Fixed replace(). It now correctly treats regex special chars as normal chars + * Added additional Cyrillic letters to toAscii + * Added $caseSensitive to contains() and count() + * Added toLowerCase() + * Added toUpperCase() + * Added regexReplace() + +### 1.1.0 (2013-08-31) + + * Fix for collapseWhitespace() + * Added isHexadecimal() + * Added constructor to Stringy\Stringy + * Added isSerialized() + * Added isJson() + +### 1.0.0 (2013-08-1) + + * 1.0.0 release + * Added test coverage for Stringy::create and method chaining + * Added tests for returned type + * Fixed StaticStringy::replace(). It was returning a Stringy object instead of string + * Renamed standardize() to the more appropriate toAscii() + * Cleaned up comments and README + +### 1.0.0-rc.1 (2013-07-28) + + * Release candidate diff --git a/vendor/danielstjules/stringy/LICENSE.txt b/vendor/danielstjules/stringy/LICENSE.txt new file mode 100644 index 0000000..0b70302 --- /dev/null +++ b/vendor/danielstjules/stringy/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright (C) 2013 Daniel St. Jules + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/danielstjules/stringy/README.md b/vendor/danielstjules/stringy/README.md new file mode 100644 index 0000000..df48e39 --- /dev/null +++ b/vendor/danielstjules/stringy/README.md @@ -0,0 +1,1082 @@ +![Stringy](http://danielstjules.com/github/stringy-logo.png) + +A PHP string manipulation library with multibyte support. Compatible with PHP +5.4+, PHP 7+, and HHVM. + +``` php +s('string')->toTitleCase()->ensureRight('y') == 'Stringy' +``` + +Refer to the [1.x branch](https://github.com/danielstjules/Stringy/tree/1.x) or +[2.x branch](https://github.com/danielstjules/Stringy/tree/2.x) for older +documentation. + +[![Build Status](https://api.travis-ci.org/danielstjules/Stringy.svg?branch=master)](https://travis-ci.org/danielstjules/Stringy) +[![Total Downloads](https://poser.pugx.org/danielstjules/stringy/downloads)](https://packagist.org/packages/danielstjules/stringy) +[![License](https://poser.pugx.org/danielstjules/stringy/license)](https://packagist.org/packages/danielstjules/stringy) + +* [Why?](#why) +* [Installation](#installation) +* [OO and Chaining](#oo-and-chaining) +* [Implemented Interfaces](#implemented-interfaces) +* [PHP 5.6 Creation](#php-56-creation) +* [StaticStringy](#staticstringy) +* [Class methods](#class-methods) + * [create](#createmixed-str--encoding-) +* [Instance methods](#instance-methods) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
appendatbetweencamelize
charscollapseWhitespacecontainscontainsAll
containsAnycountSubstrdasherizedelimit
endsWithendsWithAnyensureLeftensureRight
firstgetEncodinghasLowerCasehasUpperCase
htmlDecodehtmlEncodehumanizeindexOf
indexOfLastinsertisAlphaisAlphanumeric
isBase64isBlankisHexadecimalisJson
isLowerCaseisSerializedisUpperCaselast
lengthlineslongestCommonPrefixlongestCommonSuffix
longestCommonSubstringlowerCaseFirstpadpadBoth
padLeftpadRightprependregexReplace
removeLeftremoveRightrepeatreplace
reversesafeTruncateshuffleslugify
slicesplitstartsWithstartsWithAny
stripWhitespacesubstrsurroundswapCase
tidytitleizetoAsciitoBoolean
toLowerCasetoSpacestoTabstoTitleCase
toUpperCasetrimtrimLefttrimRight
truncateunderscoredupperCamelizeupperCaseFirst
+ +* [Extensions](#extensions) +* [Tests](#tests) +* [License](#license) + +## Why? + +In part due to a lack of multibyte support (including UTF-8) across many of +PHP's standard string functions. But also to offer an OO wrapper around the +`mbstring` module's multibyte-compatible functions. Stringy handles some quirks, +provides additional functionality, and hopefully makes strings a little easier +to work with! + +```php +// Standard library +strtoupper('fòôbàř'); // 'FòôBàř' +strlen('fòôbàř'); // 10 + +// mbstring +mb_strtoupper('fòôbàř'); // 'FÒÔBÀŘ' +mb_strlen('fòôbàř'); // '6' + +// Stringy +s('fòôbàř')->toUpperCase(); // 'FÒÔBÀŘ' +s('fòôbàř')->length(); // '6' +``` + +## Installation + +If you're using Composer to manage dependencies, you can include the following +in your composer.json file: + +```json +"require": { + "danielstjules/stringy": "~3.1.0" +} +``` + +Then, after running `composer update` or `php composer.phar update`, you can +load the class using Composer's autoloading: + +```php +require 'vendor/autoload.php'; +``` + +Otherwise, you can simply require the file directly: + +```php +require_once 'path/to/Stringy/src/Stringy.php'; +``` + +And in either case, I'd suggest using an alias. + +```php +use Stringy\Stringy as S; +``` + +Please note that Stringy relies on the `mbstring` module for its underlying +multibyte support. If the module is not found, Stringy will use +[symfony/polyfill-mbstring](https://github.com/symfony/polyfill-mbstring). +ex-mbstring is a non-default, but very common module. For example, with debian +and ubuntu, it's included in libapache2-mod-php5, php5-cli, and php5-fpm. For +OSX users, it's a default for any version of PHP installed with homebrew. +If compiling PHP from scratch, it can be included with the +`--enable-mbstring` flag. + +## OO and Chaining + +The library offers OO method chaining, as seen below: + +```php +use Stringy\Stringy as S; +echo S::create('fòô bàř')->collapseWhitespace()->swapCase(); // 'FÒÔ BÀŘ' +``` + +`Stringy\Stringy` has a __toString() method, which returns the current string +when the object is used in a string context, ie: +`(string) S::create('foo') // 'foo'` + +## Implemented Interfaces + +`Stringy\Stringy` implements the `IteratorAggregate` interface, meaning that +`foreach` can be used with an instance of the class: + +``` php +$stringy = S::create('fòôbàř'); +foreach ($stringy as $char) { + echo $char; +} +// 'fòôbàř' +``` + +It implements the `Countable` interface, enabling the use of `count()` to +retrieve the number of characters in the string: + +``` php +$stringy = S::create('fòô'); +count($stringy); // 3 +``` + +Furthermore, the `ArrayAccess` interface has been implemented. As a result, +`isset()` can be used to check if a character at a specific index exists. And +since `Stringy\Stringy` is immutable, any call to `offsetSet` or `offsetUnset` +will throw an exception. `offsetGet` has been implemented, however, and accepts +both positive and negative indexes. Invalid indexes result in an +`OutOfBoundsException`. + +``` php +$stringy = S::create('bàř'); +echo $stringy[2]; // 'ř' +echo $stringy[-2]; // 'à' +isset($stringy[-4]); // false + +$stringy[3]; // OutOfBoundsException +$stringy[2] = 'a'; // Exception +``` + +## PHP 5.6 Creation + +As of PHP 5.6, [`use function`](https://wiki.php.net/rfc/use_function) is +available for importing functions. Stringy exposes a namespaced function, +`Stringy\create`, which emits the same behaviour as `Stringy\Stringy::create()`. +If running PHP 5.6, or another runtime that supports the `use function` syntax, +you can take advantage of an even simpler API as seen below: + +``` php +use function Stringy\create as s; + +// Instead of: S::create('fòô bàř') +s('fòô bàř')->collapseWhitespace()->swapCase(); +``` + +## StaticStringy + +All methods listed under "Instance methods" are available as part of a static +wrapper. For StaticStringy methods, the optional encoding is expected to be the +last argument. The return value is not cast, and may thus be of type Stringy, +integer, boolean, etc. + +```php +use Stringy\StaticStringy as S; + +// Translates to Stringy::create('fòôbàř')->slice(0, 3); +// Returns a Stringy object with the string "fòô" +S::slice('fòôbàř', 0, 3); +``` + +## Class methods + +##### create(mixed $str [, $encoding ]) + +Creates a Stringy object and assigns both str and encoding properties +the supplied values. $str is cast to a string prior to assignment, and if +$encoding is not specified, it defaults to mb_internal_encoding(). It +then returns the initialized object. Throws an InvalidArgumentException +if the first argument is an array or object without a __toString method. + +```php +$stringy = S::create('fòôbàř'); // 'fòôbàř' +``` + +## Instance Methods + +Stringy objects are immutable. All examples below make use of PHP 5.6 +function importing, and PHP 5.4 short array syntax. They also assume the +encoding returned by mb_internal_encoding() is UTF-8. For further details, +see the documentation for the create method above, as well as the notes +on PHP 5.6 creation. + +##### append(string $string) + +Returns a new string with $string appended. + +```php +s('fòô')->append('bàř'); // 'fòôbàř' +``` + +##### at(int $index) + +Returns the character at $index, with indexes starting at 0. + +```php +s('fòôbàř')->at(3); // 'b' +``` + +##### between(string $start, string $end [, int $offset]) + +Returns the substring between $start and $end, if found, or an empty +string. An optional offset may be supplied from which to begin the +search for the start string. + +```php +s('{foo} and {bar}')->between('{', '}'); // 'foo' +``` + +##### camelize() + +Returns a camelCase version of the string. Trims surrounding spaces, +capitalizes letters following digits, spaces, dashes and underscores, +and removes spaces, dashes, as well as underscores. + +```php +s('Camel-Case')->camelize(); // 'camelCase' +``` + +##### chars() + +Returns an array consisting of the characters in the string. + +```php +s('fòôbàř')->chars(); // ['f', 'ò', 'ô', 'b', 'à', 'ř'] +``` + +##### collapseWhitespace() + +Trims the string and replaces consecutive whitespace characters with a +single space. This includes tabs and newline characters, as well as +multibyte whitespace such as the thin space and ideographic space. + +```php +s(' Ο συγγραφέας ')->collapseWhitespace(); // 'Ο συγγραφέας' +``` + +##### contains(string $needle [, boolean $caseSensitive = true ]) + +Returns true if the string contains $needle, false otherwise. By default, +the comparison is case-sensitive, but can be made insensitive +by setting $caseSensitive to false. + +```php +s('Ο συγγραφέας είπε')->contains('συγγραφέας'); // true +``` + +##### containsAll(array $needles [, boolean $caseSensitive = true ]) + +Returns true if the string contains all $needles, false otherwise. By +default the comparison is case-sensitive, but can be made insensitive by +setting $caseSensitive to false. + +```php +s('foo & bar')->containsAll(['foo', 'bar']); // true +``` + +##### containsAny(array $needles [, boolean $caseSensitive = true ]) + +Returns true if the string contains any $needles, false otherwise. By +default the comparison is case-sensitive, but can be made insensitive by +setting $caseSensitive to false. + +```php +s('str contains foo')->containsAny(['foo', 'bar']); // true +``` + +##### countSubstr(string $substring [, boolean $caseSensitive = true ]) + +Returns the number of occurrences of $substring in the given string. +By default, the comparison is case-sensitive, but can be made insensitive +by setting $caseSensitive to false. + +```php +s('Ο συγγραφέας είπε')->countSubstr('α'); // 2 +``` + +##### dasherize() + +Returns a lowercase and trimmed string separated by dashes. Dashes are +inserted before uppercase characters (with the exception of the first +character of the string), and in place of spaces as well as underscores. + +```php +s('fooBar')->dasherize(); // 'foo-bar' +``` + +##### delimit(int $delimiter) + +Returns a lowercase and trimmed string separated by the given delimiter. +Delimiters are inserted before uppercase characters (with the exception +of the first character of the string), and in place of spaces, dashes, +and underscores. Alpha delimiters are not converted to lowercase. + +```php +s('fooBar')->delimit('::'); // 'foo::bar' +``` + +##### endsWith(string $substring [, boolean $caseSensitive = true ]) + +Returns true if the string ends with $substring, false otherwise. By +default, the comparison is case-sensitive, but can be made insensitive by +setting $caseSensitive to false. + +```php +s('fòôbàř')->endsWith('bàř'); // true +``` + +##### endsWithAny(string[] $substrings [, boolean $caseSensitive = true ]) + +Returns true if the string ends with any of $substrings, false otherwise. +By default, the comparison is case-sensitive, but can be made insensitive +by setting $caseSensitive to false. + +```php +s('fòôbàř')->endsWithAny(['bàř', 'baz']); // true +``` + +##### ensureLeft(string $substring) + +Ensures that the string begins with $substring. If it doesn't, it's prepended. + +```php +s('foobar')->ensureLeft('http://'); // 'http://foobar' +``` + +##### ensureRight(string $substring) + +Ensures that the string ends with $substring. If it doesn't, it's appended. + +```php +s('foobar')->ensureRight('.com'); // 'foobar.com' +``` + +##### first(int $n) + +Returns the first $n characters of the string. + +```php +s('fòôbàř')->first(3); // 'fòô' +``` + +##### getEncoding() + +Returns the encoding used by the Stringy object. + +```php +s('fòôbàř')->getEncoding(); // 'UTF-8' +``` + +##### hasLowerCase() + +Returns true if the string contains a lower case char, false otherwise. + +```php +s('fòôbàř')->hasLowerCase(); // true +``` + +##### hasUpperCase() + +Returns true if the string contains an upper case char, false otherwise. + +```php +s('fòôbàř')->hasUpperCase(); // false +``` + +##### htmlDecode() + +Convert all HTML entities to their applicable characters. An alias of +html_entity_decode. For a list of flags, refer to +http://php.net/manual/en/function.html-entity-decode.php + +```php +s('&')->htmlDecode(); // '&' +``` + +##### htmlEncode() + +Convert all applicable characters to HTML entities. An alias of +htmlentities. Refer to http://php.net/manual/en/function.htmlentities.php +for a list of flags. + +```php +s('&')->htmlEncode(); // '&' +``` + +##### humanize() + +Capitalizes the first word of the string, replaces underscores with +spaces, and strips '_id'. + +```php +s('author_id')->humanize(); // 'Author' +``` + +##### indexOf(string $needle [, $offset = 0 ]); + +Returns the index of the first occurrence of $needle in the string, +and false if not found. Accepts an optional offset from which to begin +the search. A negative index searches from the end + +```php +s('string')->indexOf('ing'); // 3 +``` + +##### indexOfLast(string $needle [, $offset = 0 ]); + +Returns the index of the last occurrence of $needle in the string, +and false if not found. Accepts an optional offset from which to begin +the search. Offsets may be negative to count from the last character +in the string. + +```php +s('foobarfoo')->indexOfLast('foo'); // 10 +``` + +##### insert(int $index, string $substring) + +Inserts $substring into the string at the $index provided. + +```php +s('fòôbř')->insert('à', 4); // 'fòôbàř' +``` + +##### isAlpha() + +Returns true if the string contains only alphabetic chars, false otherwise. + +```php +s('丹尼爾')->isAlpha(); // true +``` + +##### isAlphanumeric() + +Returns true if the string contains only alphabetic and numeric chars, false +otherwise. + +```php +s('دانيال1')->isAlphanumeric(); // true +``` + +##### isBase64() + +Returns true if the string is base64 encoded, false otherwise. + +```php +s('Zm9vYmFy')->isBase64(); // true +``` + +##### isBlank() + +Returns true if the string contains only whitespace chars, false otherwise. + +```php +s("\n\t \v\f")->isBlank(); // true +``` + +##### isHexadecimal() + +Returns true if the string contains only hexadecimal chars, false otherwise. + +```php +s('A102F')->isHexadecimal(); // true +``` + +##### isJson() + +Returns true if the string is JSON, false otherwise. Unlike json_decode +in PHP 5.x, this method is consistent with PHP 7 and other JSON parsers, +in that an empty string is not considered valid JSON. + +```php +s('{"foo":"bar"}')->isJson(); // true +``` + +##### isLowerCase() + +Returns true if the string contains only lower case chars, false otherwise. + +```php +s('fòôbàř')->isLowerCase(); // true +``` + +##### isSerialized() + +Returns true if the string is serialized, false otherwise. + +```php +s('a:1:{s:3:"foo";s:3:"bar";}')->isSerialized(); // true +``` + +##### isUpperCase() + +Returns true if the string contains only upper case chars, false otherwise. + +```php +s('FÒÔBÀŘ')->isUpperCase(); // true +``` + +##### last(int $n) + +Returns the last $n characters of the string. + +```php +s('fòôbàř')->last(3); // 'bàř' +``` + +##### length() + +Returns the length of the string. An alias for PHP's mb_strlen() function. + +```php +s('fòôbàř')->length(); // 6 +``` + +##### lines() + +Splits on newlines and carriage returns, returning an array of Stringy +objects corresponding to the lines in the string. + +```php +s("fòô\r\nbàř\n")->lines(); // ['fòô', 'bàř', ''] +``` + +##### longestCommonPrefix(string $otherStr) + +Returns the longest common prefix between the string and $otherStr. + +```php +s('foobar')->longestCommonPrefix('foobaz'); // 'fooba' +``` + +##### longestCommonSuffix(string $otherStr) + +Returns the longest common suffix between the string and $otherStr. + +```php +s('fòôbàř')->longestCommonSuffix('fòrbàř'); // 'bàř' +``` + +##### longestCommonSubstring(string $otherStr) + +Returns the longest common substring between the string and $otherStr. In the +case of ties, it returns that which occurs first. + +```php +s('foobar')->longestCommonSubstring('boofar'); // 'oo' +``` + +##### lowerCaseFirst() + +Converts the first character of the supplied string to lower case. + +```php +s('Σ foo')->lowerCaseFirst(); // 'σ foo' +``` + +##### pad(int $length [, string $padStr = ' ' [, string $padType = 'right' ]]) + +Pads the string to a given length with $padStr. If length is less than +or equal to the length of the string, no padding takes places. The default +string used for padding is a space, and the default type (one of 'left', +'right', 'both') is 'right'. Throws an InvalidArgumentException if +$padType isn't one of those 3 values. + +```php +s('fòôbàř')->pad(9, '-/', 'left'); // '-/-fòôbàř' +``` + +##### padBoth(int $length [, string $padStr = ' ' ]) + +Returns a new string of a given length such that both sides of the string +string are padded. Alias for pad() with a $padType of 'both'. + +```php +s('foo bar')->padBoth(9, ' '); // ' foo bar ' +``` + +##### padLeft(int $length [, string $padStr = ' ' ]) + +Returns a new string of a given length such that the beginning of the +string is padded. Alias for pad() with a $padType of 'left'. + +```php +s('foo bar')->padLeft(9, ' '); // ' foo bar' +``` + +##### padRight(int $length [, string $padStr = ' ' ]) + +Returns a new string of a given length such that the end of the string is +padded. Alias for pad() with a $padType of 'right'. + +```php +s('foo bar')->padRight(10, '_*'); // 'foo bar_*_' +``` + +##### prepend(string $string) + +Returns a new string starting with $string. + +```php +s('bàř')->prepend('fòô'); // 'fòôbàř' +``` + +##### regexReplace(string $pattern, string $replacement [, string $options = 'msr']) + +Replaces all occurrences of $pattern in $str by $replacement. An alias +for mb_ereg_replace(). Note that the 'i' option with multibyte patterns +in mb_ereg_replace() requires PHP 5.6+ for correct results. This is due +to a lack of support in the bundled version of Oniguruma in PHP < 5.6, +and current versions of HHVM (3.8 and below). + +```php +s('fòô ')->regexReplace('f[òô]+\s', 'bàř'); // 'bàř' +s('fò')->regexReplace('(ò)', '\\1ô'); // 'fòô' +``` + +##### removeLeft(string $substring) + +Returns a new string with the prefix $substring removed, if present. + +```php +s('fòôbàř')->removeLeft('fòô'); // 'bàř' +``` + +##### removeRight(string $substring) + +Returns a new string with the suffix $substring removed, if present. + +```php +s('fòôbàř')->removeRight('bàř'); // 'fòô' +``` + +##### repeat(int $multiplier) + +Returns a repeated string given a multiplier. An alias for str_repeat. + +```php +s('α')->repeat(3); // 'ααα' +``` + +##### replace(string $search, string $replacement) + +Replaces all occurrences of $search in $str by $replacement. + +```php +s('fòô bàř fòô bàř')->replace('fòô ', ''); // 'bàř bàř' +``` + +##### reverse() + +Returns a reversed string. A multibyte version of strrev(). + +```php +s('fòôbàř')->reverse(); // 'řàbôòf' +``` + +##### safeTruncate(int $length [, string $substring = '' ]) + +Truncates the string to a given length, while ensuring that it does not +split words. If $substring is provided, and truncating occurs, the +string is further truncated so that the substring may be appended without +exceeding the desired length. + +```php +s('What are your plans today?')->safeTruncate(22, '...'); +// 'What are your plans...' +``` + +##### shuffle() + +A multibyte str_shuffle() function. It returns a string with its characters in +random order. + +```php +s('fòôbàř')->shuffle(); // 'àôřbòf' +``` + +##### slugify([, string $replacement = '-' [, string $language = 'en']]) + +Converts the string into an URL slug. This includes replacing non-ASCII +characters with their closest ASCII equivalents, removing remaining +non-ASCII and non-alphanumeric characters, and replacing whitespace with +$replacement. The replacement defaults to a single dash, and the string +is also converted to lowercase. The language of the source string can +also be supplied for language-specific transliteration. + +```php +s('Using strings like fòô bàř')->slugify(); // 'using-strings-like-foo-bar' +``` + +##### slice(int $start [, int $end ]) + +Returns the substring beginning at $start, and up to, but not including +the index specified by $end. If $end is omitted, the function extracts +the remaining string. If $end is negative, it is computed from the end +of the string. + +```php +s('fòôbàř')->slice(3, -1); // 'bà' +``` + +##### split(string $pattern [, int $limit ]) + +Splits the string with the provided regular expression, returning an +array of Stringy objects. An optional integer $limit will truncate the +results. + +```php +s('foo,bar,baz')->split(',', 2); // ['foo', 'bar'] +``` + +##### startsWith(string $substring [, boolean $caseSensitive = true ]) + +Returns true if the string begins with $substring, false otherwise. +By default, the comparison is case-sensitive, but can be made insensitive +by setting $caseSensitive to false. + +```php +s('FÒÔbàřbaz')->startsWith('fòôbàř', false); // true +``` + +##### startsWithAny(string[] $substrings [, boolean $caseSensitive = true ]) + +Returns true if the string begins with any of $substrings, false +otherwise. By default the comparison is case-sensitive, but can be made +insensitive by setting $caseSensitive to false. + +```php +s('FÒÔbàřbaz')->startsWithAny(['fòô', 'bàř'], false); // true +``` + +##### stripWhitespace() + +Strip all whitespace characters. This includes tabs and newline +characters, as well as multibyte whitespace such as the thin space +and ideographic space. + +```php +s(' Ο συγγραφέας ')->stripWhitespace(); // 'Οσυγγραφέας' +``` + +##### substr(int $start [, int $length ]) + +Returns the substring beginning at $start with the specified $length. +It differs from the mb_substr() function in that providing a $length of +null will return the rest of the string, rather than an empty string. + +```php +s('fòôbàř')->substr(2, 3); // 'ôbà' +``` + +##### surround(string $substring) + +Surrounds a string with the given substring. + +```php +s(' ͜ ')->surround('ʘ'); // 'ʘ ͜ ʘ' +``` + +##### swapCase() + +Returns a case swapped version of the string. + +```php +s('Ντανιλ')->swapCase(); // 'νΤΑΝΙΛ' +``` + +##### tidy() + +Returns a string with smart quotes, ellipsis characters, and dashes from +Windows-1252 (commonly used in Word documents) replaced by their ASCII equivalents. + +```php +s('“I see…”')->tidy(); // '"I see..."' +``` + +##### titleize([, array $ignore]) + +Returns a trimmed string with the first letter of each word capitalized. +Also accepts an array, $ignore, allowing you to list words not to be +capitalized. + +```php +$ignore = ['at', 'by', 'for', 'in', 'of', 'on', 'out', 'to', 'the']; +s('i like to watch television')->titleize($ignore); +// 'I Like to Watch Television' +``` + +##### toAscii([, string $language = 'en' [, bool $removeUnsupported = true ]]) + +Returns an ASCII version of the string. A set of non-ASCII characters are +replaced with their closest ASCII counterparts, and the rest are removed +by default. The language or locale of the source string can be supplied +for language-specific transliteration in any of the following formats: +en, en_GB, or en-GB. For example, passing "de" results in "äöü" mapping +to "aeoeue" rather than "aou" as in other languages. + +```php +s('fòôbàř')->toAscii(); // 'foobar' +s('äöü')->toAscii(); // 'aou' +s('äöü')->toAscii('de'); // 'aeoeue' +``` + +##### toBoolean() + +Returns a boolean representation of the given logical string value. +For example, 'true', '1', 'on' and 'yes' will return true. 'false', '0', +'off', and 'no' will return false. In all instances, case is ignored. +For other numeric strings, their sign will determine the return value. +In addition, blank strings consisting of only whitespace will return +false. For all other strings, the return value is a result of a +boolean cast. + +```php +s('OFF')->toBoolean(); // false +``` + +##### toLowerCase() + +Converts all characters in the string to lowercase. An alias for PHP's +mb_strtolower(). + +```php +s('FÒÔBÀŘ')->toLowerCase(); // 'fòôbàř' +``` + +##### toSpaces([, tabLength = 4 ]) + +Converts each tab in the string to some number of spaces, as defined by +$tabLength. By default, each tab is converted to 4 consecutive spaces. + +```php +s(' String speech = "Hi"')->toSpaces(); // ' String speech = "Hi"' +``` + +##### toTabs([, tabLength = 4 ]) + +Converts each occurrence of some consecutive number of spaces, as defined +by $tabLength, to a tab. By default, each 4 consecutive spaces are +converted to a tab. + +```php +s(' fòô bàř')->toTabs(); +// ' fòô bàř' +``` + +##### toTitleCase() + +Converts the first character of each word in the string to uppercase. + +```php +s('fòô bàř')->toTitleCase(); // 'Fòô Bàř' +``` + +##### toUpperCase() + +Converts all characters in the string to uppercase. An alias for PHP's +mb_strtoupper(). + +```php +s('fòôbàř')->toUpperCase(); // 'FÒÔBÀŘ' +``` + +##### trim([, string $chars]) + +Returns a string with whitespace removed from the start and end of the +string. Supports the removal of unicode whitespace. Accepts an optional +string of characters to strip instead of the defaults. + +```php +s(' fòôbàř ')->trim(); // 'fòôbàř' +``` + +##### trimLeft([, string $chars]) + +Returns a string with whitespace removed from the start of the string. +Supports the removal of unicode whitespace. Accepts an optional +string of characters to strip instead of the defaults. + +```php +s(' fòôbàř ')->trimLeft(); // 'fòôbàř ' +``` + +##### trimRight([, string $chars]) + +Returns a string with whitespace removed from the end of the string. +Supports the removal of unicode whitespace. Accepts an optional +string of characters to strip instead of the defaults. + +```php +s(' fòôbàř ')->trimRight(); // ' fòôbàř' +``` + +##### truncate(int $length [, string $substring = '' ]) + +Truncates the string to a given length. If $substring is provided, and +truncating occurs, the string is further truncated so that the substring +may be appended without exceeding the desired length. + +```php +s('What are your plans today?')->truncate(19, '...'); // 'What are your pl...' +``` + +##### underscored() + +Returns a lowercase and trimmed string separated by underscores. +Underscores are inserted before uppercase characters (with the exception +of the first character of the string), and in place of spaces as well as dashes. + +```php +s('TestUCase')->underscored(); // 'test_u_case' +``` + +##### upperCamelize() + +Returns an UpperCamelCase version of the supplied string. It trims +surrounding spaces, capitalizes letters following digits, spaces, dashes +and underscores, and removes spaces, dashes, underscores. + +```php +s('Upper Camel-Case')->upperCamelize(); // 'UpperCamelCase' +``` + +##### upperCaseFirst() + +Converts the first character of the supplied string to upper case. + +```php +s('σ foo')->upperCaseFirst(); // 'Σ foo' +``` + +## Extensions + +The following is a list of libraries that extend Stringy: + + * [SliceableStringy](https://github.com/danielstjules/SliceableStringy): +Python-like string slices in PHP + * [SubStringy](https://github.com/TCB13/SubStringy): +Advanced substring methods + +## Tests + +From the project directory, tests can be ran using `phpunit` + +## License + +Released under the MIT License - see `LICENSE.txt` for details. diff --git a/vendor/danielstjules/stringy/composer.json b/vendor/danielstjules/stringy/composer.json new file mode 100644 index 0000000..092989f --- /dev/null +++ b/vendor/danielstjules/stringy/composer.json @@ -0,0 +1,35 @@ +{ + "name": "danielstjules/stringy", + "description": "A string manipulation library with multibyte support", + "keywords": [ + "multibyte", "string", "manipulation", "utility", "methods", "utf-8", + "helpers", "utils", "utf" + ], + "homepage": "https://github.com/danielstjules/Stringy", + "license": "MIT", + "authors": [ + { + "name": "Daniel St. Jules", + "email": "danielst.jules@gmail.com", + "homepage": "http://www.danielstjules.com" + } + ], + "require": { + "php": ">=5.4.0", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "support": { + "issues": "https://github.com/danielstjules/Stringy/issues", + "source": "https://github.com/danielstjules/Stringy" + }, + "autoload": { + "psr-4": { "Stringy\\": "src/" }, + "files": ["src/Create.php"] + }, + "autoload-dev": { + "classmap": [ "tests" ] + } +} diff --git a/vendor/danielstjules/stringy/src/Create.php b/vendor/danielstjules/stringy/src/Create.php new file mode 100644 index 0000000..c6a2f44 --- /dev/null +++ b/vendor/danielstjules/stringy/src/Create.php @@ -0,0 +1,19 @@ +slice(0, 3); + * The result is not cast, so the return value may be of type Stringy, + * integer, boolean, etc. + * + * @param string $name + * @param mixed[] $arguments + * + * @return Stringy + * + * @throws \BadMethodCallException + */ + public static function __callStatic($name, $arguments) + { + if (!static::$methodArgs) { + $stringyClass = new ReflectionClass('Stringy\Stringy'); + $methods = $stringyClass->getMethods(ReflectionMethod::IS_PUBLIC); + + foreach ($methods as $method) { + $params = $method->getNumberOfParameters() + 2; + static::$methodArgs[$method->name] = $params; + } + } + + if (!isset(static::$methodArgs[$name])) { + throw new BadMethodCallException($name . ' is not a valid method'); + } + + $numArgs = count($arguments); + $str = ($numArgs) ? $arguments[0] : ''; + + if ($numArgs === static::$methodArgs[$name]) { + $args = array_slice($arguments, 1, -1); + $encoding = $arguments[$numArgs - 1]; + } else { + $args = array_slice($arguments, 1); + $encoding = null; + } + + $stringy = Stringy::create($str, $encoding); + + $result = call_user_func_array([$stringy, $name], $args); + + $cast = function($val) { + if (is_object($val) && $val instanceof Stringy) { + return (string) $val; + } else { + return $val; + } + }; + + return is_array($result) ? array_map($cast, $result) : $cast($result); + } +} diff --git a/vendor/danielstjules/stringy/src/Stringy.php b/vendor/danielstjules/stringy/src/Stringy.php new file mode 100644 index 0000000..ccb6f5a --- /dev/null +++ b/vendor/danielstjules/stringy/src/Stringy.php @@ -0,0 +1,1986 @@ +str = (string) $str; + $this->encoding = $encoding ?: \mb_internal_encoding(); + } + + /** + * Creates a Stringy object and assigns both str and encoding properties + * the supplied values. $str is cast to a string prior to assignment, and if + * $encoding is not specified, it defaults to mb_internal_encoding(). It + * then returns the initialized object. Throws an InvalidArgumentException + * if the first argument is an array or object without a __toString method. + * + * @param mixed $str Value to modify, after being cast to string + * @param string $encoding The character encoding + * @return static A Stringy object + * @throws \InvalidArgumentException if an array or object without a + * __toString method is passed as the first argument + */ + public static function create($str = '', $encoding = null) + { + return new static($str, $encoding); + } + + /** + * Returns the value in $str. + * + * @return string The current value of the $str property + */ + public function __toString() + { + return $this->str; + } + + /** + * Returns a new string with $string appended. + * + * @param string $string The string to append + * @return static Object with appended $string + */ + public function append($string) + { + return static::create($this->str . $string, $this->encoding); + } + + /** + * Returns the character at $index, with indexes starting at 0. + * + * @param int $index Position of the character + * @return static The character at $index + */ + public function at($index) + { + return $this->substr($index, 1); + } + + /** + * Returns the substring between $start and $end, if found, or an empty + * string. An optional offset may be supplied from which to begin the + * search for the start string. + * + * @param string $start Delimiter marking the start of the substring + * @param string $end Delimiter marking the end of the substring + * @param int $offset Index from which to begin the search + * @return static Object whose $str is a substring between $start and $end + */ + public function between($start, $end, $offset = 0) + { + $startIndex = $this->indexOf($start, $offset); + if ($startIndex === false) { + return static::create('', $this->encoding); + } + + $substrIndex = $startIndex + \mb_strlen($start, $this->encoding); + $endIndex = $this->indexOf($end, $substrIndex); + if ($endIndex === false) { + return static::create('', $this->encoding); + } + + return $this->substr($substrIndex, $endIndex - $substrIndex); + } + + /** + * Returns a camelCase version of the string. Trims surrounding spaces, + * capitalizes letters following digits, spaces, dashes and underscores, + * and removes spaces, dashes, as well as underscores. + * + * @return static Object with $str in camelCase + */ + public function camelize() + { + $encoding = $this->encoding; + $stringy = $this->trim()->lowerCaseFirst(); + $stringy->str = preg_replace('/^[-_]+/', '', $stringy->str); + + $stringy->str = preg_replace_callback( + '/[-_\s]+(.)?/u', + function ($match) use ($encoding) { + if (isset($match[1])) { + return \mb_strtoupper($match[1], $encoding); + } + + return ''; + }, + $stringy->str + ); + + $stringy->str = preg_replace_callback( + '/[\d]+(.)?/u', + function ($match) use ($encoding) { + return \mb_strtoupper($match[0], $encoding); + }, + $stringy->str + ); + + return $stringy; + } + + /** + * Returns an array consisting of the characters in the string. + * + * @return array An array of string chars + */ + public function chars() + { + $chars = []; + for ($i = 0, $l = $this->length(); $i < $l; $i++) { + $chars[] = $this->at($i)->str; + } + + return $chars; + } + + /** + * Trims the string and replaces consecutive whitespace characters with a + * single space. This includes tabs and newline characters, as well as + * multibyte whitespace such as the thin space and ideographic space. + * + * @return static Object with a trimmed $str and condensed whitespace + */ + public function collapseWhitespace() + { + return $this->regexReplace('[[:space:]]+', ' ')->trim(); + } + + /** + * Returns true if the string contains $needle, false otherwise. By default + * the comparison is case-sensitive, but can be made insensitive by setting + * $caseSensitive to false. + * + * @param string $needle Substring to look for + * @param bool $caseSensitive Whether or not to enforce case-sensitivity + * @return bool Whether or not $str contains $needle + */ + public function contains($needle, $caseSensitive = true) + { + $encoding = $this->encoding; + + if ($caseSensitive) { + return (\mb_strpos($this->str, $needle, 0, $encoding) !== false); + } + + return (\mb_stripos($this->str, $needle, 0, $encoding) !== false); + } + + /** + * Returns true if the string contains all $needles, false otherwise. By + * default the comparison is case-sensitive, but can be made insensitive by + * setting $caseSensitive to false. + * + * @param string[] $needles Substrings to look for + * @param bool $caseSensitive Whether or not to enforce case-sensitivity + * @return bool Whether or not $str contains $needle + */ + public function containsAll($needles, $caseSensitive = true) + { + if (empty($needles)) { + return false; + } + + foreach ($needles as $needle) { + if (!$this->contains($needle, $caseSensitive)) { + return false; + } + } + + return true; + } + + /** + * Returns true if the string contains any $needles, false otherwise. By + * default the comparison is case-sensitive, but can be made insensitive by + * setting $caseSensitive to false. + * + * @param string[] $needles Substrings to look for + * @param bool $caseSensitive Whether or not to enforce case-sensitivity + * @return bool Whether or not $str contains $needle + */ + public function containsAny($needles, $caseSensitive = true) + { + if (empty($needles)) { + return false; + } + + foreach ($needles as $needle) { + if ($this->contains($needle, $caseSensitive)) { + return true; + } + } + + return false; + } + + /** + * Returns the length of the string, implementing the countable interface. + * + * @return int The number of characters in the string, given the encoding + */ + public function count() + { + return $this->length(); + } + + /** + * Returns the number of occurrences of $substring in the given string. + * By default, the comparison is case-sensitive, but can be made insensitive + * by setting $caseSensitive to false. + * + * @param string $substring The substring to search for + * @param bool $caseSensitive Whether or not to enforce case-sensitivity + * @return int The number of $substring occurrences + */ + public function countSubstr($substring, $caseSensitive = true) + { + if ($caseSensitive) { + return \mb_substr_count($this->str, $substring, $this->encoding); + } + + $str = \mb_strtoupper($this->str, $this->encoding); + $substring = \mb_strtoupper($substring, $this->encoding); + + return \mb_substr_count($str, $substring, $this->encoding); + } + + /** + * Returns a lowercase and trimmed string separated by dashes. Dashes are + * inserted before uppercase characters (with the exception of the first + * character of the string), and in place of spaces as well as underscores. + * + * @return static Object with a dasherized $str + */ + public function dasherize() + { + return $this->delimit('-'); + } + + /** + * Returns a lowercase and trimmed string separated by the given delimiter. + * Delimiters are inserted before uppercase characters (with the exception + * of the first character of the string), and in place of spaces, dashes, + * and underscores. Alpha delimiters are not converted to lowercase. + * + * @param string $delimiter Sequence used to separate parts of the string + * @return static Object with a delimited $str + */ + public function delimit($delimiter) + { + $regexEncoding = $this->regexEncoding(); + $this->regexEncoding($this->encoding); + + $str = $this->eregReplace('\B([A-Z])', '-\1', $this->trim()); + $str = \mb_strtolower($str, $this->encoding); + $str = $this->eregReplace('[-_\s]+', $delimiter, $str); + + $this->regexEncoding($regexEncoding); + + return static::create($str, $this->encoding); + } + + /** + * Returns true if the string ends with $substring, false otherwise. By + * default, the comparison is case-sensitive, but can be made insensitive + * by setting $caseSensitive to false. + * + * @param string $substring The substring to look for + * @param bool $caseSensitive Whether or not to enforce case-sensitivity + * @return bool Whether or not $str ends with $substring + */ + public function endsWith($substring, $caseSensitive = true) + { + $substringLength = \mb_strlen($substring, $this->encoding); + $strLength = $this->length(); + + $endOfStr = \mb_substr($this->str, $strLength - $substringLength, + $substringLength, $this->encoding); + + if (!$caseSensitive) { + $substring = \mb_strtolower($substring, $this->encoding); + $endOfStr = \mb_strtolower($endOfStr, $this->encoding); + } + + return (string) $substring === $endOfStr; + } + + /** + * Returns true if the string ends with any of $substrings, false otherwise. + * By default, the comparison is case-sensitive, but can be made insensitive + * by setting $caseSensitive to false. + * + * @param string[] $substrings Substrings to look for + * @param bool $caseSensitive Whether or not to enforce + * case-sensitivity + * @return bool Whether or not $str ends with $substring + */ + public function endsWithAny($substrings, $caseSensitive = true) + { + if (empty($substrings)) { + return false; + } + + foreach ($substrings as $substring) { + if ($this->endsWith($substring, $caseSensitive)) { + return true; + } + } + + return false; + } + + /** + * Ensures that the string begins with $substring. If it doesn't, it's + * prepended. + * + * @param string $substring The substring to add if not present + * @return static Object with its $str prefixed by the $substring + */ + public function ensureLeft($substring) + { + $stringy = static::create($this->str, $this->encoding); + + if (!$stringy->startsWith($substring)) { + $stringy->str = $substring . $stringy->str; + } + + return $stringy; + } + + /** + * Ensures that the string ends with $substring. If it doesn't, it's + * appended. + * + * @param string $substring The substring to add if not present + * @return static Object with its $str suffixed by the $substring + */ + public function ensureRight($substring) + { + $stringy = static::create($this->str, $this->encoding); + + if (!$stringy->endsWith($substring)) { + $stringy->str .= $substring; + } + + return $stringy; + } + + /** + * Returns the first $n characters of the string. + * + * @param int $n Number of characters to retrieve from the start + * @return static Object with its $str being the first $n chars + */ + public function first($n) + { + $stringy = static::create($this->str, $this->encoding); + + if ($n < 0) { + $stringy->str = ''; + return $stringy; + } + + return $stringy->substr(0, $n); + } + + /** + * Returns the encoding used by the Stringy object. + * + * @return string The current value of the $encoding property + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * Returns a new ArrayIterator, thus implementing the IteratorAggregate + * interface. The ArrayIterator's constructor is passed an array of chars + * in the multibyte string. This enables the use of foreach with instances + * of Stringy\Stringy. + * + * @return \ArrayIterator An iterator for the characters in the string + */ + public function getIterator() + { + return new ArrayIterator($this->chars()); + } + + /** + * Returns true if the string contains a lower case char, false + * otherwise. + * + * @return bool Whether or not the string contains a lower case character. + */ + public function hasLowerCase() + { + return $this->matchesPattern('.*[[:lower:]]'); + } + + /** + * Returns true if the string contains an upper case char, false + * otherwise. + * + * @return bool Whether or not the string contains an upper case character. + */ + public function hasUpperCase() + { + return $this->matchesPattern('.*[[:upper:]]'); + } + + + /** + * Convert all HTML entities to their applicable characters. An alias of + * html_entity_decode. For a list of flags, refer to + * http://php.net/manual/en/function.html-entity-decode.php + * + * @param int|null $flags Optional flags + * @return static Object with the resulting $str after being html decoded. + */ + public function htmlDecode($flags = ENT_COMPAT) + { + $str = html_entity_decode($this->str, $flags, $this->encoding); + + return static::create($str, $this->encoding); + } + + /** + * Convert all applicable characters to HTML entities. An alias of + * htmlentities. Refer to http://php.net/manual/en/function.htmlentities.php + * for a list of flags. + * + * @param int|null $flags Optional flags + * @return static Object with the resulting $str after being html encoded. + */ + public function htmlEncode($flags = ENT_COMPAT) + { + $str = htmlentities($this->str, $flags, $this->encoding); + + return static::create($str, $this->encoding); + } + + /** + * Capitalizes the first word of the string, replaces underscores with + * spaces, and strips '_id'. + * + * @return static Object with a humanized $str + */ + public function humanize() + { + $str = str_replace(['_id', '_'], ['', ' '], $this->str); + + return static::create($str, $this->encoding)->trim()->upperCaseFirst(); + } + + /** + * Returns the index of the first occurrence of $needle in the string, + * and false if not found. Accepts an optional offset from which to begin + * the search. + * + * @param string $needle Substring to look for + * @param int $offset Offset from which to search + * @return int|bool The occurrence's index if found, otherwise false + */ + public function indexOf($needle, $offset = 0) + { + return \mb_strpos($this->str, (string) $needle, + (int) $offset, $this->encoding); + } + + /** + * Returns the index of the last occurrence of $needle in the string, + * and false if not found. Accepts an optional offset from which to begin + * the search. Offsets may be negative to count from the last character + * in the string. + * + * @param string $needle Substring to look for + * @param int $offset Offset from which to search + * @return int|bool The last occurrence's index if found, otherwise false + */ + public function indexOfLast($needle, $offset = 0) + { + return \mb_strrpos($this->str, (string) $needle, + (int) $offset, $this->encoding); + } + + /** + * Inserts $substring into the string at the $index provided. + * + * @param string $substring String to be inserted + * @param int $index The index at which to insert the substring + * @return static Object with the resulting $str after the insertion + */ + public function insert($substring, $index) + { + $stringy = static::create($this->str, $this->encoding); + if ($index > $stringy->length()) { + return $stringy; + } + + $start = \mb_substr($stringy->str, 0, $index, $stringy->encoding); + $end = \mb_substr($stringy->str, $index, $stringy->length(), + $stringy->encoding); + + $stringy->str = $start . $substring . $end; + + return $stringy; + } + + /** + * Returns true if the string contains only alphabetic chars, false + * otherwise. + * + * @return bool Whether or not $str contains only alphabetic chars + */ + public function isAlpha() + { + return $this->matchesPattern('^[[:alpha:]]*$'); + } + + /** + * Returns true if the string contains only alphabetic and numeric chars, + * false otherwise. + * + * @return bool Whether or not $str contains only alphanumeric chars + */ + public function isAlphanumeric() + { + return $this->matchesPattern('^[[:alnum:]]*$'); + } + + /** + * Returns true if the string contains only whitespace chars, false + * otherwise. + * + * @return bool Whether or not $str contains only whitespace characters + */ + public function isBlank() + { + return $this->matchesPattern('^[[:space:]]*$'); + } + + /** + * Returns true if the string contains only hexadecimal chars, false + * otherwise. + * + * @return bool Whether or not $str contains only hexadecimal chars + */ + public function isHexadecimal() + { + return $this->matchesPattern('^[[:xdigit:]]*$'); + } + + /** + * Returns true if the string is JSON, false otherwise. Unlike json_decode + * in PHP 5.x, this method is consistent with PHP 7 and other JSON parsers, + * in that an empty string is not considered valid JSON. + * + * @return bool Whether or not $str is JSON + */ + public function isJson() + { + if (!$this->length()) { + return false; + } + + json_decode($this->str); + + return (json_last_error() === JSON_ERROR_NONE); + } + + /** + * Returns true if the string contains only lower case chars, false + * otherwise. + * + * @return bool Whether or not $str contains only lower case characters + */ + public function isLowerCase() + { + return $this->matchesPattern('^[[:lower:]]*$'); + } + + /** + * Returns true if the string is serialized, false otherwise. + * + * @return bool Whether or not $str is serialized + */ + public function isSerialized() + { + return $this->str === 'b:0;' || @unserialize($this->str) !== false; + } + + + /** + * Returns true if the string is base64 encoded, false otherwise. + * + * @return bool Whether or not $str is base64 encoded + */ + public function isBase64() + { + return (base64_encode(base64_decode($this->str, true)) === $this->str); + } + + /** + * Returns true if the string contains only lower case chars, false + * otherwise. + * + * @return bool Whether or not $str contains only lower case characters + */ + public function isUpperCase() + { + return $this->matchesPattern('^[[:upper:]]*$'); + } + + /** + * Returns the last $n characters of the string. + * + * @param int $n Number of characters to retrieve from the end + * @return static Object with its $str being the last $n chars + */ + public function last($n) + { + $stringy = static::create($this->str, $this->encoding); + + if ($n <= 0) { + $stringy->str = ''; + return $stringy; + } + + return $stringy->substr(-$n); + } + + /** + * Returns the length of the string. An alias for PHP's mb_strlen() function. + * + * @return int The number of characters in $str given the encoding + */ + public function length() + { + return \mb_strlen($this->str, $this->encoding); + } + + /** + * Splits on newlines and carriage returns, returning an array of Stringy + * objects corresponding to the lines in the string. + * + * @return static[] An array of Stringy objects + */ + public function lines() + { + $array = $this->split('[\r\n]{1,2}', $this->str); + for ($i = 0; $i < count($array); $i++) { + $array[$i] = static::create($array[$i], $this->encoding); + } + + return $array; + } + + /** + * Returns the longest common prefix between the string and $otherStr. + * + * @param string $otherStr Second string for comparison + * @return static Object with its $str being the longest common prefix + */ + public function longestCommonPrefix($otherStr) + { + $encoding = $this->encoding; + $maxLength = min($this->length(), \mb_strlen($otherStr, $encoding)); + + $longestCommonPrefix = ''; + for ($i = 0; $i < $maxLength; $i++) { + $char = \mb_substr($this->str, $i, 1, $encoding); + + if ($char == \mb_substr($otherStr, $i, 1, $encoding)) { + $longestCommonPrefix .= $char; + } else { + break; + } + } + + return static::create($longestCommonPrefix, $encoding); + } + + /** + * Returns the longest common suffix between the string and $otherStr. + * + * @param string $otherStr Second string for comparison + * @return static Object with its $str being the longest common suffix + */ + public function longestCommonSuffix($otherStr) + { + $encoding = $this->encoding; + $maxLength = min($this->length(), \mb_strlen($otherStr, $encoding)); + + $longestCommonSuffix = ''; + for ($i = 1; $i <= $maxLength; $i++) { + $char = \mb_substr($this->str, -$i, 1, $encoding); + + if ($char == \mb_substr($otherStr, -$i, 1, $encoding)) { + $longestCommonSuffix = $char . $longestCommonSuffix; + } else { + break; + } + } + + return static::create($longestCommonSuffix, $encoding); + } + + /** + * Returns the longest common substring between the string and $otherStr. + * In the case of ties, it returns that which occurs first. + * + * @param string $otherStr Second string for comparison + * @return static Object with its $str being the longest common substring + */ + public function longestCommonSubstring($otherStr) + { + // Uses dynamic programming to solve + // http://en.wikipedia.org/wiki/Longest_common_substring_problem + $encoding = $this->encoding; + $stringy = static::create($this->str, $encoding); + $strLength = $stringy->length(); + $otherLength = \mb_strlen($otherStr, $encoding); + + // Return if either string is empty + if ($strLength == 0 || $otherLength == 0) { + $stringy->str = ''; + return $stringy; + } + + $len = 0; + $end = 0; + $table = array_fill(0, $strLength + 1, + array_fill(0, $otherLength + 1, 0)); + + for ($i = 1; $i <= $strLength; $i++) { + for ($j = 1; $j <= $otherLength; $j++) { + $strChar = \mb_substr($stringy->str, $i - 1, 1, $encoding); + $otherChar = \mb_substr($otherStr, $j - 1, 1, $encoding); + + if ($strChar == $otherChar) { + $table[$i][$j] = $table[$i - 1][$j - 1] + 1; + if ($table[$i][$j] > $len) { + $len = $table[$i][$j]; + $end = $i; + } + } else { + $table[$i][$j] = 0; + } + } + } + + $stringy->str = \mb_substr($stringy->str, $end - $len, $len, $encoding); + + return $stringy; + } + + /** + * Converts the first character of the string to lower case. + * + * @return static Object with the first character of $str being lower case + */ + public function lowerCaseFirst() + { + $first = \mb_substr($this->str, 0, 1, $this->encoding); + $rest = \mb_substr($this->str, 1, $this->length() - 1, + $this->encoding); + + $str = \mb_strtolower($first, $this->encoding) . $rest; + + return static::create($str, $this->encoding); + } + + /** + * Returns whether or not a character exists at an index. Offsets may be + * negative to count from the last character in the string. Implements + * part of the ArrayAccess interface. + * + * @param mixed $offset The index to check + * @return boolean Whether or not the index exists + */ + public function offsetExists($offset) + { + $length = $this->length(); + $offset = (int) $offset; + + if ($offset >= 0) { + return ($length > $offset); + } + + return ($length >= abs($offset)); + } + + /** + * Returns the character at the given index. Offsets may be negative to + * count from the last character in the string. Implements part of the + * ArrayAccess interface, and throws an OutOfBoundsException if the index + * does not exist. + * + * @param mixed $offset The index from which to retrieve the char + * @return mixed The character at the specified index + * @throws \OutOfBoundsException If the positive or negative offset does + * not exist + */ + public function offsetGet($offset) + { + $offset = (int) $offset; + $length = $this->length(); + + if (($offset >= 0 && $length <= $offset) || $length < abs($offset)) { + throw new OutOfBoundsException('No character exists at the index'); + } + + return \mb_substr($this->str, $offset, 1, $this->encoding); + } + + /** + * Implements part of the ArrayAccess interface, but throws an exception + * when called. This maintains the immutability of Stringy objects. + * + * @param mixed $offset The index of the character + * @param mixed $value Value to set + * @throws \Exception When called + */ + public function offsetSet($offset, $value) + { + // Stringy is immutable, cannot directly set char + throw new Exception('Stringy object is immutable, cannot modify char'); + } + + /** + * Implements part of the ArrayAccess interface, but throws an exception + * when called. This maintains the immutability of Stringy objects. + * + * @param mixed $offset The index of the character + * @throws \Exception When called + */ + public function offsetUnset($offset) + { + // Don't allow directly modifying the string + throw new Exception('Stringy object is immutable, cannot unset char'); + } + + /** + * Pads the string to a given length with $padStr. If length is less than + * or equal to the length of the string, no padding takes places. The + * default string used for padding is a space, and the default type (one of + * 'left', 'right', 'both') is 'right'. Throws an InvalidArgumentException + * if $padType isn't one of those 3 values. + * + * @param int $length Desired string length after padding + * @param string $padStr String used to pad, defaults to space + * @param string $padType One of 'left', 'right', 'both' + * @return static Object with a padded $str + * @throws /InvalidArgumentException If $padType isn't one of 'right', + * 'left' or 'both' + */ + public function pad($length, $padStr = ' ', $padType = 'right') + { + if (!in_array($padType, ['left', 'right', 'both'])) { + throw new InvalidArgumentException('Pad expects $padType ' . + "to be one of 'left', 'right' or 'both'"); + } + + switch ($padType) { + case 'left': + return $this->padLeft($length, $padStr); + case 'right': + return $this->padRight($length, $padStr); + default: + return $this->padBoth($length, $padStr); + } + } + + /** + * Returns a new string of a given length such that both sides of the + * string are padded. Alias for pad() with a $padType of 'both'. + * + * @param int $length Desired string length after padding + * @param string $padStr String used to pad, defaults to space + * @return static String with padding applied + */ + public function padBoth($length, $padStr = ' ') + { + $padding = $length - $this->length(); + + return $this->applyPadding(floor($padding / 2), ceil($padding / 2), + $padStr); + } + + /** + * Returns a new string of a given length such that the beginning of the + * string is padded. Alias for pad() with a $padType of 'left'. + * + * @param int $length Desired string length after padding + * @param string $padStr String used to pad, defaults to space + * @return static String with left padding + */ + public function padLeft($length, $padStr = ' ') + { + return $this->applyPadding($length - $this->length(), 0, $padStr); + } + + /** + * Returns a new string of a given length such that the end of the string + * is padded. Alias for pad() with a $padType of 'right'. + * + * @param int $length Desired string length after padding + * @param string $padStr String used to pad, defaults to space + * @return static String with right padding + */ + public function padRight($length, $padStr = ' ') + { + return $this->applyPadding(0, $length - $this->length(), $padStr); + } + + /** + * Returns a new string starting with $string. + * + * @param string $string The string to append + * @return static Object with appended $string + */ + public function prepend($string) + { + return static::create($string . $this->str, $this->encoding); + } + + /** + * Replaces all occurrences of $pattern in $str by $replacement. An alias + * for mb_ereg_replace(). Note that the 'i' option with multibyte patterns + * in mb_ereg_replace() requires PHP 5.6+ for correct results. This is due + * to a lack of support in the bundled version of Oniguruma in PHP < 5.6, + * and current versions of HHVM (3.8 and below). + * + * @param string $pattern The regular expression pattern + * @param string $replacement The string to replace with + * @param string $options Matching conditions to be used + * @return static Object with the resulting $str after the replacements + */ + public function regexReplace($pattern, $replacement, $options = 'msr') + { + $regexEncoding = $this->regexEncoding(); + $this->regexEncoding($this->encoding); + + $str = $this->eregReplace($pattern, $replacement, $this->str, $options); + $this->regexEncoding($regexEncoding); + + return static::create($str, $this->encoding); + } + + /** + * Returns a new string with the prefix $substring removed, if present. + * + * @param string $substring The prefix to remove + * @return static Object having a $str without the prefix $substring + */ + public function removeLeft($substring) + { + $stringy = static::create($this->str, $this->encoding); + + if ($stringy->startsWith($substring)) { + $substringLength = \mb_strlen($substring, $stringy->encoding); + return $stringy->substr($substringLength); + } + + return $stringy; + } + + /** + * Returns a new string with the suffix $substring removed, if present. + * + * @param string $substring The suffix to remove + * @return static Object having a $str without the suffix $substring + */ + public function removeRight($substring) + { + $stringy = static::create($this->str, $this->encoding); + + if ($stringy->endsWith($substring)) { + $substringLength = \mb_strlen($substring, $stringy->encoding); + return $stringy->substr(0, $stringy->length() - $substringLength); + } + + return $stringy; + } + + /** + * Returns a repeated string given a multiplier. An alias for str_repeat. + * + * @param int $multiplier The number of times to repeat the string + * @return static Object with a repeated str + */ + public function repeat($multiplier) + { + $repeated = str_repeat($this->str, $multiplier); + + return static::create($repeated, $this->encoding); + } + + /** + * Replaces all occurrences of $search in $str by $replacement. + * + * @param string $search The needle to search for + * @param string $replacement The string to replace with + * @return static Object with the resulting $str after the replacements + */ + public function replace($search, $replacement) + { + return $this->regexReplace(preg_quote($search), $replacement); + } + + /** + * Returns a reversed string. A multibyte version of strrev(). + * + * @return static Object with a reversed $str + */ + public function reverse() + { + $strLength = $this->length(); + $reversed = ''; + + // Loop from last index of string to first + for ($i = $strLength - 1; $i >= 0; $i--) { + $reversed .= \mb_substr($this->str, $i, 1, $this->encoding); + } + + return static::create($reversed, $this->encoding); + } + + /** + * Truncates the string to a given length, while ensuring that it does not + * split words. If $substring is provided, and truncating occurs, the + * string is further truncated so that the substring may be appended without + * exceeding the desired length. + * + * @param int $length Desired length of the truncated string + * @param string $substring The substring to append if it can fit + * @return static Object with the resulting $str after truncating + */ + public function safeTruncate($length, $substring = '') + { + $stringy = static::create($this->str, $this->encoding); + if ($length >= $stringy->length()) { + return $stringy; + } + + // Need to further trim the string so we can append the substring + $encoding = $stringy->encoding; + $substringLength = \mb_strlen($substring, $encoding); + $length = $length - $substringLength; + + $truncated = \mb_substr($stringy->str, 0, $length, $encoding); + + // If the last word was truncated + if (mb_strpos($stringy->str, ' ', $length - 1, $encoding) != $length) { + // Find pos of the last occurrence of a space, get up to that + $lastPos = \mb_strrpos($truncated, ' ', 0, $encoding); + if ($lastPos !== false) { + $truncated = \mb_substr($truncated, 0, $lastPos, $encoding); + } + } + + $stringy->str = $truncated . $substring; + + return $stringy; + } + + /* + * A multibyte str_shuffle() function. It returns a string with its + * characters in random order. + * + * @return static Object with a shuffled $str + */ + public function shuffle() + { + $indexes = range(0, $this->length() - 1); + shuffle($indexes); + + $shuffledStr = ''; + foreach ($indexes as $i) { + $shuffledStr .= \mb_substr($this->str, $i, 1, $this->encoding); + } + + return static::create($shuffledStr, $this->encoding); + } + + /** + * Converts the string into an URL slug. This includes replacing non-ASCII + * characters with their closest ASCII equivalents, removing remaining + * non-ASCII and non-alphanumeric characters, and replacing whitespace with + * $replacement. The replacement defaults to a single dash, and the string + * is also converted to lowercase. The language of the source string can + * also be supplied for language-specific transliteration. + * + * @param string $replacement The string used to replace whitespace + * @param string $language Language of the source string + * @return static Object whose $str has been converted to an URL slug + */ + public function slugify($replacement = '-', $language = 'en') + { + $stringy = $this->toAscii($language); + + $stringy->str = str_replace('@', $replacement, $stringy); + $quotedReplacement = preg_quote($replacement); + $pattern = "/[^a-zA-Z\d\s-_$quotedReplacement]/u"; + $stringy->str = preg_replace($pattern, '', $stringy); + + return $stringy->toLowerCase()->delimit($replacement) + ->removeLeft($replacement)->removeRight($replacement); + } + + /** + * Returns true if the string begins with $substring, false otherwise. By + * default, the comparison is case-sensitive, but can be made insensitive + * by setting $caseSensitive to false. + * + * @param string $substring The substring to look for + * @param bool $caseSensitive Whether or not to enforce + * case-sensitivity + * @return bool Whether or not $str starts with $substring + */ + public function startsWith($substring, $caseSensitive = true) + { + $substringLength = \mb_strlen($substring, $this->encoding); + $startOfStr = \mb_substr($this->str, 0, $substringLength, + $this->encoding); + + if (!$caseSensitive) { + $substring = \mb_strtolower($substring, $this->encoding); + $startOfStr = \mb_strtolower($startOfStr, $this->encoding); + } + + return (string) $substring === $startOfStr; + } + + /** + * Returns true if the string begins with any of $substrings, false + * otherwise. By default the comparison is case-sensitive, but can be made + * insensitive by setting $caseSensitive to false. + * + * @param string[] $substrings Substrings to look for + * @param bool $caseSensitive Whether or not to enforce + * case-sensitivity + * @return bool Whether or not $str starts with $substring + */ + public function startsWithAny($substrings, $caseSensitive = true) + { + if (empty($substrings)) { + return false; + } + + foreach ($substrings as $substring) { + if ($this->startsWith($substring, $caseSensitive)) { + return true; + } + } + + return false; + } + + /** + * Returns the substring beginning at $start, and up to, but not including + * the index specified by $end. If $end is omitted, the function extracts + * the remaining string. If $end is negative, it is computed from the end + * of the string. + * + * @param int $start Initial index from which to begin extraction + * @param int $end Optional index at which to end extraction + * @return static Object with its $str being the extracted substring + */ + public function slice($start, $end = null) + { + if ($end === null) { + $length = $this->length(); + } elseif ($end >= 0 && $end <= $start) { + return static::create('', $this->encoding); + } elseif ($end < 0) { + $length = $this->length() + $end - $start; + } else { + $length = $end - $start; + } + + return $this->substr($start, $length); + } + + /** + * Splits the string with the provided regular expression, returning an + * array of Stringy objects. An optional integer $limit will truncate the + * results. + * + * @param string $pattern The regex with which to split the string + * @param int $limit Optional maximum number of results to return + * @return static[] An array of Stringy objects + */ + public function split($pattern, $limit = null) + { + if ($limit === 0) { + return []; + } + + // mb_split errors when supplied an empty pattern in < PHP 5.4.13 + // and HHVM < 3.8 + if ($pattern === '') { + return [static::create($this->str, $this->encoding)]; + } + + $regexEncoding = $this->regexEncoding(); + $this->regexEncoding($this->encoding); + + // mb_split returns the remaining unsplit string in the last index when + // supplying a limit + $limit = ($limit > 0) ? $limit += 1 : -1; + + static $functionExists; + if ($functionExists === null) { + $functionExists = function_exists('\mb_split'); + } + + if ($functionExists) { + $array = \mb_split($pattern, $this->str, $limit); + } else if ($this->supportsEncoding()) { + $array = \preg_split("/$pattern/", $this->str, $limit); + } + + $this->regexEncoding($regexEncoding); + + if ($limit > 0 && count($array) === $limit) { + array_pop($array); + } + + for ($i = 0; $i < count($array); $i++) { + $array[$i] = static::create($array[$i], $this->encoding); + } + + return $array; + } + + /** + * Strip all whitespace characters. This includes tabs and newline + * characters, as well as multibyte whitespace such as the thin space + * and ideographic space. + * + * @return static Object with whitespace stripped + */ + public function stripWhitespace() + { + return $this->regexReplace('[[:space:]]+', ''); + } + + /** + * Returns the substring beginning at $start with the specified $length. + * It differs from the mb_substr() function in that providing a $length of + * null will return the rest of the string, rather than an empty string. + * + * @param int $start Position of the first character to use + * @param int $length Maximum number of characters used + * @return static Object with its $str being the substring + */ + public function substr($start, $length = null) + { + $length = $length === null ? $this->length() : $length; + $str = \mb_substr($this->str, $start, $length, $this->encoding); + + return static::create($str, $this->encoding); + } + + /** + * Surrounds $str with the given substring. + * + * @param string $substring The substring to add to both sides + * @return static Object whose $str had the substring both prepended and + * appended + */ + public function surround($substring) + { + $str = implode('', [$substring, $this->str, $substring]); + + return static::create($str, $this->encoding); + } + + /** + * Returns a case swapped version of the string. + * + * @return static Object whose $str has each character's case swapped + */ + public function swapCase() + { + $stringy = static::create($this->str, $this->encoding); + $encoding = $stringy->encoding; + + $stringy->str = preg_replace_callback( + '/[\S]/u', + function ($match) use ($encoding) { + if ($match[0] == \mb_strtoupper($match[0], $encoding)) { + return \mb_strtolower($match[0], $encoding); + } + + return \mb_strtoupper($match[0], $encoding); + }, + $stringy->str + ); + + return $stringy; + } + + /** + * Returns a string with smart quotes, ellipsis characters, and dashes from + * Windows-1252 (commonly used in Word documents) replaced by their ASCII + * equivalents. + * + * @return static Object whose $str has those characters removed + */ + public function tidy() + { + $str = preg_replace([ + '/\x{2026}/u', + '/[\x{201C}\x{201D}]/u', + '/[\x{2018}\x{2019}]/u', + '/[\x{2013}\x{2014}]/u', + ], [ + '...', + '"', + "'", + '-', + ], $this->str); + + return static::create($str, $this->encoding); + } + + /** + * Returns a trimmed string with the first letter of each word capitalized. + * Also accepts an array, $ignore, allowing you to list words not to be + * capitalized. + * + * @param array $ignore An array of words not to capitalize + * @return static Object with a titleized $str + */ + public function titleize($ignore = null) + { + $stringy = static::create($this->trim(), $this->encoding); + $encoding = $this->encoding; + + $stringy->str = preg_replace_callback( + '/([\S]+)/u', + function ($match) use ($encoding, $ignore) { + if ($ignore && in_array($match[0], $ignore)) { + return $match[0]; + } + + $stringy = new Stringy($match[0], $encoding); + + return (string) $stringy->toLowerCase()->upperCaseFirst(); + }, + $stringy->str + ); + + return $stringy; + } + + /** + * Returns an ASCII version of the string. A set of non-ASCII characters are + * replaced with their closest ASCII counterparts, and the rest are removed + * by default. The language or locale of the source string can be supplied + * for language-specific transliteration in any of the following formats: + * en, en_GB, or en-GB. For example, passing "de" results in "äöü" mapping + * to "aeoeue" rather than "aou" as in other languages. + * + * @param string $language Language of the source string + * @param bool $removeUnsupported Whether or not to remove the + * unsupported characters + * @return static Object whose $str contains only ASCII characters + */ + public function toAscii($language = 'en', $removeUnsupported = true) + { + $str = $this->str; + + $langSpecific = $this->langSpecificCharsArray($language); + if (!empty($langSpecific)) { + $str = str_replace($langSpecific[0], $langSpecific[1], $str); + } + + foreach ($this->charsArray() as $key => $value) { + $str = str_replace($value, $key, $str); + } + + if ($removeUnsupported) { + $str = preg_replace('/[^\x20-\x7E]/u', '', $str); + } + + return static::create($str, $this->encoding); + } + + /** + * Returns a boolean representation of the given logical string value. + * For example, 'true', '1', 'on' and 'yes' will return true. 'false', '0', + * 'off', and 'no' will return false. In all instances, case is ignored. + * For other numeric strings, their sign will determine the return value. + * In addition, blank strings consisting of only whitespace will return + * false. For all other strings, the return value is a result of a + * boolean cast. + * + * @return bool A boolean value for the string + */ + public function toBoolean() + { + $key = $this->toLowerCase()->str; + $map = [ + 'true' => true, + '1' => true, + 'on' => true, + 'yes' => true, + 'false' => false, + '0' => false, + 'off' => false, + 'no' => false + ]; + + if (array_key_exists($key, $map)) { + return $map[$key]; + } elseif (is_numeric($this->str)) { + return (intval($this->str) > 0); + } + + return (bool) $this->regexReplace('[[:space:]]', '')->str; + } + + /** + * Converts all characters in the string to lowercase. An alias for PHP's + * mb_strtolower(). + * + * @return static Object with all characters of $str being lowercase + */ + public function toLowerCase() + { + $str = \mb_strtolower($this->str, $this->encoding); + + return static::create($str, $this->encoding); + } + + /** + * Converts each tab in the string to some number of spaces, as defined by + * $tabLength. By default, each tab is converted to 4 consecutive spaces. + * + * @param int $tabLength Number of spaces to replace each tab with + * @return static Object whose $str has had tabs switched to spaces + */ + public function toSpaces($tabLength = 4) + { + $spaces = str_repeat(' ', $tabLength); + $str = str_replace("\t", $spaces, $this->str); + + return static::create($str, $this->encoding); + } + + /** + * Converts each occurrence of some consecutive number of spaces, as + * defined by $tabLength, to a tab. By default, each 4 consecutive spaces + * are converted to a tab. + * + * @param int $tabLength Number of spaces to replace with a tab + * @return static Object whose $str has had spaces switched to tabs + */ + public function toTabs($tabLength = 4) + { + $spaces = str_repeat(' ', $tabLength); + $str = str_replace($spaces, "\t", $this->str); + + return static::create($str, $this->encoding); + } + + /** + * Converts the first character of each word in the string to uppercase. + * + * @return static Object with all characters of $str being title-cased + */ + public function toTitleCase() + { + $str = \mb_convert_case($this->str, \MB_CASE_TITLE, $this->encoding); + + return static::create($str, $this->encoding); + } + + /** + * Converts all characters in the string to uppercase. An alias for PHP's + * mb_strtoupper(). + * + * @return static Object with all characters of $str being uppercase + */ + public function toUpperCase() + { + $str = \mb_strtoupper($this->str, $this->encoding); + + return static::create($str, $this->encoding); + } + + /** + * Returns a string with whitespace removed from the start and end of the + * string. Supports the removal of unicode whitespace. Accepts an optional + * string of characters to strip instead of the defaults. + * + * @param string $chars Optional string of characters to strip + * @return static Object with a trimmed $str + */ + public function trim($chars = null) + { + $chars = ($chars) ? preg_quote($chars) : '[:space:]'; + + return $this->regexReplace("^[$chars]+|[$chars]+\$", ''); + } + + /** + * Returns a string with whitespace removed from the start of the string. + * Supports the removal of unicode whitespace. Accepts an optional + * string of characters to strip instead of the defaults. + * + * @param string $chars Optional string of characters to strip + * @return static Object with a trimmed $str + */ + public function trimLeft($chars = null) + { + $chars = ($chars) ? preg_quote($chars) : '[:space:]'; + + return $this->regexReplace("^[$chars]+", ''); + } + + /** + * Returns a string with whitespace removed from the end of the string. + * Supports the removal of unicode whitespace. Accepts an optional + * string of characters to strip instead of the defaults. + * + * @param string $chars Optional string of characters to strip + * @return static Object with a trimmed $str + */ + public function trimRight($chars = null) + { + $chars = ($chars) ? preg_quote($chars) : '[:space:]'; + + return $this->regexReplace("[$chars]+\$", ''); + } + + /** + * Truncates the string to a given length. If $substring is provided, and + * truncating occurs, the string is further truncated so that the substring + * may be appended without exceeding the desired length. + * + * @param int $length Desired length of the truncated string + * @param string $substring The substring to append if it can fit + * @return static Object with the resulting $str after truncating + */ + public function truncate($length, $substring = '') + { + $stringy = static::create($this->str, $this->encoding); + if ($length >= $stringy->length()) { + return $stringy; + } + + // Need to further trim the string so we can append the substring + $substringLength = \mb_strlen($substring, $stringy->encoding); + $length = $length - $substringLength; + + $truncated = \mb_substr($stringy->str, 0, $length, $stringy->encoding); + $stringy->str = $truncated . $substring; + + return $stringy; + } + + /** + * Returns a lowercase and trimmed string separated by underscores. + * Underscores are inserted before uppercase characters (with the exception + * of the first character of the string), and in place of spaces as well as + * dashes. + * + * @return static Object with an underscored $str + */ + public function underscored() + { + return $this->delimit('_'); + } + + /** + * Returns an UpperCamelCase version of the supplied string. It trims + * surrounding spaces, capitalizes letters following digits, spaces, dashes + * and underscores, and removes spaces, dashes, underscores. + * + * @return static Object with $str in UpperCamelCase + */ + public function upperCamelize() + { + return $this->camelize()->upperCaseFirst(); + } + + /** + * Converts the first character of the supplied string to upper case. + * + * @return static Object with the first character of $str being upper case + */ + public function upperCaseFirst() + { + $first = \mb_substr($this->str, 0, 1, $this->encoding); + $rest = \mb_substr($this->str, 1, $this->length() - 1, + $this->encoding); + + $str = \mb_strtoupper($first, $this->encoding) . $rest; + + return static::create($str, $this->encoding); + } + + /** + * Returns the replacements for the toAscii() method. + * + * @return array An array of replacements. + */ + protected function charsArray() + { + static $charsArray; + if (isset($charsArray)) return $charsArray; + + return $charsArray = [ + '0' => ['°', '₀', '۰', '0'], + '1' => ['¹', '₁', '۱', '1'], + '2' => ['²', '₂', '۲', '2'], + '3' => ['³', '₃', '۳', '3'], + '4' => ['⁴', '₄', '۴', '٤', '4'], + '5' => ['⁵', '₅', '۵', '٥', '5'], + '6' => ['⁶', '₆', '۶', '٦', '6'], + '7' => ['⁷', '₇', '۷', '7'], + '8' => ['⁸', '₈', '۸', '8'], + '9' => ['⁹', '₉', '۹', '9'], + 'a' => ['à', 'á', 'ả', 'ã', 'ạ', 'ă', 'ắ', 'ằ', 'ẳ', 'ẵ', + 'ặ', 'â', 'ấ', 'ầ', 'ẩ', 'ẫ', 'ậ', 'ā', 'ą', 'å', + 'α', 'ά', 'ἀ', 'ἁ', 'ἂ', 'ἃ', 'ἄ', 'ἅ', 'ἆ', 'ἇ', + 'ᾀ', 'ᾁ', 'ᾂ', 'ᾃ', 'ᾄ', 'ᾅ', 'ᾆ', 'ᾇ', 'ὰ', 'ά', + 'ᾰ', 'ᾱ', 'ᾲ', 'ᾳ', 'ᾴ', 'ᾶ', 'ᾷ', 'а', 'أ', 'အ', + 'ာ', 'ါ', 'ǻ', 'ǎ', 'ª', 'ა', 'अ', 'ا', 'a', 'ä'], + 'b' => ['б', 'β', 'ب', 'ဗ', 'ბ', 'b'], + 'c' => ['ç', 'ć', 'č', 'ĉ', 'ċ', 'c'], + 'd' => ['ď', 'ð', 'đ', 'ƌ', 'ȡ', 'ɖ', 'ɗ', 'ᵭ', 'ᶁ', 'ᶑ', + 'д', 'δ', 'د', 'ض', 'ဍ', 'ဒ', 'დ', 'd'], + 'e' => ['é', 'è', 'ẻ', 'ẽ', 'ẹ', 'ê', 'ế', 'ề', 'ể', 'ễ', + 'ệ', 'ë', 'ē', 'ę', 'ě', 'ĕ', 'ė', 'ε', 'έ', 'ἐ', + 'ἑ', 'ἒ', 'ἓ', 'ἔ', 'ἕ', 'ὲ', 'έ', 'е', 'ё', 'э', + 'є', 'ə', 'ဧ', 'ေ', 'ဲ', 'ე', 'ए', 'إ', 'ئ', 'e'], + 'f' => ['ф', 'φ', 'ف', 'ƒ', 'ფ', 'f'], + 'g' => ['ĝ', 'ğ', 'ġ', 'ģ', 'г', 'ґ', 'γ', 'ဂ', 'გ', 'گ', + 'g'], + 'h' => ['ĥ', 'ħ', 'η', 'ή', 'ح', 'ه', 'ဟ', 'ှ', 'ჰ', 'h'], + 'i' => ['í', 'ì', 'ỉ', 'ĩ', 'ị', 'î', 'ï', 'ī', 'ĭ', 'į', + 'ı', 'ι', 'ί', 'ϊ', 'ΐ', 'ἰ', 'ἱ', 'ἲ', 'ἳ', 'ἴ', + 'ἵ', 'ἶ', 'ἷ', 'ὶ', 'ί', 'ῐ', 'ῑ', 'ῒ', 'ΐ', 'ῖ', + 'ῗ', 'і', 'ї', 'и', 'ဣ', 'ိ', 'ီ', 'ည်', 'ǐ', 'ი', + 'इ', 'ی', 'i'], + 'j' => ['ĵ', 'ј', 'Ј', 'ჯ', 'ج', 'j'], + 'k' => ['ķ', 'ĸ', 'к', 'κ', 'Ķ', 'ق', 'ك', 'က', 'კ', 'ქ', + 'ک', 'k'], + 'l' => ['ł', 'ľ', 'ĺ', 'ļ', 'ŀ', 'л', 'λ', 'ل', 'လ', 'ლ', + 'l'], + 'm' => ['м', 'μ', 'م', 'မ', 'მ', 'm'], + 'n' => ['ñ', 'ń', 'ň', 'ņ', 'ʼn', 'ŋ', 'ν', 'н', 'ن', 'န', + 'ნ', 'n'], + 'o' => ['ó', 'ò', 'ỏ', 'õ', 'ọ', 'ô', 'ố', 'ồ', 'ổ', 'ỗ', + 'ộ', 'ơ', 'ớ', 'ờ', 'ở', 'ỡ', 'ợ', 'ø', 'ō', 'ő', + 'ŏ', 'ο', 'ὀ', 'ὁ', 'ὂ', 'ὃ', 'ὄ', 'ὅ', 'ὸ', 'ό', + 'о', 'و', 'θ', 'ို', 'ǒ', 'ǿ', 'º', 'ო', 'ओ', 'o', + 'ö'], + 'p' => ['п', 'π', 'ပ', 'პ', 'پ', 'p'], + 'q' => ['ყ', 'q'], + 'r' => ['ŕ', 'ř', 'ŗ', 'р', 'ρ', 'ر', 'რ', 'r'], + 's' => ['ś', 'š', 'ş', 'с', 'σ', 'ș', 'ς', 'س', 'ص', 'စ', + 'ſ', 'ს', 's'], + 't' => ['ť', 'ţ', 'т', 'τ', 'ț', 'ت', 'ط', 'ဋ', 'တ', 'ŧ', + 'თ', 'ტ', 't'], + 'u' => ['ú', 'ù', 'ủ', 'ũ', 'ụ', 'ư', 'ứ', 'ừ', 'ử', 'ữ', + 'ự', 'û', 'ū', 'ů', 'ű', 'ŭ', 'ų', 'µ', 'у', 'ဉ', + 'ု', 'ူ', 'ǔ', 'ǖ', 'ǘ', 'ǚ', 'ǜ', 'უ', 'उ', 'u', + 'ў', 'ü'], + 'v' => ['в', 'ვ', 'ϐ', 'v'], + 'w' => ['ŵ', 'ω', 'ώ', 'ဝ', 'ွ', 'w'], + 'x' => ['χ', 'ξ', 'x'], + 'y' => ['ý', 'ỳ', 'ỷ', 'ỹ', 'ỵ', 'ÿ', 'ŷ', 'й', 'ы', 'υ', + 'ϋ', 'ύ', 'ΰ', 'ي', 'ယ', 'y'], + 'z' => ['ź', 'ž', 'ż', 'з', 'ζ', 'ز', 'ဇ', 'ზ', 'z'], + 'aa' => ['ع', 'आ', 'آ'], + 'ae' => ['æ', 'ǽ'], + 'ai' => ['ऐ'], + 'ch' => ['ч', 'ჩ', 'ჭ', 'چ'], + 'dj' => ['ђ', 'đ'], + 'dz' => ['џ', 'ძ'], + 'ei' => ['ऍ'], + 'gh' => ['غ', 'ღ'], + 'ii' => ['ई'], + 'ij' => ['ij'], + 'kh' => ['х', 'خ', 'ხ'], + 'lj' => ['љ'], + 'nj' => ['њ'], + 'oe' => ['œ', 'ؤ'], + 'oi' => ['ऑ'], + 'oii' => ['ऒ'], + 'ps' => ['ψ'], + 'sh' => ['ш', 'შ', 'ش'], + 'shch' => ['щ'], + 'ss' => ['ß'], + 'sx' => ['ŝ'], + 'th' => ['þ', 'ϑ', 'ث', 'ذ', 'ظ'], + 'ts' => ['ц', 'ც', 'წ'], + 'uu' => ['ऊ'], + 'ya' => ['я'], + 'yu' => ['ю'], + 'zh' => ['ж', 'ჟ', 'ژ'], + '(c)' => ['©'], + 'A' => ['Á', 'À', 'Ả', 'Ã', 'Ạ', 'Ă', 'Ắ', 'Ằ', 'Ẳ', 'Ẵ', + 'Ặ', 'Â', 'Ấ', 'Ầ', 'Ẩ', 'Ẫ', 'Ậ', 'Å', 'Ā', 'Ą', + 'Α', 'Ά', 'Ἀ', 'Ἁ', 'Ἂ', 'Ἃ', 'Ἄ', 'Ἅ', 'Ἆ', 'Ἇ', + 'ᾈ', 'ᾉ', 'ᾊ', 'ᾋ', 'ᾌ', 'ᾍ', 'ᾎ', 'ᾏ', 'Ᾰ', 'Ᾱ', + 'Ὰ', 'Ά', 'ᾼ', 'А', 'Ǻ', 'Ǎ', 'A', 'Ä'], + 'B' => ['Б', 'Β', 'ब', 'B'], + 'C' => ['Ç','Ć', 'Č', 'Ĉ', 'Ċ', 'C'], + 'D' => ['Ď', 'Ð', 'Đ', 'Ɖ', 'Ɗ', 'Ƌ', 'ᴅ', 'ᴆ', 'Д', 'Δ', + 'D'], + 'E' => ['É', 'È', 'Ẻ', 'Ẽ', 'Ẹ', 'Ê', 'Ế', 'Ề', 'Ể', 'Ễ', + 'Ệ', 'Ë', 'Ē', 'Ę', 'Ě', 'Ĕ', 'Ė', 'Ε', 'Έ', 'Ἐ', + 'Ἑ', 'Ἒ', 'Ἓ', 'Ἔ', 'Ἕ', 'Έ', 'Ὲ', 'Е', 'Ё', 'Э', + 'Є', 'Ə', 'E'], + 'F' => ['Ф', 'Φ', 'F'], + 'G' => ['Ğ', 'Ġ', 'Ģ', 'Г', 'Ґ', 'Γ', 'G'], + 'H' => ['Η', 'Ή', 'Ħ', 'H'], + 'I' => ['Í', 'Ì', 'Ỉ', 'Ĩ', 'Ị', 'Î', 'Ï', 'Ī', 'Ĭ', 'Į', + 'İ', 'Ι', 'Ί', 'Ϊ', 'Ἰ', 'Ἱ', 'Ἳ', 'Ἴ', 'Ἵ', 'Ἶ', + 'Ἷ', 'Ῐ', 'Ῑ', 'Ὶ', 'Ί', 'И', 'І', 'Ї', 'Ǐ', 'ϒ', + 'I'], + 'J' => ['J'], + 'K' => ['К', 'Κ', 'K'], + 'L' => ['Ĺ', 'Ł', 'Л', 'Λ', 'Ļ', 'Ľ', 'Ŀ', 'ल', 'L'], + 'M' => ['М', 'Μ', 'M'], + 'N' => ['Ń', 'Ñ', 'Ň', 'Ņ', 'Ŋ', 'Н', 'Ν', 'N'], + 'O' => ['Ó', 'Ò', 'Ỏ', 'Õ', 'Ọ', 'Ô', 'Ố', 'Ồ', 'Ổ', 'Ỗ', + 'Ộ', 'Ơ', 'Ớ', 'Ờ', 'Ở', 'Ỡ', 'Ợ', 'Ø', 'Ō', 'Ő', + 'Ŏ', 'Ο', 'Ό', 'Ὀ', 'Ὁ', 'Ὂ', 'Ὃ', 'Ὄ', 'Ὅ', 'Ὸ', + 'Ό', 'О', 'Θ', 'Ө', 'Ǒ', 'Ǿ', 'O', 'Ö'], + 'P' => ['П', 'Π', 'P'], + 'Q' => ['Q'], + 'R' => ['Ř', 'Ŕ', 'Р', 'Ρ', 'Ŗ', 'R'], + 'S' => ['Ş', 'Ŝ', 'Ș', 'Š', 'Ś', 'С', 'Σ', 'S'], + 'T' => ['Ť', 'Ţ', 'Ŧ', 'Ț', 'Т', 'Τ', 'T'], + 'U' => ['Ú', 'Ù', 'Ủ', 'Ũ', 'Ụ', 'Ư', 'Ứ', 'Ừ', 'Ử', 'Ữ', + 'Ự', 'Û', 'Ū', 'Ů', 'Ű', 'Ŭ', 'Ų', 'У', 'Ǔ', 'Ǖ', + 'Ǘ', 'Ǚ', 'Ǜ', 'U', 'Ў', 'Ü'], + 'V' => ['В', 'V'], + 'W' => ['Ω', 'Ώ', 'Ŵ', 'W'], + 'X' => ['Χ', 'Ξ', 'X'], + 'Y' => ['Ý', 'Ỳ', 'Ỷ', 'Ỹ', 'Ỵ', 'Ÿ', 'Ῠ', 'Ῡ', 'Ὺ', 'Ύ', + 'Ы', 'Й', 'Υ', 'Ϋ', 'Ŷ', 'Y'], + 'Z' => ['Ź', 'Ž', 'Ż', 'З', 'Ζ', 'Z'], + 'AE' => ['Æ', 'Ǽ'], + 'Ch' => ['Ч'], + 'Dj' => ['Ђ'], + 'Dz' => ['Џ'], + 'Gx' => ['Ĝ'], + 'Hx' => ['Ĥ'], + 'Ij' => ['IJ'], + 'Jx' => ['Ĵ'], + 'Kh' => ['Х'], + 'Lj' => ['Љ'], + 'Nj' => ['Њ'], + 'Oe' => ['Œ'], + 'Ps' => ['Ψ'], + 'Sh' => ['Ш'], + 'Shch' => ['Щ'], + 'Ss' => ['ẞ'], + 'Th' => ['Þ'], + 'Ts' => ['Ц'], + 'Ya' => ['Я'], + 'Yu' => ['Ю'], + 'Zh' => ['Ж'], + ' ' => ["\xC2\xA0", "\xE2\x80\x80", "\xE2\x80\x81", + "\xE2\x80\x82", "\xE2\x80\x83", "\xE2\x80\x84", + "\xE2\x80\x85", "\xE2\x80\x86", "\xE2\x80\x87", + "\xE2\x80\x88", "\xE2\x80\x89", "\xE2\x80\x8A", + "\xE2\x80\xAF", "\xE2\x81\x9F", "\xE3\x80\x80", + "\xEF\xBE\xA0"], + ]; + } + + /** + * Returns language-specific replacements for the toAscii() method. + * For example, German will map 'ä' to 'ae', while other languages + * will simply return 'a'. + * + * @param string $language Language of the source string + * @return array An array of replacements. + */ + protected static function langSpecificCharsArray($language = 'en') + { + $split = preg_split('/[-_]/', $language); + $language = strtolower($split[0]); + + static $charsArray = []; + if (isset($charsArray[$language])) { + return $charsArray[$language]; + } + + $languageSpecific = [ + 'de' => [ + ['ä', 'ö', 'ü', 'Ä', 'Ö', 'Ü' ], + ['ae', 'oe', 'ue', 'AE', 'OE', 'UE'], + ], + 'bg' => [ + ['х', 'Х', 'щ', 'Щ', 'ъ', 'Ъ', 'ь', 'Ь'], + ['h', 'H', 'sht', 'SHT', 'a', 'А', 'y', 'Y'] + ] + ]; + + if (isset($languageSpecific[$language])) { + $charsArray[$language] = $languageSpecific[$language]; + } else { + $charsArray[$language] = []; + } + + return $charsArray[$language]; + } + + /** + * Adds the specified amount of left and right padding to the given string. + * The default character used is a space. + * + * @param int $left Length of left padding + * @param int $right Length of right padding + * @param string $padStr String used to pad + * @return static String with padding applied + */ + protected function applyPadding($left = 0, $right = 0, $padStr = ' ') + { + $stringy = static::create($this->str, $this->encoding); + $length = \mb_strlen($padStr, $stringy->encoding); + + $strLength = $stringy->length(); + $paddedLength = $strLength + $left + $right; + + if (!$length || $paddedLength <= $strLength) { + return $stringy; + } + + $leftPadding = \mb_substr(str_repeat($padStr, ceil($left / $length)), 0, + $left, $stringy->encoding); + $rightPadding = \mb_substr(str_repeat($padStr, ceil($right / $length)), + 0, $right, $stringy->encoding); + + $stringy->str = $leftPadding . $stringy->str . $rightPadding; + + return $stringy; + } + + /** + * Returns true if $str matches the supplied pattern, false otherwise. + * + * @param string $pattern Regex pattern to match against + * @return bool Whether or not $str matches the pattern + */ + protected function matchesPattern($pattern) + { + $regexEncoding = $this->regexEncoding(); + $this->regexEncoding($this->encoding); + + $match = \mb_ereg_match($pattern, $this->str); + $this->regexEncoding($regexEncoding); + + return $match; + } + + /** + * Alias for mb_ereg_replace with a fallback to preg_replace if the + * mbstring module is not installed. + */ + protected function eregReplace($pattern, $replacement, $string, $option = 'msr') + { + static $functionExists; + if ($functionExists === null) { + $functionExists = function_exists('\mb_split'); + } + + if ($functionExists) { + return \mb_ereg_replace($pattern, $replacement, $string, $option); + } else if ($this->supportsEncoding()) { + $option = str_replace('r', '', $option); + return \preg_replace("/$pattern/u$option", $replacement, $string); + } + } + + /** + * Alias for mb_regex_encoding which default to a noop if the mbstring + * module is not installed. + */ + protected function regexEncoding() + { + static $functionExists; + + if ($functionExists === null) { + $functionExists = function_exists('\mb_regex_encoding'); + } + + if ($functionExists) { + $args = func_get_args(); + return call_user_func_array('\mb_regex_encoding', $args); + } + } + + protected function supportsEncoding() + { + $supported = ['UTF-8' => true, 'ASCII' => true]; + + if (isset($supported[$this->encoding])) { + return true; + } else { + throw new \RuntimeException('Stringy method requires the ' . + 'mbstring module for encodings other than ASCII and UTF-8. ' . + 'Encoding used: ' . $this->encoding); + } + } +} diff --git a/vendor/guzzlehttp/guzzle/.php_cs b/vendor/guzzlehttp/guzzle/.php_cs new file mode 100644 index 0000000..a8ace8a --- /dev/null +++ b/vendor/guzzlehttp/guzzle/.php_cs @@ -0,0 +1,21 @@ +setRiskyAllowed(true) + ->setRules([ + '@PSR2' => true, + 'array_syntax' => ['syntax' => 'short'], + 'declare_strict_types' => false, + 'concat_space' => ['spacing'=>'one'], + // 'ordered_imports' => true, + // 'phpdoc_align' => ['align'=>'vertical'], + // 'native_function_invocation' => true, + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->in(__DIR__.'/src') + ->name('*.php') + ) +; + +return $config; diff --git a/vendor/guzzlehttp/guzzle/CHANGELOG.md b/vendor/guzzlehttp/guzzle/CHANGELOG.md new file mode 100644 index 0000000..6555749 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/CHANGELOG.md @@ -0,0 +1,1304 @@ +# Change Log + +## 6.4.1 - 2019-10-23 + +* No `guzzle.phar` was created in 6.4.0 due expired API token. This release will fix that +* Added `parent::__construct()` to `FileCookieJar` and `SessionCookieJar` + +## 6.4.0 - 2019-10-23 + +* Improvement: Improved error messages when using curl < 7.21.2 [#2108](https://github.com/guzzle/guzzle/pull/2108) +* Fix: Test if response is readable before returning a summary in `RequestException::getResponseBodySummary()` [#2081](https://github.com/guzzle/guzzle/pull/2081) +* Fix: Add support for GUZZLE_CURL_SELECT_TIMEOUT environment variable [#2161](https://github.com/guzzle/guzzle/pull/2161) +* Improvement: Added `GuzzleHttp\Exception\InvalidArgumentException` [#2163](https://github.com/guzzle/guzzle/pull/2163) +* Improvement: Added `GuzzleHttp\_current_time()` to use `hrtime()` if that function exists. [#2242](https://github.com/guzzle/guzzle/pull/2242) +* Improvement: Added curl's `appconnect_time` in `TransferStats` [#2284](https://github.com/guzzle/guzzle/pull/2284) +* Improvement: Make GuzzleException extend Throwable wherever it's available [#2273](https://github.com/guzzle/guzzle/pull/2273) +* Fix: Prevent concurrent writes to file when saving `CookieJar` [#2335](https://github.com/guzzle/guzzle/pull/2335) +* Improvement: Update `MockHandler` so we can test transfer time [#2362](https://github.com/guzzle/guzzle/pull/2362) + +## 6.3.3 - 2018-04-22 + +* Fix: Default headers when decode_content is specified + + +## 6.3.2 - 2018-03-26 + +* Fix: Release process + + +## 6.3.1 - 2018-03-26 + +* Bug fix: Parsing 0 epoch expiry times in cookies [#2014](https://github.com/guzzle/guzzle/pull/2014) +* Improvement: Better ConnectException detection [#2012](https://github.com/guzzle/guzzle/pull/2012) +* Bug fix: Malformed domain that contains a "/" [#1999](https://github.com/guzzle/guzzle/pull/1999) +* Bug fix: Undefined offset when a cookie has no first key-value pair [#1998](https://github.com/guzzle/guzzle/pull/1998) +* Improvement: Support PHPUnit 6 [#1953](https://github.com/guzzle/guzzle/pull/1953) +* Bug fix: Support empty headers [#1915](https://github.com/guzzle/guzzle/pull/1915) +* Bug fix: Ignore case during header modifications [#1916](https://github.com/guzzle/guzzle/pull/1916) + ++ Minor code cleanups, documentation fixes and clarifications. + + +## 6.3.0 - 2017-06-22 + +* Feature: force IP resolution (ipv4 or ipv6) [#1608](https://github.com/guzzle/guzzle/pull/1608), [#1659](https://github.com/guzzle/guzzle/pull/1659) +* Improvement: Don't include summary in exception message when body is empty [#1621](https://github.com/guzzle/guzzle/pull/1621) +* Improvement: Handle `on_headers` option in MockHandler [#1580](https://github.com/guzzle/guzzle/pull/1580) +* Improvement: Added SUSE Linux CA path [#1609](https://github.com/guzzle/guzzle/issues/1609) +* Improvement: Use class reference for getting the name of the class instead of using hardcoded strings [#1641](https://github.com/guzzle/guzzle/pull/1641) +* Feature: Added `read_timeout` option [#1611](https://github.com/guzzle/guzzle/pull/1611) +* Bug fix: PHP 7.x fixes [#1685](https://github.com/guzzle/guzzle/pull/1685), [#1686](https://github.com/guzzle/guzzle/pull/1686), [#1811](https://github.com/guzzle/guzzle/pull/1811) +* Deprecation: BadResponseException instantiation without a response [#1642](https://github.com/guzzle/guzzle/pull/1642) +* Feature: Added NTLM auth [#1569](https://github.com/guzzle/guzzle/pull/1569) +* Feature: Track redirect HTTP status codes [#1711](https://github.com/guzzle/guzzle/pull/1711) +* Improvement: Check handler type during construction [#1745](https://github.com/guzzle/guzzle/pull/1745) +* Improvement: Always include the Content-Length if there's a body [#1721](https://github.com/guzzle/guzzle/pull/1721) +* Feature: Added convenience method to access a cookie by name [#1318](https://github.com/guzzle/guzzle/pull/1318) +* Bug fix: Fill `CURLOPT_CAPATH` and `CURLOPT_CAINFO` properly [#1684](https://github.com/guzzle/guzzle/pull/1684) +* Improvement: Use `\GuzzleHttp\Promise\rejection_for` function instead of object init [#1827](https://github.com/guzzle/guzzle/pull/1827) + + ++ Minor code cleanups, documentation fixes and clarifications. + +## 6.2.3 - 2017-02-28 + +* Fix deprecations with guzzle/psr7 version 1.4 + +## 6.2.2 - 2016-10-08 + +* Allow to pass nullable Response to delay callable +* Only add scheme when host is present +* Fix drain case where content-length is the literal string zero +* Obfuscate in-URL credentials in exceptions + +## 6.2.1 - 2016-07-18 + +* Address HTTP_PROXY security vulnerability, CVE-2016-5385: + https://httpoxy.org/ +* Fixing timeout bug with StreamHandler: + https://github.com/guzzle/guzzle/pull/1488 +* Only read up to `Content-Length` in PHP StreamHandler to avoid timeouts when + a server does not honor `Connection: close`. +* Ignore URI fragment when sending requests. + +## 6.2.0 - 2016-03-21 + +* Feature: added `GuzzleHttp\json_encode` and `GuzzleHttp\json_decode`. + https://github.com/guzzle/guzzle/pull/1389 +* Bug fix: Fix sleep calculation when waiting for delayed requests. + https://github.com/guzzle/guzzle/pull/1324 +* Feature: More flexible history containers. + https://github.com/guzzle/guzzle/pull/1373 +* Bug fix: defer sink stream opening in StreamHandler. + https://github.com/guzzle/guzzle/pull/1377 +* Bug fix: do not attempt to escape cookie values. + https://github.com/guzzle/guzzle/pull/1406 +* Feature: report original content encoding and length on decoded responses. + https://github.com/guzzle/guzzle/pull/1409 +* Bug fix: rewind seekable request bodies before dispatching to cURL. + https://github.com/guzzle/guzzle/pull/1422 +* Bug fix: provide an empty string to `http_build_query` for HHVM workaround. + https://github.com/guzzle/guzzle/pull/1367 + +## 6.1.1 - 2015-11-22 + +* Bug fix: Proxy::wrapSync() now correctly proxies to the appropriate handler + https://github.com/guzzle/guzzle/commit/911bcbc8b434adce64e223a6d1d14e9a8f63e4e4 +* Feature: HandlerStack is now more generic. + https://github.com/guzzle/guzzle/commit/f2102941331cda544745eedd97fc8fd46e1ee33e +* Bug fix: setting verify to false in the StreamHandler now disables peer + verification. https://github.com/guzzle/guzzle/issues/1256 +* Feature: Middleware now uses an exception factory, including more error + context. https://github.com/guzzle/guzzle/pull/1282 +* Feature: better support for disabled functions. + https://github.com/guzzle/guzzle/pull/1287 +* Bug fix: fixed regression where MockHandler was not using `sink`. + https://github.com/guzzle/guzzle/pull/1292 + +## 6.1.0 - 2015-09-08 + +* Feature: Added the `on_stats` request option to provide access to transfer + statistics for requests. https://github.com/guzzle/guzzle/pull/1202 +* Feature: Added the ability to persist session cookies in CookieJars. + https://github.com/guzzle/guzzle/pull/1195 +* Feature: Some compatibility updates for Google APP Engine + https://github.com/guzzle/guzzle/pull/1216 +* Feature: Added support for NO_PROXY to prevent the use of a proxy based on + a simple set of rules. https://github.com/guzzle/guzzle/pull/1197 +* Feature: Cookies can now contain square brackets. + https://github.com/guzzle/guzzle/pull/1237 +* Bug fix: Now correctly parsing `=` inside of quotes in Cookies. + https://github.com/guzzle/guzzle/pull/1232 +* Bug fix: Cusotm cURL options now correctly override curl options of the + same name. https://github.com/guzzle/guzzle/pull/1221 +* Bug fix: Content-Type header is now added when using an explicitly provided + multipart body. https://github.com/guzzle/guzzle/pull/1218 +* Bug fix: Now ignoring Set-Cookie headers that have no name. +* Bug fix: Reason phrase is no longer cast to an int in some cases in the + cURL handler. https://github.com/guzzle/guzzle/pull/1187 +* Bug fix: Remove the Authorization header when redirecting if the Host + header changes. https://github.com/guzzle/guzzle/pull/1207 +* Bug fix: Cookie path matching fixes + https://github.com/guzzle/guzzle/issues/1129 +* Bug fix: Fixing the cURL `body_as_string` setting + https://github.com/guzzle/guzzle/pull/1201 +* Bug fix: quotes are no longer stripped when parsing cookies. + https://github.com/guzzle/guzzle/issues/1172 +* Bug fix: `form_params` and `query` now always uses the `&` separator. + https://github.com/guzzle/guzzle/pull/1163 +* Bug fix: Adding a Content-Length to PHP stream wrapper requests if not set. + https://github.com/guzzle/guzzle/pull/1189 + +## 6.0.2 - 2015-07-04 + +* Fixed a memory leak in the curl handlers in which references to callbacks + were not being removed by `curl_reset`. +* Cookies are now extracted properly before redirects. +* Cookies now allow more character ranges. +* Decoded Content-Encoding responses are now modified to correctly reflect + their state if the encoding was automatically removed by a handler. This + means that the `Content-Encoding` header may be removed an the + `Content-Length` modified to reflect the message size after removing the + encoding. +* Added a more explicit error message when trying to use `form_params` and + `multipart` in the same request. +* Several fixes for HHVM support. +* Functions are now conditionally required using an additional level of + indirection to help with global Composer installations. + +## 6.0.1 - 2015-05-27 + +* Fixed a bug with serializing the `query` request option where the `&` + separator was missing. +* Added a better error message for when `body` is provided as an array. Please + use `form_params` or `multipart` instead. +* Various doc fixes. + +## 6.0.0 - 2015-05-26 + +* See the UPGRADING.md document for more information. +* Added `multipart` and `form_params` request options. +* Added `synchronous` request option. +* Added the `on_headers` request option. +* Fixed `expect` handling. +* No longer adding default middlewares in the client ctor. These need to be + present on the provided handler in order to work. +* Requests are no longer initiated when sending async requests with the + CurlMultiHandler. This prevents unexpected recursion from requests completing + while ticking the cURL loop. +* Removed the semantics of setting `default` to `true`. This is no longer + required now that the cURL loop is not ticked for async requests. +* Added request and response logging middleware. +* No longer allowing self signed certificates when using the StreamHandler. +* Ensuring that `sink` is valid if saving to a file. +* Request exceptions now include a "handler context" which provides handler + specific contextual information. +* Added `GuzzleHttp\RequestOptions` to allow request options to be applied + using constants. +* `$maxHandles` has been removed from CurlMultiHandler. +* `MultipartPostBody` is now part of the `guzzlehttp/psr7` package. + +## 5.3.0 - 2015-05-19 + +* Mock now supports `save_to` +* Marked `AbstractRequestEvent::getTransaction()` as public. +* Fixed a bug in which multiple headers using different casing would overwrite + previous headers in the associative array. +* Added `Utils::getDefaultHandler()` +* Marked `GuzzleHttp\Client::getDefaultUserAgent` as deprecated. +* URL scheme is now always lowercased. + +## 6.0.0-beta.1 + +* Requires PHP >= 5.5 +* Updated to use PSR-7 + * Requires immutable messages, which basically means an event based system + owned by a request instance is no longer possible. + * Utilizing the [Guzzle PSR-7 package](https://github.com/guzzle/psr7). + * Removed the dependency on `guzzlehttp/streams`. These stream abstractions + are available in the `guzzlehttp/psr7` package under the `GuzzleHttp\Psr7` + namespace. +* Added middleware and handler system + * Replaced the Guzzle event and subscriber system with a middleware system. + * No longer depends on RingPHP, but rather places the HTTP handlers directly + in Guzzle, operating on PSR-7 messages. + * Retry logic is now encapsulated in `GuzzleHttp\Middleware::retry`, which + means the `guzzlehttp/retry-subscriber` is now obsolete. + * Mocking responses is now handled using `GuzzleHttp\Handler\MockHandler`. +* Asynchronous responses + * No longer supports the `future` request option to send an async request. + Instead, use one of the `*Async` methods of a client (e.g., `requestAsync`, + `getAsync`, etc.). + * Utilizing `GuzzleHttp\Promise` instead of React's promise library to avoid + recursion required by chaining and forwarding react promises. See + https://github.com/guzzle/promises + * Added `requestAsync` and `sendAsync` to send request asynchronously. + * Added magic methods for `getAsync()`, `postAsync()`, etc. to send requests + asynchronously. +* Request options + * POST and form updates + * Added the `form_fields` and `form_files` request options. + * Removed the `GuzzleHttp\Post` namespace. + * The `body` request option no longer accepts an array for POST requests. + * The `exceptions` request option has been deprecated in favor of the + `http_errors` request options. + * The `save_to` request option has been deprecated in favor of `sink` request + option. +* Clients no longer accept an array of URI template string and variables for + URI variables. You will need to expand URI templates before passing them + into a client constructor or request method. +* Client methods `get()`, `post()`, `put()`, `patch()`, `options()`, etc. are + now magic methods that will send synchronous requests. +* Replaced `Utils.php` with plain functions in `functions.php`. +* Removed `GuzzleHttp\Collection`. +* Removed `GuzzleHttp\BatchResults`. Batched pool results are now returned as + an array. +* Removed `GuzzleHttp\Query`. Query string handling is now handled using an + associative array passed into the `query` request option. The query string + is serialized using PHP's `http_build_query`. If you need more control, you + can pass the query string in as a string. +* `GuzzleHttp\QueryParser` has been replaced with the + `GuzzleHttp\Psr7\parse_query`. + +## 5.2.0 - 2015-01-27 + +* Added `AppliesHeadersInterface` to make applying headers to a request based + on the body more generic and not specific to `PostBodyInterface`. +* Reduced the number of stack frames needed to send requests. +* Nested futures are now resolved in the client rather than the RequestFsm +* Finishing state transitions is now handled in the RequestFsm rather than the + RingBridge. +* Added a guard in the Pool class to not use recursion for request retries. + +## 5.1.0 - 2014-12-19 + +* Pool class no longer uses recursion when a request is intercepted. +* The size of a Pool can now be dynamically adjusted using a callback. + See https://github.com/guzzle/guzzle/pull/943. +* Setting a request option to `null` when creating a request with a client will + ensure that the option is not set. This allows you to overwrite default + request options on a per-request basis. + See https://github.com/guzzle/guzzle/pull/937. +* Added the ability to limit which protocols are allowed for redirects by + specifying a `protocols` array in the `allow_redirects` request option. +* Nested futures due to retries are now resolved when waiting for synchronous + responses. See https://github.com/guzzle/guzzle/pull/947. +* `"0"` is now an allowed URI path. See + https://github.com/guzzle/guzzle/pull/935. +* `Query` no longer typehints on the `$query` argument in the constructor, + allowing for strings and arrays. +* Exceptions thrown in the `end` event are now correctly wrapped with Guzzle + specific exceptions if necessary. + +## 5.0.3 - 2014-11-03 + +This change updates query strings so that they are treated as un-encoded values +by default where the value represents an un-encoded value to send over the +wire. A Query object then encodes the value before sending over the wire. This +means that even value query string values (e.g., ":") are url encoded. This +makes the Query class match PHP's http_build_query function. However, if you +want to send requests over the wire using valid query string characters that do +not need to be encoded, then you can provide a string to Url::setQuery() and +pass true as the second argument to specify that the query string is a raw +string that should not be parsed or encoded (unless a call to getQuery() is +subsequently made, forcing the query-string to be converted into a Query +object). + +## 5.0.2 - 2014-10-30 + +* Added a trailing `\r\n` to multipart/form-data payloads. See + https://github.com/guzzle/guzzle/pull/871 +* Added a `GuzzleHttp\Pool::send()` convenience method to match the docs. +* Status codes are now returned as integers. See + https://github.com/guzzle/guzzle/issues/881 +* No longer overwriting an existing `application/x-www-form-urlencoded` header + when sending POST requests, allowing for customized headers. See + https://github.com/guzzle/guzzle/issues/877 +* Improved path URL serialization. + + * No longer double percent-encoding characters in the path or query string if + they are already encoded. + * Now properly encoding the supplied path to a URL object, instead of only + encoding ' ' and '?'. + * Note: This has been changed in 5.0.3 to now encode query string values by + default unless the `rawString` argument is provided when setting the query + string on a URL: Now allowing many more characters to be present in the + query string without being percent encoded. See http://tools.ietf.org/html/rfc3986#appendix-A + +## 5.0.1 - 2014-10-16 + +Bugfix release. + +* Fixed an issue where connection errors still returned response object in + error and end events event though the response is unusable. This has been + corrected so that a response is not returned in the `getResponse` method of + these events if the response did not complete. https://github.com/guzzle/guzzle/issues/867 +* Fixed an issue where transfer statistics were not being populated in the + RingBridge. https://github.com/guzzle/guzzle/issues/866 + +## 5.0.0 - 2014-10-12 + +Adding support for non-blocking responses and some minor API cleanup. + +### New Features + +* Added support for non-blocking responses based on `guzzlehttp/guzzle-ring`. +* Added a public API for creating a default HTTP adapter. +* Updated the redirect plugin to be non-blocking so that redirects are sent + concurrently. Other plugins like this can now be updated to be non-blocking. +* Added a "progress" event so that you can get upload and download progress + events. +* Added `GuzzleHttp\Pool` which implements FutureInterface and transfers + requests concurrently using a capped pool size as efficiently as possible. +* Added `hasListeners()` to EmitterInterface. +* Removed `GuzzleHttp\ClientInterface::sendAll` and marked + `GuzzleHttp\Client::sendAll` as deprecated (it's still there, just not the + recommended way). + +### Breaking changes + +The breaking changes in this release are relatively minor. The biggest thing to +look out for is that request and response objects no longer implement fluent +interfaces. + +* Removed the fluent interfaces (i.e., `return $this`) from requests, + responses, `GuzzleHttp\Collection`, `GuzzleHttp\Url`, + `GuzzleHttp\Query`, `GuzzleHttp\Post\PostBody`, and + `GuzzleHttp\Cookie\SetCookie`. This blog post provides a good outline of + why I did this: http://ocramius.github.io/blog/fluent-interfaces-are-evil/. + This also makes the Guzzle message interfaces compatible with the current + PSR-7 message proposal. +* Removed "functions.php", so that Guzzle is truly PSR-4 compliant. Except + for the HTTP request functions from function.php, these functions are now + implemented in `GuzzleHttp\Utils` using camelCase. `GuzzleHttp\json_decode` + moved to `GuzzleHttp\Utils::jsonDecode`. `GuzzleHttp\get_path` moved to + `GuzzleHttp\Utils::getPath`. `GuzzleHttp\set_path` moved to + `GuzzleHttp\Utils::setPath`. `GuzzleHttp\batch` should now be + `GuzzleHttp\Pool::batch`, which returns an `objectStorage`. Using functions.php + caused problems for many users: they aren't PSR-4 compliant, require an + explicit include, and needed an if-guard to ensure that the functions are not + declared multiple times. +* Rewrote adapter layer. + * Removing all classes from `GuzzleHttp\Adapter`, these are now + implemented as callables that are stored in `GuzzleHttp\Ring\Client`. + * Removed the concept of "parallel adapters". Sending requests serially or + concurrently is now handled using a single adapter. + * Moved `GuzzleHttp\Adapter\Transaction` to `GuzzleHttp\Transaction`. The + Transaction object now exposes the request, response, and client as public + properties. The getters and setters have been removed. +* Removed the "headers" event. This event was only useful for changing the + body a response once the headers of the response were known. You can implement + a similar behavior in a number of ways. One example might be to use a + FnStream that has access to the transaction being sent. For example, when the + first byte is written, you could check if the response headers match your + expectations, and if so, change the actual stream body that is being + written to. +* Removed the `asArray` parameter from + `GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header + value as an array, then use the newly added `getHeaderAsArray()` method of + `MessageInterface`. This change makes the Guzzle interfaces compatible with + the PSR-7 interfaces. +* `GuzzleHttp\Message\MessageFactory` no longer allows subclasses to add + custom request options using double-dispatch (this was an implementation + detail). Instead, you should now provide an associative array to the + constructor which is a mapping of the request option name mapping to a + function that applies the option value to a request. +* Removed the concept of "throwImmediately" from exceptions and error events. + This control mechanism was used to stop a transfer of concurrent requests + from completing. This can now be handled by throwing the exception or by + cancelling a pool of requests or each outstanding future request individually. +* Updated to "GuzzleHttp\Streams" 3.0. + * `GuzzleHttp\Stream\StreamInterface::getContents()` no longer accepts a + `maxLen` parameter. This update makes the Guzzle streams project + compatible with the current PSR-7 proposal. + * `GuzzleHttp\Stream\Stream::__construct`, + `GuzzleHttp\Stream\Stream::factory`, and + `GuzzleHttp\Stream\Utils::create` no longer accept a size in the second + argument. They now accept an associative array of options, including the + "size" key and "metadata" key which can be used to provide custom metadata. + +## 4.2.2 - 2014-09-08 + +* Fixed a memory leak in the CurlAdapter when reusing cURL handles. +* No longer using `request_fulluri` in stream adapter proxies. +* Relative redirects are now based on the last response, not the first response. + +## 4.2.1 - 2014-08-19 + +* Ensuring that the StreamAdapter does not always add a Content-Type header +* Adding automated github releases with a phar and zip + +## 4.2.0 - 2014-08-17 + +* Now merging in default options using a case-insensitive comparison. + Closes https://github.com/guzzle/guzzle/issues/767 +* Added the ability to automatically decode `Content-Encoding` response bodies + using the `decode_content` request option. This is set to `true` by default + to decode the response body if it comes over the wire with a + `Content-Encoding`. Set this value to `false` to disable decoding the + response content, and pass a string to provide a request `Accept-Encoding` + header and turn on automatic response decoding. This feature now allows you + to pass an `Accept-Encoding` header in the headers of a request but still + disable automatic response decoding. + Closes https://github.com/guzzle/guzzle/issues/764 +* Added the ability to throw an exception immediately when transferring + requests in parallel. Closes https://github.com/guzzle/guzzle/issues/760 +* Updating guzzlehttp/streams dependency to ~2.1 +* No longer utilizing the now deprecated namespaced methods from the stream + package. + +## 4.1.8 - 2014-08-14 + +* Fixed an issue in the CurlFactory that caused setting the `stream=false` + request option to throw an exception. + See: https://github.com/guzzle/guzzle/issues/769 +* TransactionIterator now calls rewind on the inner iterator. + See: https://github.com/guzzle/guzzle/pull/765 +* You can now set the `Content-Type` header to `multipart/form-data` + when creating POST requests to force multipart bodies. + See https://github.com/guzzle/guzzle/issues/768 + +## 4.1.7 - 2014-08-07 + +* Fixed an error in the HistoryPlugin that caused the same request and response + to be logged multiple times when an HTTP protocol error occurs. +* Ensuring that cURL does not add a default Content-Type when no Content-Type + has been supplied by the user. This prevents the adapter layer from modifying + the request that is sent over the wire after any listeners may have already + put the request in a desired state (e.g., signed the request). +* Throwing an exception when you attempt to send requests that have the + "stream" set to true in parallel using the MultiAdapter. +* Only calling curl_multi_select when there are active cURL handles. This was + previously changed and caused performance problems on some systems due to PHP + always selecting until the maximum select timeout. +* Fixed a bug where multipart/form-data POST fields were not correctly + aggregated (e.g., values with "&"). + +## 4.1.6 - 2014-08-03 + +* Added helper methods to make it easier to represent messages as strings, + including getting the start line and getting headers as a string. + +## 4.1.5 - 2014-08-02 + +* Automatically retrying cURL "Connection died, retrying a fresh connect" + errors when possible. +* cURL implementation cleanup +* Allowing multiple event subscriber listeners to be registered per event by + passing an array of arrays of listener configuration. + +## 4.1.4 - 2014-07-22 + +* Fixed a bug that caused multi-part POST requests with more than one field to + serialize incorrectly. +* Paths can now be set to "0" +* `ResponseInterface::xml` now accepts a `libxml_options` option and added a + missing default argument that was required when parsing XML response bodies. +* A `save_to` stream is now created lazily, which means that files are not + created on disk unless a request succeeds. + +## 4.1.3 - 2014-07-15 + +* Various fixes to multipart/form-data POST uploads +* Wrapping function.php in an if-statement to ensure Guzzle can be used + globally and in a Composer install +* Fixed an issue with generating and merging in events to an event array +* POST headers are only applied before sending a request to allow you to change + the query aggregator used before uploading +* Added much more robust query string parsing +* Fixed various parsing and normalization issues with URLs +* Fixing an issue where multi-valued headers were not being utilized correctly + in the StreamAdapter + +## 4.1.2 - 2014-06-18 + +* Added support for sending payloads with GET requests + +## 4.1.1 - 2014-06-08 + +* Fixed an issue related to using custom message factory options in subclasses +* Fixed an issue with nested form fields in a multi-part POST +* Fixed an issue with using the `json` request option for POST requests +* Added `ToArrayInterface` to `GuzzleHttp\Cookie\CookieJar` + +## 4.1.0 - 2014-05-27 + +* Added a `json` request option to easily serialize JSON payloads. +* Added a `GuzzleHttp\json_decode()` wrapper to safely parse JSON. +* Added `setPort()` and `getPort()` to `GuzzleHttp\Message\RequestInterface`. +* Added the ability to provide an emitter to a client in the client constructor. +* Added the ability to persist a cookie session using $_SESSION. +* Added a trait that can be used to add event listeners to an iterator. +* Removed request method constants from RequestInterface. +* Fixed warning when invalid request start-lines are received. +* Updated MessageFactory to work with custom request option methods. +* Updated cacert bundle to latest build. + +4.0.2 (2014-04-16) +------------------ + +* Proxy requests using the StreamAdapter now properly use request_fulluri (#632) +* Added the ability to set scalars as POST fields (#628) + +## 4.0.1 - 2014-04-04 + +* The HTTP status code of a response is now set as the exception code of + RequestException objects. +* 303 redirects will now correctly switch from POST to GET requests. +* The default parallel adapter of a client now correctly uses the MultiAdapter. +* HasDataTrait now initializes the internal data array as an empty array so + that the toArray() method always returns an array. + +## 4.0.0 - 2014-03-29 + +* For more information on the 4.0 transition, see: + http://mtdowling.com/blog/2014/03/15/guzzle-4-rc/ +* For information on changes and upgrading, see: + https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40 +* Added `GuzzleHttp\batch()` as a convenience function for sending requests in + parallel without needing to write asynchronous code. +* Restructured how events are added to `GuzzleHttp\ClientInterface::sendAll()`. + You can now pass a callable or an array of associative arrays where each + associative array contains the "fn", "priority", and "once" keys. + +## 4.0.0.rc-2 - 2014-03-25 + +* Removed `getConfig()` and `setConfig()` from clients to avoid confusion + around whether things like base_url, message_factory, etc. should be able to + be retrieved or modified. +* Added `getDefaultOption()` and `setDefaultOption()` to ClientInterface +* functions.php functions were renamed using snake_case to match PHP idioms +* Added support for `HTTP_PROXY`, `HTTPS_PROXY`, and + `GUZZLE_CURL_SELECT_TIMEOUT` environment variables +* Added the ability to specify custom `sendAll()` event priorities +* Added the ability to specify custom stream context options to the stream + adapter. +* Added a functions.php function for `get_path()` and `set_path()` +* CurlAdapter and MultiAdapter now use a callable to generate curl resources +* MockAdapter now properly reads a body and emits a `headers` event +* Updated Url class to check if a scheme and host are set before adding ":" + and "//". This allows empty Url (e.g., "") to be serialized as "". +* Parsing invalid XML no longer emits warnings +* Curl classes now properly throw AdapterExceptions +* Various performance optimizations +* Streams are created with the faster `Stream\create()` function +* Marked deprecation_proxy() as internal +* Test server is now a collection of static methods on a class + +## 4.0.0-rc.1 - 2014-03-15 + +* See https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40 + +## 3.8.1 - 2014-01-28 + +* Bug: Always using GET requests when redirecting from a 303 response +* Bug: CURLOPT_SSL_VERIFYHOST is now correctly set to false when setting `$certificateAuthority` to false in + `Guzzle\Http\ClientInterface::setSslVerification()` +* Bug: RedirectPlugin now uses strict RFC 3986 compliance when combining a base URL with a relative URL +* Bug: The body of a request can now be set to `"0"` +* Sending PHP stream requests no longer forces `HTTP/1.0` +* Adding more information to ExceptionCollection exceptions so that users have more context, including a stack trace of + each sub-exception +* Updated the `$ref` attribute in service descriptions to merge over any existing parameters of a schema (rather than + clobbering everything). +* Merging URLs will now use the query string object from the relative URL (thus allowing custom query aggregators) +* Query strings are now parsed in a way that they do no convert empty keys with no value to have a dangling `=`. + For example `foo&bar=baz` is now correctly parsed and recognized as `foo&bar=baz` rather than `foo=&bar=baz`. +* Now properly escaping the regular expression delimiter when matching Cookie domains. +* Network access is now disabled when loading XML documents + +## 3.8.0 - 2013-12-05 + +* Added the ability to define a POST name for a file +* JSON response parsing now properly walks additionalProperties +* cURL error code 18 is now retried automatically in the BackoffPlugin +* Fixed a cURL error when URLs contain fragments +* Fixed an issue in the BackoffPlugin retry event where it was trying to access all exceptions as if they were + CurlExceptions +* CURLOPT_PROGRESS function fix for PHP 5.5 (69fcc1e) +* Added the ability for Guzzle to work with older versions of cURL that do not support `CURLOPT_TIMEOUT_MS` +* Fixed a bug that was encountered when parsing empty header parameters +* UriTemplate now has a `setRegex()` method to match the docs +* The `debug` request parameter now checks if it is truthy rather than if it exists +* Setting the `debug` request parameter to true shows verbose cURL output instead of using the LogPlugin +* Added the ability to combine URLs using strict RFC 3986 compliance +* Command objects can now return the validation errors encountered by the command +* Various fixes to cache revalidation (#437 and 29797e5) +* Various fixes to the AsyncPlugin +* Cleaned up build scripts + +## 3.7.4 - 2013-10-02 + +* Bug fix: 0 is now an allowed value in a description parameter that has a default value (#430) +* Bug fix: SchemaFormatter now returns an integer when formatting to a Unix timestamp + (see https://github.com/aws/aws-sdk-php/issues/147) +* Bug fix: Cleaned up and fixed URL dot segment removal to properly resolve internal dots +* Minimum PHP version is now properly specified as 5.3.3 (up from 5.3.2) (#420) +* Updated the bundled cacert.pem (#419) +* OauthPlugin now supports adding authentication to headers or query string (#425) + +## 3.7.3 - 2013-09-08 + +* Added the ability to get the exception associated with a request/command when using `MultiTransferException` and + `CommandTransferException`. +* Setting `additionalParameters` of a response to false is now honored when parsing responses with a service description +* Schemas are only injected into response models when explicitly configured. +* No longer guessing Content-Type based on the path of a request. Content-Type is now only guessed based on the path of + an EntityBody. +* Bug fix: ChunkedIterator can now properly chunk a \Traversable as well as an \Iterator. +* Bug fix: FilterIterator now relies on `\Iterator` instead of `\Traversable`. +* Bug fix: Gracefully handling malformed responses in RequestMediator::writeResponseBody() +* Bug fix: Replaced call to canCache with canCacheRequest in the CallbackCanCacheStrategy of the CachePlugin +* Bug fix: Visiting XML attributes first before visiting XML children when serializing requests +* Bug fix: Properly parsing headers that contain commas contained in quotes +* Bug fix: mimetype guessing based on a filename is now case-insensitive + +## 3.7.2 - 2013-08-02 + +* Bug fix: Properly URL encoding paths when using the PHP-only version of the UriTemplate expander + See https://github.com/guzzle/guzzle/issues/371 +* Bug fix: Cookie domains are now matched correctly according to RFC 6265 + See https://github.com/guzzle/guzzle/issues/377 +* Bug fix: GET parameters are now used when calculating an OAuth signature +* Bug fix: Fixed an issue with cache revalidation where the If-None-Match header was being double quoted +* `Guzzle\Common\AbstractHasDispatcher::dispatch()` now returns the event that was dispatched +* `Guzzle\Http\QueryString::factory()` now guesses the most appropriate query aggregator to used based on the input. + See https://github.com/guzzle/guzzle/issues/379 +* Added a way to add custom domain objects to service description parsing using the `operation.parse_class` event. See + https://github.com/guzzle/guzzle/pull/380 +* cURL multi cleanup and optimizations + +## 3.7.1 - 2013-07-05 + +* Bug fix: Setting default options on a client now works +* Bug fix: Setting options on HEAD requests now works. See #352 +* Bug fix: Moving stream factory before send event to before building the stream. See #353 +* Bug fix: Cookies no longer match on IP addresses per RFC 6265 +* Bug fix: Correctly parsing header parameters that are in `<>` and quotes +* Added `cert` and `ssl_key` as request options +* `Host` header can now diverge from the host part of a URL if the header is set manually +* `Guzzle\Service\Command\LocationVisitor\Request\XmlVisitor` was rewritten to change from using SimpleXML to XMLWriter +* OAuth parameters are only added via the plugin if they aren't already set +* Exceptions are now thrown when a URL cannot be parsed +* Returning `false` if `Guzzle\Http\EntityBody::getContentMd5()` fails +* Not setting a `Content-MD5` on a command if calculating the Content-MD5 fails via the CommandContentMd5Plugin + +## 3.7.0 - 2013-06-10 + +* See UPGRADING.md for more information on how to upgrade. +* Requests now support the ability to specify an array of $options when creating a request to more easily modify a + request. You can pass a 'request.options' configuration setting to a client to apply default request options to + every request created by a client (e.g. default query string variables, headers, curl options, etc.). +* Added a static facade class that allows you to use Guzzle with static methods and mount the class to `\Guzzle`. + See `Guzzle\Http\StaticClient::mount`. +* Added `command.request_options` to `Guzzle\Service\Command\AbstractCommand` to pass request options to requests + created by a command (e.g. custom headers, query string variables, timeout settings, etc.). +* Stream size in `Guzzle\Stream\PhpStreamRequestFactory` will now be set if Content-Length is returned in the + headers of a response +* Added `Guzzle\Common\Collection::setPath($path, $value)` to set a value into an array using a nested key + (e.g. `$collection->setPath('foo/baz/bar', 'test'); echo $collection['foo']['bar']['bar'];`) +* ServiceBuilders now support storing and retrieving arbitrary data +* CachePlugin can now purge all resources for a given URI +* CachePlugin can automatically purge matching cached items when a non-idempotent request is sent to a resource +* CachePlugin now uses the Vary header to determine if a resource is a cache hit +* `Guzzle\Http\Message\Response` now implements `\Serializable` +* Added `Guzzle\Cache\CacheAdapterFactory::fromCache()` to more easily create cache adapters +* `Guzzle\Service\ClientInterface::execute()` now accepts an array, single command, or Traversable +* Fixed a bug in `Guzzle\Http\Message\Header\Link::addLink()` +* Better handling of calculating the size of a stream in `Guzzle\Stream\Stream` using fstat() and caching the size +* `Guzzle\Common\Exception\ExceptionCollection` now creates a more readable exception message +* Fixing BC break: Added back the MonologLogAdapter implementation rather than extending from PsrLog so that older + Symfony users can still use the old version of Monolog. +* Fixing BC break: Added the implementation back in for `Guzzle\Http\Message\AbstractMessage::getTokenizedHeader()`. + Now triggering an E_USER_DEPRECATED warning when used. Use `$message->getHeader()->parseParams()`. +* Several performance improvements to `Guzzle\Common\Collection` +* Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`: + createRequest, head, delete, put, patch, post, options, prepareRequest +* Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()` +* Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface` +* Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to + `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a + resource, string, or EntityBody into the $options parameter to specify the download location of the response. +* Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a + default `array()` +* Added `Guzzle\Stream\StreamInterface::isRepeatable` +* Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use + $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or + $client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))`. +* Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use $client->getConfig()->getPath('request.options/headers')`. +* Removed `Guzzle\Http\ClientInterface::expandTemplate()` +* Removed `Guzzle\Http\ClientInterface::setRequestFactory()` +* Removed `Guzzle\Http\ClientInterface::getCurlMulti()` +* Removed `Guzzle\Http\Message\RequestInterface::canCache` +* Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect` +* Removed `Guzzle\Http\Message\RequestInterface::isRedirect` +* Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods. +* You can now enable E_USER_DEPRECATED warnings to see if you are using a deprecated method by setting + `Guzzle\Common\Version::$emitWarnings` to true. +* Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use + `$request->getResponseBody()->isRepeatable()` instead. +* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use + `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. +* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use + `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. +* Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead. +* Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead. +* Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated +* Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. + These will work through Guzzle 4.0 +* Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use [request.options][params]. +* Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client. +* Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use $client->getConfig()->getPath('request.options/headers')`. +* Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. +* Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8. +* Marked `Guzzle\Common\Collection::inject()` as deprecated. +* Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest');` +* CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a + CacheStorageInterface. These two objects and interface will be removed in a future version. +* Always setting X-cache headers on cached responses +* Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin +* `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface + $request, Response $response);` +* `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);` +* `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);` +* Added `CacheStorageInterface::purge($url)` +* `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin + $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache, + CanCacheStrategyInterface $canCache = null)` +* Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)` + +## 3.6.0 - 2013-05-29 + +* ServiceDescription now implements ToArrayInterface +* Added command.hidden_params to blacklist certain headers from being treated as additionalParameters +* Guzzle can now correctly parse incomplete URLs +* Mixed casing of headers are now forced to be a single consistent casing across all values for that header. +* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution +* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader(). +* Specific header implementations can be created for complex headers. When a message creates a header, it uses a + HeaderFactory which can map specific headers to specific header classes. There is now a Link header and + CacheControl header implementation. +* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate +* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti() +* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in + Guzzle\Http\Curl\RequestMediator +* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string. +* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface +* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders() +* Removed Guzzle\Parser\ParserRegister::get(). Use getParser() +* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser(). +* All response header helper functions return a string rather than mixing Header objects and strings inconsistently +* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle + directly via interfaces +* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist + but are a no-op until removed. +* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a + `Guzzle\Service\Command\ArrayCommandInterface`. +* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response + on a request while the request is still being transferred +* The ability to case-insensitively search for header values +* Guzzle\Http\Message\Header::hasExactHeader +* Guzzle\Http\Message\Header::raw. Use getAll() +* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object + instead. +* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess +* Added the ability to cast Model objects to a string to view debug information. + +## 3.5.0 - 2013-05-13 + +* Bug: Fixed a regression so that request responses are parsed only once per oncomplete event rather than multiple times +* Bug: Better cleanup of one-time events across the board (when an event is meant to fire once, it will now remove + itself from the EventDispatcher) +* Bug: `Guzzle\Log\MessageFormatter` now properly writes "total_time" and "connect_time" values +* Bug: Cloning an EntityEnclosingRequest now clones the EntityBody too +* Bug: Fixed an undefined index error when parsing nested JSON responses with a sentAs parameter that reference a + non-existent key +* Bug: All __call() method arguments are now required (helps with mocking frameworks) +* Deprecating Response::getRequest() and now using a shallow clone of a request object to remove a circular reference + to help with refcount based garbage collection of resources created by sending a request +* Deprecating ZF1 cache and log adapters. These will be removed in the next major version. +* Deprecating `Response::getPreviousResponse()` (method signature still exists, but it's deprecated). Use the + HistoryPlugin for a history. +* Added a `responseBody` alias for the `response_body` location +* Refactored internals to no longer rely on Response::getRequest() +* HistoryPlugin can now be cast to a string +* HistoryPlugin now logs transactions rather than requests and responses to more accurately keep track of the requests + and responses that are sent over the wire +* Added `getEffectiveUrl()` and `getRedirectCount()` to Response objects + +## 3.4.3 - 2013-04-30 + +* Bug fix: Fixing bug introduced in 3.4.2 where redirect responses are duplicated on the final redirected response +* Added a check to re-extract the temp cacert bundle from the phar before sending each request + +## 3.4.2 - 2013-04-29 + +* Bug fix: Stream objects now work correctly with "a" and "a+" modes +* Bug fix: Removing `Transfer-Encoding: chunked` header when a Content-Length is present +* Bug fix: AsyncPlugin no longer forces HEAD requests +* Bug fix: DateTime timezones are now properly handled when using the service description schema formatter +* Bug fix: CachePlugin now properly handles stale-if-error directives when a request to the origin server fails +* Setting a response on a request will write to the custom request body from the response body if one is specified +* LogPlugin now writes to php://output when STDERR is undefined +* Added the ability to set multiple POST files for the same key in a single call +* application/x-www-form-urlencoded POSTs now use the utf-8 charset by default +* Added the ability to queue CurlExceptions to the MockPlugin +* Cleaned up how manual responses are queued on requests (removed "queued_response" and now using request.before_send) +* Configuration loading now allows remote files + +## 3.4.1 - 2013-04-16 + +* Large refactoring to how CurlMulti handles work. There is now a proxy that sits in front of a pool of CurlMulti + handles. This greatly simplifies the implementation, fixes a couple bugs, and provides a small performance boost. +* Exceptions are now properly grouped when sending requests in parallel +* Redirects are now properly aggregated when a multi transaction fails +* Redirects now set the response on the original object even in the event of a failure +* Bug fix: Model names are now properly set even when using $refs +* Added support for PHP 5.5's CurlFile to prevent warnings with the deprecated @ syntax +* Added support for oauth_callback in OAuth signatures +* Added support for oauth_verifier in OAuth signatures +* Added support to attempt to retrieve a command first literally, then ucfirst, the with inflection + +## 3.4.0 - 2013-04-11 + +* Bug fix: URLs are now resolved correctly based on http://tools.ietf.org/html/rfc3986#section-5.2. #289 +* Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289 +* Bug fix: Parsing a query string with a single PHP array value will now result in an array. #263 +* Bug fix: Better normalization of the User-Agent header to prevent duplicate headers. #264. +* Bug fix: Added `number` type to service descriptions. +* Bug fix: empty parameters are removed from an OAuth signature +* Bug fix: Revalidating a cache entry prefers the Last-Modified over the Date header +* Bug fix: Fixed "array to string" error when validating a union of types in a service description +* Bug fix: Removed code that attempted to determine the size of a stream when data is written to the stream +* Bug fix: Not including an `oauth_token` if the value is null in the OauthPlugin. +* Bug fix: Now correctly aggregating successful requests and failed requests in CurlMulti when a redirect occurs. +* The new default CURLOPT_TIMEOUT setting has been increased to 150 seconds so that Guzzle works on poor connections. +* Added a feature to EntityEnclosingRequest::setBody() that will automatically set the Content-Type of the request if + the Content-Type can be determined based on the entity body or the path of the request. +* Added the ability to overwrite configuration settings in a client when grabbing a throwaway client from a builder. +* Added support for a PSR-3 LogAdapter. +* Added a `command.after_prepare` event +* Added `oauth_callback` parameter to the OauthPlugin +* Added the ability to create a custom stream class when using a stream factory +* Added a CachingEntityBody decorator +* Added support for `additionalParameters` in service descriptions to define how custom parameters are serialized. +* The bundled SSL certificate is now provided in the phar file and extracted when running Guzzle from a phar. +* You can now send any EntityEnclosingRequest with POST fields or POST files and cURL will handle creating bodies +* POST requests using a custom entity body are now treated exactly like PUT requests but with a custom cURL method. This + means that the redirect behavior of POST requests with custom bodies will not be the same as POST requests that use + POST fields or files (the latter is only used when emulating a form POST in the browser). +* Lots of cleanup to CurlHandle::factory and RequestFactory::createRequest + +## 3.3.1 - 2013-03-10 + +* Added the ability to create PHP streaming responses from HTTP requests +* Bug fix: Running any filters when parsing response headers with service descriptions +* Bug fix: OauthPlugin fixes to allow for multi-dimensional array signing, and sorting parameters before signing +* Bug fix: Removed the adding of default empty arrays and false Booleans to responses in order to be consistent across + response location visitors. +* Bug fix: Removed the possibility of creating configuration files with circular dependencies +* RequestFactory::create() now uses the key of a POST file when setting the POST file name +* Added xmlAllowEmpty to serialize an XML body even if no XML specific parameters are set + +## 3.3.0 - 2013-03-03 + +* A large number of performance optimizations have been made +* Bug fix: Added 'wb' as a valid write mode for streams +* Bug fix: `Guzzle\Http\Message\Response::json()` now allows scalar values to be returned +* Bug fix: Fixed bug in `Guzzle\Http\Message\Response` where wrapping quotes were stripped from `getEtag()` +* BC: Removed `Guzzle\Http\Utils` class +* BC: Setting a service description on a client will no longer modify the client's command factories. +* BC: Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using + the 'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io' +* BC: `Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getSteamType()` are no longer converted to + lowercase +* Operation parameter objects are now lazy loaded internally +* Added ErrorResponsePlugin that can throw errors for responses defined in service description operations' errorResponses +* Added support for instantiating responseType=class responseClass classes. Classes must implement + `Guzzle\Service\Command\ResponseClassInterface` +* Added support for additionalProperties for top-level parameters in responseType=model responseClasses. These + additional properties also support locations and can be used to parse JSON responses where the outermost part of the + JSON is an array +* Added support for nested renaming of JSON models (rename sentAs to name) +* CachePlugin + * Added support for stale-if-error so that the CachePlugin can now serve stale content from the cache on error + * Debug headers can now added to cached response in the CachePlugin + +## 3.2.0 - 2013-02-14 + +* CurlMulti is no longer reused globally. A new multi object is created per-client. This helps to isolate clients. +* URLs with no path no longer contain a "/" by default +* Guzzle\Http\QueryString does no longer manages the leading "?". This is now handled in Guzzle\Http\Url. +* BadResponseException no longer includes the full request and response message +* Adding setData() to Guzzle\Service\Description\ServiceDescriptionInterface +* Adding getResponseBody() to Guzzle\Http\Message\RequestInterface +* Various updates to classes to use ServiceDescriptionInterface type hints rather than ServiceDescription +* Header values can now be normalized into distinct values when multiple headers are combined with a comma separated list +* xmlEncoding can now be customized for the XML declaration of a XML service description operation +* Guzzle\Http\QueryString now uses Guzzle\Http\QueryAggregator\QueryAggregatorInterface objects to add custom value + aggregation and no longer uses callbacks +* The URL encoding implementation of Guzzle\Http\QueryString can now be customized +* Bug fix: Filters were not always invoked for array service description parameters +* Bug fix: Redirects now use a target response body rather than a temporary response body +* Bug fix: The default exponential backoff BackoffPlugin was not giving when the request threshold was exceeded +* Bug fix: Guzzle now takes the first found value when grabbing Cache-Control directives + +## 3.1.2 - 2013-01-27 + +* Refactored how operation responses are parsed. Visitors now include a before() method responsible for parsing the + response body. For example, the XmlVisitor now parses the XML response into an array in the before() method. +* Fixed an issue where cURL would not automatically decompress responses when the Accept-Encoding header was sent +* CURLOPT_SSL_VERIFYHOST is never set to 1 because it is deprecated (see 5e0ff2ef20f839e19d1eeb298f90ba3598784444) +* Fixed a bug where redirect responses were not chained correctly using getPreviousResponse() +* Setting default headers on a client after setting the user-agent will not erase the user-agent setting + +## 3.1.1 - 2013-01-20 + +* Adding wildcard support to Guzzle\Common\Collection::getPath() +* Adding alias support to ServiceBuilder configs +* Adding Guzzle\Service\Resource\CompositeResourceIteratorFactory and cleaning up factory interface + +## 3.1.0 - 2013-01-12 + +* BC: CurlException now extends from RequestException rather than BadResponseException +* BC: Renamed Guzzle\Plugin\Cache\CanCacheStrategyInterface::canCache() to canCacheRequest() and added CanCacheResponse() +* Added getData to ServiceDescriptionInterface +* Added context array to RequestInterface::setState() +* Bug: Removing hard dependency on the BackoffPlugin from Guzzle\Http +* Bug: Adding required content-type when JSON request visitor adds JSON to a command +* Bug: Fixing the serialization of a service description with custom data +* Made it easier to deal with exceptions thrown when transferring commands or requests in parallel by providing + an array of successful and failed responses +* Moved getPath from Guzzle\Service\Resource\Model to Guzzle\Common\Collection +* Added Guzzle\Http\IoEmittingEntityBody +* Moved command filtration from validators to location visitors +* Added `extends` attributes to service description parameters +* Added getModels to ServiceDescriptionInterface + +## 3.0.7 - 2012-12-19 + +* Fixing phar detection when forcing a cacert to system if null or true +* Allowing filename to be passed to `Guzzle\Http\Message\Request::setResponseBody()` +* Cleaning up `Guzzle\Common\Collection::inject` method +* Adding a response_body location to service descriptions + +## 3.0.6 - 2012-12-09 + +* CurlMulti performance improvements +* Adding setErrorResponses() to Operation +* composer.json tweaks + +## 3.0.5 - 2012-11-18 + +* Bug: Fixing an infinite recursion bug caused from revalidating with the CachePlugin +* Bug: Response body can now be a string containing "0" +* Bug: Using Guzzle inside of a phar uses system by default but now allows for a custom cacert +* Bug: QueryString::fromString now properly parses query string parameters that contain equal signs +* Added support for XML attributes in service description responses +* DefaultRequestSerializer now supports array URI parameter values for URI template expansion +* Added better mimetype guessing to requests and post files + +## 3.0.4 - 2012-11-11 + +* Bug: Fixed a bug when adding multiple cookies to a request to use the correct glue value +* Bug: Cookies can now be added that have a name, domain, or value set to "0" +* Bug: Using the system cacert bundle when using the Phar +* Added json and xml methods to Response to make it easier to parse JSON and XML response data into data structures +* Enhanced cookie jar de-duplication +* Added the ability to enable strict cookie jars that throw exceptions when invalid cookies are added +* Added setStream to StreamInterface to actually make it possible to implement custom rewind behavior for entity bodies +* Added the ability to create any sort of hash for a stream rather than just an MD5 hash + +## 3.0.3 - 2012-11-04 + +* Implementing redirects in PHP rather than cURL +* Added PECL URI template extension and using as default parser if available +* Bug: Fixed Content-Length parsing of Response factory +* Adding rewind() method to entity bodies and streams. Allows for custom rewinding of non-repeatable streams. +* Adding ToArrayInterface throughout library +* Fixing OauthPlugin to create unique nonce values per request + +## 3.0.2 - 2012-10-25 + +* Magic methods are enabled by default on clients +* Magic methods return the result of a command +* Service clients no longer require a base_url option in the factory +* Bug: Fixed an issue with URI templates where null template variables were being expanded + +## 3.0.1 - 2012-10-22 + +* Models can now be used like regular collection objects by calling filter, map, etc. +* Models no longer require a Parameter structure or initial data in the constructor +* Added a custom AppendIterator to get around a PHP bug with the `\AppendIterator` + +## 3.0.0 - 2012-10-15 + +* Rewrote service description format to be based on Swagger + * Now based on JSON schema + * Added nested input structures and nested response models + * Support for JSON and XML input and output models + * Renamed `commands` to `operations` + * Removed dot class notation + * Removed custom types +* Broke the project into smaller top-level namespaces to be more component friendly +* Removed support for XML configs and descriptions. Use arrays or JSON files. +* Removed the Validation component and Inspector +* Moved all cookie code to Guzzle\Plugin\Cookie +* Magic methods on a Guzzle\Service\Client now return the command un-executed. +* Calling getResult() or getResponse() on a command will lazily execute the command if needed. +* Now shipping with cURL's CA certs and using it by default +* Added previousResponse() method to response objects +* No longer sending Accept and Accept-Encoding headers on every request +* Only sending an Expect header by default when a payload is greater than 1MB +* Added/moved client options: + * curl.blacklist to curl.option.blacklist + * Added ssl.certificate_authority +* Added a Guzzle\Iterator component +* Moved plugins from Guzzle\Http\Plugin to Guzzle\Plugin +* Added a more robust backoff retry strategy (replaced the ExponentialBackoffPlugin) +* Added a more robust caching plugin +* Added setBody to response objects +* Updating LogPlugin to use a more flexible MessageFormatter +* Added a completely revamped build process +* Cleaning up Collection class and removing default values from the get method +* Fixed ZF2 cache adapters + +## 2.8.8 - 2012-10-15 + +* Bug: Fixed a cookie issue that caused dot prefixed domains to not match where popular browsers did + +## 2.8.7 - 2012-09-30 + +* Bug: Fixed config file aliases for JSON includes +* Bug: Fixed cookie bug on a request object by using CookieParser to parse cookies on requests +* Bug: Removing the path to a file when sending a Content-Disposition header on a POST upload +* Bug: Hardening request and response parsing to account for missing parts +* Bug: Fixed PEAR packaging +* Bug: Fixed Request::getInfo +* Bug: Fixed cases where CURLM_CALL_MULTI_PERFORM return codes were causing curl transactions to fail +* Adding the ability for the namespace Iterator factory to look in multiple directories +* Added more getters/setters/removers from service descriptions +* Added the ability to remove POST fields from OAuth signatures +* OAuth plugin now supports 2-legged OAuth + +## 2.8.6 - 2012-09-05 + +* Added the ability to modify and build service descriptions +* Added the use of visitors to apply parameters to locations in service descriptions using the dynamic command +* Added a `json` parameter location +* Now allowing dot notation for classes in the CacheAdapterFactory +* Using the union of two arrays rather than an array_merge when extending service builder services and service params +* Ensuring that a service is a string before doing strpos() checks on it when substituting services for references + in service builder config files. +* Services defined in two different config files that include one another will by default replace the previously + defined service, but you can now create services that extend themselves and merge their settings over the previous +* The JsonLoader now supports aliasing filenames with different filenames. This allows you to alias something like + '_default' with a default JSON configuration file. + +## 2.8.5 - 2012-08-29 + +* Bug: Suppressed empty arrays from URI templates +* Bug: Added the missing $options argument from ServiceDescription::factory to enable caching +* Added support for HTTP responses that do not contain a reason phrase in the start-line +* AbstractCommand commands are now invokable +* Added a way to get the data used when signing an Oauth request before a request is sent + +## 2.8.4 - 2012-08-15 + +* Bug: Custom delay time calculations are no longer ignored in the ExponentialBackoffPlugin +* Added the ability to transfer entity bodies as a string rather than streamed. This gets around curl error 65. Set `body_as_string` in a request's curl options to enable. +* Added a StreamInterface, EntityBodyInterface, and added ftell() to Guzzle\Common\Stream +* Added an AbstractEntityBodyDecorator and a ReadLimitEntityBody decorator to transfer only a subset of a decorated stream +* Stream and EntityBody objects will now return the file position to the previous position after a read required operation (e.g. getContentMd5()) +* Added additional response status codes +* Removed SSL information from the default User-Agent header +* DELETE requests can now send an entity body +* Added an EventDispatcher to the ExponentialBackoffPlugin and added an ExponentialBackoffLogger to log backoff retries +* Added the ability of the MockPlugin to consume mocked request bodies +* LogPlugin now exposes request and response objects in the extras array + +## 2.8.3 - 2012-07-30 + +* Bug: Fixed a case where empty POST requests were sent as GET requests +* Bug: Fixed a bug in ExponentialBackoffPlugin that caused fatal errors when retrying an EntityEnclosingRequest that does not have a body +* Bug: Setting the response body of a request to null after completing a request, not when setting the state of a request to new +* Added multiple inheritance to service description commands +* Added an ApiCommandInterface and added `getParamNames()` and `hasParam()` +* Removed the default 2mb size cutoff from the Md5ValidatorPlugin so that it now defaults to validating everything +* Changed CurlMulti::perform to pass a smaller timeout to CurlMulti::executeHandles + +## 2.8.2 - 2012-07-24 + +* Bug: Query string values set to 0 are no longer dropped from the query string +* Bug: A Collection object is no longer created each time a call is made to `Guzzle\Service\Command\AbstractCommand::getRequestHeaders()` +* Bug: `+` is now treated as an encoded space when parsing query strings +* QueryString and Collection performance improvements +* Allowing dot notation for class paths in filters attribute of a service descriptions + +## 2.8.1 - 2012-07-16 + +* Loosening Event Dispatcher dependency +* POST redirects can now be customized using CURLOPT_POSTREDIR + +## 2.8.0 - 2012-07-15 + +* BC: Guzzle\Http\Query + * Query strings with empty variables will always show an equal sign unless the variable is set to QueryString::BLANK (e.g. ?acl= vs ?acl) + * Changed isEncodingValues() and isEncodingFields() to isUrlEncoding() + * Changed setEncodeValues(bool) and setEncodeFields(bool) to useUrlEncoding(bool) + * Changed the aggregation functions of QueryString to be static methods + * Can now use fromString() with querystrings that have a leading ? +* cURL configuration values can be specified in service descriptions using `curl.` prefixed parameters +* Content-Length is set to 0 before emitting the request.before_send event when sending an empty request body +* Cookies are no longer URL decoded by default +* Bug: URI template variables set to null are no longer expanded + +## 2.7.2 - 2012-07-02 + +* BC: Moving things to get ready for subtree splits. Moving Inflection into Common. Moving Guzzle\Http\Parser to Guzzle\Parser. +* BC: Removing Guzzle\Common\Batch\Batch::count() and replacing it with isEmpty() +* CachePlugin now allows for a custom request parameter function to check if a request can be cached +* Bug fix: CachePlugin now only caches GET and HEAD requests by default +* Bug fix: Using header glue when transferring headers over the wire +* Allowing deeply nested arrays for composite variables in URI templates +* Batch divisors can now return iterators or arrays + +## 2.7.1 - 2012-06-26 + +* Minor patch to update version number in UA string +* Updating build process + +## 2.7.0 - 2012-06-25 + +* BC: Inflection classes moved to Guzzle\Inflection. No longer static methods. Can now inject custom inflectors into classes. +* BC: Removed magic setX methods from commands +* BC: Magic methods mapped to service description commands are now inflected in the command factory rather than the client __call() method +* Verbose cURL options are no longer enabled by default. Set curl.debug to true on a client to enable. +* Bug: Now allowing colons in a response start-line (e.g. HTTP/1.1 503 Service Unavailable: Back-end server is at capacity) +* Guzzle\Service\Resource\ResourceIteratorApplyBatched now internally uses the Guzzle\Common\Batch namespace +* Added Guzzle\Service\Plugin namespace and a PluginCollectionPlugin +* Added the ability to set POST fields and files in a service description +* Guzzle\Http\EntityBody::factory() now accepts objects with a __toString() method +* Adding a command.before_prepare event to clients +* Added BatchClosureTransfer and BatchClosureDivisor +* BatchTransferException now includes references to the batch divisor and transfer strategies +* Fixed some tests so that they pass more reliably +* Added Guzzle\Common\Log\ArrayLogAdapter + +## 2.6.6 - 2012-06-10 + +* BC: Removing Guzzle\Http\Plugin\BatchQueuePlugin +* BC: Removing Guzzle\Service\Command\CommandSet +* Adding generic batching system (replaces the batch queue plugin and command set) +* Updating ZF cache and log adapters and now using ZF's composer repository +* Bug: Setting the name of each ApiParam when creating through an ApiCommand +* Adding result_type, result_doc, deprecated, and doc_url to service descriptions +* Bug: Changed the default cookie header casing back to 'Cookie' + +## 2.6.5 - 2012-06-03 + +* BC: Renaming Guzzle\Http\Message\RequestInterface::getResourceUri() to getResource() +* BC: Removing unused AUTH_BASIC and AUTH_DIGEST constants from +* BC: Guzzle\Http\Cookie is now used to manage Set-Cookie data, not Cookie data +* BC: Renaming methods in the CookieJarInterface +* Moving almost all cookie logic out of the CookiePlugin and into the Cookie or CookieJar implementations +* Making the default glue for HTTP headers ';' instead of ',' +* Adding a removeValue to Guzzle\Http\Message\Header +* Adding getCookies() to request interface. +* Making it easier to add event subscribers to HasDispatcherInterface classes. Can now directly call addSubscriber() + +## 2.6.4 - 2012-05-30 + +* BC: Cleaning up how POST files are stored in EntityEnclosingRequest objects. Adding PostFile class. +* BC: Moving ApiCommand specific functionality from the Inspector and on to the ApiCommand +* Bug: Fixing magic method command calls on clients +* Bug: Email constraint only validates strings +* Bug: Aggregate POST fields when POST files are present in curl handle +* Bug: Fixing default User-Agent header +* Bug: Only appending or prepending parameters in commands if they are specified +* Bug: Not requiring response reason phrases or status codes to match a predefined list of codes +* Allowing the use of dot notation for class namespaces when using instance_of constraint +* Added any_match validation constraint +* Added an AsyncPlugin +* Passing request object to the calculateWait method of the ExponentialBackoffPlugin +* Allowing the result of a command object to be changed +* Parsing location and type sub values when instantiating a service description rather than over and over at runtime + +## 2.6.3 - 2012-05-23 + +* [BC] Guzzle\Common\FromConfigInterface no longer requires any config options. +* [BC] Refactoring how POST files are stored on an EntityEnclosingRequest. They are now separate from POST fields. +* You can now use an array of data when creating PUT request bodies in the request factory. +* Removing the requirement that HTTPS requests needed a Cache-Control: public directive to be cacheable. +* [Http] Adding support for Content-Type in multipart POST uploads per upload +* [Http] Added support for uploading multiple files using the same name (foo[0], foo[1]) +* Adding more POST data operations for easier manipulation of POST data. +* You can now set empty POST fields. +* The body of a request is only shown on EntityEnclosingRequest objects that do not use POST files. +* Split the Guzzle\Service\Inspector::validateConfig method into two methods. One to initialize when a command is created, and one to validate. +* CS updates + +## 2.6.2 - 2012-05-19 + +* [Http] Better handling of nested scope requests in CurlMulti. Requests are now always prepares in the send() method rather than the addRequest() method. + +## 2.6.1 - 2012-05-19 + +* [BC] Removing 'path' support in service descriptions. Use 'uri'. +* [BC] Guzzle\Service\Inspector::parseDocBlock is now protected. Adding getApiParamsForClass() with cache. +* [BC] Removing Guzzle\Common\NullObject. Use https://github.com/mtdowling/NullObject if you need it. +* [BC] Removing Guzzle\Common\XmlElement. +* All commands, both dynamic and concrete, have ApiCommand objects. +* Adding a fix for CurlMulti so that if all of the connections encounter some sort of curl error, then the loop exits. +* Adding checks to EntityEnclosingRequest so that empty POST files and fields are ignored. +* Making the method signature of Guzzle\Service\Builder\ServiceBuilder::factory more flexible. + +## 2.6.0 - 2012-05-15 + +* [BC] Moving Guzzle\Service\Builder to Guzzle\Service\Builder\ServiceBuilder +* [BC] Executing a Command returns the result of the command rather than the command +* [BC] Moving all HTTP parsing logic to Guzzle\Http\Parsers. Allows for faster C implementations if needed. +* [BC] Changing the Guzzle\Http\Message\Response::setProtocol() method to accept a protocol and version in separate args. +* [BC] Moving ResourceIterator* to Guzzle\Service\Resource +* [BC] Completely refactored ResourceIterators to iterate over a cloned command object +* [BC] Moved Guzzle\Http\UriTemplate to Guzzle\Http\Parser\UriTemplate\UriTemplate +* [BC] Guzzle\Guzzle is now deprecated +* Moving Guzzle\Common\Guzzle::inject to Guzzle\Common\Collection::inject +* Adding Guzzle\Version class to give version information about Guzzle +* Adding Guzzle\Http\Utils class to provide getDefaultUserAgent() and getHttpDate() +* Adding Guzzle\Curl\CurlVersion to manage caching curl_version() data +* ServiceDescription and ServiceBuilder are now cacheable using similar configs +* Changing the format of XML and JSON service builder configs. Backwards compatible. +* Cleaned up Cookie parsing +* Trimming the default Guzzle User-Agent header +* Adding a setOnComplete() method to Commands that is called when a command completes +* Keeping track of requests that were mocked in the MockPlugin +* Fixed a caching bug in the CacheAdapterFactory +* Inspector objects can be injected into a Command object +* Refactoring a lot of code and tests to be case insensitive when dealing with headers +* Adding Guzzle\Http\Message\HeaderComparison for easy comparison of HTTP headers using a DSL +* Adding the ability to set global option overrides to service builder configs +* Adding the ability to include other service builder config files from within XML and JSON files +* Moving the parseQuery method out of Url and on to QueryString::fromString() as a static factory method. + +## 2.5.0 - 2012-05-08 + +* Major performance improvements +* [BC] Simplifying Guzzle\Common\Collection. Please check to see if you are using features that are now deprecated. +* [BC] Using a custom validation system that allows a flyweight implementation for much faster validation. No longer using Symfony2 Validation component. +* [BC] No longer supporting "{{ }}" for injecting into command or UriTemplates. Use "{}" +* Added the ability to passed parameters to all requests created by a client +* Added callback functionality to the ExponentialBackoffPlugin +* Using microtime in ExponentialBackoffPlugin to allow more granular backoff strategies. +* Rewinding request stream bodies when retrying requests +* Exception is thrown when JSON response body cannot be decoded +* Added configurable magic method calls to clients and commands. This is off by default. +* Fixed a defect that added a hash to every parsed URL part +* Fixed duplicate none generation for OauthPlugin. +* Emitting an event each time a client is generated by a ServiceBuilder +* Using an ApiParams object instead of a Collection for parameters of an ApiCommand +* cache.* request parameters should be renamed to params.cache.* +* Added the ability to set arbitrary curl options on requests (disable_wire, progress, etc.). See CurlHandle. +* Added the ability to disable type validation of service descriptions +* ServiceDescriptions and ServiceBuilders are now Serializable diff --git a/vendor/guzzlehttp/guzzle/Dockerfile b/vendor/guzzlehttp/guzzle/Dockerfile new file mode 100644 index 0000000..f6a0952 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/Dockerfile @@ -0,0 +1,18 @@ +FROM composer:latest as setup + +RUN mkdir /guzzle + +WORKDIR /guzzle + +RUN set -xe \ + && composer init --name=guzzlehttp/test --description="Simple project for testing Guzzle scripts" --author="Márk Sági-Kazár " --no-interaction \ + && composer require guzzlehttp/guzzle + + +FROM php:7.3 + +RUN mkdir /guzzle + +WORKDIR /guzzle + +COPY --from=setup /guzzle /guzzle diff --git a/vendor/guzzlehttp/guzzle/LICENSE b/vendor/guzzlehttp/guzzle/LICENSE new file mode 100644 index 0000000..50a177b --- /dev/null +++ b/vendor/guzzlehttp/guzzle/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011-2018 Michael Dowling, https://github.com/mtdowling + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/guzzlehttp/guzzle/README.md b/vendor/guzzlehttp/guzzle/README.md new file mode 100644 index 0000000..a5ef18a --- /dev/null +++ b/vendor/guzzlehttp/guzzle/README.md @@ -0,0 +1,90 @@ +Guzzle, PHP HTTP client +======================= + +[![Latest Version](https://img.shields.io/github/release/guzzle/guzzle.svg?style=flat-square)](https://github.com/guzzle/guzzle/releases) +[![Build Status](https://img.shields.io/travis/guzzle/guzzle.svg?style=flat-square)](https://travis-ci.org/guzzle/guzzle) +[![Total Downloads](https://img.shields.io/packagist/dt/guzzlehttp/guzzle.svg?style=flat-square)](https://packagist.org/packages/guzzlehttp/guzzle) + +Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and +trivial to integrate with web services. + +- Simple interface for building query strings, POST requests, streaming large + uploads, streaming large downloads, using HTTP cookies, uploading JSON data, + etc... +- Can send both synchronous and asynchronous requests using the same interface. +- Uses PSR-7 interfaces for requests, responses, and streams. This allows you + to utilize other PSR-7 compatible libraries with Guzzle. +- Abstracts away the underlying HTTP transport, allowing you to write + environment and transport agnostic code; i.e., no hard dependency on cURL, + PHP streams, sockets, or non-blocking event loops. +- Middleware system allows you to augment and compose client behavior. + +```php +$client = new \GuzzleHttp\Client(); +$response = $client->request('GET', 'https://api.github.com/repos/guzzle/guzzle'); + +echo $response->getStatusCode(); # 200 +echo $response->getHeaderLine('content-type'); # 'application/json; charset=utf8' +echo $response->getBody(); # '{"id": 1420053, "name": "guzzle", ...}' + +# Send an asynchronous request. +$request = new \GuzzleHttp\Psr7\Request('GET', 'http://httpbin.org'); +$promise = $client->sendAsync($request)->then(function ($response) { + echo 'I completed! ' . $response->getBody(); +}); + +$promise->wait(); +``` + +## Help and docs + +- [Documentation](http://guzzlephp.org/) +- [Stack Overflow](http://stackoverflow.com/questions/tagged/guzzle) +- [Gitter](https://gitter.im/guzzle/guzzle) + + +## Installing Guzzle + +The recommended way to install Guzzle is through +[Composer](http://getcomposer.org). + +```bash +# Install Composer +curl -sS https://getcomposer.org/installer | php +``` + +Next, run the Composer command to install the latest stable version of Guzzle: + +```bash +composer require guzzlehttp/guzzle +``` + +After installing, you need to require Composer's autoloader: + +```php +require 'vendor/autoload.php'; +``` + +You can then later update Guzzle using composer: + + ```bash +composer update + ``` + + +## Version Guidance + +| Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version | +|---------|------------|---------------------|--------------|---------------------|---------------------|-------|-------------| +| 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >= 5.3.3 | +| 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >= 5.4 | +| 5.x | Maintained | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >= 5.4 | +| 6.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >= 5.5 | + +[guzzle-3-repo]: https://github.com/guzzle/guzzle3 +[guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x +[guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3 +[guzzle-6-repo]: https://github.com/guzzle/guzzle +[guzzle-3-docs]: http://guzzle3.readthedocs.org +[guzzle-5-docs]: http://guzzle.readthedocs.org/en/5.3/ +[guzzle-6-docs]: http://guzzle.readthedocs.org/en/latest/ diff --git a/vendor/guzzlehttp/guzzle/UPGRADING.md b/vendor/guzzlehttp/guzzle/UPGRADING.md new file mode 100644 index 0000000..91d1dcc --- /dev/null +++ b/vendor/guzzlehttp/guzzle/UPGRADING.md @@ -0,0 +1,1203 @@ +Guzzle Upgrade Guide +==================== + +5.0 to 6.0 +---------- + +Guzzle now uses [PSR-7](http://www.php-fig.org/psr/psr-7/) for HTTP messages. +Due to the fact that these messages are immutable, this prompted a refactoring +of Guzzle to use a middleware based system rather than an event system. Any +HTTP message interaction (e.g., `GuzzleHttp\Message\Request`) need to be +updated to work with the new immutable PSR-7 request and response objects. Any +event listeners or subscribers need to be updated to become middleware +functions that wrap handlers (or are injected into a +`GuzzleHttp\HandlerStack`). + +- Removed `GuzzleHttp\BatchResults` +- Removed `GuzzleHttp\Collection` +- Removed `GuzzleHttp\HasDataTrait` +- Removed `GuzzleHttp\ToArrayInterface` +- The `guzzlehttp/streams` dependency has been removed. Stream functionality + is now present in the `GuzzleHttp\Psr7` namespace provided by the + `guzzlehttp/psr7` package. +- Guzzle no longer uses ReactPHP promises and now uses the + `guzzlehttp/promises` library. We use a custom promise library for three + significant reasons: + 1. React promises (at the time of writing this) are recursive. Promise + chaining and promise resolution will eventually blow the stack. Guzzle + promises are not recursive as they use a sort of trampolining technique. + Note: there has been movement in the React project to modify promises to + no longer utilize recursion. + 2. Guzzle needs to have the ability to synchronously block on a promise to + wait for a result. Guzzle promises allows this functionality (and does + not require the use of recursion). + 3. Because we need to be able to wait on a result, doing so using React + promises requires wrapping react promises with RingPHP futures. This + overhead is no longer needed, reducing stack sizes, reducing complexity, + and improving performance. +- `GuzzleHttp\Mimetypes` has been moved to a function in + `GuzzleHttp\Psr7\mimetype_from_extension` and + `GuzzleHttp\Psr7\mimetype_from_filename`. +- `GuzzleHttp\Query` and `GuzzleHttp\QueryParser` have been removed. Query + strings must now be passed into request objects as strings, or provided to + the `query` request option when creating requests with clients. The `query` + option uses PHP's `http_build_query` to convert an array to a string. If you + need a different serialization technique, you will need to pass the query + string in as a string. There are a couple helper functions that will make + working with query strings easier: `GuzzleHttp\Psr7\parse_query` and + `GuzzleHttp\Psr7\build_query`. +- Guzzle no longer has a dependency on RingPHP. Due to the use of a middleware + system based on PSR-7, using RingPHP and it's middleware system as well adds + more complexity than the benefits it provides. All HTTP handlers that were + present in RingPHP have been modified to work directly with PSR-7 messages + and placed in the `GuzzleHttp\Handler` namespace. This significantly reduces + complexity in Guzzle, removes a dependency, and improves performance. RingPHP + will be maintained for Guzzle 5 support, but will no longer be a part of + Guzzle 6. +- As Guzzle now uses a middleware based systems the event system and RingPHP + integration has been removed. Note: while the event system has been removed, + it is possible to add your own type of event system that is powered by the + middleware system. + - Removed the `Event` namespace. + - Removed the `Subscriber` namespace. + - Removed `Transaction` class + - Removed `RequestFsm` + - Removed `RingBridge` + - `GuzzleHttp\Subscriber\Cookie` is now provided by + `GuzzleHttp\Middleware::cookies` + - `GuzzleHttp\Subscriber\HttpError` is now provided by + `GuzzleHttp\Middleware::httpError` + - `GuzzleHttp\Subscriber\History` is now provided by + `GuzzleHttp\Middleware::history` + - `GuzzleHttp\Subscriber\Mock` is now provided by + `GuzzleHttp\Handler\MockHandler` + - `GuzzleHttp\Subscriber\Prepare` is now provided by + `GuzzleHttp\PrepareBodyMiddleware` + - `GuzzleHttp\Subscriber\Redirect` is now provided by + `GuzzleHttp\RedirectMiddleware` +- Guzzle now uses `Psr\Http\Message\UriInterface` (implements in + `GuzzleHttp\Psr7\Uri`) for URI support. `GuzzleHttp\Url` is now gone. +- Static functions in `GuzzleHttp\Utils` have been moved to namespaced + functions under the `GuzzleHttp` namespace. This requires either a Composer + based autoloader or you to include functions.php. +- `GuzzleHttp\ClientInterface::getDefaultOption` has been renamed to + `GuzzleHttp\ClientInterface::getConfig`. +- `GuzzleHttp\ClientInterface::setDefaultOption` has been removed. +- The `json` and `xml` methods of response objects has been removed. With the + migration to strictly adhering to PSR-7 as the interface for Guzzle messages, + adding methods to message interfaces would actually require Guzzle messages + to extend from PSR-7 messages rather then work with them directly. + +## Migrating to middleware + +The change to PSR-7 unfortunately required significant refactoring to Guzzle +due to the fact that PSR-7 messages are immutable. Guzzle 5 relied on an event +system from plugins. The event system relied on mutability of HTTP messages and +side effects in order to work. With immutable messages, you have to change your +workflow to become more about either returning a value (e.g., functional +middlewares) or setting a value on an object. Guzzle v6 has chosen the +functional middleware approach. + +Instead of using the event system to listen for things like the `before` event, +you now create a stack based middleware function that intercepts a request on +the way in and the promise of the response on the way out. This is a much +simpler and more predictable approach than the event system and works nicely +with PSR-7 middleware. Due to the use of promises, the middleware system is +also asynchronous. + +v5: + +```php +use GuzzleHttp\Event\BeforeEvent; +$client = new GuzzleHttp\Client(); +// Get the emitter and listen to the before event. +$client->getEmitter()->on('before', function (BeforeEvent $e) { + // Guzzle v5 events relied on mutation + $e->getRequest()->setHeader('X-Foo', 'Bar'); +}); +``` + +v6: + +In v6, you can modify the request before it is sent using the `mapRequest` +middleware. The idiomatic way in v6 to modify the request/response lifecycle is +to setup a handler middleware stack up front and inject the handler into a +client. + +```php +use GuzzleHttp\Middleware; +// Create a handler stack that has all of the default middlewares attached +$handler = GuzzleHttp\HandlerStack::create(); +// Push the handler onto the handler stack +$handler->push(Middleware::mapRequest(function (RequestInterface $request) { + // Notice that we have to return a request object + return $request->withHeader('X-Foo', 'Bar'); +})); +// Inject the handler into the client +$client = new GuzzleHttp\Client(['handler' => $handler]); +``` + +## POST Requests + +This version added the [`form_params`](http://guzzle.readthedocs.org/en/latest/request-options.html#form_params) +and `multipart` request options. `form_params` is an associative array of +strings or array of strings and is used to serialize an +`application/x-www-form-urlencoded` POST request. The +[`multipart`](http://guzzle.readthedocs.org/en/latest/request-options.html#multipart) +option is now used to send a multipart/form-data POST request. + +`GuzzleHttp\Post\PostFile` has been removed. Use the `multipart` option to add +POST files to a multipart/form-data request. + +The `body` option no longer accepts an array to send POST requests. Please use +`multipart` or `form_params` instead. + +The `base_url` option has been renamed to `base_uri`. + +4.x to 5.0 +---------- + +## Rewritten Adapter Layer + +Guzzle now uses [RingPHP](http://ringphp.readthedocs.org/en/latest) to send +HTTP requests. The `adapter` option in a `GuzzleHttp\Client` constructor +is still supported, but it has now been renamed to `handler`. Instead of +passing a `GuzzleHttp\Adapter\AdapterInterface`, you must now pass a PHP +`callable` that follows the RingPHP specification. + +## Removed Fluent Interfaces + +[Fluent interfaces were removed](http://ocramius.github.io/blog/fluent-interfaces-are-evil) +from the following classes: + +- `GuzzleHttp\Collection` +- `GuzzleHttp\Url` +- `GuzzleHttp\Query` +- `GuzzleHttp\Post\PostBody` +- `GuzzleHttp\Cookie\SetCookie` + +## Removed functions.php + +Removed "functions.php", so that Guzzle is truly PSR-4 compliant. The following +functions can be used as replacements. + +- `GuzzleHttp\json_decode` -> `GuzzleHttp\Utils::jsonDecode` +- `GuzzleHttp\get_path` -> `GuzzleHttp\Utils::getPath` +- `GuzzleHttp\Utils::setPath` -> `GuzzleHttp\set_path` +- `GuzzleHttp\Pool::batch` -> `GuzzleHttp\batch`. This function is, however, + deprecated in favor of using `GuzzleHttp\Pool::batch()`. + +The "procedural" global client has been removed with no replacement (e.g., +`GuzzleHttp\get()`, `GuzzleHttp\post()`, etc.). Use a `GuzzleHttp\Client` +object as a replacement. + +## `throwImmediately` has been removed + +The concept of "throwImmediately" has been removed from exceptions and error +events. This control mechanism was used to stop a transfer of concurrent +requests from completing. This can now be handled by throwing the exception or +by cancelling a pool of requests or each outstanding future request +individually. + +## headers event has been removed + +Removed the "headers" event. This event was only useful for changing the +body a response once the headers of the response were known. You can implement +a similar behavior in a number of ways. One example might be to use a +FnStream that has access to the transaction being sent. For example, when the +first byte is written, you could check if the response headers match your +expectations, and if so, change the actual stream body that is being +written to. + +## Updates to HTTP Messages + +Removed the `asArray` parameter from +`GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header +value as an array, then use the newly added `getHeaderAsArray()` method of +`MessageInterface`. This change makes the Guzzle interfaces compatible with +the PSR-7 interfaces. + +3.x to 4.0 +---------- + +## Overarching changes: + +- Now requires PHP 5.4 or greater. +- No longer requires cURL to send requests. +- Guzzle no longer wraps every exception it throws. Only exceptions that are + recoverable are now wrapped by Guzzle. +- Various namespaces have been removed or renamed. +- No longer requiring the Symfony EventDispatcher. A custom event dispatcher + based on the Symfony EventDispatcher is + now utilized in `GuzzleHttp\Event\EmitterInterface` (resulting in significant + speed and functionality improvements). + +Changes per Guzzle 3.x namespace are described below. + +## Batch + +The `Guzzle\Batch` namespace has been removed. This is best left to +third-parties to implement on top of Guzzle's core HTTP library. + +## Cache + +The `Guzzle\Cache` namespace has been removed. (Todo: No suitable replacement +has been implemented yet, but hoping to utilize a PSR cache interface). + +## Common + +- Removed all of the wrapped exceptions. It's better to use the standard PHP + library for unrecoverable exceptions. +- `FromConfigInterface` has been removed. +- `Guzzle\Common\Version` has been removed. The VERSION constant can be found + at `GuzzleHttp\ClientInterface::VERSION`. + +### Collection + +- `getAll` has been removed. Use `toArray` to convert a collection to an array. +- `inject` has been removed. +- `keySearch` has been removed. +- `getPath` no longer supports wildcard expressions. Use something better like + JMESPath for this. +- `setPath` now supports appending to an existing array via the `[]` notation. + +### Events + +Guzzle no longer requires Symfony's EventDispatcher component. Guzzle now uses +`GuzzleHttp\Event\Emitter`. + +- `Symfony\Component\EventDispatcher\EventDispatcherInterface` is replaced by + `GuzzleHttp\Event\EmitterInterface`. +- `Symfony\Component\EventDispatcher\EventDispatcher` is replaced by + `GuzzleHttp\Event\Emitter`. +- `Symfony\Component\EventDispatcher\Event` is replaced by + `GuzzleHttp\Event\Event`, and Guzzle now has an EventInterface in + `GuzzleHttp\Event\EventInterface`. +- `AbstractHasDispatcher` has moved to a trait, `HasEmitterTrait`, and + `HasDispatcherInterface` has moved to `HasEmitterInterface`. Retrieving the + event emitter of a request, client, etc. now uses the `getEmitter` method + rather than the `getDispatcher` method. + +#### Emitter + +- Use the `once()` method to add a listener that automatically removes itself + the first time it is invoked. +- Use the `listeners()` method to retrieve a list of event listeners rather than + the `getListeners()` method. +- Use `emit()` instead of `dispatch()` to emit an event from an emitter. +- Use `attach()` instead of `addSubscriber()` and `detach()` instead of + `removeSubscriber()`. + +```php +$mock = new Mock(); +// 3.x +$request->getEventDispatcher()->addSubscriber($mock); +$request->getEventDispatcher()->removeSubscriber($mock); +// 4.x +$request->getEmitter()->attach($mock); +$request->getEmitter()->detach($mock); +``` + +Use the `on()` method to add a listener rather than the `addListener()` method. + +```php +// 3.x +$request->getEventDispatcher()->addListener('foo', function (Event $event) { /* ... */ } ); +// 4.x +$request->getEmitter()->on('foo', function (Event $event, $name) { /* ... */ } ); +``` + +## Http + +### General changes + +- The cacert.pem certificate has been moved to `src/cacert.pem`. +- Added the concept of adapters that are used to transfer requests over the + wire. +- Simplified the event system. +- Sending requests in parallel is still possible, but batching is no longer a + concept of the HTTP layer. Instead, you must use the `complete` and `error` + events to asynchronously manage parallel request transfers. +- `Guzzle\Http\Url` has moved to `GuzzleHttp\Url`. +- `Guzzle\Http\QueryString` has moved to `GuzzleHttp\Query`. +- QueryAggregators have been rewritten so that they are simply callable + functions. +- `GuzzleHttp\StaticClient` has been removed. Use the functions provided in + `functions.php` for an easy to use static client instance. +- Exceptions in `GuzzleHttp\Exception` have been updated to all extend from + `GuzzleHttp\Exception\TransferException`. + +### Client + +Calling methods like `get()`, `post()`, `head()`, etc. no longer create and +return a request, but rather creates a request, sends the request, and returns +the response. + +```php +// 3.0 +$request = $client->get('/'); +$response = $request->send(); + +// 4.0 +$response = $client->get('/'); + +// or, to mirror the previous behavior +$request = $client->createRequest('GET', '/'); +$response = $client->send($request); +``` + +`GuzzleHttp\ClientInterface` has changed. + +- The `send` method no longer accepts more than one request. Use `sendAll` to + send multiple requests in parallel. +- `setUserAgent()` has been removed. Use a default request option instead. You + could, for example, do something like: + `$client->setConfig('defaults/headers/User-Agent', 'Foo/Bar ' . $client::getDefaultUserAgent())`. +- `setSslVerification()` has been removed. Use default request options instead, + like `$client->setConfig('defaults/verify', true)`. + +`GuzzleHttp\Client` has changed. + +- The constructor now accepts only an associative array. You can include a + `base_url` string or array to use a URI template as the base URL of a client. + You can also specify a `defaults` key that is an associative array of default + request options. You can pass an `adapter` to use a custom adapter, + `batch_adapter` to use a custom adapter for sending requests in parallel, or + a `message_factory` to change the factory used to create HTTP requests and + responses. +- The client no longer emits a `client.create_request` event. +- Creating requests with a client no longer automatically utilize a URI + template. You must pass an array into a creational method (e.g., + `createRequest`, `get`, `put`, etc.) in order to expand a URI template. + +### Messages + +Messages no longer have references to their counterparts (i.e., a request no +longer has a reference to it's response, and a response no loger has a +reference to its request). This association is now managed through a +`GuzzleHttp\Adapter\TransactionInterface` object. You can get references to +these transaction objects using request events that are emitted over the +lifecycle of a request. + +#### Requests with a body + +- `GuzzleHttp\Message\EntityEnclosingRequest` and + `GuzzleHttp\Message\EntityEnclosingRequestInterface` have been removed. The + separation between requests that contain a body and requests that do not + contain a body has been removed, and now `GuzzleHttp\Message\RequestInterface` + handles both use cases. +- Any method that previously accepts a `GuzzleHttp\Response` object now accept a + `GuzzleHttp\Message\ResponseInterface`. +- `GuzzleHttp\Message\RequestFactoryInterface` has been renamed to + `GuzzleHttp\Message\MessageFactoryInterface`. This interface is used to create + both requests and responses and is implemented in + `GuzzleHttp\Message\MessageFactory`. +- POST field and file methods have been removed from the request object. You + must now use the methods made available to `GuzzleHttp\Post\PostBodyInterface` + to control the format of a POST body. Requests that are created using a + standard `GuzzleHttp\Message\MessageFactoryInterface` will automatically use + a `GuzzleHttp\Post\PostBody` body if the body was passed as an array or if + the method is POST and no body is provided. + +```php +$request = $client->createRequest('POST', '/'); +$request->getBody()->setField('foo', 'bar'); +$request->getBody()->addFile(new PostFile('file_key', fopen('/path/to/content', 'r'))); +``` + +#### Headers + +- `GuzzleHttp\Message\Header` has been removed. Header values are now simply + represented by an array of values or as a string. Header values are returned + as a string by default when retrieving a header value from a message. You can + pass an optional argument of `true` to retrieve a header value as an array + of strings instead of a single concatenated string. +- `GuzzleHttp\PostFile` and `GuzzleHttp\PostFileInterface` have been moved to + `GuzzleHttp\Post`. This interface has been simplified and now allows the + addition of arbitrary headers. +- Custom headers like `GuzzleHttp\Message\Header\Link` have been removed. Most + of the custom headers are now handled separately in specific + subscribers/plugins, and `GuzzleHttp\Message\HeaderValues::parseParams()` has + been updated to properly handle headers that contain parameters (like the + `Link` header). + +#### Responses + +- `GuzzleHttp\Message\Response::getInfo()` and + `GuzzleHttp\Message\Response::setInfo()` have been removed. Use the event + system to retrieve this type of information. +- `GuzzleHttp\Message\Response::getRawHeaders()` has been removed. +- `GuzzleHttp\Message\Response::getMessage()` has been removed. +- `GuzzleHttp\Message\Response::calculateAge()` and other cache specific + methods have moved to the CacheSubscriber. +- Header specific helper functions like `getContentMd5()` have been removed. + Just use `getHeader('Content-MD5')` instead. +- `GuzzleHttp\Message\Response::setRequest()` and + `GuzzleHttp\Message\Response::getRequest()` have been removed. Use the event + system to work with request and response objects as a transaction. +- `GuzzleHttp\Message\Response::getRedirectCount()` has been removed. Use the + Redirect subscriber instead. +- `GuzzleHttp\Message\Response::isSuccessful()` and other related methods have + been removed. Use `getStatusCode()` instead. + +#### Streaming responses + +Streaming requests can now be created by a client directly, returning a +`GuzzleHttp\Message\ResponseInterface` object that contains a body stream +referencing an open PHP HTTP stream. + +```php +// 3.0 +use Guzzle\Stream\PhpStreamRequestFactory; +$request = $client->get('/'); +$factory = new PhpStreamRequestFactory(); +$stream = $factory->fromRequest($request); +$data = $stream->read(1024); + +// 4.0 +$response = $client->get('/', ['stream' => true]); +// Read some data off of the stream in the response body +$data = $response->getBody()->read(1024); +``` + +#### Redirects + +The `configureRedirects()` method has been removed in favor of a +`allow_redirects` request option. + +```php +// Standard redirects with a default of a max of 5 redirects +$request = $client->createRequest('GET', '/', ['allow_redirects' => true]); + +// Strict redirects with a custom number of redirects +$request = $client->createRequest('GET', '/', [ + 'allow_redirects' => ['max' => 5, 'strict' => true] +]); +``` + +#### EntityBody + +EntityBody interfaces and classes have been removed or moved to +`GuzzleHttp\Stream`. All classes and interfaces that once required +`GuzzleHttp\EntityBodyInterface` now require +`GuzzleHttp\Stream\StreamInterface`. Creating a new body for a request no +longer uses `GuzzleHttp\EntityBody::factory` but now uses +`GuzzleHttp\Stream\Stream::factory` or even better: +`GuzzleHttp\Stream\create()`. + +- `Guzzle\Http\EntityBodyInterface` is now `GuzzleHttp\Stream\StreamInterface` +- `Guzzle\Http\EntityBody` is now `GuzzleHttp\Stream\Stream` +- `Guzzle\Http\CachingEntityBody` is now `GuzzleHttp\Stream\CachingStream` +- `Guzzle\Http\ReadLimitEntityBody` is now `GuzzleHttp\Stream\LimitStream` +- `Guzzle\Http\IoEmittyinEntityBody` has been removed. + +#### Request lifecycle events + +Requests previously submitted a large number of requests. The number of events +emitted over the lifecycle of a request has been significantly reduced to make +it easier to understand how to extend the behavior of a request. All events +emitted during the lifecycle of a request now emit a custom +`GuzzleHttp\Event\EventInterface` object that contains context providing +methods and a way in which to modify the transaction at that specific point in +time (e.g., intercept the request and set a response on the transaction). + +- `request.before_send` has been renamed to `before` and now emits a + `GuzzleHttp\Event\BeforeEvent` +- `request.complete` has been renamed to `complete` and now emits a + `GuzzleHttp\Event\CompleteEvent`. +- `request.sent` has been removed. Use `complete`. +- `request.success` has been removed. Use `complete`. +- `error` is now an event that emits a `GuzzleHttp\Event\ErrorEvent`. +- `request.exception` has been removed. Use `error`. +- `request.receive.status_line` has been removed. +- `curl.callback.progress` has been removed. Use a custom `StreamInterface` to + maintain a status update. +- `curl.callback.write` has been removed. Use a custom `StreamInterface` to + intercept writes. +- `curl.callback.read` has been removed. Use a custom `StreamInterface` to + intercept reads. + +`headers` is a new event that is emitted after the response headers of a +request have been received before the body of the response is downloaded. This +event emits a `GuzzleHttp\Event\HeadersEvent`. + +You can intercept a request and inject a response using the `intercept()` event +of a `GuzzleHttp\Event\BeforeEvent`, `GuzzleHttp\Event\CompleteEvent`, and +`GuzzleHttp\Event\ErrorEvent` event. + +See: http://docs.guzzlephp.org/en/latest/events.html + +## Inflection + +The `Guzzle\Inflection` namespace has been removed. This is not a core concern +of Guzzle. + +## Iterator + +The `Guzzle\Iterator` namespace has been removed. + +- `Guzzle\Iterator\AppendIterator`, `Guzzle\Iterator\ChunkedIterator`, and + `Guzzle\Iterator\MethodProxyIterator` are nice, but not a core requirement of + Guzzle itself. +- `Guzzle\Iterator\FilterIterator` is no longer needed because an equivalent + class is shipped with PHP 5.4. +- `Guzzle\Iterator\MapIterator` is not really needed when using PHP 5.5 because + it's easier to just wrap an iterator in a generator that maps values. + +For a replacement of these iterators, see https://github.com/nikic/iter + +## Log + +The LogPlugin has moved to https://github.com/guzzle/log-subscriber. The +`Guzzle\Log` namespace has been removed. Guzzle now relies on +`Psr\Log\LoggerInterface` for all logging. The MessageFormatter class has been +moved to `GuzzleHttp\Subscriber\Log\Formatter`. + +## Parser + +The `Guzzle\Parser` namespace has been removed. This was previously used to +make it possible to plug in custom parsers for cookies, messages, URI +templates, and URLs; however, this level of complexity is not needed in Guzzle +so it has been removed. + +- Cookie: Cookie parsing logic has been moved to + `GuzzleHttp\Cookie\SetCookie::fromString`. +- Message: Message parsing logic for both requests and responses has been moved + to `GuzzleHttp\Message\MessageFactory::fromMessage`. Message parsing is only + used in debugging or deserializing messages, so it doesn't make sense for + Guzzle as a library to add this level of complexity to parsing messages. +- UriTemplate: URI template parsing has been moved to + `GuzzleHttp\UriTemplate`. The Guzzle library will automatically use the PECL + URI template library if it is installed. +- Url: URL parsing is now performed in `GuzzleHttp\Url::fromString` (previously + it was `Guzzle\Http\Url::factory()`). If custom URL parsing is necessary, + then developers are free to subclass `GuzzleHttp\Url`. + +## Plugin + +The `Guzzle\Plugin` namespace has been renamed to `GuzzleHttp\Subscriber`. +Several plugins are shipping with the core Guzzle library under this namespace. + +- `GuzzleHttp\Subscriber\Cookie`: Replaces the old CookiePlugin. Cookie jar + code has moved to `GuzzleHttp\Cookie`. +- `GuzzleHttp\Subscriber\History`: Replaces the old HistoryPlugin. +- `GuzzleHttp\Subscriber\HttpError`: Throws errors when a bad HTTP response is + received. +- `GuzzleHttp\Subscriber\Mock`: Replaces the old MockPlugin. +- `GuzzleHttp\Subscriber\Prepare`: Prepares the body of a request just before + sending. This subscriber is attached to all requests by default. +- `GuzzleHttp\Subscriber\Redirect`: Replaces the RedirectPlugin. + +The following plugins have been removed (third-parties are free to re-implement +these if needed): + +- `GuzzleHttp\Plugin\Async` has been removed. +- `GuzzleHttp\Plugin\CurlAuth` has been removed. +- `GuzzleHttp\Plugin\ErrorResponse\ErrorResponsePlugin` has been removed. This + functionality should instead be implemented with event listeners that occur + after normal response parsing occurs in the guzzle/command package. + +The following plugins are not part of the core Guzzle package, but are provided +in separate repositories: + +- `Guzzle\Http\Plugin\BackoffPlugin` has been rewritten to be much simpler + to build custom retry policies using simple functions rather than various + chained classes. See: https://github.com/guzzle/retry-subscriber +- `Guzzle\Http\Plugin\Cache\CachePlugin` has moved to + https://github.com/guzzle/cache-subscriber +- `Guzzle\Http\Plugin\Log\LogPlugin` has moved to + https://github.com/guzzle/log-subscriber +- `Guzzle\Http\Plugin\Md5\Md5Plugin` has moved to + https://github.com/guzzle/message-integrity-subscriber +- `Guzzle\Http\Plugin\Mock\MockPlugin` has moved to + `GuzzleHttp\Subscriber\MockSubscriber`. +- `Guzzle\Http\Plugin\Oauth\OauthPlugin` has moved to + https://github.com/guzzle/oauth-subscriber + +## Service + +The service description layer of Guzzle has moved into two separate packages: + +- http://github.com/guzzle/command Provides a high level abstraction over web + services by representing web service operations using commands. +- http://github.com/guzzle/guzzle-services Provides an implementation of + guzzle/command that provides request serialization and response parsing using + Guzzle service descriptions. + +## Stream + +Stream have moved to a separate package available at +https://github.com/guzzle/streams. + +`Guzzle\Stream\StreamInterface` has been given a large update to cleanly take +on the responsibilities of `Guzzle\Http\EntityBody` and +`Guzzle\Http\EntityBodyInterface` now that they have been removed. The number +of methods implemented by the `StreamInterface` has been drastically reduced to +allow developers to more easily extend and decorate stream behavior. + +## Removed methods from StreamInterface + +- `getStream` and `setStream` have been removed to better encapsulate streams. +- `getMetadata` and `setMetadata` have been removed in favor of + `GuzzleHttp\Stream\MetadataStreamInterface`. +- `getWrapper`, `getWrapperData`, `getStreamType`, and `getUri` have all been + removed. This data is accessible when + using streams that implement `GuzzleHttp\Stream\MetadataStreamInterface`. +- `rewind` has been removed. Use `seek(0)` for a similar behavior. + +## Renamed methods + +- `detachStream` has been renamed to `detach`. +- `feof` has been renamed to `eof`. +- `ftell` has been renamed to `tell`. +- `readLine` has moved from an instance method to a static class method of + `GuzzleHttp\Stream\Stream`. + +## Metadata streams + +`GuzzleHttp\Stream\MetadataStreamInterface` has been added to denote streams +that contain additional metadata accessible via `getMetadata()`. +`GuzzleHttp\Stream\StreamInterface::getMetadata` and +`GuzzleHttp\Stream\StreamInterface::setMetadata` have been removed. + +## StreamRequestFactory + +The entire concept of the StreamRequestFactory has been removed. The way this +was used in Guzzle 3 broke the actual interface of sending streaming requests +(instead of getting back a Response, you got a StreamInterface). Streaming +PHP requests are now implemented through the `GuzzleHttp\Adapter\StreamAdapter`. + +3.6 to 3.7 +---------- + +### Deprecations + +- You can now enable E_USER_DEPRECATED warnings to see if you are using any deprecated methods.: + +```php +\Guzzle\Common\Version::$emitWarnings = true; +``` + +The following APIs and options have been marked as deprecated: + +- Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use `$request->getResponseBody()->isRepeatable()` instead. +- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. +- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. +- Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead. +- Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead. +- Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated +- Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client. +- Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8. +- Marked `Guzzle\Common\Collection::inject()` as deprecated. +- Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use + `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` or + `$client->setDefaultOption('auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` + +3.7 introduces `request.options` as a parameter for a client configuration and as an optional argument to all creational +request methods. When paired with a client's configuration settings, these options allow you to specify default settings +for various aspects of a request. Because these options make other previous configuration options redundant, several +configuration options and methods of a client and AbstractCommand have been deprecated. + +- Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use `$client->getDefaultOption('headers')`. +- Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use `$client->setDefaultOption('headers/{header_name}', 'value')`. +- Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use `$client->setDefaultOption('params/{param_name}', 'value')` +- Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. These will work through Guzzle 4.0 + + $command = $client->getCommand('foo', array( + 'command.headers' => array('Test' => '123'), + 'command.response_body' => '/path/to/file' + )); + + // Should be changed to: + + $command = $client->getCommand('foo', array( + 'command.request_options' => array( + 'headers' => array('Test' => '123'), + 'save_as' => '/path/to/file' + ) + )); + +### Interface changes + +Additions and changes (you will need to update any implementations or subclasses you may have created): + +- Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`: + createRequest, head, delete, put, patch, post, options, prepareRequest +- Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()` +- Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface` +- Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to + `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a + resource, string, or EntityBody into the $options parameter to specify the download location of the response. +- Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a + default `array()` +- Added `Guzzle\Stream\StreamInterface::isRepeatable` +- Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods. + +The following methods were removed from interfaces. All of these methods are still available in the concrete classes +that implement them, but you should update your code to use alternative methods: + +- Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use + `$client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or + `$client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))` or + `$client->setDefaultOption('headers/{header_name}', 'value')`. or + `$client->setDefaultOption('headers', array('header_name' => 'value'))`. +- Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use `$client->getConfig()->getPath('request.options/headers')`. +- Removed `Guzzle\Http\ClientInterface::expandTemplate()`. This is an implementation detail. +- Removed `Guzzle\Http\ClientInterface::setRequestFactory()`. This is an implementation detail. +- Removed `Guzzle\Http\ClientInterface::getCurlMulti()`. This is a very specific implementation detail. +- Removed `Guzzle\Http\Message\RequestInterface::canCache`. Use the CachePlugin. +- Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect`. Use the HistoryPlugin. +- Removed `Guzzle\Http\Message\RequestInterface::isRedirect`. Use the HistoryPlugin. + +### Cache plugin breaking changes + +- CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a + CacheStorageInterface. These two objects and interface will be removed in a future version. +- Always setting X-cache headers on cached responses +- Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin +- `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface + $request, Response $response);` +- `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);` +- `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);` +- Added `CacheStorageInterface::purge($url)` +- `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin + $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache, + CanCacheStrategyInterface $canCache = null)` +- Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)` + +3.5 to 3.6 +---------- + +* Mixed casing of headers are now forced to be a single consistent casing across all values for that header. +* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution +* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader(). + For example, setHeader() first removes the header using unset on a HeaderCollection and then calls addHeader(). + Keeping the Host header and URL host in sync is now handled by overriding the addHeader method in Request. +* Specific header implementations can be created for complex headers. When a message creates a header, it uses a + HeaderFactory which can map specific headers to specific header classes. There is now a Link header and + CacheControl header implementation. +* Moved getLinks() from Response to just be used on a Link header object. + +If you previously relied on Guzzle\Http\Message\Header::raw(), then you will need to update your code to use the +HeaderInterface (e.g. toArray(), getAll(), etc.). + +### Interface changes + +* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate +* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti() +* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in + Guzzle\Http\Curl\RequestMediator +* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string. +* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface +* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders() + +### Removed deprecated functions + +* Removed Guzzle\Parser\ParserRegister::get(). Use getParser() +* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser(). + +### Deprecations + +* The ability to case-insensitively search for header values +* Guzzle\Http\Message\Header::hasExactHeader +* Guzzle\Http\Message\Header::raw. Use getAll() +* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object + instead. + +### Other changes + +* All response header helper functions return a string rather than mixing Header objects and strings inconsistently +* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle + directly via interfaces +* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist + but are a no-op until removed. +* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a + `Guzzle\Service\Command\ArrayCommandInterface`. +* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response + on a request while the request is still being transferred +* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess + +3.3 to 3.4 +---------- + +Base URLs of a client now follow the rules of http://tools.ietf.org/html/rfc3986#section-5.2.2 when merging URLs. + +3.2 to 3.3 +---------- + +### Response::getEtag() quote stripping removed + +`Guzzle\Http\Message\Response::getEtag()` no longer strips quotes around the ETag response header + +### Removed `Guzzle\Http\Utils` + +The `Guzzle\Http\Utils` class was removed. This class was only used for testing. + +### Stream wrapper and type + +`Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getStreamType()` are no longer converted to lowercase. + +### curl.emit_io became emit_io + +Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using the +'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io' + +3.1 to 3.2 +---------- + +### CurlMulti is no longer reused globally + +Before 3.2, the same CurlMulti object was reused globally for each client. This can cause issue where plugins added +to a single client can pollute requests dispatched from other clients. + +If you still wish to reuse the same CurlMulti object with each client, then you can add a listener to the +ServiceBuilder's `service_builder.create_client` event to inject a custom CurlMulti object into each client as it is +created. + +```php +$multi = new Guzzle\Http\Curl\CurlMulti(); +$builder = Guzzle\Service\Builder\ServiceBuilder::factory('/path/to/config.json'); +$builder->addListener('service_builder.create_client', function ($event) use ($multi) { + $event['client']->setCurlMulti($multi); +} +}); +``` + +### No default path + +URLs no longer have a default path value of '/' if no path was specified. + +Before: + +```php +$request = $client->get('http://www.foo.com'); +echo $request->getUrl(); +// >> http://www.foo.com/ +``` + +After: + +```php +$request = $client->get('http://www.foo.com'); +echo $request->getUrl(); +// >> http://www.foo.com +``` + +### Less verbose BadResponseException + +The exception message for `Guzzle\Http\Exception\BadResponseException` no longer contains the full HTTP request and +response information. You can, however, get access to the request and response object by calling `getRequest()` or +`getResponse()` on the exception object. + +### Query parameter aggregation + +Multi-valued query parameters are no longer aggregated using a callback function. `Guzzle\Http\Query` now has a +setAggregator() method that accepts a `Guzzle\Http\QueryAggregator\QueryAggregatorInterface` object. This object is +responsible for handling the aggregation of multi-valued query string variables into a flattened hash. + +2.8 to 3.x +---------- + +### Guzzle\Service\Inspector + +Change `\Guzzle\Service\Inspector::fromConfig` to `\Guzzle\Common\Collection::fromConfig` + +**Before** + +```php +use Guzzle\Service\Inspector; + +class YourClient extends \Guzzle\Service\Client +{ + public static function factory($config = array()) + { + $default = array(); + $required = array('base_url', 'username', 'api_key'); + $config = Inspector::fromConfig($config, $default, $required); + + $client = new self( + $config->get('base_url'), + $config->get('username'), + $config->get('api_key') + ); + $client->setConfig($config); + + $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json')); + + return $client; + } +``` + +**After** + +```php +use Guzzle\Common\Collection; + +class YourClient extends \Guzzle\Service\Client +{ + public static function factory($config = array()) + { + $default = array(); + $required = array('base_url', 'username', 'api_key'); + $config = Collection::fromConfig($config, $default, $required); + + $client = new self( + $config->get('base_url'), + $config->get('username'), + $config->get('api_key') + ); + $client->setConfig($config); + + $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json')); + + return $client; + } +``` + +### Convert XML Service Descriptions to JSON + +**Before** + +```xml + + + + + + Get a list of groups + + + Uses a search query to get a list of groups + + + + Create a group + + + + + Delete a group by ID + + + + + + + Update a group + + + + + + +``` + +**After** + +```json +{ + "name": "Zendesk REST API v2", + "apiVersion": "2012-12-31", + "description":"Provides access to Zendesk views, groups, tickets, ticket fields, and users", + "operations": { + "list_groups": { + "httpMethod":"GET", + "uri": "groups.json", + "summary": "Get a list of groups" + }, + "search_groups":{ + "httpMethod":"GET", + "uri": "search.json?query=\"{query} type:group\"", + "summary": "Uses a search query to get a list of groups", + "parameters":{ + "query":{ + "location": "uri", + "description":"Zendesk Search Query", + "type": "string", + "required": true + } + } + }, + "create_group": { + "httpMethod":"POST", + "uri": "groups.json", + "summary": "Create a group", + "parameters":{ + "data": { + "type": "array", + "location": "body", + "description":"Group JSON", + "filters": "json_encode", + "required": true + }, + "Content-Type":{ + "type": "string", + "location":"header", + "static": "application/json" + } + } + }, + "delete_group": { + "httpMethod":"DELETE", + "uri": "groups/{id}.json", + "summary": "Delete a group", + "parameters":{ + "id":{ + "location": "uri", + "description":"Group to delete by ID", + "type": "integer", + "required": true + } + } + }, + "get_group": { + "httpMethod":"GET", + "uri": "groups/{id}.json", + "summary": "Get a ticket", + "parameters":{ + "id":{ + "location": "uri", + "description":"Group to get by ID", + "type": "integer", + "required": true + } + } + }, + "update_group": { + "httpMethod":"PUT", + "uri": "groups/{id}.json", + "summary": "Update a group", + "parameters":{ + "id": { + "location": "uri", + "description":"Group to update by ID", + "type": "integer", + "required": true + }, + "data": { + "type": "array", + "location": "body", + "description":"Group JSON", + "filters": "json_encode", + "required": true + }, + "Content-Type":{ + "type": "string", + "location":"header", + "static": "application/json" + } + } + } +} +``` + +### Guzzle\Service\Description\ServiceDescription + +Commands are now called Operations + +**Before** + +```php +use Guzzle\Service\Description\ServiceDescription; + +$sd = new ServiceDescription(); +$sd->getCommands(); // @returns ApiCommandInterface[] +$sd->hasCommand($name); +$sd->getCommand($name); // @returns ApiCommandInterface|null +$sd->addCommand($command); // @param ApiCommandInterface $command +``` + +**After** + +```php +use Guzzle\Service\Description\ServiceDescription; + +$sd = new ServiceDescription(); +$sd->getOperations(); // @returns OperationInterface[] +$sd->hasOperation($name); +$sd->getOperation($name); // @returns OperationInterface|null +$sd->addOperation($operation); // @param OperationInterface $operation +``` + +### Guzzle\Common\Inflection\Inflector + +Namespace is now `Guzzle\Inflection\Inflector` + +### Guzzle\Http\Plugin + +Namespace is now `Guzzle\Plugin`. Many other changes occur within this namespace and are detailed in their own sections below. + +### Guzzle\Http\Plugin\LogPlugin and Guzzle\Common\Log + +Now `Guzzle\Plugin\Log\LogPlugin` and `Guzzle\Log` respectively. + +**Before** + +```php +use Guzzle\Common\Log\ClosureLogAdapter; +use Guzzle\Http\Plugin\LogPlugin; + +/** @var \Guzzle\Http\Client */ +$client; + +// $verbosity is an integer indicating desired message verbosity level +$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $verbosity = LogPlugin::LOG_VERBOSE); +``` + +**After** + +```php +use Guzzle\Log\ClosureLogAdapter; +use Guzzle\Log\MessageFormatter; +use Guzzle\Plugin\Log\LogPlugin; + +/** @var \Guzzle\Http\Client */ +$client; + +// $format is a string indicating desired message format -- @see MessageFormatter +$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $format = MessageFormatter::DEBUG_FORMAT); +``` + +### Guzzle\Http\Plugin\CurlAuthPlugin + +Now `Guzzle\Plugin\CurlAuth\CurlAuthPlugin`. + +### Guzzle\Http\Plugin\ExponentialBackoffPlugin + +Now `Guzzle\Plugin\Backoff\BackoffPlugin`, and other changes. + +**Before** + +```php +use Guzzle\Http\Plugin\ExponentialBackoffPlugin; + +$backoffPlugin = new ExponentialBackoffPlugin($maxRetries, array_merge( + ExponentialBackoffPlugin::getDefaultFailureCodes(), array(429) + )); + +$client->addSubscriber($backoffPlugin); +``` + +**After** + +```php +use Guzzle\Plugin\Backoff\BackoffPlugin; +use Guzzle\Plugin\Backoff\HttpBackoffStrategy; + +// Use convenient factory method instead -- see implementation for ideas of what +// you can do with chaining backoff strategies +$backoffPlugin = BackoffPlugin::getExponentialBackoff($maxRetries, array_merge( + HttpBackoffStrategy::getDefaultFailureCodes(), array(429) + )); +$client->addSubscriber($backoffPlugin); +``` + +### Known Issues + +#### [BUG] Accept-Encoding header behavior changed unintentionally. + +(See #217) (Fixed in 09daeb8c666fb44499a0646d655a8ae36456575e) + +In version 2.8 setting the `Accept-Encoding` header would set the CURLOPT_ENCODING option, which permitted cURL to +properly handle gzip/deflate compressed responses from the server. In versions affected by this bug this does not happen. +See issue #217 for a workaround, or use a version containing the fix. diff --git a/vendor/guzzlehttp/guzzle/composer.json b/vendor/guzzlehttp/guzzle/composer.json new file mode 100644 index 0000000..c553257 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/composer.json @@ -0,0 +1,58 @@ +{ + "name": "guzzlehttp/guzzle", + "type": "library", + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "framework", + "http", + "rest", + "web service", + "curl", + "client", + "HTTP client" + ], + "homepage": "http://guzzlephp.org/", + "license": "MIT", + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "require": { + "php": ">=5.5", + "ext-json": "*", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.6.1" + }, + "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" + }, + "config": { + "sort-packages": true + }, + "extra": { + "branch-alias": { + "dev-master": "6.3-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "autoload-dev": { + "psr-4": { + "GuzzleHttp\\Tests\\": "tests/" + } + } +} diff --git a/vendor/guzzlehttp/guzzle/phpstan.neon.dist b/vendor/guzzlehttp/guzzle/phpstan.neon.dist new file mode 100644 index 0000000..4ef4192 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/phpstan.neon.dist @@ -0,0 +1,9 @@ +parameters: + level: 1 + paths: + - src + + ignoreErrors: + - + message: '#Function uri_template not found#' + path: %currentWorkingDirectory%/src/functions.php diff --git a/vendor/guzzlehttp/guzzle/src/Client.php b/vendor/guzzlehttp/guzzle/src/Client.php new file mode 100644 index 0000000..0f43c71 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Client.php @@ -0,0 +1,422 @@ + 'http://www.foo.com/1.0/', + * 'timeout' => 0, + * 'allow_redirects' => false, + * 'proxy' => '192.168.16.1:10' + * ]); + * + * Client configuration settings include the following options: + * + * - handler: (callable) Function that transfers HTTP requests over the + * wire. The function is called with a Psr7\Http\Message\RequestInterface + * and array of transfer options, and must return a + * GuzzleHttp\Promise\PromiseInterface that is fulfilled with a + * Psr7\Http\Message\ResponseInterface on success. "handler" is a + * constructor only option that cannot be overridden in per/request + * options. If no handler is provided, a default handler will be created + * that enables all of the request options below by attaching all of the + * default middleware to the handler. + * - base_uri: (string|UriInterface) Base URI of the client that is merged + * into relative URIs. Can be a string or instance of UriInterface. + * - **: any request option + * + * @param array $config Client configuration settings. + * + * @see \GuzzleHttp\RequestOptions for a list of available request options. + */ + public function __construct(array $config = []) + { + if (!isset($config['handler'])) { + $config['handler'] = HandlerStack::create(); + } elseif (!is_callable($config['handler'])) { + throw new \InvalidArgumentException('handler must be a callable'); + } + + // Convert the base_uri to a UriInterface + if (isset($config['base_uri'])) { + $config['base_uri'] = Psr7\uri_for($config['base_uri']); + } + + $this->configureDefaults($config); + } + + public function __call($method, $args) + { + if (count($args) < 1) { + throw new \InvalidArgumentException('Magic request methods require a URI and optional options array'); + } + + $uri = $args[0]; + $opts = isset($args[1]) ? $args[1] : []; + + return substr($method, -5) === 'Async' + ? $this->requestAsync(substr($method, 0, -5), $uri, $opts) + : $this->request($method, $uri, $opts); + } + + public function sendAsync(RequestInterface $request, array $options = []) + { + // Merge the base URI into the request URI if needed. + $options = $this->prepareDefaults($options); + + return $this->transfer( + $request->withUri($this->buildUri($request->getUri(), $options), $request->hasHeader('Host')), + $options + ); + } + + public function send(RequestInterface $request, array $options = []) + { + $options[RequestOptions::SYNCHRONOUS] = true; + return $this->sendAsync($request, $options)->wait(); + } + + public function requestAsync($method, $uri = '', array $options = []) + { + $options = $this->prepareDefaults($options); + // Remove request modifying parameter because it can be done up-front. + $headers = isset($options['headers']) ? $options['headers'] : []; + $body = isset($options['body']) ? $options['body'] : null; + $version = isset($options['version']) ? $options['version'] : '1.1'; + // Merge the URI into the base URI. + $uri = $this->buildUri($uri, $options); + if (is_array($body)) { + $this->invalidBody(); + } + $request = new Psr7\Request($method, $uri, $headers, $body, $version); + // Remove the option so that they are not doubly-applied. + unset($options['headers'], $options['body'], $options['version']); + + return $this->transfer($request, $options); + } + + public function request($method, $uri = '', array $options = []) + { + $options[RequestOptions::SYNCHRONOUS] = true; + return $this->requestAsync($method, $uri, $options)->wait(); + } + + public function getConfig($option = null) + { + return $option === null + ? $this->config + : (isset($this->config[$option]) ? $this->config[$option] : null); + } + + private function buildUri($uri, array $config) + { + // for BC we accept null which would otherwise fail in uri_for + $uri = Psr7\uri_for($uri === null ? '' : $uri); + + if (isset($config['base_uri'])) { + $uri = Psr7\UriResolver::resolve(Psr7\uri_for($config['base_uri']), $uri); + } + + return $uri->getScheme() === '' && $uri->getHost() !== '' ? $uri->withScheme('http') : $uri; + } + + /** + * Configures the default options for a client. + * + * @param array $config + */ + private function configureDefaults(array $config) + { + $defaults = [ + 'allow_redirects' => RedirectMiddleware::$defaultSettings, + 'http_errors' => true, + 'decode_content' => true, + 'verify' => true, + 'cookies' => false + ]; + + // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set. + + // We can only trust the HTTP_PROXY environment variable in a CLI + // process due to the fact that PHP has no reliable mechanism to + // get environment variables that start with "HTTP_". + if (php_sapi_name() == 'cli' && getenv('HTTP_PROXY')) { + $defaults['proxy']['http'] = getenv('HTTP_PROXY'); + } + + if ($proxy = getenv('HTTPS_PROXY')) { + $defaults['proxy']['https'] = $proxy; + } + + if ($noProxy = getenv('NO_PROXY')) { + $cleanedNoProxy = str_replace(' ', '', $noProxy); + $defaults['proxy']['no'] = explode(',', $cleanedNoProxy); + } + + $this->config = $config + $defaults; + + if (!empty($config['cookies']) && $config['cookies'] === true) { + $this->config['cookies'] = new CookieJar(); + } + + // Add the default user-agent header. + if (!isset($this->config['headers'])) { + $this->config['headers'] = ['User-Agent' => default_user_agent()]; + } else { + // Add the User-Agent header if one was not already set. + foreach (array_keys($this->config['headers']) as $name) { + if (strtolower($name) === 'user-agent') { + return; + } + } + $this->config['headers']['User-Agent'] = default_user_agent(); + } + } + + /** + * Merges default options into the array. + * + * @param array $options Options to modify by reference + * + * @return array + */ + private function prepareDefaults(array $options) + { + $defaults = $this->config; + + if (!empty($defaults['headers'])) { + // Default headers are only added if they are not present. + $defaults['_conditional'] = $defaults['headers']; + unset($defaults['headers']); + } + + // Special handling for headers is required as they are added as + // conditional headers and as headers passed to a request ctor. + if (array_key_exists('headers', $options)) { + // Allows default headers to be unset. + if ($options['headers'] === null) { + $defaults['_conditional'] = null; + unset($options['headers']); + } elseif (!is_array($options['headers'])) { + throw new \InvalidArgumentException('headers must be an array'); + } + } + + // Shallow merge defaults underneath options. + $result = $options + $defaults; + + // Remove null values. + foreach ($result as $k => $v) { + if ($v === null) { + unset($result[$k]); + } + } + + return $result; + } + + /** + * Transfers the given request and applies request options. + * + * The URI of the request is not modified and the request options are used + * as-is without merging in default options. + * + * @param RequestInterface $request + * @param array $options + * + * @return Promise\PromiseInterface + */ + private function transfer(RequestInterface $request, array $options) + { + // save_to -> sink + if (isset($options['save_to'])) { + $options['sink'] = $options['save_to']; + unset($options['save_to']); + } + + // exceptions -> http_errors + if (isset($options['exceptions'])) { + $options['http_errors'] = $options['exceptions']; + unset($options['exceptions']); + } + + $request = $this->applyOptions($request, $options); + $handler = $options['handler']; + + try { + return Promise\promise_for($handler($request, $options)); + } catch (\Exception $e) { + return Promise\rejection_for($e); + } + } + + /** + * Applies the array of request options to a request. + * + * @param RequestInterface $request + * @param array $options + * + * @return RequestInterface + */ + private function applyOptions(RequestInterface $request, array &$options) + { + $modify = [ + 'set_headers' => [], + ]; + + if (isset($options['headers'])) { + $modify['set_headers'] = $options['headers']; + unset($options['headers']); + } + + if (isset($options['form_params'])) { + if (isset($options['multipart'])) { + throw new \InvalidArgumentException('You cannot use ' + . 'form_params and multipart at the same time. Use the ' + . 'form_params option if you want to send application/' + . 'x-www-form-urlencoded requests, and the multipart ' + . 'option to send multipart/form-data requests.'); + } + $options['body'] = http_build_query($options['form_params'], '', '&'); + unset($options['form_params']); + // Ensure that we don't have the header in different case and set the new value. + $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']); + $options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded'; + } + + if (isset($options['multipart'])) { + $options['body'] = new Psr7\MultipartStream($options['multipart']); + unset($options['multipart']); + } + + if (isset($options['json'])) { + $options['body'] = \GuzzleHttp\json_encode($options['json']); + unset($options['json']); + // Ensure that we don't have the header in different case and set the new value. + $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']); + $options['_conditional']['Content-Type'] = 'application/json'; + } + + if (!empty($options['decode_content']) + && $options['decode_content'] !== true + ) { + // Ensure that we don't have the header in different case and set the new value. + $options['_conditional'] = Psr7\_caseless_remove(['Accept-Encoding'], $options['_conditional']); + $modify['set_headers']['Accept-Encoding'] = $options['decode_content']; + } + + if (isset($options['body'])) { + if (is_array($options['body'])) { + $this->invalidBody(); + } + $modify['body'] = Psr7\stream_for($options['body']); + unset($options['body']); + } + + if (!empty($options['auth']) && is_array($options['auth'])) { + $value = $options['auth']; + $type = isset($value[2]) ? strtolower($value[2]) : 'basic'; + switch ($type) { + case 'basic': + // Ensure that we don't have the header in different case and set the new value. + $modify['set_headers'] = Psr7\_caseless_remove(['Authorization'], $modify['set_headers']); + $modify['set_headers']['Authorization'] = 'Basic ' + . base64_encode("$value[0]:$value[1]"); + break; + case 'digest': + // @todo: Do not rely on curl + $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_DIGEST; + $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]"; + break; + case 'ntlm': + $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_NTLM; + $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]"; + break; + } + } + + if (isset($options['query'])) { + $value = $options['query']; + if (is_array($value)) { + $value = http_build_query($value, null, '&', PHP_QUERY_RFC3986); + } + if (!is_string($value)) { + throw new \InvalidArgumentException('query must be a string or array'); + } + $modify['query'] = $value; + unset($options['query']); + } + + // Ensure that sink is not an invalid value. + if (isset($options['sink'])) { + // TODO: Add more sink validation? + if (is_bool($options['sink'])) { + throw new \InvalidArgumentException('sink must not be a boolean'); + } + } + + $request = Psr7\modify_request($request, $modify); + if ($request->getBody() instanceof Psr7\MultipartStream) { + // Use a multipart/form-data POST if a Content-Type is not set. + // Ensure that we don't have the header in different case and set the new value. + $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']); + $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary=' + . $request->getBody()->getBoundary(); + } + + // Merge in conditional headers if they are not present. + if (isset($options['_conditional'])) { + // Build up the changes so it's in a single clone of the message. + $modify = []; + foreach ($options['_conditional'] as $k => $v) { + if (!$request->hasHeader($k)) { + $modify['set_headers'][$k] = $v; + } + } + $request = Psr7\modify_request($request, $modify); + // Don't pass this internal value along to middleware/handlers. + unset($options['_conditional']); + } + + return $request; + } + + private function invalidBody() + { + throw new \InvalidArgumentException('Passing in the "body" request ' + . 'option as an array to send a POST request has been deprecated. ' + . 'Please use the "form_params" request option to send a ' + . 'application/x-www-form-urlencoded request, or the "multipart" ' + . 'request option to send a multipart/form-data request.'); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/ClientInterface.php b/vendor/guzzlehttp/guzzle/src/ClientInterface.php new file mode 100644 index 0000000..5b37085 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/ClientInterface.php @@ -0,0 +1,84 @@ +strictMode = $strictMode; + + foreach ($cookieArray as $cookie) { + if (!($cookie instanceof SetCookie)) { + $cookie = new SetCookie($cookie); + } + $this->setCookie($cookie); + } + } + + /** + * Create a new Cookie jar from an associative array and domain. + * + * @param array $cookies Cookies to create the jar from + * @param string $domain Domain to set the cookies to + * + * @return self + */ + public static function fromArray(array $cookies, $domain) + { + $cookieJar = new self(); + foreach ($cookies as $name => $value) { + $cookieJar->setCookie(new SetCookie([ + 'Domain' => $domain, + 'Name' => $name, + 'Value' => $value, + 'Discard' => true + ])); + } + + return $cookieJar; + } + + /** + * @deprecated + */ + public static function getCookieValue($value) + { + return $value; + } + + /** + * Evaluate if this cookie should be persisted to storage + * that survives between requests. + * + * @param SetCookie $cookie Being evaluated. + * @param bool $allowSessionCookies If we should persist session cookies + * @return bool + */ + public static function shouldPersist( + SetCookie $cookie, + $allowSessionCookies = false + ) { + if ($cookie->getExpires() || $allowSessionCookies) { + if (!$cookie->getDiscard()) { + return true; + } + } + + return false; + } + + /** + * Finds and returns the cookie based on the name + * + * @param string $name cookie name to search for + * @return SetCookie|null cookie that was found or null if not found + */ + public function getCookieByName($name) + { + // don't allow a null name + if ($name === null) { + return null; + } + foreach ($this->cookies as $cookie) { + if ($cookie->getName() !== null && strcasecmp($cookie->getName(), $name) === 0) { + return $cookie; + } + } + } + + public function toArray() + { + return array_map(function (SetCookie $cookie) { + return $cookie->toArray(); + }, $this->getIterator()->getArrayCopy()); + } + + public function clear($domain = null, $path = null, $name = null) + { + if (!$domain) { + $this->cookies = []; + return; + } elseif (!$path) { + $this->cookies = array_filter( + $this->cookies, + function (SetCookie $cookie) use ($domain) { + return !$cookie->matchesDomain($domain); + } + ); + } elseif (!$name) { + $this->cookies = array_filter( + $this->cookies, + function (SetCookie $cookie) use ($path, $domain) { + return !($cookie->matchesPath($path) && + $cookie->matchesDomain($domain)); + } + ); + } else { + $this->cookies = array_filter( + $this->cookies, + function (SetCookie $cookie) use ($path, $domain, $name) { + return !($cookie->getName() == $name && + $cookie->matchesPath($path) && + $cookie->matchesDomain($domain)); + } + ); + } + } + + public function clearSessionCookies() + { + $this->cookies = array_filter( + $this->cookies, + function (SetCookie $cookie) { + return !$cookie->getDiscard() && $cookie->getExpires(); + } + ); + } + + public function setCookie(SetCookie $cookie) + { + // If the name string is empty (but not 0), ignore the set-cookie + // string entirely. + $name = $cookie->getName(); + if (!$name && $name !== '0') { + return false; + } + + // Only allow cookies with set and valid domain, name, value + $result = $cookie->validate(); + if ($result !== true) { + if ($this->strictMode) { + throw new \RuntimeException('Invalid cookie: ' . $result); + } else { + $this->removeCookieIfEmpty($cookie); + return false; + } + } + + // Resolve conflicts with previously set cookies + foreach ($this->cookies as $i => $c) { + + // Two cookies are identical, when their path, and domain are + // identical. + if ($c->getPath() != $cookie->getPath() || + $c->getDomain() != $cookie->getDomain() || + $c->getName() != $cookie->getName() + ) { + continue; + } + + // The previously set cookie is a discard cookie and this one is + // not so allow the new cookie to be set + if (!$cookie->getDiscard() && $c->getDiscard()) { + unset($this->cookies[$i]); + continue; + } + + // If the new cookie's expiration is further into the future, then + // replace the old cookie + if ($cookie->getExpires() > $c->getExpires()) { + unset($this->cookies[$i]); + continue; + } + + // If the value has changed, we better change it + if ($cookie->getValue() !== $c->getValue()) { + unset($this->cookies[$i]); + continue; + } + + // The cookie exists, so no need to continue + return false; + } + + $this->cookies[] = $cookie; + + return true; + } + + public function count() + { + return count($this->cookies); + } + + public function getIterator() + { + return new \ArrayIterator(array_values($this->cookies)); + } + + public function extractCookies( + RequestInterface $request, + ResponseInterface $response + ) { + if ($cookieHeader = $response->getHeader('Set-Cookie')) { + foreach ($cookieHeader as $cookie) { + $sc = SetCookie::fromString($cookie); + if (!$sc->getDomain()) { + $sc->setDomain($request->getUri()->getHost()); + } + if (0 !== strpos($sc->getPath(), '/')) { + $sc->setPath($this->getCookiePathFromRequest($request)); + } + $this->setCookie($sc); + } + } + } + + /** + * Computes cookie path following RFC 6265 section 5.1.4 + * + * @link https://tools.ietf.org/html/rfc6265#section-5.1.4 + * + * @param RequestInterface $request + * @return string + */ + private function getCookiePathFromRequest(RequestInterface $request) + { + $uriPath = $request->getUri()->getPath(); + if ('' === $uriPath) { + return '/'; + } + if (0 !== strpos($uriPath, '/')) { + return '/'; + } + if ('/' === $uriPath) { + return '/'; + } + if (0 === $lastSlashPos = strrpos($uriPath, '/')) { + return '/'; + } + + return substr($uriPath, 0, $lastSlashPos); + } + + public function withCookieHeader(RequestInterface $request) + { + $values = []; + $uri = $request->getUri(); + $scheme = $uri->getScheme(); + $host = $uri->getHost(); + $path = $uri->getPath() ?: '/'; + + foreach ($this->cookies as $cookie) { + if ($cookie->matchesPath($path) && + $cookie->matchesDomain($host) && + !$cookie->isExpired() && + (!$cookie->getSecure() || $scheme === 'https') + ) { + $values[] = $cookie->getName() . '=' + . $cookie->getValue(); + } + } + + return $values + ? $request->withHeader('Cookie', implode('; ', $values)) + : $request; + } + + /** + * If a cookie already exists and the server asks to set it again with a + * null value, the cookie must be deleted. + * + * @param SetCookie $cookie + */ + private function removeCookieIfEmpty(SetCookie $cookie) + { + $cookieValue = $cookie->getValue(); + if ($cookieValue === null || $cookieValue === '') { + $this->clear( + $cookie->getDomain(), + $cookie->getPath(), + $cookie->getName() + ); + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php new file mode 100644 index 0000000..2cf298a --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php @@ -0,0 +1,84 @@ +filename = $cookieFile; + $this->storeSessionCookies = $storeSessionCookies; + + if (file_exists($cookieFile)) { + $this->load($cookieFile); + } + } + + /** + * Saves the file when shutting down + */ + public function __destruct() + { + $this->save($this->filename); + } + + /** + * Saves the cookies to a file. + * + * @param string $filename File to save + * @throws \RuntimeException if the file cannot be found or created + */ + public function save($filename) + { + $json = []; + foreach ($this as $cookie) { + /** @var SetCookie $cookie */ + if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { + $json[] = $cookie->toArray(); + } + } + + $jsonStr = \GuzzleHttp\json_encode($json); + if (false === file_put_contents($filename, $jsonStr, LOCK_EX)) { + throw new \RuntimeException("Unable to save file {$filename}"); + } + } + + /** + * Load cookies from a JSON formatted file. + * + * Old cookies are kept unless overwritten by newly loaded ones. + * + * @param string $filename Cookie file to load. + * @throws \RuntimeException if the file cannot be loaded. + */ + public function load($filename) + { + $json = file_get_contents($filename); + if (false === $json) { + throw new \RuntimeException("Unable to load file {$filename}"); + } elseif ($json === '') { + return; + } + + $data = \GuzzleHttp\json_decode($json, true); + if (is_array($data)) { + foreach (json_decode($json, true) as $cookie) { + $this->setCookie(new SetCookie($cookie)); + } + } elseif (strlen($data)) { + throw new \RuntimeException("Invalid cookie file: {$filename}"); + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php b/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php new file mode 100644 index 0000000..0224a24 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php @@ -0,0 +1,72 @@ +sessionKey = $sessionKey; + $this->storeSessionCookies = $storeSessionCookies; + $this->load(); + } + + /** + * Saves cookies to session when shutting down + */ + public function __destruct() + { + $this->save(); + } + + /** + * Save cookies to the client session + */ + public function save() + { + $json = []; + foreach ($this as $cookie) { + /** @var SetCookie $cookie */ + if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { + $json[] = $cookie->toArray(); + } + } + + $_SESSION[$this->sessionKey] = json_encode($json); + } + + /** + * Load the contents of the client session into the data array + */ + protected function load() + { + if (!isset($_SESSION[$this->sessionKey])) { + return; + } + $data = json_decode($_SESSION[$this->sessionKey], true); + if (is_array($data)) { + foreach ($data as $cookie) { + $this->setCookie(new SetCookie($cookie)); + } + } elseif (strlen($data)) { + throw new \RuntimeException("Invalid cookie data"); + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php b/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php new file mode 100644 index 0000000..3d776a7 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php @@ -0,0 +1,403 @@ + null, + 'Value' => null, + 'Domain' => null, + 'Path' => '/', + 'Max-Age' => null, + 'Expires' => null, + 'Secure' => false, + 'Discard' => false, + 'HttpOnly' => false + ]; + + /** @var array Cookie data */ + private $data; + + /** + * Create a new SetCookie object from a string + * + * @param string $cookie Set-Cookie header string + * + * @return self + */ + public static function fromString($cookie) + { + // Create the default return array + $data = self::$defaults; + // Explode the cookie string using a series of semicolons + $pieces = array_filter(array_map('trim', explode(';', $cookie))); + // The name of the cookie (first kvp) must exist and include an equal sign. + if (empty($pieces[0]) || !strpos($pieces[0], '=')) { + return new self($data); + } + + // Add the cookie pieces into the parsed data array + foreach ($pieces as $part) { + $cookieParts = explode('=', $part, 2); + $key = trim($cookieParts[0]); + $value = isset($cookieParts[1]) + ? trim($cookieParts[1], " \n\r\t\0\x0B") + : true; + + // Only check for non-cookies when cookies have been found + if (empty($data['Name'])) { + $data['Name'] = $key; + $data['Value'] = $value; + } else { + foreach (array_keys(self::$defaults) as $search) { + if (!strcasecmp($search, $key)) { + $data[$search] = $value; + continue 2; + } + } + $data[$key] = $value; + } + } + + return new self($data); + } + + /** + * @param array $data Array of cookie data provided by a Cookie parser + */ + public function __construct(array $data = []) + { + $this->data = array_replace(self::$defaults, $data); + // Extract the Expires value and turn it into a UNIX timestamp if needed + if (!$this->getExpires() && $this->getMaxAge()) { + // Calculate the Expires date + $this->setExpires(time() + $this->getMaxAge()); + } elseif ($this->getExpires() && !is_numeric($this->getExpires())) { + $this->setExpires($this->getExpires()); + } + } + + public function __toString() + { + $str = $this->data['Name'] . '=' . $this->data['Value'] . '; '; + foreach ($this->data as $k => $v) { + if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== false) { + if ($k === 'Expires') { + $str .= 'Expires=' . gmdate('D, d M Y H:i:s \G\M\T', $v) . '; '; + } else { + $str .= ($v === true ? $k : "{$k}={$v}") . '; '; + } + } + } + + return rtrim($str, '; '); + } + + public function toArray() + { + return $this->data; + } + + /** + * Get the cookie name + * + * @return string + */ + public function getName() + { + return $this->data['Name']; + } + + /** + * Set the cookie name + * + * @param string $name Cookie name + */ + public function setName($name) + { + $this->data['Name'] = $name; + } + + /** + * Get the cookie value + * + * @return string + */ + public function getValue() + { + return $this->data['Value']; + } + + /** + * Set the cookie value + * + * @param string $value Cookie value + */ + public function setValue($value) + { + $this->data['Value'] = $value; + } + + /** + * Get the domain + * + * @return string|null + */ + public function getDomain() + { + return $this->data['Domain']; + } + + /** + * Set the domain of the cookie + * + * @param string $domain + */ + public function setDomain($domain) + { + $this->data['Domain'] = $domain; + } + + /** + * Get the path + * + * @return string + */ + public function getPath() + { + return $this->data['Path']; + } + + /** + * Set the path of the cookie + * + * @param string $path Path of the cookie + */ + public function setPath($path) + { + $this->data['Path'] = $path; + } + + /** + * Maximum lifetime of the cookie in seconds + * + * @return int|null + */ + public function getMaxAge() + { + return $this->data['Max-Age']; + } + + /** + * Set the max-age of the cookie + * + * @param int $maxAge Max age of the cookie in seconds + */ + public function setMaxAge($maxAge) + { + $this->data['Max-Age'] = $maxAge; + } + + /** + * The UNIX timestamp when the cookie Expires + * + * @return mixed + */ + public function getExpires() + { + return $this->data['Expires']; + } + + /** + * Set the unix timestamp for which the cookie will expire + * + * @param int $timestamp Unix timestamp + */ + public function setExpires($timestamp) + { + $this->data['Expires'] = is_numeric($timestamp) + ? (int) $timestamp + : strtotime($timestamp); + } + + /** + * Get whether or not this is a secure cookie + * + * @return bool|null + */ + public function getSecure() + { + return $this->data['Secure']; + } + + /** + * Set whether or not the cookie is secure + * + * @param bool $secure Set to true or false if secure + */ + public function setSecure($secure) + { + $this->data['Secure'] = $secure; + } + + /** + * Get whether or not this is a session cookie + * + * @return bool|null + */ + public function getDiscard() + { + return $this->data['Discard']; + } + + /** + * Set whether or not this is a session cookie + * + * @param bool $discard Set to true or false if this is a session cookie + */ + public function setDiscard($discard) + { + $this->data['Discard'] = $discard; + } + + /** + * Get whether or not this is an HTTP only cookie + * + * @return bool + */ + public function getHttpOnly() + { + return $this->data['HttpOnly']; + } + + /** + * Set whether or not this is an HTTP only cookie + * + * @param bool $httpOnly Set to true or false if this is HTTP only + */ + public function setHttpOnly($httpOnly) + { + $this->data['HttpOnly'] = $httpOnly; + } + + /** + * Check if the cookie matches a path value. + * + * A request-path path-matches a given cookie-path if at least one of + * the following conditions holds: + * + * - The cookie-path and the request-path are identical. + * - The cookie-path is a prefix of the request-path, and the last + * character of the cookie-path is %x2F ("/"). + * - The cookie-path is a prefix of the request-path, and the first + * character of the request-path that is not included in the cookie- + * path is a %x2F ("/") character. + * + * @param string $requestPath Path to check against + * + * @return bool + */ + public function matchesPath($requestPath) + { + $cookiePath = $this->getPath(); + + // Match on exact matches or when path is the default empty "/" + if ($cookiePath === '/' || $cookiePath == $requestPath) { + return true; + } + + // Ensure that the cookie-path is a prefix of the request path. + if (0 !== strpos($requestPath, $cookiePath)) { + return false; + } + + // Match if the last character of the cookie-path is "/" + if (substr($cookiePath, -1, 1) === '/') { + return true; + } + + // Match if the first character not included in cookie path is "/" + return substr($requestPath, strlen($cookiePath), 1) === '/'; + } + + /** + * Check if the cookie matches a domain value + * + * @param string $domain Domain to check against + * + * @return bool + */ + public function matchesDomain($domain) + { + // Remove the leading '.' as per spec in RFC 6265. + // http://tools.ietf.org/html/rfc6265#section-5.2.3 + $cookieDomain = ltrim($this->getDomain(), '.'); + + // Domain not set or exact match. + if (!$cookieDomain || !strcasecmp($domain, $cookieDomain)) { + return true; + } + + // Matching the subdomain according to RFC 6265. + // http://tools.ietf.org/html/rfc6265#section-5.1.3 + if (filter_var($domain, FILTER_VALIDATE_IP)) { + return false; + } + + return (bool) preg_match('/\.' . preg_quote($cookieDomain, '/') . '$/', $domain); + } + + /** + * Check if the cookie is expired + * + * @return bool + */ + public function isExpired() + { + return $this->getExpires() !== null && time() > $this->getExpires(); + } + + /** + * Check if the cookie is valid according to RFC 6265 + * + * @return bool|string Returns true if valid or an error message if invalid + */ + public function validate() + { + // Names must not be empty, but can be 0 + $name = $this->getName(); + if (empty($name) && !is_numeric($name)) { + return 'The cookie name must not be empty'; + } + + // Check if any of the invalid characters are present in the cookie name + if (preg_match( + '/[\x00-\x20\x22\x28-\x29\x2c\x2f\x3a-\x40\x5c\x7b\x7d\x7f]/', + $name + )) { + return 'Cookie name must not contain invalid characters: ASCII ' + . 'Control characters (0-31;127), space, tab and the ' + . 'following characters: ()<>@,;:\"/?={}'; + } + + // Value must not be empty, but can be 0 + $value = $this->getValue(); + if (empty($value) && !is_numeric($value)) { + return 'The cookie value must not be empty'; + } + + // Domains must not be empty, but can be 0 + // A "0" is not a valid internet domain, but may be used as server name + // in a private network. + $domain = $this->getDomain(); + if (empty($domain) && !is_numeric($domain)) { + return 'The cookie domain must not be empty'; + } + + return true; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php b/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php new file mode 100644 index 0000000..427d896 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php @@ -0,0 +1,27 @@ +getStatusCode() + : 0; + parent::__construct($message, $code, $previous); + $this->request = $request; + $this->response = $response; + $this->handlerContext = $handlerContext; + } + + /** + * Wrap non-RequestExceptions with a RequestException + * + * @param RequestInterface $request + * @param \Exception $e + * + * @return RequestException + */ + public static function wrapException(RequestInterface $request, \Exception $e) + { + return $e instanceof RequestException + ? $e + : new RequestException($e->getMessage(), $request, null, $e); + } + + /** + * Factory method to create a new exception with a normalized error message + * + * @param RequestInterface $request Request + * @param ResponseInterface $response Response received + * @param \Exception $previous Previous exception + * @param array $ctx Optional handler context. + * + * @return self + */ + public static function create( + RequestInterface $request, + ResponseInterface $response = null, + \Exception $previous = null, + array $ctx = [] + ) { + if (!$response) { + return new self( + 'Error completing request', + $request, + null, + $previous, + $ctx + ); + } + + $level = (int) floor($response->getStatusCode() / 100); + if ($level === 4) { + $label = 'Client error'; + $className = ClientException::class; + } elseif ($level === 5) { + $label = 'Server error'; + $className = ServerException::class; + } else { + $label = 'Unsuccessful request'; + $className = __CLASS__; + } + + $uri = $request->getUri(); + $uri = static::obfuscateUri($uri); + + // Client Error: `GET /` resulted in a `404 Not Found` response: + // ... (truncated) + $message = sprintf( + '%s: `%s %s` resulted in a `%s %s` response', + $label, + $request->getMethod(), + $uri, + $response->getStatusCode(), + $response->getReasonPhrase() + ); + + $summary = static::getResponseBodySummary($response); + + if ($summary !== null) { + $message .= ":\n{$summary}\n"; + } + + return new $className($message, $request, $response, $previous, $ctx); + } + + /** + * Get a short summary of the response + * + * Will return `null` if the response is not printable. + * + * @param ResponseInterface $response + * + * @return string|null + */ + public static function getResponseBodySummary(ResponseInterface $response) + { + $body = $response->getBody(); + + if (!$body->isSeekable() || !$body->isReadable()) { + return null; + } + + $size = $body->getSize(); + + if ($size === 0) { + return null; + } + + $summary = $body->read(120); + $body->rewind(); + + if ($size > 120) { + $summary .= ' (truncated...)'; + } + + // Matches any printable character, including unicode characters: + // letters, marks, numbers, punctuation, spacing, and separators. + if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/', $summary)) { + return null; + } + + return $summary; + } + + /** + * Obfuscates URI if there is an username and a password present + * + * @param UriInterface $uri + * + * @return UriInterface + */ + private static function obfuscateUri($uri) + { + $userInfo = $uri->getUserInfo(); + + if (false !== ($pos = strpos($userInfo, ':'))) { + return $uri->withUserInfo(substr($userInfo, 0, $pos), '***'); + } + + return $uri; + } + + /** + * Get the request that caused the exception + * + * @return RequestInterface + */ + public function getRequest() + { + return $this->request; + } + + /** + * Get the associated response + * + * @return ResponseInterface|null + */ + public function getResponse() + { + return $this->response; + } + + /** + * Check if a response was received + * + * @return bool + */ + public function hasResponse() + { + return $this->response !== null; + } + + /** + * Get contextual information about the error from the underlying handler. + * + * The contents of this array will vary depending on which handler you are + * using. It may also be just an empty array. Relying on this data will + * couple you to a specific handler, but can give more debug information + * when needed. + * + * @return array + */ + public function getHandlerContext() + { + return $this->handlerContext; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php b/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php new file mode 100644 index 0000000..a77c289 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php @@ -0,0 +1,27 @@ +stream = $stream; + $msg = $msg ?: 'Could not seek the stream to position ' . $pos; + parent::__construct($msg); + } + + /** + * @return StreamInterface + */ + public function getStream() + { + return $this->stream; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php b/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php new file mode 100644 index 0000000..127094c --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php @@ -0,0 +1,9 @@ +maxHandles = $maxHandles; + } + + public function create(RequestInterface $request, array $options) + { + if (isset($options['curl']['body_as_string'])) { + $options['_body_as_string'] = $options['curl']['body_as_string']; + unset($options['curl']['body_as_string']); + } + + $easy = new EasyHandle; + $easy->request = $request; + $easy->options = $options; + $conf = $this->getDefaultConf($easy); + $this->applyMethod($easy, $conf); + $this->applyHandlerOptions($easy, $conf); + $this->applyHeaders($easy, $conf); + unset($conf['_headers']); + + // Add handler options from the request configuration options + if (isset($options['curl'])) { + $conf = array_replace($conf, $options['curl']); + } + + $conf[CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy); + $easy->handle = $this->handles + ? array_pop($this->handles) + : curl_init(); + curl_setopt_array($easy->handle, $conf); + + return $easy; + } + + public function release(EasyHandle $easy) + { + $resource = $easy->handle; + unset($easy->handle); + + if (count($this->handles) >= $this->maxHandles) { + curl_close($resource); + } else { + // Remove all callback functions as they can hold onto references + // and are not cleaned up by curl_reset. Using curl_setopt_array + // does not work for some reason, so removing each one + // individually. + curl_setopt($resource, CURLOPT_HEADERFUNCTION, null); + curl_setopt($resource, CURLOPT_READFUNCTION, null); + curl_setopt($resource, CURLOPT_WRITEFUNCTION, null); + curl_setopt($resource, CURLOPT_PROGRESSFUNCTION, null); + curl_reset($resource); + $this->handles[] = $resource; + } + } + + /** + * Completes a cURL transaction, either returning a response promise or a + * rejected promise. + * + * @param callable $handler + * @param EasyHandle $easy + * @param CurlFactoryInterface $factory Dictates how the handle is released + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public static function finish( + callable $handler, + EasyHandle $easy, + CurlFactoryInterface $factory + ) { + if (isset($easy->options['on_stats'])) { + self::invokeStats($easy); + } + + if (!$easy->response || $easy->errno) { + return self::finishError($handler, $easy, $factory); + } + + // Return the response if it is present and there is no error. + $factory->release($easy); + + // Rewind the body of the response if possible. + $body = $easy->response->getBody(); + if ($body->isSeekable()) { + $body->rewind(); + } + + return new FulfilledPromise($easy->response); + } + + private static function invokeStats(EasyHandle $easy) + { + $curlStats = curl_getinfo($easy->handle); + $curlStats['appconnect_time'] = curl_getinfo($easy->handle, CURLINFO_APPCONNECT_TIME); + $stats = new TransferStats( + $easy->request, + $easy->response, + $curlStats['total_time'], + $easy->errno, + $curlStats + ); + call_user_func($easy->options['on_stats'], $stats); + } + + private static function finishError( + callable $handler, + EasyHandle $easy, + CurlFactoryInterface $factory + ) { + // Get error information and release the handle to the factory. + $ctx = [ + 'errno' => $easy->errno, + 'error' => curl_error($easy->handle), + 'appconnect_time' => curl_getinfo($easy->handle, CURLINFO_APPCONNECT_TIME), + ] + curl_getinfo($easy->handle); + $ctx[self::CURL_VERSION_STR] = curl_version()['version']; + $factory->release($easy); + + // Retry when nothing is present or when curl failed to rewind. + if (empty($easy->options['_err_message']) + && (!$easy->errno || $easy->errno == 65) + ) { + return self::retryFailedRewind($handler, $easy, $ctx); + } + + return self::createRejection($easy, $ctx); + } + + private static function createRejection(EasyHandle $easy, array $ctx) + { + static $connectionErrors = [ + CURLE_OPERATION_TIMEOUTED => true, + CURLE_COULDNT_RESOLVE_HOST => true, + CURLE_COULDNT_CONNECT => true, + CURLE_SSL_CONNECT_ERROR => true, + CURLE_GOT_NOTHING => true, + ]; + + // If an exception was encountered during the onHeaders event, then + // return a rejected promise that wraps that exception. + if ($easy->onHeadersException) { + return \GuzzleHttp\Promise\rejection_for( + new RequestException( + 'An error was encountered during the on_headers event', + $easy->request, + $easy->response, + $easy->onHeadersException, + $ctx + ) + ); + } + if (version_compare($ctx[self::CURL_VERSION_STR], self::LOW_CURL_VERSION_NUMBER)) { + $message = sprintf( + 'cURL error %s: %s (%s)', + $ctx['errno'], + $ctx['error'], + 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html' + ); + } else { + $message = sprintf( + 'cURL error %s: %s (%s) for %s', + $ctx['errno'], + $ctx['error'], + 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html', + $easy->request->getUri() + ); + } + + // Create a connection exception if it was a specific error code. + $error = isset($connectionErrors[$easy->errno]) + ? new ConnectException($message, $easy->request, null, $ctx) + : new RequestException($message, $easy->request, $easy->response, null, $ctx); + + return \GuzzleHttp\Promise\rejection_for($error); + } + + private function getDefaultConf(EasyHandle $easy) + { + $conf = [ + '_headers' => $easy->request->getHeaders(), + CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(), + CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''), + CURLOPT_RETURNTRANSFER => false, + CURLOPT_HEADER => false, + CURLOPT_CONNECTTIMEOUT => 150, + ]; + + if (defined('CURLOPT_PROTOCOLS')) { + $conf[CURLOPT_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS; + } + + $version = $easy->request->getProtocolVersion(); + if ($version == 1.1) { + $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_1; + } elseif ($version == 2.0) { + $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_2_0; + } else { + $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_0; + } + + return $conf; + } + + private function applyMethod(EasyHandle $easy, array &$conf) + { + $body = $easy->request->getBody(); + $size = $body->getSize(); + + if ($size === null || $size > 0) { + $this->applyBody($easy->request, $easy->options, $conf); + return; + } + + $method = $easy->request->getMethod(); + if ($method === 'PUT' || $method === 'POST') { + // See http://tools.ietf.org/html/rfc7230#section-3.3.2 + if (!$easy->request->hasHeader('Content-Length')) { + $conf[CURLOPT_HTTPHEADER][] = 'Content-Length: 0'; + } + } elseif ($method === 'HEAD') { + $conf[CURLOPT_NOBODY] = true; + unset( + $conf[CURLOPT_WRITEFUNCTION], + $conf[CURLOPT_READFUNCTION], + $conf[CURLOPT_FILE], + $conf[CURLOPT_INFILE] + ); + } + } + + private function applyBody(RequestInterface $request, array $options, array &$conf) + { + $size = $request->hasHeader('Content-Length') + ? (int) $request->getHeaderLine('Content-Length') + : null; + + // Send the body as a string if the size is less than 1MB OR if the + // [curl][body_as_string] request value is set. + if (($size !== null && $size < 1000000) || + !empty($options['_body_as_string']) + ) { + $conf[CURLOPT_POSTFIELDS] = (string) $request->getBody(); + // Don't duplicate the Content-Length header + $this->removeHeader('Content-Length', $conf); + $this->removeHeader('Transfer-Encoding', $conf); + } else { + $conf[CURLOPT_UPLOAD] = true; + if ($size !== null) { + $conf[CURLOPT_INFILESIZE] = $size; + $this->removeHeader('Content-Length', $conf); + } + $body = $request->getBody(); + if ($body->isSeekable()) { + $body->rewind(); + } + $conf[CURLOPT_READFUNCTION] = function ($ch, $fd, $length) use ($body) { + return $body->read($length); + }; + } + + // If the Expect header is not present, prevent curl from adding it + if (!$request->hasHeader('Expect')) { + $conf[CURLOPT_HTTPHEADER][] = 'Expect:'; + } + + // cURL sometimes adds a content-type by default. Prevent this. + if (!$request->hasHeader('Content-Type')) { + $conf[CURLOPT_HTTPHEADER][] = 'Content-Type:'; + } + } + + private function applyHeaders(EasyHandle $easy, array &$conf) + { + foreach ($conf['_headers'] as $name => $values) { + foreach ($values as $value) { + $value = (string) $value; + if ($value === '') { + // cURL requires a special format for empty headers. + // See https://github.com/guzzle/guzzle/issues/1882 for more details. + $conf[CURLOPT_HTTPHEADER][] = "$name;"; + } else { + $conf[CURLOPT_HTTPHEADER][] = "$name: $value"; + } + } + } + + // Remove the Accept header if one was not set + if (!$easy->request->hasHeader('Accept')) { + $conf[CURLOPT_HTTPHEADER][] = 'Accept:'; + } + } + + /** + * Remove a header from the options array. + * + * @param string $name Case-insensitive header to remove + * @param array $options Array of options to modify + */ + private function removeHeader($name, array &$options) + { + foreach (array_keys($options['_headers']) as $key) { + if (!strcasecmp($key, $name)) { + unset($options['_headers'][$key]); + return; + } + } + } + + private function applyHandlerOptions(EasyHandle $easy, array &$conf) + { + $options = $easy->options; + if (isset($options['verify'])) { + if ($options['verify'] === false) { + unset($conf[CURLOPT_CAINFO]); + $conf[CURLOPT_SSL_VERIFYHOST] = 0; + $conf[CURLOPT_SSL_VERIFYPEER] = false; + } else { + $conf[CURLOPT_SSL_VERIFYHOST] = 2; + $conf[CURLOPT_SSL_VERIFYPEER] = true; + if (is_string($options['verify'])) { + // Throw an error if the file/folder/link path is not valid or doesn't exist. + if (!file_exists($options['verify'])) { + throw new \InvalidArgumentException( + "SSL CA bundle not found: {$options['verify']}" + ); + } + // If it's a directory or a link to a directory use CURLOPT_CAPATH. + // If not, it's probably a file, or a link to a file, so use CURLOPT_CAINFO. + if (is_dir($options['verify']) || + (is_link($options['verify']) && is_dir(readlink($options['verify'])))) { + $conf[CURLOPT_CAPATH] = $options['verify']; + } else { + $conf[CURLOPT_CAINFO] = $options['verify']; + } + } + } + } + + if (!empty($options['decode_content'])) { + $accept = $easy->request->getHeaderLine('Accept-Encoding'); + if ($accept) { + $conf[CURLOPT_ENCODING] = $accept; + } else { + $conf[CURLOPT_ENCODING] = ''; + // Don't let curl send the header over the wire + $conf[CURLOPT_HTTPHEADER][] = 'Accept-Encoding:'; + } + } + + if (isset($options['sink'])) { + $sink = $options['sink']; + if (!is_string($sink)) { + $sink = \GuzzleHttp\Psr7\stream_for($sink); + } elseif (!is_dir(dirname($sink))) { + // Ensure that the directory exists before failing in curl. + throw new \RuntimeException(sprintf( + 'Directory %s does not exist for sink value of %s', + dirname($sink), + $sink + )); + } else { + $sink = new LazyOpenStream($sink, 'w+'); + } + $easy->sink = $sink; + $conf[CURLOPT_WRITEFUNCTION] = function ($ch, $write) use ($sink) { + return $sink->write($write); + }; + } else { + // Use a default temp stream if no sink was set. + $conf[CURLOPT_FILE] = fopen('php://temp', 'w+'); + $easy->sink = Psr7\stream_for($conf[CURLOPT_FILE]); + } + $timeoutRequiresNoSignal = false; + if (isset($options['timeout'])) { + $timeoutRequiresNoSignal |= $options['timeout'] < 1; + $conf[CURLOPT_TIMEOUT_MS] = $options['timeout'] * 1000; + } + + // CURL default value is CURL_IPRESOLVE_WHATEVER + if (isset($options['force_ip_resolve'])) { + if ('v4' === $options['force_ip_resolve']) { + $conf[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V4; + } elseif ('v6' === $options['force_ip_resolve']) { + $conf[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V6; + } + } + + if (isset($options['connect_timeout'])) { + $timeoutRequiresNoSignal |= $options['connect_timeout'] < 1; + $conf[CURLOPT_CONNECTTIMEOUT_MS] = $options['connect_timeout'] * 1000; + } + + if ($timeoutRequiresNoSignal && strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') { + $conf[CURLOPT_NOSIGNAL] = true; + } + + if (isset($options['proxy'])) { + if (!is_array($options['proxy'])) { + $conf[CURLOPT_PROXY] = $options['proxy']; + } else { + $scheme = $easy->request->getUri()->getScheme(); + if (isset($options['proxy'][$scheme])) { + $host = $easy->request->getUri()->getHost(); + if (!isset($options['proxy']['no']) || + !\GuzzleHttp\is_host_in_noproxy($host, $options['proxy']['no']) + ) { + $conf[CURLOPT_PROXY] = $options['proxy'][$scheme]; + } + } + } + } + + if (isset($options['cert'])) { + $cert = $options['cert']; + if (is_array($cert)) { + $conf[CURLOPT_SSLCERTPASSWD] = $cert[1]; + $cert = $cert[0]; + } + if (!file_exists($cert)) { + throw new \InvalidArgumentException( + "SSL certificate not found: {$cert}" + ); + } + $conf[CURLOPT_SSLCERT] = $cert; + } + + if (isset($options['ssl_key'])) { + $sslKey = $options['ssl_key']; + if (is_array($sslKey)) { + $conf[CURLOPT_SSLKEYPASSWD] = $sslKey[1]; + $sslKey = $sslKey[0]; + } + if (!file_exists($sslKey)) { + throw new \InvalidArgumentException( + "SSL private key not found: {$sslKey}" + ); + } + $conf[CURLOPT_SSLKEY] = $sslKey; + } + + if (isset($options['progress'])) { + $progress = $options['progress']; + if (!is_callable($progress)) { + throw new \InvalidArgumentException( + 'progress client option must be callable' + ); + } + $conf[CURLOPT_NOPROGRESS] = false; + $conf[CURLOPT_PROGRESSFUNCTION] = function () use ($progress) { + $args = func_get_args(); + // PHP 5.5 pushed the handle onto the start of the args + if (is_resource($args[0])) { + array_shift($args); + } + call_user_func_array($progress, $args); + }; + } + + if (!empty($options['debug'])) { + $conf[CURLOPT_STDERR] = \GuzzleHttp\debug_resource($options['debug']); + $conf[CURLOPT_VERBOSE] = true; + } + } + + /** + * This function ensures that a response was set on a transaction. If one + * was not set, then the request is retried if possible. This error + * typically means you are sending a payload, curl encountered a + * "Connection died, retrying a fresh connect" error, tried to rewind the + * stream, and then encountered a "necessary data rewind wasn't possible" + * error, causing the request to be sent through curl_multi_info_read() + * without an error status. + */ + private static function retryFailedRewind( + callable $handler, + EasyHandle $easy, + array $ctx + ) { + try { + // Only rewind if the body has been read from. + $body = $easy->request->getBody(); + if ($body->tell() > 0) { + $body->rewind(); + } + } catch (\RuntimeException $e) { + $ctx['error'] = 'The connection unexpectedly failed without ' + . 'providing an error. The request would have been retried, ' + . 'but attempting to rewind the request body failed. ' + . 'Exception: ' . $e; + return self::createRejection($easy, $ctx); + } + + // Retry no more than 3 times before giving up. + if (!isset($easy->options['_curl_retries'])) { + $easy->options['_curl_retries'] = 1; + } elseif ($easy->options['_curl_retries'] == 2) { + $ctx['error'] = 'The cURL request was retried 3 times ' + . 'and did not succeed. The most likely reason for the failure ' + . 'is that cURL was unable to rewind the body of the request ' + . 'and subsequent retries resulted in the same error. Turn on ' + . 'the debug option to see what went wrong. See ' + . 'https://bugs.php.net/bug.php?id=47204 for more information.'; + return self::createRejection($easy, $ctx); + } else { + $easy->options['_curl_retries']++; + } + + return $handler($easy->request, $easy->options); + } + + private function createHeaderFn(EasyHandle $easy) + { + if (isset($easy->options['on_headers'])) { + $onHeaders = $easy->options['on_headers']; + + if (!is_callable($onHeaders)) { + throw new \InvalidArgumentException('on_headers must be callable'); + } + } else { + $onHeaders = null; + } + + return function ($ch, $h) use ( + $onHeaders, + $easy, + &$startingResponse + ) { + $value = trim($h); + if ($value === '') { + $startingResponse = true; + $easy->createResponse(); + if ($onHeaders !== null) { + try { + $onHeaders($easy->response); + } catch (\Exception $e) { + // Associate the exception with the handle and trigger + // a curl header write error by returning 0. + $easy->onHeadersException = $e; + return -1; + } + } + } elseif ($startingResponse) { + $startingResponse = false; + $easy->headers = [$value]; + } else { + $easy->headers[] = $value; + } + return strlen($h); + }; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php b/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php new file mode 100644 index 0000000..b0fc236 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php @@ -0,0 +1,27 @@ +factory = isset($options['handle_factory']) + ? $options['handle_factory'] + : new CurlFactory(3); + } + + public function __invoke(RequestInterface $request, array $options) + { + if (isset($options['delay'])) { + usleep($options['delay'] * 1000); + } + + $easy = $this->factory->create($request, $options); + curl_exec($easy->handle); + $easy->errno = curl_errno($easy->handle); + + return CurlFactory::finish($this, $easy, $this->factory); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php new file mode 100644 index 0000000..d829762 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php @@ -0,0 +1,205 @@ +factory = isset($options['handle_factory']) + ? $options['handle_factory'] : new CurlFactory(50); + + if (isset($options['select_timeout'])) { + $this->selectTimeout = $options['select_timeout']; + } elseif ($selectTimeout = getenv('GUZZLE_CURL_SELECT_TIMEOUT')) { + $this->selectTimeout = $selectTimeout; + } else { + $this->selectTimeout = 1; + } + } + + public function __get($name) + { + if ($name === '_mh') { + return $this->_mh = curl_multi_init(); + } + + throw new \BadMethodCallException(); + } + + public function __destruct() + { + if (isset($this->_mh)) { + curl_multi_close($this->_mh); + unset($this->_mh); + } + } + + public function __invoke(RequestInterface $request, array $options) + { + $easy = $this->factory->create($request, $options); + $id = (int) $easy->handle; + + $promise = new Promise( + [$this, 'execute'], + function () use ($id) { + return $this->cancel($id); + } + ); + + $this->addRequest(['easy' => $easy, 'deferred' => $promise]); + + return $promise; + } + + /** + * Ticks the curl event loop. + */ + public function tick() + { + // Add any delayed handles if needed. + if ($this->delays) { + $currentTime = \GuzzleHttp\_current_time(); + foreach ($this->delays as $id => $delay) { + if ($currentTime >= $delay) { + unset($this->delays[$id]); + curl_multi_add_handle( + $this->_mh, + $this->handles[$id]['easy']->handle + ); + } + } + } + + // Step through the task queue which may add additional requests. + P\queue()->run(); + + if ($this->active && + curl_multi_select($this->_mh, $this->selectTimeout) === -1 + ) { + // Perform a usleep if a select returns -1. + // See: https://bugs.php.net/bug.php?id=61141 + usleep(250); + } + + while (curl_multi_exec($this->_mh, $this->active) === CURLM_CALL_MULTI_PERFORM); + + $this->processMessages(); + } + + /** + * Runs until all outstanding connections have completed. + */ + public function execute() + { + $queue = P\queue(); + + while ($this->handles || !$queue->isEmpty()) { + // If there are no transfers, then sleep for the next delay + if (!$this->active && $this->delays) { + usleep($this->timeToNext()); + } + $this->tick(); + } + } + + private function addRequest(array $entry) + { + $easy = $entry['easy']; + $id = (int) $easy->handle; + $this->handles[$id] = $entry; + if (empty($easy->options['delay'])) { + curl_multi_add_handle($this->_mh, $easy->handle); + } else { + $this->delays[$id] = \GuzzleHttp\_current_time() + ($easy->options['delay'] / 1000); + } + } + + /** + * Cancels a handle from sending and removes references to it. + * + * @param int $id Handle ID to cancel and remove. + * + * @return bool True on success, false on failure. + */ + private function cancel($id) + { + // Cannot cancel if it has been processed. + if (!isset($this->handles[$id])) { + return false; + } + + $handle = $this->handles[$id]['easy']->handle; + unset($this->delays[$id], $this->handles[$id]); + curl_multi_remove_handle($this->_mh, $handle); + curl_close($handle); + + return true; + } + + private function processMessages() + { + while ($done = curl_multi_info_read($this->_mh)) { + $id = (int) $done['handle']; + curl_multi_remove_handle($this->_mh, $done['handle']); + + if (!isset($this->handles[$id])) { + // Probably was cancelled. + continue; + } + + $entry = $this->handles[$id]; + unset($this->handles[$id], $this->delays[$id]); + $entry['easy']->errno = $done['result']; + $entry['deferred']->resolve( + CurlFactory::finish( + $this, + $entry['easy'], + $this->factory + ) + ); + } + } + + private function timeToNext() + { + $currentTime = \GuzzleHttp\_current_time(); + $nextTime = PHP_INT_MAX; + foreach ($this->delays as $time) { + if ($time < $nextTime) { + $nextTime = $time; + } + } + + return max(0, $nextTime - $currentTime) * 1000000; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php b/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php new file mode 100644 index 0000000..7754e91 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php @@ -0,0 +1,92 @@ +headers)) { + throw new \RuntimeException('No headers have been received'); + } + + // HTTP-version SP status-code SP reason-phrase + $startLine = explode(' ', array_shift($this->headers), 3); + $headers = \GuzzleHttp\headers_from_lines($this->headers); + $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers); + + if (!empty($this->options['decode_content']) + && isset($normalizedKeys['content-encoding']) + ) { + $headers['x-encoded-content-encoding'] + = $headers[$normalizedKeys['content-encoding']]; + unset($headers[$normalizedKeys['content-encoding']]); + if (isset($normalizedKeys['content-length'])) { + $headers['x-encoded-content-length'] + = $headers[$normalizedKeys['content-length']]; + + $bodyLength = (int) $this->sink->getSize(); + if ($bodyLength) { + $headers[$normalizedKeys['content-length']] = $bodyLength; + } else { + unset($headers[$normalizedKeys['content-length']]); + } + } + } + + // Attach a response to the easy handle with the parsed headers. + $this->response = new Response( + $startLine[1], + $headers, + $this->sink, + substr($startLine[0], 5), + isset($startLine[2]) ? (string) $startLine[2] : null + ); + } + + public function __get($name) + { + $msg = $name === 'handle' + ? 'The EasyHandle has been released' + : 'Invalid property: ' . $name; + throw new \BadMethodCallException($msg); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php new file mode 100644 index 0000000..d5c449c --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php @@ -0,0 +1,190 @@ +onFulfilled = $onFulfilled; + $this->onRejected = $onRejected; + + if ($queue) { + call_user_func_array([$this, 'append'], $queue); + } + } + + public function __invoke(RequestInterface $request, array $options) + { + if (!$this->queue) { + throw new \OutOfBoundsException('Mock queue is empty'); + } + + if (isset($options['delay'])) { + usleep($options['delay'] * 1000); + } + + $this->lastRequest = $request; + $this->lastOptions = $options; + $response = array_shift($this->queue); + + if (isset($options['on_headers'])) { + if (!is_callable($options['on_headers'])) { + throw new \InvalidArgumentException('on_headers must be callable'); + } + try { + $options['on_headers']($response); + } catch (\Exception $e) { + $msg = 'An error was encountered during the on_headers event'; + $response = new RequestException($msg, $request, $response, $e); + } + } + + if (is_callable($response)) { + $response = call_user_func($response, $request, $options); + } + + $response = $response instanceof \Exception + ? \GuzzleHttp\Promise\rejection_for($response) + : \GuzzleHttp\Promise\promise_for($response); + + return $response->then( + function ($value) use ($request, $options) { + $this->invokeStats($request, $options, $value); + if ($this->onFulfilled) { + call_user_func($this->onFulfilled, $value); + } + if (isset($options['sink'])) { + $contents = (string) $value->getBody(); + $sink = $options['sink']; + + if (is_resource($sink)) { + fwrite($sink, $contents); + } elseif (is_string($sink)) { + file_put_contents($sink, $contents); + } elseif ($sink instanceof \Psr\Http\Message\StreamInterface) { + $sink->write($contents); + } + } + + return $value; + }, + function ($reason) use ($request, $options) { + $this->invokeStats($request, $options, null, $reason); + if ($this->onRejected) { + call_user_func($this->onRejected, $reason); + } + return \GuzzleHttp\Promise\rejection_for($reason); + } + ); + } + + /** + * Adds one or more variadic requests, exceptions, callables, or promises + * to the queue. + */ + public function append() + { + foreach (func_get_args() as $value) { + if ($value instanceof ResponseInterface + || $value instanceof \Exception + || $value instanceof PromiseInterface + || is_callable($value) + ) { + $this->queue[] = $value; + } else { + throw new \InvalidArgumentException('Expected a response or ' + . 'exception. Found ' . \GuzzleHttp\describe_type($value)); + } + } + } + + /** + * Get the last received request. + * + * @return RequestInterface + */ + public function getLastRequest() + { + return $this->lastRequest; + } + + /** + * Get the last received request options. + * + * @return array + */ + public function getLastOptions() + { + return $this->lastOptions; + } + + /** + * Returns the number of remaining items in the queue. + * + * @return int + */ + public function count() + { + return count($this->queue); + } + + private function invokeStats( + RequestInterface $request, + array $options, + ResponseInterface $response = null, + $reason = null + ) { + if (isset($options['on_stats'])) { + $transferTime = isset($options['transfer_time']) ? $options['transfer_time'] : 0; + $stats = new TransferStats($request, $response, $transferTime, $reason); + call_user_func($options['on_stats'], $stats); + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php b/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php new file mode 100644 index 0000000..f8b00be --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php @@ -0,0 +1,55 @@ +withoutHeader('Expect'); + + // Append a content-length header if body size is zero to match + // cURL's behavior. + if (0 === $request->getBody()->getSize()) { + $request = $request->withHeader('Content-Length', '0'); + } + + return $this->createResponse( + $request, + $options, + $this->createStream($request, $options), + $startTime + ); + } catch (\InvalidArgumentException $e) { + throw $e; + } catch (\Exception $e) { + // Determine if the error was a networking error. + $message = $e->getMessage(); + // This list can probably get more comprehensive. + if (strpos($message, 'getaddrinfo') // DNS lookup failed + || strpos($message, 'Connection refused') + || strpos($message, "couldn't connect to host") // error on HHVM + || strpos($message, "connection attempt failed") + ) { + $e = new ConnectException($e->getMessage(), $request, $e); + } + $e = RequestException::wrapException($request, $e); + $this->invokeStats($options, $request, $startTime, null, $e); + + return \GuzzleHttp\Promise\rejection_for($e); + } + } + + private function invokeStats( + array $options, + RequestInterface $request, + $startTime, + ResponseInterface $response = null, + $error = null + ) { + if (isset($options['on_stats'])) { + $stats = new TransferStats( + $request, + $response, + \GuzzleHttp\_current_time() - $startTime, + $error, + [] + ); + call_user_func($options['on_stats'], $stats); + } + } + + private function createResponse( + RequestInterface $request, + array $options, + $stream, + $startTime + ) { + $hdrs = $this->lastHeaders; + $this->lastHeaders = []; + $parts = explode(' ', array_shift($hdrs), 3); + $ver = explode('/', $parts[0])[1]; + $status = $parts[1]; + $reason = isset($parts[2]) ? $parts[2] : null; + $headers = \GuzzleHttp\headers_from_lines($hdrs); + list($stream, $headers) = $this->checkDecode($options, $headers, $stream); + $stream = Psr7\stream_for($stream); + $sink = $stream; + + if (strcasecmp('HEAD', $request->getMethod())) { + $sink = $this->createSink($stream, $options); + } + + $response = new Psr7\Response($status, $headers, $sink, $ver, $reason); + + if (isset($options['on_headers'])) { + try { + $options['on_headers']($response); + } catch (\Exception $e) { + $msg = 'An error was encountered during the on_headers event'; + $ex = new RequestException($msg, $request, $response, $e); + return \GuzzleHttp\Promise\rejection_for($ex); + } + } + + // Do not drain when the request is a HEAD request because they have + // no body. + if ($sink !== $stream) { + $this->drain( + $stream, + $sink, + $response->getHeaderLine('Content-Length') + ); + } + + $this->invokeStats($options, $request, $startTime, $response, null); + + return new FulfilledPromise($response); + } + + private function createSink(StreamInterface $stream, array $options) + { + if (!empty($options['stream'])) { + return $stream; + } + + $sink = isset($options['sink']) + ? $options['sink'] + : fopen('php://temp', 'r+'); + + return is_string($sink) + ? new Psr7\LazyOpenStream($sink, 'w+') + : Psr7\stream_for($sink); + } + + private function checkDecode(array $options, array $headers, $stream) + { + // Automatically decode responses when instructed. + if (!empty($options['decode_content'])) { + $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers); + if (isset($normalizedKeys['content-encoding'])) { + $encoding = $headers[$normalizedKeys['content-encoding']]; + if ($encoding[0] === 'gzip' || $encoding[0] === 'deflate') { + $stream = new Psr7\InflateStream( + Psr7\stream_for($stream) + ); + $headers['x-encoded-content-encoding'] + = $headers[$normalizedKeys['content-encoding']]; + // Remove content-encoding header + unset($headers[$normalizedKeys['content-encoding']]); + // Fix content-length header + if (isset($normalizedKeys['content-length'])) { + $headers['x-encoded-content-length'] + = $headers[$normalizedKeys['content-length']]; + + $length = (int) $stream->getSize(); + if ($length === 0) { + unset($headers[$normalizedKeys['content-length']]); + } else { + $headers[$normalizedKeys['content-length']] = [$length]; + } + } + } + } + } + + return [$stream, $headers]; + } + + /** + * Drains the source stream into the "sink" client option. + * + * @param StreamInterface $source + * @param StreamInterface $sink + * @param string $contentLength Header specifying the amount of + * data to read. + * + * @return StreamInterface + * @throws \RuntimeException when the sink option is invalid. + */ + private function drain( + StreamInterface $source, + StreamInterface $sink, + $contentLength + ) { + // If a content-length header is provided, then stop reading once + // that number of bytes has been read. This can prevent infinitely + // reading from a stream when dealing with servers that do not honor + // Connection: Close headers. + Psr7\copy_to_stream( + $source, + $sink, + (strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1 + ); + + $sink->seek(0); + $source->close(); + + return $sink; + } + + /** + * Create a resource and check to ensure it was created successfully + * + * @param callable $callback Callable that returns stream resource + * + * @return resource + * @throws \RuntimeException on error + */ + private function createResource(callable $callback) + { + $errors = null; + set_error_handler(function ($_, $msg, $file, $line) use (&$errors) { + $errors[] = [ + 'message' => $msg, + 'file' => $file, + 'line' => $line + ]; + return true; + }); + + $resource = $callback(); + restore_error_handler(); + + if (!$resource) { + $message = 'Error creating resource: '; + foreach ($errors as $err) { + foreach ($err as $key => $value) { + $message .= "[$key] $value" . PHP_EOL; + } + } + throw new \RuntimeException(trim($message)); + } + + return $resource; + } + + private function createStream(RequestInterface $request, array $options) + { + static $methods; + if (!$methods) { + $methods = array_flip(get_class_methods(__CLASS__)); + } + + // HTTP/1.1 streams using the PHP stream wrapper require a + // Connection: close header + if ($request->getProtocolVersion() == '1.1' + && !$request->hasHeader('Connection') + ) { + $request = $request->withHeader('Connection', 'close'); + } + + // Ensure SSL is verified by default + if (!isset($options['verify'])) { + $options['verify'] = true; + } + + $params = []; + $context = $this->getDefaultContext($request); + + if (isset($options['on_headers']) && !is_callable($options['on_headers'])) { + throw new \InvalidArgumentException('on_headers must be callable'); + } + + if (!empty($options)) { + foreach ($options as $key => $value) { + $method = "add_{$key}"; + if (isset($methods[$method])) { + $this->{$method}($request, $context, $value, $params); + } + } + } + + if (isset($options['stream_context'])) { + if (!is_array($options['stream_context'])) { + throw new \InvalidArgumentException('stream_context must be an array'); + } + $context = array_replace_recursive( + $context, + $options['stream_context'] + ); + } + + // Microsoft NTLM authentication only supported with curl handler + if (isset($options['auth']) + && is_array($options['auth']) + && isset($options['auth'][2]) + && 'ntlm' == $options['auth'][2] + ) { + throw new \InvalidArgumentException('Microsoft NTLM authentication only supported with curl handler'); + } + + $uri = $this->resolveHost($request, $options); + + $context = $this->createResource( + function () use ($context, $params) { + return stream_context_create($context, $params); + } + ); + + return $this->createResource( + function () use ($uri, &$http_response_header, $context, $options) { + $resource = fopen((string) $uri, 'r', null, $context); + $this->lastHeaders = $http_response_header; + + if (isset($options['read_timeout'])) { + $readTimeout = $options['read_timeout']; + $sec = (int) $readTimeout; + $usec = ($readTimeout - $sec) * 100000; + stream_set_timeout($resource, $sec, $usec); + } + + return $resource; + } + ); + } + + private function resolveHost(RequestInterface $request, array $options) + { + $uri = $request->getUri(); + + if (isset($options['force_ip_resolve']) && !filter_var($uri->getHost(), FILTER_VALIDATE_IP)) { + if ('v4' === $options['force_ip_resolve']) { + $records = dns_get_record($uri->getHost(), DNS_A); + if (!isset($records[0]['ip'])) { + throw new ConnectException( + sprintf( + "Could not resolve IPv4 address for host '%s'", + $uri->getHost() + ), + $request + ); + } + $uri = $uri->withHost($records[0]['ip']); + } elseif ('v6' === $options['force_ip_resolve']) { + $records = dns_get_record($uri->getHost(), DNS_AAAA); + if (!isset($records[0]['ipv6'])) { + throw new ConnectException( + sprintf( + "Could not resolve IPv6 address for host '%s'", + $uri->getHost() + ), + $request + ); + } + $uri = $uri->withHost('[' . $records[0]['ipv6'] . ']'); + } + } + + return $uri; + } + + private function getDefaultContext(RequestInterface $request) + { + $headers = ''; + foreach ($request->getHeaders() as $name => $value) { + foreach ($value as $val) { + $headers .= "$name: $val\r\n"; + } + } + + $context = [ + 'http' => [ + 'method' => $request->getMethod(), + 'header' => $headers, + 'protocol_version' => $request->getProtocolVersion(), + 'ignore_errors' => true, + 'follow_location' => 0, + ], + ]; + + $body = (string) $request->getBody(); + + if (!empty($body)) { + $context['http']['content'] = $body; + // Prevent the HTTP handler from adding a Content-Type header. + if (!$request->hasHeader('Content-Type')) { + $context['http']['header'] .= "Content-Type:\r\n"; + } + } + + $context['http']['header'] = rtrim($context['http']['header']); + + return $context; + } + + private function add_proxy(RequestInterface $request, &$options, $value, &$params) + { + if (!is_array($value)) { + $options['http']['proxy'] = $value; + } else { + $scheme = $request->getUri()->getScheme(); + if (isset($value[$scheme])) { + if (!isset($value['no']) + || !\GuzzleHttp\is_host_in_noproxy( + $request->getUri()->getHost(), + $value['no'] + ) + ) { + $options['http']['proxy'] = $value[$scheme]; + } + } + } + } + + private function add_timeout(RequestInterface $request, &$options, $value, &$params) + { + if ($value > 0) { + $options['http']['timeout'] = $value; + } + } + + private function add_verify(RequestInterface $request, &$options, $value, &$params) + { + if ($value === true) { + // PHP 5.6 or greater will find the system cert by default. When + // < 5.6, use the Guzzle bundled cacert. + if (PHP_VERSION_ID < 50600) { + $options['ssl']['cafile'] = \GuzzleHttp\default_ca_bundle(); + } + } elseif (is_string($value)) { + $options['ssl']['cafile'] = $value; + if (!file_exists($value)) { + throw new \RuntimeException("SSL CA bundle not found: $value"); + } + } elseif ($value === false) { + $options['ssl']['verify_peer'] = false; + $options['ssl']['verify_peer_name'] = false; + return; + } else { + throw new \InvalidArgumentException('Invalid verify request option'); + } + + $options['ssl']['verify_peer'] = true; + $options['ssl']['verify_peer_name'] = true; + $options['ssl']['allow_self_signed'] = false; + } + + private function add_cert(RequestInterface $request, &$options, $value, &$params) + { + if (is_array($value)) { + $options['ssl']['passphrase'] = $value[1]; + $value = $value[0]; + } + + if (!file_exists($value)) { + throw new \RuntimeException("SSL certificate not found: {$value}"); + } + + $options['ssl']['local_cert'] = $value; + } + + private function add_progress(RequestInterface $request, &$options, $value, &$params) + { + $this->addNotification( + $params, + function ($code, $a, $b, $c, $transferred, $total) use ($value) { + if ($code == STREAM_NOTIFY_PROGRESS) { + $value($total, $transferred, null, null); + } + } + ); + } + + private function add_debug(RequestInterface $request, &$options, $value, &$params) + { + if ($value === false) { + return; + } + + static $map = [ + STREAM_NOTIFY_CONNECT => 'CONNECT', + STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED', + STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT', + STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS', + STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS', + STREAM_NOTIFY_REDIRECTED => 'REDIRECTED', + STREAM_NOTIFY_PROGRESS => 'PROGRESS', + STREAM_NOTIFY_FAILURE => 'FAILURE', + STREAM_NOTIFY_COMPLETED => 'COMPLETED', + STREAM_NOTIFY_RESOLVE => 'RESOLVE', + ]; + static $args = ['severity', 'message', 'message_code', + 'bytes_transferred', 'bytes_max']; + + $value = \GuzzleHttp\debug_resource($value); + $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment(''); + $this->addNotification( + $params, + function () use ($ident, $value, $map, $args) { + $passed = func_get_args(); + $code = array_shift($passed); + fprintf($value, '<%s> [%s] ', $ident, $map[$code]); + foreach (array_filter($passed) as $i => $v) { + fwrite($value, $args[$i] . ': "' . $v . '" '); + } + fwrite($value, "\n"); + } + ); + } + + private function addNotification(array &$params, callable $notify) + { + // Wrap the existing function if needed. + if (!isset($params['notification'])) { + $params['notification'] = $notify; + } else { + $params['notification'] = $this->callArray([ + $params['notification'], + $notify + ]); + } + } + + private function callArray(array $functions) + { + return function () use ($functions) { + $args = func_get_args(); + foreach ($functions as $fn) { + call_user_func_array($fn, $args); + } + }; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/HandlerStack.php b/vendor/guzzlehttp/guzzle/src/HandlerStack.php new file mode 100644 index 0000000..f001686 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/HandlerStack.php @@ -0,0 +1,273 @@ +push(Middleware::httpErrors(), 'http_errors'); + $stack->push(Middleware::redirect(), 'allow_redirects'); + $stack->push(Middleware::cookies(), 'cookies'); + $stack->push(Middleware::prepareBody(), 'prepare_body'); + + return $stack; + } + + /** + * @param callable $handler Underlying HTTP handler. + */ + public function __construct(callable $handler = null) + { + $this->handler = $handler; + } + + /** + * Invokes the handler stack as a composed handler + * + * @param RequestInterface $request + * @param array $options + */ + public function __invoke(RequestInterface $request, array $options) + { + $handler = $this->resolve(); + + return $handler($request, $options); + } + + /** + * Dumps a string representation of the stack. + * + * @return string + */ + public function __toString() + { + $depth = 0; + $stack = []; + if ($this->handler) { + $stack[] = "0) Handler: " . $this->debugCallable($this->handler); + } + + $result = ''; + foreach (array_reverse($this->stack) as $tuple) { + $depth++; + $str = "{$depth}) Name: '{$tuple[1]}', "; + $str .= "Function: " . $this->debugCallable($tuple[0]); + $result = "> {$str}\n{$result}"; + $stack[] = $str; + } + + foreach (array_keys($stack) as $k) { + $result .= "< {$stack[$k]}\n"; + } + + return $result; + } + + /** + * Set the HTTP handler that actually returns a promise. + * + * @param callable $handler Accepts a request and array of options and + * returns a Promise. + */ + public function setHandler(callable $handler) + { + $this->handler = $handler; + $this->cached = null; + } + + /** + * Returns true if the builder has a handler. + * + * @return bool + */ + public function hasHandler() + { + return (bool) $this->handler; + } + + /** + * Unshift a middleware to the bottom of the stack. + * + * @param callable $middleware Middleware function + * @param string $name Name to register for this middleware. + */ + public function unshift(callable $middleware, $name = null) + { + array_unshift($this->stack, [$middleware, $name]); + $this->cached = null; + } + + /** + * Push a middleware to the top of the stack. + * + * @param callable $middleware Middleware function + * @param string $name Name to register for this middleware. + */ + public function push(callable $middleware, $name = '') + { + $this->stack[] = [$middleware, $name]; + $this->cached = null; + } + + /** + * Add a middleware before another middleware by name. + * + * @param string $findName Middleware to find + * @param callable $middleware Middleware function + * @param string $withName Name to register for this middleware. + */ + public function before($findName, callable $middleware, $withName = '') + { + $this->splice($findName, $withName, $middleware, true); + } + + /** + * Add a middleware after another middleware by name. + * + * @param string $findName Middleware to find + * @param callable $middleware Middleware function + * @param string $withName Name to register for this middleware. + */ + public function after($findName, callable $middleware, $withName = '') + { + $this->splice($findName, $withName, $middleware, false); + } + + /** + * Remove a middleware by instance or name from the stack. + * + * @param callable|string $remove Middleware to remove by instance or name. + */ + public function remove($remove) + { + $this->cached = null; + $idx = is_callable($remove) ? 0 : 1; + $this->stack = array_values(array_filter( + $this->stack, + function ($tuple) use ($idx, $remove) { + return $tuple[$idx] !== $remove; + } + )); + } + + /** + * Compose the middleware and handler into a single callable function. + * + * @return callable + */ + public function resolve() + { + if (!$this->cached) { + if (!($prev = $this->handler)) { + throw new \LogicException('No handler has been specified'); + } + + foreach (array_reverse($this->stack) as $fn) { + $prev = $fn[0]($prev); + } + + $this->cached = $prev; + } + + return $this->cached; + } + + /** + * @param string $name + * @return int + */ + private function findByName($name) + { + foreach ($this->stack as $k => $v) { + if ($v[1] === $name) { + return $k; + } + } + + throw new \InvalidArgumentException("Middleware not found: $name"); + } + + /** + * Splices a function into the middleware list at a specific position. + * + * @param string $findName + * @param string $withName + * @param callable $middleware + * @param bool $before + */ + private function splice($findName, $withName, callable $middleware, $before) + { + $this->cached = null; + $idx = $this->findByName($findName); + $tuple = [$middleware, $withName]; + + if ($before) { + if ($idx === 0) { + array_unshift($this->stack, $tuple); + } else { + $replacement = [$tuple, $this->stack[$idx]]; + array_splice($this->stack, $idx, 1, $replacement); + } + } elseif ($idx === count($this->stack) - 1) { + $this->stack[] = $tuple; + } else { + $replacement = [$this->stack[$idx], $tuple]; + array_splice($this->stack, $idx, 1, $replacement); + } + } + + /** + * Provides a debug string for a given callable. + * + * @param array|callable $fn Function to write as a string. + * + * @return string + */ + private function debugCallable($fn) + { + if (is_string($fn)) { + return "callable({$fn})"; + } + + if (is_array($fn)) { + return is_string($fn[0]) + ? "callable({$fn[0]}::{$fn[1]})" + : "callable(['" . get_class($fn[0]) . "', '{$fn[1]}'])"; + } + + return 'callable(' . spl_object_hash($fn) . ')'; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/MessageFormatter.php b/vendor/guzzlehttp/guzzle/src/MessageFormatter.php new file mode 100644 index 0000000..663ac73 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/MessageFormatter.php @@ -0,0 +1,180 @@ +>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}"; + const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}'; + + /** @var string Template used to format log messages */ + private $template; + + /** + * @param string $template Log message template + */ + public function __construct($template = self::CLF) + { + $this->template = $template ?: self::CLF; + } + + /** + * Returns a formatted message string. + * + * @param RequestInterface $request Request that was sent + * @param ResponseInterface $response Response that was received + * @param \Exception $error Exception that was received + * + * @return string + */ + public function format( + RequestInterface $request, + ResponseInterface $response = null, + \Exception $error = null + ) { + $cache = []; + + return preg_replace_callback( + '/{\s*([A-Za-z_\-\.0-9]+)\s*}/', + function (array $matches) use ($request, $response, $error, &$cache) { + if (isset($cache[$matches[1]])) { + return $cache[$matches[1]]; + } + + $result = ''; + switch ($matches[1]) { + case 'request': + $result = Psr7\str($request); + break; + case 'response': + $result = $response ? Psr7\str($response) : ''; + break; + case 'req_headers': + $result = trim($request->getMethod() + . ' ' . $request->getRequestTarget()) + . ' HTTP/' . $request->getProtocolVersion() . "\r\n" + . $this->headers($request); + break; + case 'res_headers': + $result = $response ? + sprintf( + 'HTTP/%s %d %s', + $response->getProtocolVersion(), + $response->getStatusCode(), + $response->getReasonPhrase() + ) . "\r\n" . $this->headers($response) + : 'NULL'; + break; + case 'req_body': + $result = $request->getBody(); + break; + case 'res_body': + $result = $response ? $response->getBody() : 'NULL'; + break; + case 'ts': + case 'date_iso_8601': + $result = gmdate('c'); + break; + case 'date_common_log': + $result = date('d/M/Y:H:i:s O'); + break; + case 'method': + $result = $request->getMethod(); + break; + case 'version': + $result = $request->getProtocolVersion(); + break; + case 'uri': + case 'url': + $result = $request->getUri(); + break; + case 'target': + $result = $request->getRequestTarget(); + break; + case 'req_version': + $result = $request->getProtocolVersion(); + break; + case 'res_version': + $result = $response + ? $response->getProtocolVersion() + : 'NULL'; + break; + case 'host': + $result = $request->getHeaderLine('Host'); + break; + case 'hostname': + $result = gethostname(); + break; + case 'code': + $result = $response ? $response->getStatusCode() : 'NULL'; + break; + case 'phrase': + $result = $response ? $response->getReasonPhrase() : 'NULL'; + break; + case 'error': + $result = $error ? $error->getMessage() : 'NULL'; + break; + default: + // handle prefixed dynamic headers + if (strpos($matches[1], 'req_header_') === 0) { + $result = $request->getHeaderLine(substr($matches[1], 11)); + } elseif (strpos($matches[1], 'res_header_') === 0) { + $result = $response + ? $response->getHeaderLine(substr($matches[1], 11)) + : 'NULL'; + } + } + + $cache[$matches[1]] = $result; + return $result; + }, + $this->template + ); + } + + private function headers(MessageInterface $message) + { + $result = ''; + foreach ($message->getHeaders() as $name => $values) { + $result .= $name . ': ' . implode(', ', $values) . "\r\n"; + } + + return trim($result); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Middleware.php b/vendor/guzzlehttp/guzzle/src/Middleware.php new file mode 100644 index 0000000..bffc197 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Middleware.php @@ -0,0 +1,254 @@ +withCookieHeader($request); + return $handler($request, $options) + ->then( + function ($response) use ($cookieJar, $request) { + $cookieJar->extractCookies($request, $response); + return $response; + } + ); + }; + }; + } + + /** + * Middleware that throws exceptions for 4xx or 5xx responses when the + * "http_error" request option is set to true. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function httpErrors() + { + return function (callable $handler) { + return function ($request, array $options) use ($handler) { + if (empty($options['http_errors'])) { + return $handler($request, $options); + } + return $handler($request, $options)->then( + function (ResponseInterface $response) use ($request) { + $code = $response->getStatusCode(); + if ($code < 400) { + return $response; + } + throw RequestException::create($request, $response); + } + ); + }; + }; + } + + /** + * Middleware that pushes history data to an ArrayAccess container. + * + * @param array|\ArrayAccess $container Container to hold the history (by reference). + * + * @return callable Returns a function that accepts the next handler. + * @throws \InvalidArgumentException if container is not an array or ArrayAccess. + */ + public static function history(&$container) + { + if (!is_array($container) && !$container instanceof \ArrayAccess) { + throw new \InvalidArgumentException('history container must be an array or object implementing ArrayAccess'); + } + + return function (callable $handler) use (&$container) { + return function ($request, array $options) use ($handler, &$container) { + return $handler($request, $options)->then( + function ($value) use ($request, &$container, $options) { + $container[] = [ + 'request' => $request, + 'response' => $value, + 'error' => null, + 'options' => $options + ]; + return $value; + }, + function ($reason) use ($request, &$container, $options) { + $container[] = [ + 'request' => $request, + 'response' => null, + 'error' => $reason, + 'options' => $options + ]; + return \GuzzleHttp\Promise\rejection_for($reason); + } + ); + }; + }; + } + + /** + * Middleware that invokes a callback before and after sending a request. + * + * The provided listener cannot modify or alter the response. It simply + * "taps" into the chain to be notified before returning the promise. The + * before listener accepts a request and options array, and the after + * listener accepts a request, options array, and response promise. + * + * @param callable $before Function to invoke before forwarding the request. + * @param callable $after Function invoked after forwarding. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function tap(callable $before = null, callable $after = null) + { + return function (callable $handler) use ($before, $after) { + return function ($request, array $options) use ($handler, $before, $after) { + if ($before) { + $before($request, $options); + } + $response = $handler($request, $options); + if ($after) { + $after($request, $options, $response); + } + return $response; + }; + }; + } + + /** + * Middleware that handles request redirects. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function redirect() + { + return function (callable $handler) { + return new RedirectMiddleware($handler); + }; + } + + /** + * Middleware that retries requests based on the boolean result of + * invoking the provided "decider" function. + * + * If no delay function is provided, a simple implementation of exponential + * backoff will be utilized. + * + * @param callable $decider Function that accepts the number of retries, + * a request, [response], and [exception] and + * returns true if the request is to be retried. + * @param callable $delay Function that accepts the number of retries and + * returns the number of milliseconds to delay. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function retry(callable $decider, callable $delay = null) + { + return function (callable $handler) use ($decider, $delay) { + return new RetryMiddleware($decider, $handler, $delay); + }; + } + + /** + * Middleware that logs requests, responses, and errors using a message + * formatter. + * + * @param LoggerInterface $logger Logs messages. + * @param MessageFormatter $formatter Formatter used to create message strings. + * @param string $logLevel Level at which to log requests. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function log(LoggerInterface $logger, MessageFormatter $formatter, $logLevel = 'info' /* \Psr\Log\LogLevel::INFO */) + { + return function (callable $handler) use ($logger, $formatter, $logLevel) { + return function ($request, array $options) use ($handler, $logger, $formatter, $logLevel) { + return $handler($request, $options)->then( + function ($response) use ($logger, $request, $formatter, $logLevel) { + $message = $formatter->format($request, $response); + $logger->log($logLevel, $message); + return $response; + }, + function ($reason) use ($logger, $request, $formatter) { + $response = $reason instanceof RequestException + ? $reason->getResponse() + : null; + $message = $formatter->format($request, $response, $reason); + $logger->notice($message); + return \GuzzleHttp\Promise\rejection_for($reason); + } + ); + }; + }; + } + + /** + * This middleware adds a default content-type if possible, a default + * content-length or transfer-encoding header, and the expect header. + * + * @return callable + */ + public static function prepareBody() + { + return function (callable $handler) { + return new PrepareBodyMiddleware($handler); + }; + } + + /** + * Middleware that applies a map function to the request before passing to + * the next handler. + * + * @param callable $fn Function that accepts a RequestInterface and returns + * a RequestInterface. + * @return callable + */ + public static function mapRequest(callable $fn) + { + return function (callable $handler) use ($fn) { + return function ($request, array $options) use ($handler, $fn) { + return $handler($fn($request), $options); + }; + }; + } + + /** + * Middleware that applies a map function to the resolved promise's + * response. + * + * @param callable $fn Function that accepts a ResponseInterface and + * returns a ResponseInterface. + * @return callable + */ + public static function mapResponse(callable $fn) + { + return function (callable $handler) use ($fn) { + return function ($request, array $options) use ($handler, $fn) { + return $handler($request, $options)->then($fn); + }; + }; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Pool.php b/vendor/guzzlehttp/guzzle/src/Pool.php new file mode 100644 index 0000000..05c854a --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Pool.php @@ -0,0 +1,123 @@ + $rfn) { + if ($rfn instanceof RequestInterface) { + yield $key => $client->sendAsync($rfn, $opts); + } elseif (is_callable($rfn)) { + yield $key => $rfn($opts); + } else { + throw new \InvalidArgumentException('Each value yielded by ' + . 'the iterator must be a Psr7\Http\Message\RequestInterface ' + . 'or a callable that returns a promise that fulfills ' + . 'with a Psr7\Message\Http\ResponseInterface object.'); + } + } + }; + + $this->each = new EachPromise($requests(), $config); + } + + public function promise() + { + return $this->each->promise(); + } + + /** + * Sends multiple requests concurrently and returns an array of responses + * and exceptions that uses the same ordering as the provided requests. + * + * IMPORTANT: This method keeps every request and response in memory, and + * as such, is NOT recommended when sending a large number or an + * indeterminate number of requests concurrently. + * + * @param ClientInterface $client Client used to send the requests + * @param array|\Iterator $requests Requests to send concurrently. + * @param array $options Passes through the options available in + * {@see GuzzleHttp\Pool::__construct} + * + * @return array Returns an array containing the response or an exception + * in the same order that the requests were sent. + * @throws \InvalidArgumentException if the event format is incorrect. + */ + public static function batch( + ClientInterface $client, + $requests, + array $options = [] + ) { + $res = []; + self::cmpCallback($options, 'fulfilled', $res); + self::cmpCallback($options, 'rejected', $res); + $pool = new static($client, $requests, $options); + $pool->promise()->wait(); + ksort($res); + + return $res; + } + + private static function cmpCallback(array &$options, $name, array &$results) + { + if (!isset($options[$name])) { + $options[$name] = function ($v, $k) use (&$results) { + $results[$k] = $v; + }; + } else { + $currentFn = $options[$name]; + $options[$name] = function ($v, $k) use (&$results, $currentFn) { + $currentFn($v, $k); + $results[$k] = $v; + }; + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php b/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php new file mode 100644 index 0000000..2eb95f9 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php @@ -0,0 +1,106 @@ +nextHandler = $nextHandler; + } + + /** + * @param RequestInterface $request + * @param array $options + * + * @return PromiseInterface + */ + public function __invoke(RequestInterface $request, array $options) + { + $fn = $this->nextHandler; + + // Don't do anything if the request has no body. + if ($request->getBody()->getSize() === 0) { + return $fn($request, $options); + } + + $modify = []; + + // Add a default content-type if possible. + if (!$request->hasHeader('Content-Type')) { + if ($uri = $request->getBody()->getMetadata('uri')) { + if ($type = Psr7\mimetype_from_filename($uri)) { + $modify['set_headers']['Content-Type'] = $type; + } + } + } + + // Add a default content-length or transfer-encoding header. + if (!$request->hasHeader('Content-Length') + && !$request->hasHeader('Transfer-Encoding') + ) { + $size = $request->getBody()->getSize(); + if ($size !== null) { + $modify['set_headers']['Content-Length'] = $size; + } else { + $modify['set_headers']['Transfer-Encoding'] = 'chunked'; + } + } + + // Add the expect header if needed. + $this->addExpectHeader($request, $options, $modify); + + return $fn(Psr7\modify_request($request, $modify), $options); + } + + private function addExpectHeader( + RequestInterface $request, + array $options, + array &$modify + ) { + // Determine if the Expect header should be used + if ($request->hasHeader('Expect')) { + return; + } + + $expect = isset($options['expect']) ? $options['expect'] : null; + + // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.0 + if ($expect === false || $request->getProtocolVersion() < 1.1) { + return; + } + + // The expect header is unconditionally enabled + if ($expect === true) { + $modify['set_headers']['Expect'] = '100-Continue'; + return; + } + + // By default, send the expect header when the payload is > 1mb + if ($expect === null) { + $expect = 1048576; + } + + // Always add if the body cannot be rewound, the size cannot be + // determined, or the size is greater than the cutoff threshold + $body = $request->getBody(); + $size = $body->getSize(); + + if ($size === null || $size >= (int) $expect || !$body->isSeekable()) { + $modify['set_headers']['Expect'] = '100-Continue'; + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php b/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php new file mode 100644 index 0000000..bff4e4e --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php @@ -0,0 +1,237 @@ + 5, + 'protocols' => ['http', 'https'], + 'strict' => false, + 'referer' => false, + 'track_redirects' => false, + ]; + + /** @var callable */ + private $nextHandler; + + /** + * @param callable $nextHandler Next handler to invoke. + */ + public function __construct(callable $nextHandler) + { + $this->nextHandler = $nextHandler; + } + + /** + * @param RequestInterface $request + * @param array $options + * + * @return PromiseInterface + */ + public function __invoke(RequestInterface $request, array $options) + { + $fn = $this->nextHandler; + + if (empty($options['allow_redirects'])) { + return $fn($request, $options); + } + + if ($options['allow_redirects'] === true) { + $options['allow_redirects'] = self::$defaultSettings; + } elseif (!is_array($options['allow_redirects'])) { + throw new \InvalidArgumentException('allow_redirects must be true, false, or array'); + } else { + // Merge the default settings with the provided settings + $options['allow_redirects'] += self::$defaultSettings; + } + + if (empty($options['allow_redirects']['max'])) { + return $fn($request, $options); + } + + return $fn($request, $options) + ->then(function (ResponseInterface $response) use ($request, $options) { + return $this->checkRedirect($request, $options, $response); + }); + } + + /** + * @param RequestInterface $request + * @param array $options + * @param ResponseInterface|PromiseInterface $response + * + * @return ResponseInterface|PromiseInterface + */ + public function checkRedirect( + RequestInterface $request, + array $options, + ResponseInterface $response + ) { + if (substr($response->getStatusCode(), 0, 1) != '3' + || !$response->hasHeader('Location') + ) { + return $response; + } + + $this->guardMax($request, $options); + $nextRequest = $this->modifyRequest($request, $options, $response); + + if (isset($options['allow_redirects']['on_redirect'])) { + call_user_func( + $options['allow_redirects']['on_redirect'], + $request, + $response, + $nextRequest->getUri() + ); + } + + /** @var PromiseInterface|ResponseInterface $promise */ + $promise = $this($nextRequest, $options); + + // Add headers to be able to track history of redirects. + if (!empty($options['allow_redirects']['track_redirects'])) { + return $this->withTracking( + $promise, + (string) $nextRequest->getUri(), + $response->getStatusCode() + ); + } + + return $promise; + } + + private function withTracking(PromiseInterface $promise, $uri, $statusCode) + { + return $promise->then( + function (ResponseInterface $response) use ($uri, $statusCode) { + // Note that we are pushing to the front of the list as this + // would be an earlier response than what is currently present + // in the history header. + $historyHeader = $response->getHeader(self::HISTORY_HEADER); + $statusHeader = $response->getHeader(self::STATUS_HISTORY_HEADER); + array_unshift($historyHeader, $uri); + array_unshift($statusHeader, $statusCode); + return $response->withHeader(self::HISTORY_HEADER, $historyHeader) + ->withHeader(self::STATUS_HISTORY_HEADER, $statusHeader); + } + ); + } + + private function guardMax(RequestInterface $request, array &$options) + { + $current = isset($options['__redirect_count']) + ? $options['__redirect_count'] + : 0; + $options['__redirect_count'] = $current + 1; + $max = $options['allow_redirects']['max']; + + if ($options['__redirect_count'] > $max) { + throw new TooManyRedirectsException( + "Will not follow more than {$max} redirects", + $request + ); + } + } + + /** + * @param RequestInterface $request + * @param array $options + * @param ResponseInterface $response + * + * @return RequestInterface + */ + public function modifyRequest( + RequestInterface $request, + array $options, + ResponseInterface $response + ) { + // Request modifications to apply. + $modify = []; + $protocols = $options['allow_redirects']['protocols']; + + // Use a GET request if this is an entity enclosing request and we are + // not forcing RFC compliance, but rather emulating what all browsers + // would do. + $statusCode = $response->getStatusCode(); + if ($statusCode == 303 || + ($statusCode <= 302 && $request->getBody() && !$options['allow_redirects']['strict']) + ) { + $modify['method'] = 'GET'; + $modify['body'] = ''; + } + + $modify['uri'] = $this->redirectUri($request, $response, $protocols); + Psr7\rewind_body($request); + + // Add the Referer header if it is told to do so and only + // add the header if we are not redirecting from https to http. + if ($options['allow_redirects']['referer'] + && $modify['uri']->getScheme() === $request->getUri()->getScheme() + ) { + $uri = $request->getUri()->withUserInfo(''); + $modify['set_headers']['Referer'] = (string) $uri; + } else { + $modify['remove_headers'][] = 'Referer'; + } + + // Remove Authorization header if host is different. + if ($request->getUri()->getHost() !== $modify['uri']->getHost()) { + $modify['remove_headers'][] = 'Authorization'; + } + + return Psr7\modify_request($request, $modify); + } + + /** + * Set the appropriate URL on the request based on the location header + * + * @param RequestInterface $request + * @param ResponseInterface $response + * @param array $protocols + * + * @return UriInterface + */ + private function redirectUri( + RequestInterface $request, + ResponseInterface $response, + array $protocols + ) { + $location = Psr7\UriResolver::resolve( + $request->getUri(), + new Psr7\Uri($response->getHeaderLine('Location')) + ); + + // Ensure that the redirect URI is allowed based on the protocols. + if (!in_array($location->getScheme(), $protocols)) { + throw new BadResponseException( + sprintf( + 'Redirect URI, %s, does not use one of the allowed redirect protocols: %s', + $location, + implode(', ', $protocols) + ), + $request, + $response + ); + } + + return $location; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/RequestOptions.php b/vendor/guzzlehttp/guzzle/src/RequestOptions.php new file mode 100644 index 0000000..5c0fd19 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/RequestOptions.php @@ -0,0 +1,255 @@ +decider = $decider; + $this->nextHandler = $nextHandler; + $this->delay = $delay ?: __CLASS__ . '::exponentialDelay'; + } + + /** + * Default exponential backoff delay function. + * + * @param int $retries + * + * @return int + */ + public static function exponentialDelay($retries) + { + return (int) pow(2, $retries - 1); + } + + /** + * @param RequestInterface $request + * @param array $options + * + * @return PromiseInterface + */ + public function __invoke(RequestInterface $request, array $options) + { + if (!isset($options['retries'])) { + $options['retries'] = 0; + } + + $fn = $this->nextHandler; + return $fn($request, $options) + ->then( + $this->onFulfilled($request, $options), + $this->onRejected($request, $options) + ); + } + + private function onFulfilled(RequestInterface $req, array $options) + { + return function ($value) use ($req, $options) { + if (!call_user_func( + $this->decider, + $options['retries'], + $req, + $value, + null + )) { + return $value; + } + return $this->doRetry($req, $options, $value); + }; + } + + private function onRejected(RequestInterface $req, array $options) + { + return function ($reason) use ($req, $options) { + if (!call_user_func( + $this->decider, + $options['retries'], + $req, + null, + $reason + )) { + return \GuzzleHttp\Promise\rejection_for($reason); + } + return $this->doRetry($req, $options); + }; + } + + private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null) + { + $options['delay'] = call_user_func($this->delay, ++$options['retries'], $response); + + return $this($request, $options); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/TransferStats.php b/vendor/guzzlehttp/guzzle/src/TransferStats.php new file mode 100644 index 0000000..23a22a3 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/TransferStats.php @@ -0,0 +1,126 @@ +request = $request; + $this->response = $response; + $this->transferTime = $transferTime; + $this->handlerErrorData = $handlerErrorData; + $this->handlerStats = $handlerStats; + } + + /** + * @return RequestInterface + */ + public function getRequest() + { + return $this->request; + } + + /** + * Returns the response that was received (if any). + * + * @return ResponseInterface|null + */ + public function getResponse() + { + return $this->response; + } + + /** + * Returns true if a response was received. + * + * @return bool + */ + public function hasResponse() + { + return $this->response !== null; + } + + /** + * Gets handler specific error data. + * + * This might be an exception, a integer representing an error code, or + * anything else. Relying on this value assumes that you know what handler + * you are using. + * + * @return mixed + */ + public function getHandlerErrorData() + { + return $this->handlerErrorData; + } + + /** + * Get the effective URI the request was sent to. + * + * @return UriInterface + */ + public function getEffectiveUri() + { + return $this->request->getUri(); + } + + /** + * Get the estimated time the request was being transferred by the handler. + * + * @return float Time in seconds. + */ + public function getTransferTime() + { + return $this->transferTime; + } + + /** + * Gets an array of all of the handler specific transfer data. + * + * @return array + */ + public function getHandlerStats() + { + return $this->handlerStats; + } + + /** + * Get a specific handler statistic from the handler by name. + * + * @param string $stat Handler specific transfer stat to retrieve. + * + * @return mixed|null + */ + public function getHandlerStat($stat) + { + return isset($this->handlerStats[$stat]) + ? $this->handlerStats[$stat] + : null; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/UriTemplate.php b/vendor/guzzlehttp/guzzle/src/UriTemplate.php new file mode 100644 index 0000000..96dcfd0 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/UriTemplate.php @@ -0,0 +1,237 @@ + ['prefix' => '', 'joiner' => ',', 'query' => false], + '+' => ['prefix' => '', 'joiner' => ',', 'query' => false], + '#' => ['prefix' => '#', 'joiner' => ',', 'query' => false], + '.' => ['prefix' => '.', 'joiner' => '.', 'query' => false], + '/' => ['prefix' => '/', 'joiner' => '/', 'query' => false], + ';' => ['prefix' => ';', 'joiner' => ';', 'query' => true], + '?' => ['prefix' => '?', 'joiner' => '&', 'query' => true], + '&' => ['prefix' => '&', 'joiner' => '&', 'query' => true] + ]; + + /** @var array Delimiters */ + private static $delims = [':', '/', '?', '#', '[', ']', '@', '!', '$', + '&', '\'', '(', ')', '*', '+', ',', ';', '=']; + + /** @var array Percent encoded delimiters */ + private static $delimsPct = ['%3A', '%2F', '%3F', '%23', '%5B', '%5D', + '%40', '%21', '%24', '%26', '%27', '%28', '%29', '%2A', '%2B', '%2C', + '%3B', '%3D']; + + public function expand($template, array $variables) + { + if (false === strpos($template, '{')) { + return $template; + } + + $this->template = $template; + $this->variables = $variables; + + return preg_replace_callback( + '/\{([^\}]+)\}/', + [$this, 'expandMatch'], + $this->template + ); + } + + /** + * Parse an expression into parts + * + * @param string $expression Expression to parse + * + * @return array Returns an associative array of parts + */ + private function parseExpression($expression) + { + $result = []; + + if (isset(self::$operatorHash[$expression[0]])) { + $result['operator'] = $expression[0]; + $expression = substr($expression, 1); + } else { + $result['operator'] = ''; + } + + foreach (explode(',', $expression) as $value) { + $value = trim($value); + $varspec = []; + if ($colonPos = strpos($value, ':')) { + $varspec['value'] = substr($value, 0, $colonPos); + $varspec['modifier'] = ':'; + $varspec['position'] = (int) substr($value, $colonPos + 1); + } elseif (substr($value, -1) === '*') { + $varspec['modifier'] = '*'; + $varspec['value'] = substr($value, 0, -1); + } else { + $varspec['value'] = (string) $value; + $varspec['modifier'] = ''; + } + $result['values'][] = $varspec; + } + + return $result; + } + + /** + * Process an expansion + * + * @param array $matches Matches met in the preg_replace_callback + * + * @return string Returns the replacement string + */ + private function expandMatch(array $matches) + { + static $rfc1738to3986 = ['+' => '%20', '%7e' => '~']; + + $replacements = []; + $parsed = self::parseExpression($matches[1]); + $prefix = self::$operatorHash[$parsed['operator']]['prefix']; + $joiner = self::$operatorHash[$parsed['operator']]['joiner']; + $useQuery = self::$operatorHash[$parsed['operator']]['query']; + + foreach ($parsed['values'] as $value) { + if (!isset($this->variables[$value['value']])) { + continue; + } + + $variable = $this->variables[$value['value']]; + $actuallyUseQuery = $useQuery; + $expanded = ''; + + if (is_array($variable)) { + $isAssoc = $this->isAssoc($variable); + $kvp = []; + foreach ($variable as $key => $var) { + if ($isAssoc) { + $key = rawurlencode($key); + $isNestedArray = is_array($var); + } else { + $isNestedArray = false; + } + + if (!$isNestedArray) { + $var = rawurlencode($var); + if ($parsed['operator'] === '+' || + $parsed['operator'] === '#' + ) { + $var = $this->decodeReserved($var); + } + } + + if ($value['modifier'] === '*') { + if ($isAssoc) { + if ($isNestedArray) { + // Nested arrays must allow for deeply nested + // structures. + $var = strtr( + http_build_query([$key => $var]), + $rfc1738to3986 + ); + } else { + $var = $key . '=' . $var; + } + } elseif ($key > 0 && $actuallyUseQuery) { + $var = $value['value'] . '=' . $var; + } + } + + $kvp[$key] = $var; + } + + if (empty($variable)) { + $actuallyUseQuery = false; + } elseif ($value['modifier'] === '*') { + $expanded = implode($joiner, $kvp); + if ($isAssoc) { + // Don't prepend the value name when using the explode + // modifier with an associative array. + $actuallyUseQuery = false; + } + } else { + if ($isAssoc) { + // When an associative array is encountered and the + // explode modifier is not set, then the result must be + // a comma separated list of keys followed by their + // respective values. + foreach ($kvp as $k => &$v) { + $v = $k . ',' . $v; + } + } + $expanded = implode(',', $kvp); + } + } else { + if ($value['modifier'] === ':') { + $variable = substr($variable, 0, $value['position']); + } + $expanded = rawurlencode($variable); + if ($parsed['operator'] === '+' || $parsed['operator'] === '#') { + $expanded = $this->decodeReserved($expanded); + } + } + + if ($actuallyUseQuery) { + if (!$expanded && $joiner !== '&') { + $expanded = $value['value']; + } else { + $expanded = $value['value'] . '=' . $expanded; + } + } + + $replacements[] = $expanded; + } + + $ret = implode($joiner, $replacements); + if ($ret && $prefix) { + return $prefix . $ret; + } + + return $ret; + } + + /** + * Determines if an array is associative. + * + * This makes the assumption that input arrays are sequences or hashes. + * This assumption is a tradeoff for accuracy in favor of speed, but it + * should work in almost every case where input is supplied for a URI + * template. + * + * @param array $array Array to check + * + * @return bool + */ + private function isAssoc(array $array) + { + return $array && array_keys($array)[0] !== 0; + } + + /** + * Removes percent encoding on reserved characters (used with + and # + * modifiers). + * + * @param string $string String to fix + * + * @return string + */ + private function decodeReserved($string) + { + return str_replace(self::$delimsPct, self::$delims, $string); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/functions.php b/vendor/guzzlehttp/guzzle/src/functions.php new file mode 100644 index 0000000..51d736d --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/functions.php @@ -0,0 +1,346 @@ +expand($template, $variables); +} + +/** + * Debug function used to describe the provided value type and class. + * + * @param mixed $input + * + * @return string Returns a string containing the type of the variable and + * if a class is provided, the class name. + */ +function describe_type($input) +{ + switch (gettype($input)) { + case 'object': + return 'object(' . get_class($input) . ')'; + case 'array': + return 'array(' . count($input) . ')'; + default: + ob_start(); + var_dump($input); + // normalize float vs double + return str_replace('double(', 'float(', rtrim(ob_get_clean())); + } +} + +/** + * Parses an array of header lines into an associative array of headers. + * + * @param array $lines Header lines array of strings in the following + * format: "Name: Value" + * @return array + */ +function headers_from_lines($lines) +{ + $headers = []; + + foreach ($lines as $line) { + $parts = explode(':', $line, 2); + $headers[trim($parts[0])][] = isset($parts[1]) + ? trim($parts[1]) + : null; + } + + return $headers; +} + +/** + * Returns a debug stream based on the provided variable. + * + * @param mixed $value Optional value + * + * @return resource + */ +function debug_resource($value = null) +{ + if (is_resource($value)) { + return $value; + } elseif (defined('STDOUT')) { + return STDOUT; + } + + return fopen('php://output', 'w'); +} + +/** + * Chooses and creates a default handler to use based on the environment. + * + * The returned handler is not wrapped by any default middlewares. + * + * @throws \RuntimeException if no viable Handler is available. + * @return callable Returns the best handler for the given system. + */ +function choose_handler() +{ + $handler = null; + if (function_exists('curl_multi_exec') && function_exists('curl_exec')) { + $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler()); + } elseif (function_exists('curl_exec')) { + $handler = new CurlHandler(); + } elseif (function_exists('curl_multi_exec')) { + $handler = new CurlMultiHandler(); + } + + if (ini_get('allow_url_fopen')) { + $handler = $handler + ? Proxy::wrapStreaming($handler, new StreamHandler()) + : new StreamHandler(); + } elseif (!$handler) { + throw new \RuntimeException('GuzzleHttp requires cURL, the ' + . 'allow_url_fopen ini setting, or a custom HTTP handler.'); + } + + return $handler; +} + +/** + * Get the default User-Agent string to use with Guzzle + * + * @return string + */ +function default_user_agent() +{ + static $defaultAgent = ''; + + if (!$defaultAgent) { + $defaultAgent = 'GuzzleHttp/' . Client::VERSION; + if (extension_loaded('curl') && function_exists('curl_version')) { + $defaultAgent .= ' curl/' . \curl_version()['version']; + } + $defaultAgent .= ' PHP/' . PHP_VERSION; + } + + return $defaultAgent; +} + +/** + * Returns the default cacert bundle for the current system. + * + * First, the openssl.cafile and curl.cainfo php.ini settings are checked. + * If those settings are not configured, then the common locations for + * bundles found on Red Hat, CentOS, Fedora, Ubuntu, Debian, FreeBSD, OS X + * and Windows are checked. If any of these file locations are found on + * disk, they will be utilized. + * + * Note: the result of this function is cached for subsequent calls. + * + * @return string + * @throws \RuntimeException if no bundle can be found. + */ +function default_ca_bundle() +{ + static $cached = null; + static $cafiles = [ + // Red Hat, CentOS, Fedora (provided by the ca-certificates package) + '/etc/pki/tls/certs/ca-bundle.crt', + // Ubuntu, Debian (provided by the ca-certificates package) + '/etc/ssl/certs/ca-certificates.crt', + // FreeBSD (provided by the ca_root_nss package) + '/usr/local/share/certs/ca-root-nss.crt', + // SLES 12 (provided by the ca-certificates package) + '/var/lib/ca-certificates/ca-bundle.pem', + // OS X provided by homebrew (using the default path) + '/usr/local/etc/openssl/cert.pem', + // Google app engine + '/etc/ca-certificates.crt', + // Windows? + 'C:\\windows\\system32\\curl-ca-bundle.crt', + 'C:\\windows\\curl-ca-bundle.crt', + ]; + + if ($cached) { + return $cached; + } + + if ($ca = ini_get('openssl.cafile')) { + return $cached = $ca; + } + + if ($ca = ini_get('curl.cainfo')) { + return $cached = $ca; + } + + foreach ($cafiles as $filename) { + if (file_exists($filename)) { + return $cached = $filename; + } + } + + throw new \RuntimeException( + <<< EOT +No system CA bundle could be found in any of the the common system locations. +PHP versions earlier than 5.6 are not properly configured to use the system's +CA bundle by default. In order to verify peer certificates, you will need to +supply the path on disk to a certificate bundle to the 'verify' request +option: http://docs.guzzlephp.org/en/latest/clients.html#verify. If you do not +need a specific certificate bundle, then Mozilla provides a commonly used CA +bundle which can be downloaded here (provided by the maintainer of cURL): +https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt. Once +you have a CA bundle available on disk, you can set the 'openssl.cafile' PHP +ini setting to point to the path to the file, allowing you to omit the 'verify' +request option. See http://curl.haxx.se/docs/sslcerts.html for more +information. +EOT + ); +} + +/** + * Creates an associative array of lowercase header names to the actual + * header casing. + * + * @param array $headers + * + * @return array + */ +function normalize_header_keys(array $headers) +{ + $result = []; + foreach (array_keys($headers) as $key) { + $result[strtolower($key)] = $key; + } + + return $result; +} + +/** + * Returns true if the provided host matches any of the no proxy areas. + * + * This method will strip a port from the host if it is present. Each pattern + * can be matched with an exact match (e.g., "foo.com" == "foo.com") or a + * partial match: (e.g., "foo.com" == "baz.foo.com" and ".foo.com" == + * "baz.foo.com", but ".foo.com" != "foo.com"). + * + * Areas are matched in the following cases: + * 1. "*" (without quotes) always matches any hosts. + * 2. An exact match. + * 3. The area starts with "." and the area is the last part of the host. e.g. + * '.mit.edu' will match any host that ends with '.mit.edu'. + * + * @param string $host Host to check against the patterns. + * @param array $noProxyArray An array of host patterns. + * + * @return bool + */ +function is_host_in_noproxy($host, array $noProxyArray) +{ + if (strlen($host) === 0) { + throw new \InvalidArgumentException('Empty host provided'); + } + + // Strip port if present. + if (strpos($host, ':')) { + $host = explode($host, ':', 2)[0]; + } + + foreach ($noProxyArray as $area) { + // Always match on wildcards. + if ($area === '*') { + return true; + } elseif (empty($area)) { + // Don't match on empty values. + continue; + } elseif ($area === $host) { + // Exact matches. + return true; + } else { + // Special match if the area when prefixed with ".". Remove any + // existing leading "." and add a new leading ".". + $area = '.' . ltrim($area, '.'); + if (substr($host, -(strlen($area))) === $area) { + return true; + } + } + } + + return false; +} + +/** + * Wrapper for json_decode that throws when an error occurs. + * + * @param string $json JSON data to parse + * @param bool $assoc When true, returned objects will be converted + * into associative arrays. + * @param int $depth User specified recursion depth. + * @param int $options Bitmask of JSON decode options. + * + * @return mixed + * @throws Exception\InvalidArgumentException if the JSON cannot be decoded. + * @link http://www.php.net/manual/en/function.json-decode.php + */ +function json_decode($json, $assoc = false, $depth = 512, $options = 0) +{ + $data = \json_decode($json, $assoc, $depth, $options); + if (JSON_ERROR_NONE !== json_last_error()) { + throw new Exception\InvalidArgumentException( + 'json_decode error: ' . json_last_error_msg() + ); + } + + return $data; +} + +/** + * Wrapper for JSON encoding that throws when an error occurs. + * + * @param mixed $value The value being encoded + * @param int $options JSON encode option bitmask + * @param int $depth Set the maximum depth. Must be greater than zero. + * + * @return string + * @throws Exception\InvalidArgumentException if the JSON cannot be encoded. + * @link http://www.php.net/manual/en/function.json-encode.php + */ +function json_encode($value, $options = 0, $depth = 512) +{ + $json = \json_encode($value, $options, $depth); + if (JSON_ERROR_NONE !== json_last_error()) { + throw new Exception\InvalidArgumentException( + 'json_encode error: ' . json_last_error_msg() + ); + } + + return $json; +} + +/** + * Wrapper for the hrtime() or microtime() functions + * (depending on the PHP version, one of the two is used) + * + * @return float|mixed UNIX timestamp + * @internal + */ +function _current_time() +{ + return function_exists('hrtime') ? hrtime(true) / 1e9 : microtime(true); +} diff --git a/vendor/guzzlehttp/guzzle/src/functions_include.php b/vendor/guzzlehttp/guzzle/src/functions_include.php new file mode 100644 index 0000000..a93393a --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/functions_include.php @@ -0,0 +1,6 @@ + + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/guzzlehttp/promises/Makefile b/vendor/guzzlehttp/promises/Makefile new file mode 100644 index 0000000..8d5b3ef --- /dev/null +++ b/vendor/guzzlehttp/promises/Makefile @@ -0,0 +1,13 @@ +all: clean test + +test: + vendor/bin/phpunit + +coverage: + vendor/bin/phpunit --coverage-html=artifacts/coverage + +view-coverage: + open artifacts/coverage/index.html + +clean: + rm -rf artifacts/* diff --git a/vendor/guzzlehttp/promises/README.md b/vendor/guzzlehttp/promises/README.md new file mode 100644 index 0000000..7b607e2 --- /dev/null +++ b/vendor/guzzlehttp/promises/README.md @@ -0,0 +1,504 @@ +# Guzzle Promises + +[Promises/A+](https://promisesaplus.com/) implementation that handles promise +chaining and resolution iteratively, allowing for "infinite" promise chaining +while keeping the stack size constant. Read [this blog post](https://blog.domenic.me/youre-missing-the-point-of-promises/) +for a general introduction to promises. + +- [Features](#features) +- [Quick start](#quick-start) +- [Synchronous wait](#synchronous-wait) +- [Cancellation](#cancellation) +- [API](#api) + - [Promise](#promise) + - [FulfilledPromise](#fulfilledpromise) + - [RejectedPromise](#rejectedpromise) +- [Promise interop](#promise-interop) +- [Implementation notes](#implementation-notes) + + +# Features + +- [Promises/A+](https://promisesaplus.com/) implementation. +- Promise resolution and chaining is handled iteratively, allowing for + "infinite" promise chaining. +- Promises have a synchronous `wait` method. +- Promises can be cancelled. +- Works with any object that has a `then` function. +- C# style async/await coroutine promises using + `GuzzleHttp\Promise\coroutine()`. + + +# Quick start + +A *promise* represents the eventual result of an asynchronous operation. The +primary way of interacting with a promise is through its `then` method, which +registers callbacks to receive either a promise's eventual value or the reason +why the promise cannot be fulfilled. + + +## Callbacks + +Callbacks are registered with the `then` method by providing an optional +`$onFulfilled` followed by an optional `$onRejected` function. + + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$promise->then( + // $onFulfilled + function ($value) { + echo 'The promise was fulfilled.'; + }, + // $onRejected + function ($reason) { + echo 'The promise was rejected.'; + } +); +``` + +*Resolving* a promise means that you either fulfill a promise with a *value* or +reject a promise with a *reason*. Resolving a promises triggers callbacks +registered with the promises's `then` method. These callbacks are triggered +only once and in the order in which they were added. + + +## Resolving a promise + +Promises are fulfilled using the `resolve($value)` method. Resolving a promise +with any value other than a `GuzzleHttp\Promise\RejectedPromise` will trigger +all of the onFulfilled callbacks (resolving a promise with a rejected promise +will reject the promise and trigger the `$onRejected` callbacks). + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$promise + ->then(function ($value) { + // Return a value and don't break the chain + return "Hello, " . $value; + }) + // This then is executed after the first then and receives the value + // returned from the first then. + ->then(function ($value) { + echo $value; + }); + +// Resolving the promise triggers the $onFulfilled callbacks and outputs +// "Hello, reader". +$promise->resolve('reader.'); +``` + + +## Promise forwarding + +Promises can be chained one after the other. Each then in the chain is a new +promise. The return value of a promise is what's forwarded to the next +promise in the chain. Returning a promise in a `then` callback will cause the +subsequent promises in the chain to only be fulfilled when the returned promise +has been fulfilled. The next promise in the chain will be invoked with the +resolved value of the promise. + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$nextPromise = new Promise(); + +$promise + ->then(function ($value) use ($nextPromise) { + echo $value; + return $nextPromise; + }) + ->then(function ($value) { + echo $value; + }); + +// Triggers the first callback and outputs "A" +$promise->resolve('A'); +// Triggers the second callback and outputs "B" +$nextPromise->resolve('B'); +``` + +## Promise rejection + +When a promise is rejected, the `$onRejected` callbacks are invoked with the +rejection reason. + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$promise->then(null, function ($reason) { + echo $reason; +}); + +$promise->reject('Error!'); +// Outputs "Error!" +``` + +## Rejection forwarding + +If an exception is thrown in an `$onRejected` callback, subsequent +`$onRejected` callbacks are invoked with the thrown exception as the reason. + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$promise->then(null, function ($reason) { + throw new \Exception($reason); +})->then(null, function ($reason) { + assert($reason->getMessage() === 'Error!'); +}); + +$promise->reject('Error!'); +``` + +You can also forward a rejection down the promise chain by returning a +`GuzzleHttp\Promise\RejectedPromise` in either an `$onFulfilled` or +`$onRejected` callback. + +```php +use GuzzleHttp\Promise\Promise; +use GuzzleHttp\Promise\RejectedPromise; + +$promise = new Promise(); +$promise->then(null, function ($reason) { + return new RejectedPromise($reason); +})->then(null, function ($reason) { + assert($reason === 'Error!'); +}); + +$promise->reject('Error!'); +``` + +If an exception is not thrown in a `$onRejected` callback and the callback +does not return a rejected promise, downstream `$onFulfilled` callbacks are +invoked using the value returned from the `$onRejected` callback. + +```php +use GuzzleHttp\Promise\Promise; +use GuzzleHttp\Promise\RejectedPromise; + +$promise = new Promise(); +$promise + ->then(null, function ($reason) { + return "It's ok"; + }) + ->then(function ($value) { + assert($value === "It's ok"); + }); + +$promise->reject('Error!'); +``` + +# Synchronous wait + +You can synchronously force promises to complete using a promise's `wait` +method. When creating a promise, you can provide a wait function that is used +to synchronously force a promise to complete. When a wait function is invoked +it is expected to deliver a value to the promise or reject the promise. If the +wait function does not deliver a value, then an exception is thrown. The wait +function provided to a promise constructor is invoked when the `wait` function +of the promise is called. + +```php +$promise = new Promise(function () use (&$promise) { + $promise->resolve('foo'); +}); + +// Calling wait will return the value of the promise. +echo $promise->wait(); // outputs "foo" +``` + +If an exception is encountered while invoking the wait function of a promise, +the promise is rejected with the exception and the exception is thrown. + +```php +$promise = new Promise(function () use (&$promise) { + throw new \Exception('foo'); +}); + +$promise->wait(); // throws the exception. +``` + +Calling `wait` on a promise that has been fulfilled will not trigger the wait +function. It will simply return the previously resolved value. + +```php +$promise = new Promise(function () { die('this is not called!'); }); +$promise->resolve('foo'); +echo $promise->wait(); // outputs "foo" +``` + +Calling `wait` on a promise that has been rejected will throw an exception. If +the rejection reason is an instance of `\Exception` the reason is thrown. +Otherwise, a `GuzzleHttp\Promise\RejectionException` is thrown and the reason +can be obtained by calling the `getReason` method of the exception. + +```php +$promise = new Promise(); +$promise->reject('foo'); +$promise->wait(); +``` + +> PHP Fatal error: Uncaught exception 'GuzzleHttp\Promise\RejectionException' with message 'The promise was rejected with value: foo' + + +## Unwrapping a promise + +When synchronously waiting on a promise, you are joining the state of the +promise into the current state of execution (i.e., return the value of the +promise if it was fulfilled or throw an exception if it was rejected). This is +called "unwrapping" the promise. Waiting on a promise will by default unwrap +the promise state. + +You can force a promise to resolve and *not* unwrap the state of the promise +by passing `false` to the first argument of the `wait` function: + +```php +$promise = new Promise(); +$promise->reject('foo'); +// This will not throw an exception. It simply ensures the promise has +// been resolved. +$promise->wait(false); +``` + +When unwrapping a promise, the resolved value of the promise will be waited +upon until the unwrapped value is not a promise. This means that if you resolve +promise A with a promise B and unwrap promise A, the value returned by the +wait function will be the value delivered to promise B. + +**Note**: when you do not unwrap the promise, no value is returned. + + +# Cancellation + +You can cancel a promise that has not yet been fulfilled using the `cancel()` +method of a promise. When creating a promise you can provide an optional +cancel function that when invoked cancels the action of computing a resolution +of the promise. + + +# API + + +## Promise + +When creating a promise object, you can provide an optional `$waitFn` and +`$cancelFn`. `$waitFn` is a function that is invoked with no arguments and is +expected to resolve the promise. `$cancelFn` is a function with no arguments +that is expected to cancel the computation of a promise. It is invoked when the +`cancel()` method of a promise is called. + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise( + function () use (&$promise) { + $promise->resolve('waited'); + }, + function () { + // do something that will cancel the promise computation (e.g., close + // a socket, cancel a database query, etc...) + } +); + +assert('waited' === $promise->wait()); +``` + +A promise has the following methods: + +- `then(callable $onFulfilled, callable $onRejected) : PromiseInterface` + + Appends fulfillment and rejection handlers to the promise, and returns a new promise resolving to the return value of the called handler. + +- `otherwise(callable $onRejected) : PromiseInterface` + + Appends a rejection handler callback to the promise, and returns a new promise resolving to the return value of the callback if it is called, or to its original fulfillment value if the promise is instead fulfilled. + +- `wait($unwrap = true) : mixed` + + Synchronously waits on the promise to complete. + + `$unwrap` controls whether or not the value of the promise is returned for a + fulfilled promise or if an exception is thrown if the promise is rejected. + This is set to `true` by default. + +- `cancel()` + + Attempts to cancel the promise if possible. The promise being cancelled and + the parent most ancestor that has not yet been resolved will also be + cancelled. Any promises waiting on the cancelled promise to resolve will also + be cancelled. + +- `getState() : string` + + Returns the state of the promise. One of `pending`, `fulfilled`, or + `rejected`. + +- `resolve($value)` + + Fulfills the promise with the given `$value`. + +- `reject($reason)` + + Rejects the promise with the given `$reason`. + + +## FulfilledPromise + +A fulfilled promise can be created to represent a promise that has been +fulfilled. + +```php +use GuzzleHttp\Promise\FulfilledPromise; + +$promise = new FulfilledPromise('value'); + +// Fulfilled callbacks are immediately invoked. +$promise->then(function ($value) { + echo $value; +}); +``` + + +## RejectedPromise + +A rejected promise can be created to represent a promise that has been +rejected. + +```php +use GuzzleHttp\Promise\RejectedPromise; + +$promise = new RejectedPromise('Error'); + +// Rejected callbacks are immediately invoked. +$promise->then(null, function ($reason) { + echo $reason; +}); +``` + + +# Promise interop + +This library works with foreign promises that have a `then` method. This means +you can use Guzzle promises with [React promises](https://github.com/reactphp/promise) +for example. When a foreign promise is returned inside of a then method +callback, promise resolution will occur recursively. + +```php +// Create a React promise +$deferred = new React\Promise\Deferred(); +$reactPromise = $deferred->promise(); + +// Create a Guzzle promise that is fulfilled with a React promise. +$guzzlePromise = new \GuzzleHttp\Promise\Promise(); +$guzzlePromise->then(function ($value) use ($reactPromise) { + // Do something something with the value... + // Return the React promise + return $reactPromise; +}); +``` + +Please note that wait and cancel chaining is no longer possible when forwarding +a foreign promise. You will need to wrap a third-party promise with a Guzzle +promise in order to utilize wait and cancel functions with foreign promises. + + +## Event Loop Integration + +In order to keep the stack size constant, Guzzle promises are resolved +asynchronously using a task queue. When waiting on promises synchronously, the +task queue will be automatically run to ensure that the blocking promise and +any forwarded promises are resolved. When using promises asynchronously in an +event loop, you will need to run the task queue on each tick of the loop. If +you do not run the task queue, then promises will not be resolved. + +You can run the task queue using the `run()` method of the global task queue +instance. + +```php +// Get the global task queue +$queue = \GuzzleHttp\Promise\queue(); +$queue->run(); +``` + +For example, you could use Guzzle promises with React using a periodic timer: + +```php +$loop = React\EventLoop\Factory::create(); +$loop->addPeriodicTimer(0, [$queue, 'run']); +``` + +*TODO*: Perhaps adding a `futureTick()` on each tick would be faster? + + +# Implementation notes + + +## Promise resolution and chaining is handled iteratively + +By shuffling pending handlers from one owner to another, promises are +resolved iteratively, allowing for "infinite" then chaining. + +```php +then(function ($v) { + // The stack size remains constant (a good thing) + echo xdebug_get_stack_depth() . ', '; + return $v + 1; + }); +} + +$parent->resolve(0); +var_dump($p->wait()); // int(1000) + +``` + +When a promise is fulfilled or rejected with a non-promise value, the promise +then takes ownership of the handlers of each child promise and delivers values +down the chain without using recursion. + +When a promise is resolved with another promise, the original promise transfers +all of its pending handlers to the new promise. When the new promise is +eventually resolved, all of the pending handlers are delivered the forwarded +value. + + +## A promise is the deferred. + +Some promise libraries implement promises using a deferred object to represent +a computation and a promise object to represent the delivery of the result of +the computation. This is a nice separation of computation and delivery because +consumers of the promise cannot modify the value that will be eventually +delivered. + +One side effect of being able to implement promise resolution and chaining +iteratively is that you need to be able for one promise to reach into the state +of another promise to shuffle around ownership of handlers. In order to achieve +this without making the handlers of a promise publicly mutable, a promise is +also the deferred value, allowing promises of the same parent class to reach +into and modify the private properties of promises of the same type. While this +does allow consumers of the value to modify the resolution or rejection of the +deferred, it is a small price to pay for keeping the stack size constant. + +```php +$promise = new Promise(); +$promise->then(function ($value) { echo $value; }); +// The promise is the deferred value, so you can deliver a value to it. +$promise->resolve('foo'); +// prints "foo" +``` diff --git a/vendor/guzzlehttp/promises/composer.json b/vendor/guzzlehttp/promises/composer.json new file mode 100644 index 0000000..ec41a61 --- /dev/null +++ b/vendor/guzzlehttp/promises/composer.json @@ -0,0 +1,34 @@ +{ + "name": "guzzlehttp/promises", + "description": "Guzzle promises library", + "keywords": ["promise"], + "license": "MIT", + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": ["src/functions_include.php"] + }, + "scripts": { + "test": "vendor/bin/phpunit", + "test-ci": "vendor/bin/phpunit --coverage-text" + }, + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + } +} diff --git a/vendor/guzzlehttp/promises/src/AggregateException.php b/vendor/guzzlehttp/promises/src/AggregateException.php new file mode 100644 index 0000000..6a5690c --- /dev/null +++ b/vendor/guzzlehttp/promises/src/AggregateException.php @@ -0,0 +1,16 @@ +then(function ($v) { echo $v; }); + * + * @param callable $generatorFn Generator function to wrap into a promise. + * + * @return Promise + * @link https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration + */ +final class Coroutine implements PromiseInterface +{ + /** + * @var PromiseInterface|null + */ + private $currentPromise; + + /** + * @var Generator + */ + private $generator; + + /** + * @var Promise + */ + private $result; + + public function __construct(callable $generatorFn) + { + $this->generator = $generatorFn(); + $this->result = new Promise(function () { + while (isset($this->currentPromise)) { + $this->currentPromise->wait(); + } + }); + $this->nextCoroutine($this->generator->current()); + } + + public function then( + callable $onFulfilled = null, + callable $onRejected = null + ) { + return $this->result->then($onFulfilled, $onRejected); + } + + public function otherwise(callable $onRejected) + { + return $this->result->otherwise($onRejected); + } + + public function wait($unwrap = true) + { + return $this->result->wait($unwrap); + } + + public function getState() + { + return $this->result->getState(); + } + + public function resolve($value) + { + $this->result->resolve($value); + } + + public function reject($reason) + { + $this->result->reject($reason); + } + + public function cancel() + { + $this->currentPromise->cancel(); + $this->result->cancel(); + } + + private function nextCoroutine($yielded) + { + $this->currentPromise = promise_for($yielded) + ->then([$this, '_handleSuccess'], [$this, '_handleFailure']); + } + + /** + * @internal + */ + public function _handleSuccess($value) + { + unset($this->currentPromise); + try { + $next = $this->generator->send($value); + if ($this->generator->valid()) { + $this->nextCoroutine($next); + } else { + $this->result->resolve($value); + } + } catch (Exception $exception) { + $this->result->reject($exception); + } catch (Throwable $throwable) { + $this->result->reject($throwable); + } + } + + /** + * @internal + */ + public function _handleFailure($reason) + { + unset($this->currentPromise); + try { + $nextYield = $this->generator->throw(exception_for($reason)); + // The throw was caught, so keep iterating on the coroutine + $this->nextCoroutine($nextYield); + } catch (Exception $exception) { + $this->result->reject($exception); + } catch (Throwable $throwable) { + $this->result->reject($throwable); + } + } +} diff --git a/vendor/guzzlehttp/promises/src/EachPromise.php b/vendor/guzzlehttp/promises/src/EachPromise.php new file mode 100644 index 0000000..d0ddf60 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/EachPromise.php @@ -0,0 +1,229 @@ +iterable = iter_for($iterable); + + if (isset($config['concurrency'])) { + $this->concurrency = $config['concurrency']; + } + + if (isset($config['fulfilled'])) { + $this->onFulfilled = $config['fulfilled']; + } + + if (isset($config['rejected'])) { + $this->onRejected = $config['rejected']; + } + } + + public function promise() + { + if ($this->aggregate) { + return $this->aggregate; + } + + try { + $this->createPromise(); + $this->iterable->rewind(); + $this->refillPending(); + } catch (\Throwable $e) { + $this->aggregate->reject($e); + } catch (\Exception $e) { + $this->aggregate->reject($e); + } + + return $this->aggregate; + } + + private function createPromise() + { + $this->mutex = false; + $this->aggregate = new Promise(function () { + reset($this->pending); + if (empty($this->pending) && !$this->iterable->valid()) { + $this->aggregate->resolve(null); + return; + } + + // Consume a potentially fluctuating list of promises while + // ensuring that indexes are maintained (precluding array_shift). + while ($promise = current($this->pending)) { + next($this->pending); + $promise->wait(); + if ($this->aggregate->getState() !== PromiseInterface::PENDING) { + return; + } + } + }); + + // Clear the references when the promise is resolved. + $clearFn = function () { + $this->iterable = $this->concurrency = $this->pending = null; + $this->onFulfilled = $this->onRejected = null; + }; + + $this->aggregate->then($clearFn, $clearFn); + } + + private function refillPending() + { + if (!$this->concurrency) { + // Add all pending promises. + while ($this->addPending() && $this->advanceIterator()); + return; + } + + // Add only up to N pending promises. + $concurrency = is_callable($this->concurrency) + ? call_user_func($this->concurrency, count($this->pending)) + : $this->concurrency; + $concurrency = max($concurrency - count($this->pending), 0); + // Concurrency may be set to 0 to disallow new promises. + if (!$concurrency) { + return; + } + // Add the first pending promise. + $this->addPending(); + // Note this is special handling for concurrency=1 so that we do + // not advance the iterator after adding the first promise. This + // helps work around issues with generators that might not have the + // next value to yield until promise callbacks are called. + while (--$concurrency + && $this->advanceIterator() + && $this->addPending()); + } + + private function addPending() + { + if (!$this->iterable || !$this->iterable->valid()) { + return false; + } + + $promise = promise_for($this->iterable->current()); + $idx = $this->iterable->key(); + + $this->pending[$idx] = $promise->then( + function ($value) use ($idx) { + if ($this->onFulfilled) { + call_user_func( + $this->onFulfilled, $value, $idx, $this->aggregate + ); + } + $this->step($idx); + }, + function ($reason) use ($idx) { + if ($this->onRejected) { + call_user_func( + $this->onRejected, $reason, $idx, $this->aggregate + ); + } + $this->step($idx); + } + ); + + return true; + } + + private function advanceIterator() + { + // Place a lock on the iterator so that we ensure to not recurse, + // preventing fatal generator errors. + if ($this->mutex) { + return false; + } + + $this->mutex = true; + + try { + $this->iterable->next(); + $this->mutex = false; + return true; + } catch (\Throwable $e) { + $this->aggregate->reject($e); + $this->mutex = false; + return false; + } catch (\Exception $e) { + $this->aggregate->reject($e); + $this->mutex = false; + return false; + } + } + + private function step($idx) + { + // If the promise was already resolved, then ignore this step. + if ($this->aggregate->getState() !== PromiseInterface::PENDING) { + return; + } + + unset($this->pending[$idx]); + + // Only refill pending promises if we are not locked, preventing the + // EachPromise to recursively invoke the provided iterator, which + // cause a fatal error: "Cannot resume an already running generator" + if ($this->advanceIterator() && !$this->checkIfFinished()) { + // Add more pending promises if possible. + $this->refillPending(); + } + } + + private function checkIfFinished() + { + if (!$this->pending && !$this->iterable->valid()) { + // Resolve the promise if there's nothing left to do. + $this->aggregate->resolve(null); + return true; + } + + return false; + } +} diff --git a/vendor/guzzlehttp/promises/src/FulfilledPromise.php b/vendor/guzzlehttp/promises/src/FulfilledPromise.php new file mode 100644 index 0000000..dbbeeb9 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/FulfilledPromise.php @@ -0,0 +1,82 @@ +value = $value; + } + + public function then( + callable $onFulfilled = null, + callable $onRejected = null + ) { + // Return itself if there is no onFulfilled function. + if (!$onFulfilled) { + return $this; + } + + $queue = queue(); + $p = new Promise([$queue, 'run']); + $value = $this->value; + $queue->add(static function () use ($p, $value, $onFulfilled) { + if ($p->getState() === self::PENDING) { + try { + $p->resolve($onFulfilled($value)); + } catch (\Throwable $e) { + $p->reject($e); + } catch (\Exception $e) { + $p->reject($e); + } + } + }); + + return $p; + } + + public function otherwise(callable $onRejected) + { + return $this->then(null, $onRejected); + } + + public function wait($unwrap = true, $defaultDelivery = null) + { + return $unwrap ? $this->value : null; + } + + public function getState() + { + return self::FULFILLED; + } + + public function resolve($value) + { + if ($value !== $this->value) { + throw new \LogicException("Cannot resolve a fulfilled promise"); + } + } + + public function reject($reason) + { + throw new \LogicException("Cannot reject a fulfilled promise"); + } + + public function cancel() + { + // pass + } +} diff --git a/vendor/guzzlehttp/promises/src/Promise.php b/vendor/guzzlehttp/promises/src/Promise.php new file mode 100644 index 0000000..844ada0 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/Promise.php @@ -0,0 +1,280 @@ +waitFn = $waitFn; + $this->cancelFn = $cancelFn; + } + + public function then( + callable $onFulfilled = null, + callable $onRejected = null + ) { + if ($this->state === self::PENDING) { + $p = new Promise(null, [$this, 'cancel']); + $this->handlers[] = [$p, $onFulfilled, $onRejected]; + $p->waitList = $this->waitList; + $p->waitList[] = $this; + return $p; + } + + // Return a fulfilled promise and immediately invoke any callbacks. + if ($this->state === self::FULFILLED) { + return $onFulfilled + ? promise_for($this->result)->then($onFulfilled) + : promise_for($this->result); + } + + // It's either cancelled or rejected, so return a rejected promise + // and immediately invoke any callbacks. + $rejection = rejection_for($this->result); + return $onRejected ? $rejection->then(null, $onRejected) : $rejection; + } + + public function otherwise(callable $onRejected) + { + return $this->then(null, $onRejected); + } + + public function wait($unwrap = true) + { + $this->waitIfPending(); + + $inner = $this->result instanceof PromiseInterface + ? $this->result->wait($unwrap) + : $this->result; + + if ($unwrap) { + if ($this->result instanceof PromiseInterface + || $this->state === self::FULFILLED + ) { + return $inner; + } else { + // It's rejected so "unwrap" and throw an exception. + throw exception_for($inner); + } + } + } + + public function getState() + { + return $this->state; + } + + public function cancel() + { + if ($this->state !== self::PENDING) { + return; + } + + $this->waitFn = $this->waitList = null; + + if ($this->cancelFn) { + $fn = $this->cancelFn; + $this->cancelFn = null; + try { + $fn(); + } catch (\Throwable $e) { + $this->reject($e); + } catch (\Exception $e) { + $this->reject($e); + } + } + + // Reject the promise only if it wasn't rejected in a then callback. + if ($this->state === self::PENDING) { + $this->reject(new CancellationException('Promise has been cancelled')); + } + } + + public function resolve($value) + { + $this->settle(self::FULFILLED, $value); + } + + public function reject($reason) + { + $this->settle(self::REJECTED, $reason); + } + + private function settle($state, $value) + { + if ($this->state !== self::PENDING) { + // Ignore calls with the same resolution. + if ($state === $this->state && $value === $this->result) { + return; + } + throw $this->state === $state + ? new \LogicException("The promise is already {$state}.") + : new \LogicException("Cannot change a {$this->state} promise to {$state}"); + } + + if ($value === $this) { + throw new \LogicException('Cannot fulfill or reject a promise with itself'); + } + + // Clear out the state of the promise but stash the handlers. + $this->state = $state; + $this->result = $value; + $handlers = $this->handlers; + $this->handlers = null; + $this->waitList = $this->waitFn = null; + $this->cancelFn = null; + + if (!$handlers) { + return; + } + + // If the value was not a settled promise or a thenable, then resolve + // it in the task queue using the correct ID. + if (!method_exists($value, 'then')) { + $id = $state === self::FULFILLED ? 1 : 2; + // It's a success, so resolve the handlers in the queue. + queue()->add(static function () use ($id, $value, $handlers) { + foreach ($handlers as $handler) { + self::callHandler($id, $value, $handler); + } + }); + } elseif ($value instanceof Promise + && $value->getState() === self::PENDING + ) { + // We can just merge our handlers onto the next promise. + $value->handlers = array_merge($value->handlers, $handlers); + } else { + // Resolve the handlers when the forwarded promise is resolved. + $value->then( + static function ($value) use ($handlers) { + foreach ($handlers as $handler) { + self::callHandler(1, $value, $handler); + } + }, + static function ($reason) use ($handlers) { + foreach ($handlers as $handler) { + self::callHandler(2, $reason, $handler); + } + } + ); + } + } + + /** + * Call a stack of handlers using a specific callback index and value. + * + * @param int $index 1 (resolve) or 2 (reject). + * @param mixed $value Value to pass to the callback. + * @param array $handler Array of handler data (promise and callbacks). + * + * @return array Returns the next group to resolve. + */ + private static function callHandler($index, $value, array $handler) + { + /** @var PromiseInterface $promise */ + $promise = $handler[0]; + + // The promise may have been cancelled or resolved before placing + // this thunk in the queue. + if ($promise->getState() !== self::PENDING) { + return; + } + + try { + if (isset($handler[$index])) { + $promise->resolve($handler[$index]($value)); + } elseif ($index === 1) { + // Forward resolution values as-is. + $promise->resolve($value); + } else { + // Forward rejections down the chain. + $promise->reject($value); + } + } catch (\Throwable $reason) { + $promise->reject($reason); + } catch (\Exception $reason) { + $promise->reject($reason); + } + } + + private function waitIfPending() + { + if ($this->state !== self::PENDING) { + return; + } elseif ($this->waitFn) { + $this->invokeWaitFn(); + } elseif ($this->waitList) { + $this->invokeWaitList(); + } else { + // If there's not wait function, then reject the promise. + $this->reject('Cannot wait on a promise that has ' + . 'no internal wait function. You must provide a wait ' + . 'function when constructing the promise to be able to ' + . 'wait on a promise.'); + } + + queue()->run(); + + if ($this->state === self::PENDING) { + $this->reject('Invoking the wait callback did not resolve the promise'); + } + } + + private function invokeWaitFn() + { + try { + $wfn = $this->waitFn; + $this->waitFn = null; + $wfn(true); + } catch (\Exception $reason) { + if ($this->state === self::PENDING) { + // The promise has not been resolved yet, so reject the promise + // with the exception. + $this->reject($reason); + } else { + // The promise was already resolved, so there's a problem in + // the application. + throw $reason; + } + } + } + + private function invokeWaitList() + { + $waitList = $this->waitList; + $this->waitList = null; + + foreach ($waitList as $result) { + while (true) { + $result->waitIfPending(); + + if ($result->result instanceof Promise) { + $result = $result->result; + } else { + if ($result->result instanceof PromiseInterface) { + $result->result->wait(false); + } + break; + } + } + } + } +} diff --git a/vendor/guzzlehttp/promises/src/PromiseInterface.php b/vendor/guzzlehttp/promises/src/PromiseInterface.php new file mode 100644 index 0000000..8f5f4b9 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/PromiseInterface.php @@ -0,0 +1,93 @@ +reason = $reason; + } + + public function then( + callable $onFulfilled = null, + callable $onRejected = null + ) { + // If there's no onRejected callback then just return self. + if (!$onRejected) { + return $this; + } + + $queue = queue(); + $reason = $this->reason; + $p = new Promise([$queue, 'run']); + $queue->add(static function () use ($p, $reason, $onRejected) { + if ($p->getState() === self::PENDING) { + try { + // Return a resolved promise if onRejected does not throw. + $p->resolve($onRejected($reason)); + } catch (\Throwable $e) { + // onRejected threw, so return a rejected promise. + $p->reject($e); + } catch (\Exception $e) { + // onRejected threw, so return a rejected promise. + $p->reject($e); + } + } + }); + + return $p; + } + + public function otherwise(callable $onRejected) + { + return $this->then(null, $onRejected); + } + + public function wait($unwrap = true, $defaultDelivery = null) + { + if ($unwrap) { + throw exception_for($this->reason); + } + } + + public function getState() + { + return self::REJECTED; + } + + public function resolve($value) + { + throw new \LogicException("Cannot resolve a rejected promise"); + } + + public function reject($reason) + { + if ($reason !== $this->reason) { + throw new \LogicException("Cannot reject a rejected promise"); + } + } + + public function cancel() + { + // pass + } +} diff --git a/vendor/guzzlehttp/promises/src/RejectionException.php b/vendor/guzzlehttp/promises/src/RejectionException.php new file mode 100644 index 0000000..07c1136 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/RejectionException.php @@ -0,0 +1,47 @@ +reason = $reason; + + $message = 'The promise was rejected'; + + if ($description) { + $message .= ' with reason: ' . $description; + } elseif (is_string($reason) + || (is_object($reason) && method_exists($reason, '__toString')) + ) { + $message .= ' with reason: ' . $this->reason; + } elseif ($reason instanceof \JsonSerializable) { + $message .= ' with reason: ' + . json_encode($this->reason, JSON_PRETTY_PRINT); + } + + parent::__construct($message); + } + + /** + * Returns the rejection reason. + * + * @return mixed + */ + public function getReason() + { + return $this->reason; + } +} diff --git a/vendor/guzzlehttp/promises/src/TaskQueue.php b/vendor/guzzlehttp/promises/src/TaskQueue.php new file mode 100644 index 0000000..6e8a2a0 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/TaskQueue.php @@ -0,0 +1,66 @@ +run(); + */ +class TaskQueue implements TaskQueueInterface +{ + private $enableShutdown = true; + private $queue = []; + + public function __construct($withShutdown = true) + { + if ($withShutdown) { + register_shutdown_function(function () { + if ($this->enableShutdown) { + // Only run the tasks if an E_ERROR didn't occur. + $err = error_get_last(); + if (!$err || ($err['type'] ^ E_ERROR)) { + $this->run(); + } + } + }); + } + } + + public function isEmpty() + { + return !$this->queue; + } + + public function add(callable $task) + { + $this->queue[] = $task; + } + + public function run() + { + /** @var callable $task */ + while ($task = array_shift($this->queue)) { + $task(); + } + } + + /** + * The task queue will be run and exhausted by default when the process + * exits IFF the exit is not the result of a PHP E_ERROR error. + * + * You can disable running the automatic shutdown of the queue by calling + * this function. If you disable the task queue shutdown process, then you + * MUST either run the task queue (as a result of running your event loop + * or manually using the run() method) or wait on each outstanding promise. + * + * Note: This shutdown will occur before any destructors are triggered. + */ + public function disableShutdown() + { + $this->enableShutdown = false; + } +} diff --git a/vendor/guzzlehttp/promises/src/TaskQueueInterface.php b/vendor/guzzlehttp/promises/src/TaskQueueInterface.php new file mode 100644 index 0000000..ac8306e --- /dev/null +++ b/vendor/guzzlehttp/promises/src/TaskQueueInterface.php @@ -0,0 +1,25 @@ + + * while ($eventLoop->isRunning()) { + * GuzzleHttp\Promise\queue()->run(); + * } + * + * + * @param TaskQueueInterface $assign Optionally specify a new queue instance. + * + * @return TaskQueueInterface + */ +function queue(TaskQueueInterface $assign = null) +{ + static $queue; + + if ($assign) { + $queue = $assign; + } elseif (!$queue) { + $queue = new TaskQueue(); + } + + return $queue; +} + +/** + * Adds a function to run in the task queue when it is next `run()` and returns + * a promise that is fulfilled or rejected with the result. + * + * @param callable $task Task function to run. + * + * @return PromiseInterface + */ +function task(callable $task) +{ + $queue = queue(); + $promise = new Promise([$queue, 'run']); + $queue->add(function () use ($task, $promise) { + try { + $promise->resolve($task()); + } catch (\Throwable $e) { + $promise->reject($e); + } catch (\Exception $e) { + $promise->reject($e); + } + }); + + return $promise; +} + +/** + * Creates a promise for a value if the value is not a promise. + * + * @param mixed $value Promise or value. + * + * @return PromiseInterface + */ +function promise_for($value) +{ + if ($value instanceof PromiseInterface) { + return $value; + } + + // Return a Guzzle promise that shadows the given promise. + if (method_exists($value, 'then')) { + $wfn = method_exists($value, 'wait') ? [$value, 'wait'] : null; + $cfn = method_exists($value, 'cancel') ? [$value, 'cancel'] : null; + $promise = new Promise($wfn, $cfn); + $value->then([$promise, 'resolve'], [$promise, 'reject']); + return $promise; + } + + return new FulfilledPromise($value); +} + +/** + * Creates a rejected promise for a reason if the reason is not a promise. If + * the provided reason is a promise, then it is returned as-is. + * + * @param mixed $reason Promise or reason. + * + * @return PromiseInterface + */ +function rejection_for($reason) +{ + if ($reason instanceof PromiseInterface) { + return $reason; + } + + return new RejectedPromise($reason); +} + +/** + * Create an exception for a rejected promise value. + * + * @param mixed $reason + * + * @return \Exception|\Throwable + */ +function exception_for($reason) +{ + return $reason instanceof \Exception || $reason instanceof \Throwable + ? $reason + : new RejectionException($reason); +} + +/** + * Returns an iterator for the given value. + * + * @param mixed $value + * + * @return \Iterator + */ +function iter_for($value) +{ + if ($value instanceof \Iterator) { + return $value; + } elseif (is_array($value)) { + return new \ArrayIterator($value); + } else { + return new \ArrayIterator([$value]); + } +} + +/** + * Synchronously waits on a promise to resolve and returns an inspection state + * array. + * + * Returns a state associative array containing a "state" key mapping to a + * valid promise state. If the state of the promise is "fulfilled", the array + * will contain a "value" key mapping to the fulfilled value of the promise. If + * the promise is rejected, the array will contain a "reason" key mapping to + * the rejection reason of the promise. + * + * @param PromiseInterface $promise Promise or value. + * + * @return array + */ +function inspect(PromiseInterface $promise) +{ + try { + return [ + 'state' => PromiseInterface::FULFILLED, + 'value' => $promise->wait() + ]; + } catch (RejectionException $e) { + return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()]; + } catch (\Throwable $e) { + return ['state' => PromiseInterface::REJECTED, 'reason' => $e]; + } catch (\Exception $e) { + return ['state' => PromiseInterface::REJECTED, 'reason' => $e]; + } +} + +/** + * Waits on all of the provided promises, but does not unwrap rejected promises + * as thrown exception. + * + * Returns an array of inspection state arrays. + * + * @param PromiseInterface[] $promises Traversable of promises to wait upon. + * + * @return array + * @see GuzzleHttp\Promise\inspect for the inspection state array format. + */ +function inspect_all($promises) +{ + $results = []; + foreach ($promises as $key => $promise) { + $results[$key] = inspect($promise); + } + + return $results; +} + +/** + * Waits on all of the provided promises and returns the fulfilled values. + * + * Returns an array that contains the value of each promise (in the same order + * the promises were provided). An exception is thrown if any of the promises + * are rejected. + * + * @param mixed $promises Iterable of PromiseInterface objects to wait on. + * + * @return array + * @throws \Exception on error + * @throws \Throwable on error in PHP >=7 + */ +function unwrap($promises) +{ + $results = []; + foreach ($promises as $key => $promise) { + $results[$key] = $promise->wait(); + } + + return $results; +} + +/** + * Given an array of promises, return a promise that is fulfilled when all the + * items in the array are fulfilled. + * + * The promise's fulfillment value is an array with fulfillment values at + * respective positions to the original array. If any promise in the array + * rejects, the returned promise is rejected with the rejection reason. + * + * @param mixed $promises Promises or values. + * + * @return PromiseInterface + */ +function all($promises) +{ + $results = []; + return each( + $promises, + function ($value, $idx) use (&$results) { + $results[$idx] = $value; + }, + function ($reason, $idx, Promise $aggregate) { + $aggregate->reject($reason); + } + )->then(function () use (&$results) { + ksort($results); + return $results; + }); +} + +/** + * Initiate a competitive race between multiple promises or values (values will + * become immediately fulfilled promises). + * + * When count amount of promises have been fulfilled, the returned promise is + * fulfilled with an array that contains the fulfillment values of the winners + * in order of resolution. + * + * This prommise is rejected with a {@see GuzzleHttp\Promise\AggregateException} + * if the number of fulfilled promises is less than the desired $count. + * + * @param int $count Total number of promises. + * @param mixed $promises Promises or values. + * + * @return PromiseInterface + */ +function some($count, $promises) +{ + $results = []; + $rejections = []; + + return each( + $promises, + function ($value, $idx, PromiseInterface $p) use (&$results, $count) { + if ($p->getState() !== PromiseInterface::PENDING) { + return; + } + $results[$idx] = $value; + if (count($results) >= $count) { + $p->resolve(null); + } + }, + function ($reason) use (&$rejections) { + $rejections[] = $reason; + } + )->then( + function () use (&$results, &$rejections, $count) { + if (count($results) !== $count) { + throw new AggregateException( + 'Not enough promises to fulfill count', + $rejections + ); + } + ksort($results); + return array_values($results); + } + ); +} + +/** + * Like some(), with 1 as count. However, if the promise fulfills, the + * fulfillment value is not an array of 1 but the value directly. + * + * @param mixed $promises Promises or values. + * + * @return PromiseInterface + */ +function any($promises) +{ + return some(1, $promises)->then(function ($values) { return $values[0]; }); +} + +/** + * Returns a promise that is fulfilled when all of the provided promises have + * been fulfilled or rejected. + * + * The returned promise is fulfilled with an array of inspection state arrays. + * + * @param mixed $promises Promises or values. + * + * @return PromiseInterface + * @see GuzzleHttp\Promise\inspect for the inspection state array format. + */ +function settle($promises) +{ + $results = []; + + return each( + $promises, + function ($value, $idx) use (&$results) { + $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value]; + }, + function ($reason, $idx) use (&$results) { + $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason]; + } + )->then(function () use (&$results) { + ksort($results); + return $results; + }); +} + +/** + * Given an iterator that yields promises or values, returns a promise that is + * fulfilled with a null value when the iterator has been consumed or the + * aggregate promise has been fulfilled or rejected. + * + * $onFulfilled is a function that accepts the fulfilled value, iterator + * index, and the aggregate promise. The callback can invoke any necessary side + * effects and choose to resolve or reject the aggregate promise if needed. + * + * $onRejected is a function that accepts the rejection reason, iterator + * index, and the aggregate promise. The callback can invoke any necessary side + * effects and choose to resolve or reject the aggregate promise if needed. + * + * @param mixed $iterable Iterator or array to iterate over. + * @param callable $onFulfilled + * @param callable $onRejected + * + * @return PromiseInterface + */ +function each( + $iterable, + callable $onFulfilled = null, + callable $onRejected = null +) { + return (new EachPromise($iterable, [ + 'fulfilled' => $onFulfilled, + 'rejected' => $onRejected + ]))->promise(); +} + +/** + * Like each, but only allows a certain number of outstanding promises at any + * given time. + * + * $concurrency may be an integer or a function that accepts the number of + * pending promises and returns a numeric concurrency limit value to allow for + * dynamic a concurrency size. + * + * @param mixed $iterable + * @param int|callable $concurrency + * @param callable $onFulfilled + * @param callable $onRejected + * + * @return PromiseInterface + */ +function each_limit( + $iterable, + $concurrency, + callable $onFulfilled = null, + callable $onRejected = null +) { + return (new EachPromise($iterable, [ + 'fulfilled' => $onFulfilled, + 'rejected' => $onRejected, + 'concurrency' => $concurrency + ]))->promise(); +} + +/** + * Like each_limit, but ensures that no promise in the given $iterable argument + * is rejected. If any promise is rejected, then the aggregate promise is + * rejected with the encountered rejection. + * + * @param mixed $iterable + * @param int|callable $concurrency + * @param callable $onFulfilled + * + * @return PromiseInterface + */ +function each_limit_all( + $iterable, + $concurrency, + callable $onFulfilled = null +) { + return each_limit( + $iterable, + $concurrency, + $onFulfilled, + function ($reason, $idx, PromiseInterface $aggregate) { + $aggregate->reject($reason); + } + ); +} + +/** + * Returns true if a promise is fulfilled. + * + * @param PromiseInterface $promise + * + * @return bool + */ +function is_fulfilled(PromiseInterface $promise) +{ + return $promise->getState() === PromiseInterface::FULFILLED; +} + +/** + * Returns true if a promise is rejected. + * + * @param PromiseInterface $promise + * + * @return bool + */ +function is_rejected(PromiseInterface $promise) +{ + return $promise->getState() === PromiseInterface::REJECTED; +} + +/** + * Returns true if a promise is fulfilled or rejected. + * + * @param PromiseInterface $promise + * + * @return bool + */ +function is_settled(PromiseInterface $promise) +{ + return $promise->getState() !== PromiseInterface::PENDING; +} + +/** + * @see Coroutine + * + * @param callable $generatorFn + * + * @return PromiseInterface + */ +function coroutine(callable $generatorFn) +{ + return new Coroutine($generatorFn); +} diff --git a/vendor/guzzlehttp/promises/src/functions_include.php b/vendor/guzzlehttp/promises/src/functions_include.php new file mode 100644 index 0000000..34cd171 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/functions_include.php @@ -0,0 +1,6 @@ +withPath('foo')->withHost('example.com')` will throw an exception + because the path of a URI with an authority must start with a slash "/" or be empty + - `(new Uri())->withScheme('http')` will return `'http://localhost'` + +### Deprecated + +- `Uri::resolve` in favor of `UriResolver::resolve` +- `Uri::removeDotSegments` in favor of `UriResolver::removeDotSegments` + +### Fixed + +- `Stream::read` when length parameter <= 0. +- `copy_to_stream` reads bytes in chunks instead of `maxLen` into memory. +- `ServerRequest::getUriFromGlobals` when `Host` header contains port. +- Compatibility of URIs with `file` scheme and empty host. + + +## [1.3.1] - 2016-06-25 + +### Fixed + +- `Uri::__toString` for network path references, e.g. `//example.org`. +- Missing lowercase normalization for host. +- Handling of URI components in case they are `'0'` in a lot of places, + e.g. as a user info password. +- `Uri::withAddedHeader` to correctly merge headers with different case. +- Trimming of header values in `Uri::withAddedHeader`. Header values may + be surrounded by whitespace which should be ignored according to RFC 7230 + Section 3.2.4. This does not apply to header names. +- `Uri::withAddedHeader` with an array of header values. +- `Uri::resolve` when base path has no slash and handling of fragment. +- Handling of encoding in `Uri::with(out)QueryValue` so one can pass the + key/value both in encoded as well as decoded form to those methods. This is + consistent with withPath, withQuery etc. +- `ServerRequest::withoutAttribute` when attribute value is null. + + +## [1.3.0] - 2016-04-13 + +### Added + +- Remaining interfaces needed for full PSR7 compatibility + (ServerRequestInterface, UploadedFileInterface, etc.). +- Support for stream_for from scalars. + +### Changed + +- Can now extend Uri. + +### Fixed +- A bug in validating request methods by making it more permissive. + + +## [1.2.3] - 2016-02-18 + +### Fixed + +- Support in `GuzzleHttp\Psr7\CachingStream` for seeking forward on remote + streams, which can sometimes return fewer bytes than requested with `fread`. +- Handling of gzipped responses with FNAME headers. + + +## [1.2.2] - 2016-01-22 + +### Added + +- Support for URIs without any authority. +- Support for HTTP 451 'Unavailable For Legal Reasons.' +- Support for using '0' as a filename. +- Support for including non-standard ports in Host headers. + + +## [1.2.1] - 2015-11-02 + +### Changes + +- Now supporting negative offsets when seeking to SEEK_END. + + +## [1.2.0] - 2015-08-15 + +### Changed + +- Body as `"0"` is now properly added to a response. +- Now allowing forward seeking in CachingStream. +- Now properly parsing HTTP requests that contain proxy targets in + `parse_request`. +- functions.php is now conditionally required. +- user-info is no longer dropped when resolving URIs. + + +## [1.1.0] - 2015-06-24 + +### Changed + +- URIs can now be relative. +- `multipart/form-data` headers are now overridden case-insensitively. +- URI paths no longer encode the following characters because they are allowed + in URIs: "(", ")", "*", "!", "'" +- A port is no longer added to a URI when the scheme is missing and no port is + present. + + +## 1.0.0 - 2015-05-19 + +Initial release. + +Currently unsupported: + +- `Psr\Http\Message\ServerRequestInterface` +- `Psr\Http\Message\UploadedFileInterface` + + + +[Unreleased]: https://github.com/guzzle/psr7/compare/1.6.0...HEAD +[1.6.0]: https://github.com/guzzle/psr7/compare/1.5.2...1.6.0 +[1.5.2]: https://github.com/guzzle/psr7/compare/1.5.1...1.5.2 +[1.5.1]: https://github.com/guzzle/psr7/compare/1.5.0...1.5.1 +[1.5.0]: https://github.com/guzzle/psr7/compare/1.4.2...1.5.0 +[1.4.2]: https://github.com/guzzle/psr7/compare/1.4.1...1.4.2 +[1.4.1]: https://github.com/guzzle/psr7/compare/1.4.0...1.4.1 +[1.4.0]: https://github.com/guzzle/psr7/compare/1.3.1...1.4.0 +[1.3.1]: https://github.com/guzzle/psr7/compare/1.3.0...1.3.1 +[1.3.0]: https://github.com/guzzle/psr7/compare/1.2.3...1.3.0 +[1.2.3]: https://github.com/guzzle/psr7/compare/1.2.2...1.2.3 +[1.2.2]: https://github.com/guzzle/psr7/compare/1.2.1...1.2.2 +[1.2.1]: https://github.com/guzzle/psr7/compare/1.2.0...1.2.1 +[1.2.0]: https://github.com/guzzle/psr7/compare/1.1.0...1.2.0 +[1.1.0]: https://github.com/guzzle/psr7/compare/1.0.0...1.1.0 diff --git a/vendor/guzzlehttp/psr7/LICENSE b/vendor/guzzlehttp/psr7/LICENSE new file mode 100644 index 0000000..581d95f --- /dev/null +++ b/vendor/guzzlehttp/psr7/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015 Michael Dowling, https://github.com/mtdowling + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/guzzlehttp/psr7/README.md b/vendor/guzzlehttp/psr7/README.md new file mode 100644 index 0000000..c60a6a3 --- /dev/null +++ b/vendor/guzzlehttp/psr7/README.md @@ -0,0 +1,745 @@ +# PSR-7 Message Implementation + +This repository contains a full [PSR-7](http://www.php-fig.org/psr/psr-7/) +message implementation, several stream decorators, and some helpful +functionality like query string parsing. + + +[![Build Status](https://travis-ci.org/guzzle/psr7.svg?branch=master)](https://travis-ci.org/guzzle/psr7) + + +# Stream implementation + +This package comes with a number of stream implementations and stream +decorators. + + +## AppendStream + +`GuzzleHttp\Psr7\AppendStream` + +Reads from multiple streams, one after the other. + +```php +use GuzzleHttp\Psr7; + +$a = Psr7\stream_for('abc, '); +$b = Psr7\stream_for('123.'); +$composed = new Psr7\AppendStream([$a, $b]); + +$composed->addStream(Psr7\stream_for(' Above all listen to me')); + +echo $composed; // abc, 123. Above all listen to me. +``` + + +## BufferStream + +`GuzzleHttp\Psr7\BufferStream` + +Provides a buffer stream that can be written to fill a buffer, and read +from to remove bytes from the buffer. + +This stream returns a "hwm" metadata value that tells upstream consumers +what the configured high water mark of the stream is, or the maximum +preferred size of the buffer. + +```php +use GuzzleHttp\Psr7; + +// When more than 1024 bytes are in the buffer, it will begin returning +// false to writes. This is an indication that writers should slow down. +$buffer = new Psr7\BufferStream(1024); +``` + + +## CachingStream + +The CachingStream is used to allow seeking over previously read bytes on +non-seekable streams. This can be useful when transferring a non-seekable +entity body fails due to needing to rewind the stream (for example, resulting +from a redirect). Data that is read from the remote stream will be buffered in +a PHP temp stream so that previously read bytes are cached first in memory, +then on disk. + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\stream_for(fopen('http://www.google.com', 'r')); +$stream = new Psr7\CachingStream($original); + +$stream->read(1024); +echo $stream->tell(); +// 1024 + +$stream->seek(0); +echo $stream->tell(); +// 0 +``` + + +## DroppingStream + +`GuzzleHttp\Psr7\DroppingStream` + +Stream decorator that begins dropping data once the size of the underlying +stream becomes too full. + +```php +use GuzzleHttp\Psr7; + +// Create an empty stream +$stream = Psr7\stream_for(); + +// Start dropping data when the stream has more than 10 bytes +$dropping = new Psr7\DroppingStream($stream, 10); + +$dropping->write('01234567890123456789'); +echo $stream; // 0123456789 +``` + + +## FnStream + +`GuzzleHttp\Psr7\FnStream` + +Compose stream implementations based on a hash of functions. + +Allows for easy testing and extension of a provided stream without needing +to create a concrete class for a simple extension point. + +```php + +use GuzzleHttp\Psr7; + +$stream = Psr7\stream_for('hi'); +$fnStream = Psr7\FnStream::decorate($stream, [ + 'rewind' => function () use ($stream) { + echo 'About to rewind - '; + $stream->rewind(); + echo 'rewound!'; + } +]); + +$fnStream->rewind(); +// Outputs: About to rewind - rewound! +``` + + +## InflateStream + +`GuzzleHttp\Psr7\InflateStream` + +Uses PHP's zlib.inflate filter to inflate deflate or gzipped content. + +This stream decorator skips the first 10 bytes of the given stream to remove +the gzip header, converts the provided stream to a PHP stream resource, +then appends the zlib.inflate filter. The stream is then converted back +to a Guzzle stream resource to be used as a Guzzle stream. + + +## LazyOpenStream + +`GuzzleHttp\Psr7\LazyOpenStream` + +Lazily reads or writes to a file that is opened only after an IO operation +take place on the stream. + +```php +use GuzzleHttp\Psr7; + +$stream = new Psr7\LazyOpenStream('/path/to/file', 'r'); +// The file has not yet been opened... + +echo $stream->read(10); +// The file is opened and read from only when needed. +``` + + +## LimitStream + +`GuzzleHttp\Psr7\LimitStream` + +LimitStream can be used to read a subset or slice of an existing stream object. +This can be useful for breaking a large file into smaller pieces to be sent in +chunks (e.g. Amazon S3's multipart upload API). + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\stream_for(fopen('/tmp/test.txt', 'r+')); +echo $original->getSize(); +// >>> 1048576 + +// Limit the size of the body to 1024 bytes and start reading from byte 2048 +$stream = new Psr7\LimitStream($original, 1024, 2048); +echo $stream->getSize(); +// >>> 1024 +echo $stream->tell(); +// >>> 0 +``` + + +## MultipartStream + +`GuzzleHttp\Psr7\MultipartStream` + +Stream that when read returns bytes for a streaming multipart or +multipart/form-data stream. + + +## NoSeekStream + +`GuzzleHttp\Psr7\NoSeekStream` + +NoSeekStream wraps a stream and does not allow seeking. + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\stream_for('foo'); +$noSeek = new Psr7\NoSeekStream($original); + +echo $noSeek->read(3); +// foo +var_export($noSeek->isSeekable()); +// false +$noSeek->seek(0); +var_export($noSeek->read(3)); +// NULL +``` + + +## PumpStream + +`GuzzleHttp\Psr7\PumpStream` + +Provides a read only stream that pumps data from a PHP callable. + +When invoking the provided callable, the PumpStream will pass the amount of +data requested to read to the callable. The callable can choose to ignore +this value and return fewer or more bytes than requested. Any extra data +returned by the provided callable is buffered internally until drained using +the read() function of the PumpStream. The provided callable MUST return +false when there is no more data to read. + + +## Implementing stream decorators + +Creating a stream decorator is very easy thanks to the +`GuzzleHttp\Psr7\StreamDecoratorTrait`. This trait provides methods that +implement `Psr\Http\Message\StreamInterface` by proxying to an underlying +stream. Just `use` the `StreamDecoratorTrait` and implement your custom +methods. + +For example, let's say we wanted to call a specific function each time the last +byte is read from a stream. This could be implemented by overriding the +`read()` method. + +```php +use Psr\Http\Message\StreamInterface; +use GuzzleHttp\Psr7\StreamDecoratorTrait; + +class EofCallbackStream implements StreamInterface +{ + use StreamDecoratorTrait; + + private $callback; + + public function __construct(StreamInterface $stream, callable $cb) + { + $this->stream = $stream; + $this->callback = $cb; + } + + public function read($length) + { + $result = $this->stream->read($length); + + // Invoke the callback when EOF is hit. + if ($this->eof()) { + call_user_func($this->callback); + } + + return $result; + } +} +``` + +This decorator could be added to any existing stream and used like so: + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\stream_for('foo'); + +$eofStream = new EofCallbackStream($original, function () { + echo 'EOF!'; +}); + +$eofStream->read(2); +$eofStream->read(1); +// echoes "EOF!" +$eofStream->seek(0); +$eofStream->read(3); +// echoes "EOF!" +``` + + +## PHP StreamWrapper + +You can use the `GuzzleHttp\Psr7\StreamWrapper` class if you need to use a +PSR-7 stream as a PHP stream resource. + +Use the `GuzzleHttp\Psr7\StreamWrapper::getResource()` method to create a PHP +stream from a PSR-7 stream. + +```php +use GuzzleHttp\Psr7\StreamWrapper; + +$stream = GuzzleHttp\Psr7\stream_for('hello!'); +$resource = StreamWrapper::getResource($stream); +echo fread($resource, 6); // outputs hello! +``` + + +# Function API + +There are various functions available under the `GuzzleHttp\Psr7` namespace. + + +## `function str` + +`function str(MessageInterface $message)` + +Returns the string representation of an HTTP message. + +```php +$request = new GuzzleHttp\Psr7\Request('GET', 'http://example.com'); +echo GuzzleHttp\Psr7\str($request); +``` + + +## `function uri_for` + +`function uri_for($uri)` + +This function accepts a string or `Psr\Http\Message\UriInterface` and returns a +UriInterface for the given value. If the value is already a `UriInterface`, it +is returned as-is. + +```php +$uri = GuzzleHttp\Psr7\uri_for('http://example.com'); +assert($uri === GuzzleHttp\Psr7\uri_for($uri)); +``` + + +## `function stream_for` + +`function stream_for($resource = '', array $options = [])` + +Create a new stream based on the input type. + +Options is an associative array that can contain the following keys: + +* - metadata: Array of custom metadata. +* - size: Size of the stream. + +This method accepts the following `$resource` types: + +- `Psr\Http\Message\StreamInterface`: Returns the value as-is. +- `string`: Creates a stream object that uses the given string as the contents. +- `resource`: Creates a stream object that wraps the given PHP stream resource. +- `Iterator`: If the provided value implements `Iterator`, then a read-only + stream object will be created that wraps the given iterable. Each time the + stream is read from, data from the iterator will fill a buffer and will be + continuously called until the buffer is equal to the requested read size. + Subsequent read calls will first read from the buffer and then call `next` + on the underlying iterator until it is exhausted. +- `object` with `__toString()`: If the object has the `__toString()` method, + the object will be cast to a string and then a stream will be returned that + uses the string value. +- `NULL`: When `null` is passed, an empty stream object is returned. +- `callable` When a callable is passed, a read-only stream object will be + created that invokes the given callable. The callable is invoked with the + number of suggested bytes to read. The callable can return any number of + bytes, but MUST return `false` when there is no more data to return. The + stream object that wraps the callable will invoke the callable until the + number of requested bytes are available. Any additional bytes will be + buffered and used in subsequent reads. + +```php +$stream = GuzzleHttp\Psr7\stream_for('foo'); +$stream = GuzzleHttp\Psr7\stream_for(fopen('/path/to/file', 'r')); + +$generator = function ($bytes) { + for ($i = 0; $i < $bytes; $i++) { + yield ' '; + } +} + +$stream = GuzzleHttp\Psr7\stream_for($generator(100)); +``` + + +## `function parse_header` + +`function parse_header($header)` + +Parse an array of header values containing ";" separated data into an array of +associative arrays representing the header key value pair data of the header. +When a parameter does not contain a value, but just contains a key, this +function will inject a key with a '' string value. + + +## `function normalize_header` + +`function normalize_header($header)` + +Converts an array of header values that may contain comma separated headers +into an array of headers with no comma separated values. + + +## `function modify_request` + +`function modify_request(RequestInterface $request, array $changes)` + +Clone and modify a request with the given changes. This method is useful for +reducing the number of clones needed to mutate a message. + +The changes can be one of: + +- method: (string) Changes the HTTP method. +- set_headers: (array) Sets the given headers. +- remove_headers: (array) Remove the given headers. +- body: (mixed) Sets the given body. +- uri: (UriInterface) Set the URI. +- query: (string) Set the query string value of the URI. +- version: (string) Set the protocol version. + + +## `function rewind_body` + +`function rewind_body(MessageInterface $message)` + +Attempts to rewind a message body and throws an exception on failure. The body +of the message will only be rewound if a call to `tell()` returns a value other +than `0`. + + +## `function try_fopen` + +`function try_fopen($filename, $mode)` + +Safely opens a PHP stream resource using a filename. + +When fopen fails, PHP normally raises a warning. This function adds an error +handler that checks for errors and throws an exception instead. + + +## `function copy_to_string` + +`function copy_to_string(StreamInterface $stream, $maxLen = -1)` + +Copy the contents of a stream into a string until the given number of bytes +have been read. + + +## `function copy_to_stream` + +`function copy_to_stream(StreamInterface $source, StreamInterface $dest, $maxLen = -1)` + +Copy the contents of a stream into another stream until the given number of +bytes have been read. + + +## `function hash` + +`function hash(StreamInterface $stream, $algo, $rawOutput = false)` + +Calculate a hash of a Stream. This method reads the entire stream to calculate +a rolling hash (based on PHP's hash_init functions). + + +## `function readline` + +`function readline(StreamInterface $stream, $maxLength = null)` + +Read a line from the stream up to the maximum allowed buffer length. + + +## `function parse_request` + +`function parse_request($message)` + +Parses a request message string into a request object. + + +## `function parse_response` + +`function parse_response($message)` + +Parses a response message string into a response object. + + +## `function parse_query` + +`function parse_query($str, $urlEncoding = true)` + +Parse a query string into an associative array. + +If multiple values are found for the same key, the value of that key value pair +will become an array. This function does not parse nested PHP style arrays into +an associative array (e.g., `foo[a]=1&foo[b]=2` will be parsed into +`['foo[a]' => '1', 'foo[b]' => '2']`). + + +## `function build_query` + +`function build_query(array $params, $encoding = PHP_QUERY_RFC3986)` + +Build a query string from an array of key value pairs. + +This function can use the return value of parse_query() to build a query string. +This function does not modify the provided keys when an array is encountered +(like http_build_query would). + + +## `function mimetype_from_filename` + +`function mimetype_from_filename($filename)` + +Determines the mimetype of a file by looking at its extension. + + +## `function mimetype_from_extension` + +`function mimetype_from_extension($extension)` + +Maps a file extensions to a mimetype. + + +# Additional URI Methods + +Aside from the standard `Psr\Http\Message\UriInterface` implementation in form of the `GuzzleHttp\Psr7\Uri` class, +this library also provides additional functionality when working with URIs as static methods. + +## URI Types + +An instance of `Psr\Http\Message\UriInterface` can either be an absolute URI or a relative reference. +An absolute URI has a scheme. A relative reference is used to express a URI relative to another URI, +the base URI. Relative references can be divided into several forms according to +[RFC 3986 Section 4.2](https://tools.ietf.org/html/rfc3986#section-4.2): + +- network-path references, e.g. `//example.com/path` +- absolute-path references, e.g. `/path` +- relative-path references, e.g. `subpath` + +The following methods can be used to identify the type of the URI. + +### `GuzzleHttp\Psr7\Uri::isAbsolute` + +`public static function isAbsolute(UriInterface $uri): bool` + +Whether the URI is absolute, i.e. it has a scheme. + +### `GuzzleHttp\Psr7\Uri::isNetworkPathReference` + +`public static function isNetworkPathReference(UriInterface $uri): bool` + +Whether the URI is a network-path reference. A relative reference that begins with two slash characters is +termed an network-path reference. + +### `GuzzleHttp\Psr7\Uri::isAbsolutePathReference` + +`public static function isAbsolutePathReference(UriInterface $uri): bool` + +Whether the URI is a absolute-path reference. A relative reference that begins with a single slash character is +termed an absolute-path reference. + +### `GuzzleHttp\Psr7\Uri::isRelativePathReference` + +`public static function isRelativePathReference(UriInterface $uri): bool` + +Whether the URI is a relative-path reference. A relative reference that does not begin with a slash character is +termed a relative-path reference. + +### `GuzzleHttp\Psr7\Uri::isSameDocumentReference` + +`public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool` + +Whether the URI is a same-document reference. A same-document reference refers to a URI that is, aside from its +fragment component, identical to the base URI. When no base URI is given, only an empty URI reference +(apart from its fragment) is considered a same-document reference. + +## URI Components + +Additional methods to work with URI components. + +### `GuzzleHttp\Psr7\Uri::isDefaultPort` + +`public static function isDefaultPort(UriInterface $uri): bool` + +Whether the URI has the default port of the current scheme. `Psr\Http\Message\UriInterface::getPort` may return null +or the standard port. This method can be used independently of the implementation. + +### `GuzzleHttp\Psr7\Uri::composeComponents` + +`public static function composeComponents($scheme, $authority, $path, $query, $fragment): string` + +Composes a URI reference string from its various components according to +[RFC 3986 Section 5.3](https://tools.ietf.org/html/rfc3986#section-5.3). Usually this method does not need to be called +manually but instead is used indirectly via `Psr\Http\Message\UriInterface::__toString`. + +### `GuzzleHttp\Psr7\Uri::fromParts` + +`public static function fromParts(array $parts): UriInterface` + +Creates a URI from a hash of [`parse_url`](http://php.net/manual/en/function.parse-url.php) components. + + +### `GuzzleHttp\Psr7\Uri::withQueryValue` + +`public static function withQueryValue(UriInterface $uri, $key, $value): UriInterface` + +Creates a new URI with a specific query string value. Any existing query string values that exactly match the +provided key are removed and replaced with the given key value pair. A value of null will set the query string +key without a value, e.g. "key" instead of "key=value". + +### `GuzzleHttp\Psr7\Uri::withQueryValues` + +`public static function withQueryValues(UriInterface $uri, array $keyValueArray): UriInterface` + +Creates a new URI with multiple query string values. It has the same behavior as `withQueryValue()` but for an +associative array of key => value. + +### `GuzzleHttp\Psr7\Uri::withoutQueryValue` + +`public static function withoutQueryValue(UriInterface $uri, $key): UriInterface` + +Creates a new URI with a specific query string value removed. Any existing query string values that exactly match the +provided key are removed. + +## Reference Resolution + +`GuzzleHttp\Psr7\UriResolver` provides methods to resolve a URI reference in the context of a base URI according +to [RFC 3986 Section 5](https://tools.ietf.org/html/rfc3986#section-5). This is for example also what web browsers +do when resolving a link in a website based on the current request URI. + +### `GuzzleHttp\Psr7\UriResolver::resolve` + +`public static function resolve(UriInterface $base, UriInterface $rel): UriInterface` + +Converts the relative URI into a new URI that is resolved against the base URI. + +### `GuzzleHttp\Psr7\UriResolver::removeDotSegments` + +`public static function removeDotSegments(string $path): string` + +Removes dot segments from a path and returns the new path according to +[RFC 3986 Section 5.2.4](https://tools.ietf.org/html/rfc3986#section-5.2.4). + +### `GuzzleHttp\Psr7\UriResolver::relativize` + +`public static function relativize(UriInterface $base, UriInterface $target): UriInterface` + +Returns the target URI as a relative reference from the base URI. This method is the counterpart to resolve(): + +```php +(string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) +``` + +One use-case is to use the current request URI as base URI and then generate relative links in your documents +to reduce the document size or offer self-contained downloadable document archives. + +```php +$base = new Uri('http://example.com/a/b/'); +echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. +echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. +echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. +echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. +``` + +## Normalization and Comparison + +`GuzzleHttp\Psr7\UriNormalizer` provides methods to normalize and compare URIs according to +[RFC 3986 Section 6](https://tools.ietf.org/html/rfc3986#section-6). + +### `GuzzleHttp\Psr7\UriNormalizer::normalize` + +`public static function normalize(UriInterface $uri, $flags = self::PRESERVING_NORMALIZATIONS): UriInterface` + +Returns a normalized URI. The scheme and host component are already normalized to lowercase per PSR-7 UriInterface. +This methods adds additional normalizations that can be configured with the `$flags` parameter which is a bitmask +of normalizations to apply. The following normalizations are available: + +- `UriNormalizer::PRESERVING_NORMALIZATIONS` + + Default normalizations which only include the ones that preserve semantics. + +- `UriNormalizer::CAPITALIZE_PERCENT_ENCODING` + + All letters within a percent-encoding triplet (e.g., "%3A") are case-insensitive, and should be capitalized. + + Example: `http://example.org/a%c2%b1b` → `http://example.org/a%C2%B1b` + +- `UriNormalizer::DECODE_UNRESERVED_CHARACTERS` + + Decodes percent-encoded octets of unreserved characters. For consistency, percent-encoded octets in the ranges of + ALPHA (%41–%5A and %61–%7A), DIGIT (%30–%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should + not be created by URI producers and, when found in a URI, should be decoded to their corresponding unreserved + characters by URI normalizers. + + Example: `http://example.org/%7Eusern%61me/` → `http://example.org/~username/` + +- `UriNormalizer::CONVERT_EMPTY_PATH` + + Converts the empty path to "/" for http and https URIs. + + Example: `http://example.org` → `http://example.org/` + +- `UriNormalizer::REMOVE_DEFAULT_HOST` + + Removes the default host of the given URI scheme from the URI. Only the "file" scheme defines the default host + "localhost". All of `file:/myfile`, `file:///myfile`, and `file://localhost/myfile` are equivalent according to + RFC 3986. + + Example: `file://localhost/myfile` → `file:///myfile` + +- `UriNormalizer::REMOVE_DEFAULT_PORT` + + Removes the default port of the given URI scheme from the URI. + + Example: `http://example.org:80/` → `http://example.org/` + +- `UriNormalizer::REMOVE_DOT_SEGMENTS` + + Removes unnecessary dot-segments. Dot-segments in relative-path references are not removed as it would + change the semantics of the URI reference. + + Example: `http://example.org/../a/b/../c/./d.html` → `http://example.org/a/c/d.html` + +- `UriNormalizer::REMOVE_DUPLICATE_SLASHES` + + Paths which include two or more adjacent slashes are converted to one. Webservers usually ignore duplicate slashes + and treat those URIs equivalent. But in theory those URIs do not need to be equivalent. So this normalization + may change the semantics. Encoded slashes (%2F) are not removed. + + Example: `http://example.org//foo///bar.html` → `http://example.org/foo/bar.html` + +- `UriNormalizer::SORT_QUERY_PARAMETERS` + + Sort query parameters with their values in alphabetical order. However, the order of parameters in a URI may be + significant (this is not defined by the standard). So this normalization is not safe and may change the semantics + of the URI. + + Example: `?lang=en&article=fred` → `?article=fred&lang=en` + +### `GuzzleHttp\Psr7\UriNormalizer::isEquivalent` + +`public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS): bool` + +Whether two URIs can be considered equivalent. Both URIs are normalized automatically before comparison with the given +`$normalizations` bitmask. The method also accepts relative URI references and returns true when they are equivalent. +This of course assumes they will be resolved against the same base URI. If this is not the case, determination of +equivalence or difference of relative references does not mean anything. diff --git a/vendor/guzzlehttp/psr7/composer.json b/vendor/guzzlehttp/psr7/composer.json new file mode 100644 index 0000000..168a055 --- /dev/null +++ b/vendor/guzzlehttp/psr7/composer.json @@ -0,0 +1,49 @@ +{ + "name": "guzzlehttp/psr7", + "type": "library", + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": ["request", "response", "message", "stream", "http", "uri", "url", "psr-7"], + "license": "MIT", + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8", + "ext-zlib": "*" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "suggest": { + "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": ["src/functions_include.php"] + }, + "autoload-dev": { + "psr-4": { + "GuzzleHttp\\Tests\\Psr7\\": "tests/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.6-dev" + } + } +} diff --git a/vendor/guzzlehttp/psr7/src/AppendStream.php b/vendor/guzzlehttp/psr7/src/AppendStream.php new file mode 100644 index 0000000..472a0d6 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/AppendStream.php @@ -0,0 +1,241 @@ +addStream($stream); + } + } + + public function __toString() + { + try { + $this->rewind(); + return $this->getContents(); + } catch (\Exception $e) { + return ''; + } + } + + /** + * Add a stream to the AppendStream + * + * @param StreamInterface $stream Stream to append. Must be readable. + * + * @throws \InvalidArgumentException if the stream is not readable + */ + public function addStream(StreamInterface $stream) + { + if (!$stream->isReadable()) { + throw new \InvalidArgumentException('Each stream must be readable'); + } + + // The stream is only seekable if all streams are seekable + if (!$stream->isSeekable()) { + $this->seekable = false; + } + + $this->streams[] = $stream; + } + + public function getContents() + { + return copy_to_string($this); + } + + /** + * Closes each attached stream. + * + * {@inheritdoc} + */ + public function close() + { + $this->pos = $this->current = 0; + $this->seekable = true; + + foreach ($this->streams as $stream) { + $stream->close(); + } + + $this->streams = []; + } + + /** + * Detaches each attached stream. + * + * Returns null as it's not clear which underlying stream resource to return. + * + * {@inheritdoc} + */ + public function detach() + { + $this->pos = $this->current = 0; + $this->seekable = true; + + foreach ($this->streams as $stream) { + $stream->detach(); + } + + $this->streams = []; + } + + public function tell() + { + return $this->pos; + } + + /** + * Tries to calculate the size by adding the size of each stream. + * + * If any of the streams do not return a valid number, then the size of the + * append stream cannot be determined and null is returned. + * + * {@inheritdoc} + */ + public function getSize() + { + $size = 0; + + foreach ($this->streams as $stream) { + $s = $stream->getSize(); + if ($s === null) { + return null; + } + $size += $s; + } + + return $size; + } + + public function eof() + { + return !$this->streams || + ($this->current >= count($this->streams) - 1 && + $this->streams[$this->current]->eof()); + } + + public function rewind() + { + $this->seek(0); + } + + /** + * Attempts to seek to the given position. Only supports SEEK_SET. + * + * {@inheritdoc} + */ + public function seek($offset, $whence = SEEK_SET) + { + if (!$this->seekable) { + throw new \RuntimeException('This AppendStream is not seekable'); + } elseif ($whence !== SEEK_SET) { + throw new \RuntimeException('The AppendStream can only seek with SEEK_SET'); + } + + $this->pos = $this->current = 0; + + // Rewind each stream + foreach ($this->streams as $i => $stream) { + try { + $stream->rewind(); + } catch (\Exception $e) { + throw new \RuntimeException('Unable to seek stream ' + . $i . ' of the AppendStream', 0, $e); + } + } + + // Seek to the actual position by reading from each stream + while ($this->pos < $offset && !$this->eof()) { + $result = $this->read(min(8096, $offset - $this->pos)); + if ($result === '') { + break; + } + } + } + + /** + * Reads from all of the appended streams until the length is met or EOF. + * + * {@inheritdoc} + */ + public function read($length) + { + $buffer = ''; + $total = count($this->streams) - 1; + $remaining = $length; + $progressToNext = false; + + while ($remaining > 0) { + + // Progress to the next stream if needed. + if ($progressToNext || $this->streams[$this->current]->eof()) { + $progressToNext = false; + if ($this->current === $total) { + break; + } + $this->current++; + } + + $result = $this->streams[$this->current]->read($remaining); + + // Using a loose comparison here to match on '', false, and null + if ($result == null) { + $progressToNext = true; + continue; + } + + $buffer .= $result; + $remaining = $length - strlen($buffer); + } + + $this->pos += strlen($buffer); + + return $buffer; + } + + public function isReadable() + { + return true; + } + + public function isWritable() + { + return false; + } + + public function isSeekable() + { + return $this->seekable; + } + + public function write($string) + { + throw new \RuntimeException('Cannot write to an AppendStream'); + } + + public function getMetadata($key = null) + { + return $key ? null : []; + } +} diff --git a/vendor/guzzlehttp/psr7/src/BufferStream.php b/vendor/guzzlehttp/psr7/src/BufferStream.php new file mode 100644 index 0000000..af4d4c2 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/BufferStream.php @@ -0,0 +1,137 @@ +hwm = $hwm; + } + + public function __toString() + { + return $this->getContents(); + } + + public function getContents() + { + $buffer = $this->buffer; + $this->buffer = ''; + + return $buffer; + } + + public function close() + { + $this->buffer = ''; + } + + public function detach() + { + $this->close(); + } + + public function getSize() + { + return strlen($this->buffer); + } + + public function isReadable() + { + return true; + } + + public function isWritable() + { + return true; + } + + public function isSeekable() + { + return false; + } + + public function rewind() + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET) + { + throw new \RuntimeException('Cannot seek a BufferStream'); + } + + public function eof() + { + return strlen($this->buffer) === 0; + } + + public function tell() + { + throw new \RuntimeException('Cannot determine the position of a BufferStream'); + } + + /** + * Reads data from the buffer. + */ + public function read($length) + { + $currentLength = strlen($this->buffer); + + if ($length >= $currentLength) { + // No need to slice the buffer because we don't have enough data. + $result = $this->buffer; + $this->buffer = ''; + } else { + // Slice up the result to provide a subset of the buffer. + $result = substr($this->buffer, 0, $length); + $this->buffer = substr($this->buffer, $length); + } + + return $result; + } + + /** + * Writes data to the buffer. + */ + public function write($string) + { + $this->buffer .= $string; + + // TODO: What should happen here? + if (strlen($this->buffer) >= $this->hwm) { + return false; + } + + return strlen($string); + } + + public function getMetadata($key = null) + { + if ($key == 'hwm') { + return $this->hwm; + } + + return $key ? null : []; + } +} diff --git a/vendor/guzzlehttp/psr7/src/CachingStream.php b/vendor/guzzlehttp/psr7/src/CachingStream.php new file mode 100644 index 0000000..ed68f08 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/CachingStream.php @@ -0,0 +1,138 @@ +remoteStream = $stream; + $this->stream = $target ?: new Stream(fopen('php://temp', 'r+')); + } + + public function getSize() + { + return max($this->stream->getSize(), $this->remoteStream->getSize()); + } + + public function rewind() + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET) + { + if ($whence == SEEK_SET) { + $byte = $offset; + } elseif ($whence == SEEK_CUR) { + $byte = $offset + $this->tell(); + } elseif ($whence == SEEK_END) { + $size = $this->remoteStream->getSize(); + if ($size === null) { + $size = $this->cacheEntireStream(); + } + $byte = $size + $offset; + } else { + throw new \InvalidArgumentException('Invalid whence'); + } + + $diff = $byte - $this->stream->getSize(); + + if ($diff > 0) { + // Read the remoteStream until we have read in at least the amount + // of bytes requested, or we reach the end of the file. + while ($diff > 0 && !$this->remoteStream->eof()) { + $this->read($diff); + $diff = $byte - $this->stream->getSize(); + } + } else { + // We can just do a normal seek since we've already seen this byte. + $this->stream->seek($byte); + } + } + + public function read($length) + { + // Perform a regular read on any previously read data from the buffer + $data = $this->stream->read($length); + $remaining = $length - strlen($data); + + // More data was requested so read from the remote stream + if ($remaining) { + // If data was written to the buffer in a position that would have + // been filled from the remote stream, then we must skip bytes on + // the remote stream to emulate overwriting bytes from that + // position. This mimics the behavior of other PHP stream wrappers. + $remoteData = $this->remoteStream->read( + $remaining + $this->skipReadBytes + ); + + if ($this->skipReadBytes) { + $len = strlen($remoteData); + $remoteData = substr($remoteData, $this->skipReadBytes); + $this->skipReadBytes = max(0, $this->skipReadBytes - $len); + } + + $data .= $remoteData; + $this->stream->write($remoteData); + } + + return $data; + } + + public function write($string) + { + // When appending to the end of the currently read stream, you'll want + // to skip bytes from being read from the remote stream to emulate + // other stream wrappers. Basically replacing bytes of data of a fixed + // length. + $overflow = (strlen($string) + $this->tell()) - $this->remoteStream->tell(); + if ($overflow > 0) { + $this->skipReadBytes += $overflow; + } + + return $this->stream->write($string); + } + + public function eof() + { + return $this->stream->eof() && $this->remoteStream->eof(); + } + + /** + * Close both the remote stream and buffer stream + */ + public function close() + { + $this->remoteStream->close() && $this->stream->close(); + } + + private function cacheEntireStream() + { + $target = new FnStream(['write' => 'strlen']); + copy_to_stream($this, $target); + + return $this->tell(); + } +} diff --git a/vendor/guzzlehttp/psr7/src/DroppingStream.php b/vendor/guzzlehttp/psr7/src/DroppingStream.php new file mode 100644 index 0000000..8935c80 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/DroppingStream.php @@ -0,0 +1,42 @@ +stream = $stream; + $this->maxLength = $maxLength; + } + + public function write($string) + { + $diff = $this->maxLength - $this->stream->getSize(); + + // Begin returning 0 when the underlying stream is too large. + if ($diff <= 0) { + return 0; + } + + // Write the stream or a subset of the stream if needed. + if (strlen($string) < $diff) { + return $this->stream->write($string); + } + + return $this->stream->write(substr($string, 0, $diff)); + } +} diff --git a/vendor/guzzlehttp/psr7/src/FnStream.php b/vendor/guzzlehttp/psr7/src/FnStream.php new file mode 100644 index 0000000..73daea6 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/FnStream.php @@ -0,0 +1,158 @@ +methods = $methods; + + // Create the functions on the class + foreach ($methods as $name => $fn) { + $this->{'_fn_' . $name} = $fn; + } + } + + /** + * Lazily determine which methods are not implemented. + * @throws \BadMethodCallException + */ + public function __get($name) + { + throw new \BadMethodCallException(str_replace('_fn_', '', $name) + . '() is not implemented in the FnStream'); + } + + /** + * The close method is called on the underlying stream only if possible. + */ + public function __destruct() + { + if (isset($this->_fn_close)) { + call_user_func($this->_fn_close); + } + } + + /** + * An unserialize would allow the __destruct to run when the unserialized value goes out of scope. + * @throws \LogicException + */ + public function __wakeup() + { + throw new \LogicException('FnStream should never be unserialized'); + } + + /** + * Adds custom functionality to an underlying stream by intercepting + * specific method calls. + * + * @param StreamInterface $stream Stream to decorate + * @param array $methods Hash of method name to a closure + * + * @return FnStream + */ + public static function decorate(StreamInterface $stream, array $methods) + { + // If any of the required methods were not provided, then simply + // proxy to the decorated stream. + foreach (array_diff(self::$slots, array_keys($methods)) as $diff) { + $methods[$diff] = [$stream, $diff]; + } + + return new self($methods); + } + + public function __toString() + { + return call_user_func($this->_fn___toString); + } + + public function close() + { + return call_user_func($this->_fn_close); + } + + public function detach() + { + return call_user_func($this->_fn_detach); + } + + public function getSize() + { + return call_user_func($this->_fn_getSize); + } + + public function tell() + { + return call_user_func($this->_fn_tell); + } + + public function eof() + { + return call_user_func($this->_fn_eof); + } + + public function isSeekable() + { + return call_user_func($this->_fn_isSeekable); + } + + public function rewind() + { + call_user_func($this->_fn_rewind); + } + + public function seek($offset, $whence = SEEK_SET) + { + call_user_func($this->_fn_seek, $offset, $whence); + } + + public function isWritable() + { + return call_user_func($this->_fn_isWritable); + } + + public function write($string) + { + return call_user_func($this->_fn_write, $string); + } + + public function isReadable() + { + return call_user_func($this->_fn_isReadable); + } + + public function read($length) + { + return call_user_func($this->_fn_read, $length); + } + + public function getContents() + { + return call_user_func($this->_fn_getContents); + } + + public function getMetadata($key = null) + { + return call_user_func($this->_fn_getMetadata, $key); + } +} diff --git a/vendor/guzzlehttp/psr7/src/InflateStream.php b/vendor/guzzlehttp/psr7/src/InflateStream.php new file mode 100644 index 0000000..5e4f602 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/InflateStream.php @@ -0,0 +1,52 @@ +read(10); + $filenameHeaderLength = $this->getLengthOfPossibleFilenameHeader($stream, $header); + // Skip the header, that is 10 + length of filename + 1 (nil) bytes + $stream = new LimitStream($stream, -1, 10 + $filenameHeaderLength); + $resource = StreamWrapper::getResource($stream); + stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ); + $this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource)); + } + + /** + * @param StreamInterface $stream + * @param $header + * @return int + */ + private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header) + { + $filename_header_length = 0; + + if (substr(bin2hex($header), 6, 2) === '08') { + // we have a filename, read until nil + $filename_header_length = 1; + while ($stream->read(1) !== chr(0)) { + $filename_header_length++; + } + } + + return $filename_header_length; + } +} diff --git a/vendor/guzzlehttp/psr7/src/LazyOpenStream.php b/vendor/guzzlehttp/psr7/src/LazyOpenStream.php new file mode 100644 index 0000000..02cec3a --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/LazyOpenStream.php @@ -0,0 +1,39 @@ +filename = $filename; + $this->mode = $mode; + } + + /** + * Creates the underlying stream lazily when required. + * + * @return StreamInterface + */ + protected function createStream() + { + return stream_for(try_fopen($this->filename, $this->mode)); + } +} diff --git a/vendor/guzzlehttp/psr7/src/LimitStream.php b/vendor/guzzlehttp/psr7/src/LimitStream.php new file mode 100644 index 0000000..e4f239e --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/LimitStream.php @@ -0,0 +1,155 @@ +stream = $stream; + $this->setLimit($limit); + $this->setOffset($offset); + } + + public function eof() + { + // Always return true if the underlying stream is EOF + if ($this->stream->eof()) { + return true; + } + + // No limit and the underlying stream is not at EOF + if ($this->limit == -1) { + return false; + } + + return $this->stream->tell() >= $this->offset + $this->limit; + } + + /** + * Returns the size of the limited subset of data + * {@inheritdoc} + */ + public function getSize() + { + if (null === ($length = $this->stream->getSize())) { + return null; + } elseif ($this->limit == -1) { + return $length - $this->offset; + } else { + return min($this->limit, $length - $this->offset); + } + } + + /** + * Allow for a bounded seek on the read limited stream + * {@inheritdoc} + */ + public function seek($offset, $whence = SEEK_SET) + { + if ($whence !== SEEK_SET || $offset < 0) { + throw new \RuntimeException(sprintf( + 'Cannot seek to offset %s with whence %s', + $offset, + $whence + )); + } + + $offset += $this->offset; + + if ($this->limit !== -1) { + if ($offset > $this->offset + $this->limit) { + $offset = $this->offset + $this->limit; + } + } + + $this->stream->seek($offset); + } + + /** + * Give a relative tell() + * {@inheritdoc} + */ + public function tell() + { + return $this->stream->tell() - $this->offset; + } + + /** + * Set the offset to start limiting from + * + * @param int $offset Offset to seek to and begin byte limiting from + * + * @throws \RuntimeException if the stream cannot be seeked. + */ + public function setOffset($offset) + { + $current = $this->stream->tell(); + + if ($current !== $offset) { + // If the stream cannot seek to the offset position, then read to it + if ($this->stream->isSeekable()) { + $this->stream->seek($offset); + } elseif ($current > $offset) { + throw new \RuntimeException("Could not seek to stream offset $offset"); + } else { + $this->stream->read($offset - $current); + } + } + + $this->offset = $offset; + } + + /** + * Set the limit of bytes that the decorator allows to be read from the + * stream. + * + * @param int $limit Number of bytes to allow to be read from the stream. + * Use -1 for no limit. + */ + public function setLimit($limit) + { + $this->limit = $limit; + } + + public function read($length) + { + if ($this->limit == -1) { + return $this->stream->read($length); + } + + // Check if the current position is less than the total allowed + // bytes + original offset + $remaining = ($this->offset + $this->limit) - $this->stream->tell(); + if ($remaining > 0) { + // Only return the amount of requested data, ensuring that the byte + // limit is not exceeded + return $this->stream->read(min($remaining, $length)); + } + + return ''; + } +} diff --git a/vendor/guzzlehttp/psr7/src/MessageTrait.php b/vendor/guzzlehttp/psr7/src/MessageTrait.php new file mode 100644 index 0000000..a7966d1 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/MessageTrait.php @@ -0,0 +1,213 @@ + array of values */ + private $headers = []; + + /** @var array Map of lowercase header name => original name at registration */ + private $headerNames = []; + + /** @var string */ + private $protocol = '1.1'; + + /** @var StreamInterface */ + private $stream; + + public function getProtocolVersion() + { + return $this->protocol; + } + + public function withProtocolVersion($version) + { + if ($this->protocol === $version) { + return $this; + } + + $new = clone $this; + $new->protocol = $version; + return $new; + } + + public function getHeaders() + { + return $this->headers; + } + + public function hasHeader($header) + { + return isset($this->headerNames[strtolower($header)]); + } + + public function getHeader($header) + { + $header = strtolower($header); + + if (!isset($this->headerNames[$header])) { + return []; + } + + $header = $this->headerNames[$header]; + + return $this->headers[$header]; + } + + public function getHeaderLine($header) + { + return implode(', ', $this->getHeader($header)); + } + + public function withHeader($header, $value) + { + $this->assertHeader($header); + $value = $this->normalizeHeaderValue($value); + $normalized = strtolower($header); + + $new = clone $this; + if (isset($new->headerNames[$normalized])) { + unset($new->headers[$new->headerNames[$normalized]]); + } + $new->headerNames[$normalized] = $header; + $new->headers[$header] = $value; + + return $new; + } + + public function withAddedHeader($header, $value) + { + $this->assertHeader($header); + $value = $this->normalizeHeaderValue($value); + $normalized = strtolower($header); + + $new = clone $this; + if (isset($new->headerNames[$normalized])) { + $header = $this->headerNames[$normalized]; + $new->headers[$header] = array_merge($this->headers[$header], $value); + } else { + $new->headerNames[$normalized] = $header; + $new->headers[$header] = $value; + } + + return $new; + } + + public function withoutHeader($header) + { + $normalized = strtolower($header); + + if (!isset($this->headerNames[$normalized])) { + return $this; + } + + $header = $this->headerNames[$normalized]; + + $new = clone $this; + unset($new->headers[$header], $new->headerNames[$normalized]); + + return $new; + } + + public function getBody() + { + if (!$this->stream) { + $this->stream = stream_for(''); + } + + return $this->stream; + } + + public function withBody(StreamInterface $body) + { + if ($body === $this->stream) { + return $this; + } + + $new = clone $this; + $new->stream = $body; + return $new; + } + + private function setHeaders(array $headers) + { + $this->headerNames = $this->headers = []; + foreach ($headers as $header => $value) { + if (is_int($header)) { + // Numeric array keys are converted to int by PHP but having a header name '123' is not forbidden by the spec + // and also allowed in withHeader(). So we need to cast it to string again for the following assertion to pass. + $header = (string) $header; + } + $this->assertHeader($header); + $value = $this->normalizeHeaderValue($value); + $normalized = strtolower($header); + if (isset($this->headerNames[$normalized])) { + $header = $this->headerNames[$normalized]; + $this->headers[$header] = array_merge($this->headers[$header], $value); + } else { + $this->headerNames[$normalized] = $header; + $this->headers[$header] = $value; + } + } + } + + private function normalizeHeaderValue($value) + { + if (!is_array($value)) { + return $this->trimHeaderValues([$value]); + } + + if (count($value) === 0) { + throw new \InvalidArgumentException('Header value can not be an empty array.'); + } + + return $this->trimHeaderValues($value); + } + + /** + * Trims whitespace from the header values. + * + * Spaces and tabs ought to be excluded by parsers when extracting the field value from a header field. + * + * header-field = field-name ":" OWS field-value OWS + * OWS = *( SP / HTAB ) + * + * @param string[] $values Header values + * + * @return string[] Trimmed header values + * + * @see https://tools.ietf.org/html/rfc7230#section-3.2.4 + */ + private function trimHeaderValues(array $values) + { + return array_map(function ($value) { + if (!is_scalar($value) && null !== $value) { + throw new \InvalidArgumentException(sprintf( + 'Header value must be scalar or null but %s provided.', + is_object($value) ? get_class($value) : gettype($value) + )); + } + + return trim((string) $value, " \t"); + }, $values); + } + + private function assertHeader($header) + { + if (!is_string($header)) { + throw new \InvalidArgumentException(sprintf( + 'Header name must be a string but %s provided.', + is_object($header) ? get_class($header) : gettype($header) + )); + } + + if ($header === '') { + throw new \InvalidArgumentException('Header name can not be empty.'); + } + } +} diff --git a/vendor/guzzlehttp/psr7/src/MultipartStream.php b/vendor/guzzlehttp/psr7/src/MultipartStream.php new file mode 100644 index 0000000..c0fd584 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/MultipartStream.php @@ -0,0 +1,153 @@ +boundary = $boundary ?: sha1(uniqid('', true)); + $this->stream = $this->createStream($elements); + } + + /** + * Get the boundary + * + * @return string + */ + public function getBoundary() + { + return $this->boundary; + } + + public function isWritable() + { + return false; + } + + /** + * Get the headers needed before transferring the content of a POST file + */ + private function getHeaders(array $headers) + { + $str = ''; + foreach ($headers as $key => $value) { + $str .= "{$key}: {$value}\r\n"; + } + + return "--{$this->boundary}\r\n" . trim($str) . "\r\n\r\n"; + } + + /** + * Create the aggregate stream that will be used to upload the POST data + */ + protected function createStream(array $elements) + { + $stream = new AppendStream(); + + foreach ($elements as $element) { + $this->addElement($stream, $element); + } + + // Add the trailing boundary with CRLF + $stream->addStream(stream_for("--{$this->boundary}--\r\n")); + + return $stream; + } + + private function addElement(AppendStream $stream, array $element) + { + foreach (['contents', 'name'] as $key) { + if (!array_key_exists($key, $element)) { + throw new \InvalidArgumentException("A '{$key}' key is required"); + } + } + + $element['contents'] = stream_for($element['contents']); + + if (empty($element['filename'])) { + $uri = $element['contents']->getMetadata('uri'); + if (substr($uri, 0, 6) !== 'php://') { + $element['filename'] = $uri; + } + } + + list($body, $headers) = $this->createElement( + $element['name'], + $element['contents'], + isset($element['filename']) ? $element['filename'] : null, + isset($element['headers']) ? $element['headers'] : [] + ); + + $stream->addStream(stream_for($this->getHeaders($headers))); + $stream->addStream($body); + $stream->addStream(stream_for("\r\n")); + } + + /** + * @return array + */ + private function createElement($name, StreamInterface $stream, $filename, array $headers) + { + // Set a default content-disposition header if one was no provided + $disposition = $this->getHeader($headers, 'content-disposition'); + if (!$disposition) { + $headers['Content-Disposition'] = ($filename === '0' || $filename) + ? sprintf('form-data; name="%s"; filename="%s"', + $name, + basename($filename)) + : "form-data; name=\"{$name}\""; + } + + // Set a default content-length header if one was no provided + $length = $this->getHeader($headers, 'content-length'); + if (!$length) { + if ($length = $stream->getSize()) { + $headers['Content-Length'] = (string) $length; + } + } + + // Set a default Content-Type if one was not supplied + $type = $this->getHeader($headers, 'content-type'); + if (!$type && ($filename === '0' || $filename)) { + if ($type = mimetype_from_filename($filename)) { + $headers['Content-Type'] = $type; + } + } + + return [$stream, $headers]; + } + + private function getHeader(array $headers, $key) + { + $lowercaseHeader = strtolower($key); + foreach ($headers as $k => $v) { + if (strtolower($k) === $lowercaseHeader) { + return $v; + } + } + + return null; + } +} diff --git a/vendor/guzzlehttp/psr7/src/NoSeekStream.php b/vendor/guzzlehttp/psr7/src/NoSeekStream.php new file mode 100644 index 0000000..2332218 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/NoSeekStream.php @@ -0,0 +1,22 @@ +source = $source; + $this->size = isset($options['size']) ? $options['size'] : null; + $this->metadata = isset($options['metadata']) ? $options['metadata'] : []; + $this->buffer = new BufferStream(); + } + + public function __toString() + { + try { + return copy_to_string($this); + } catch (\Exception $e) { + return ''; + } + } + + public function close() + { + $this->detach(); + } + + public function detach() + { + $this->tellPos = false; + $this->source = null; + } + + public function getSize() + { + return $this->size; + } + + public function tell() + { + return $this->tellPos; + } + + public function eof() + { + return !$this->source; + } + + public function isSeekable() + { + return false; + } + + public function rewind() + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET) + { + throw new \RuntimeException('Cannot seek a PumpStream'); + } + + public function isWritable() + { + return false; + } + + public function write($string) + { + throw new \RuntimeException('Cannot write to a PumpStream'); + } + + public function isReadable() + { + return true; + } + + public function read($length) + { + $data = $this->buffer->read($length); + $readLen = strlen($data); + $this->tellPos += $readLen; + $remaining = $length - $readLen; + + if ($remaining) { + $this->pump($remaining); + $data .= $this->buffer->read($remaining); + $this->tellPos += strlen($data) - $readLen; + } + + return $data; + } + + public function getContents() + { + $result = ''; + while (!$this->eof()) { + $result .= $this->read(1000000); + } + + return $result; + } + + public function getMetadata($key = null) + { + if (!$key) { + return $this->metadata; + } + + return isset($this->metadata[$key]) ? $this->metadata[$key] : null; + } + + private function pump($length) + { + if ($this->source) { + do { + $data = call_user_func($this->source, $length); + if ($data === false || $data === null) { + $this->source = null; + return; + } + $this->buffer->write($data); + $length -= strlen($data); + } while ($length > 0); + } + } +} diff --git a/vendor/guzzlehttp/psr7/src/Request.php b/vendor/guzzlehttp/psr7/src/Request.php new file mode 100644 index 0000000..59f337d --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Request.php @@ -0,0 +1,151 @@ +assertMethod($method); + if (!($uri instanceof UriInterface)) { + $uri = new Uri($uri); + } + + $this->method = strtoupper($method); + $this->uri = $uri; + $this->setHeaders($headers); + $this->protocol = $version; + + if (!isset($this->headerNames['host'])) { + $this->updateHostFromUri(); + } + + if ($body !== '' && $body !== null) { + $this->stream = stream_for($body); + } + } + + public function getRequestTarget() + { + if ($this->requestTarget !== null) { + return $this->requestTarget; + } + + $target = $this->uri->getPath(); + if ($target == '') { + $target = '/'; + } + if ($this->uri->getQuery() != '') { + $target .= '?' . $this->uri->getQuery(); + } + + return $target; + } + + public function withRequestTarget($requestTarget) + { + if (preg_match('#\s#', $requestTarget)) { + throw new InvalidArgumentException( + 'Invalid request target provided; cannot contain whitespace' + ); + } + + $new = clone $this; + $new->requestTarget = $requestTarget; + return $new; + } + + public function getMethod() + { + return $this->method; + } + + public function withMethod($method) + { + $this->assertMethod($method); + $new = clone $this; + $new->method = strtoupper($method); + return $new; + } + + public function getUri() + { + return $this->uri; + } + + public function withUri(UriInterface $uri, $preserveHost = false) + { + if ($uri === $this->uri) { + return $this; + } + + $new = clone $this; + $new->uri = $uri; + + if (!$preserveHost || !isset($this->headerNames['host'])) { + $new->updateHostFromUri(); + } + + return $new; + } + + private function updateHostFromUri() + { + $host = $this->uri->getHost(); + + if ($host == '') { + return; + } + + if (($port = $this->uri->getPort()) !== null) { + $host .= ':' . $port; + } + + if (isset($this->headerNames['host'])) { + $header = $this->headerNames['host']; + } else { + $header = 'Host'; + $this->headerNames['host'] = 'Host'; + } + // Ensure Host is the first header. + // See: http://tools.ietf.org/html/rfc7230#section-5.4 + $this->headers = [$header => [$host]] + $this->headers; + } + + private function assertMethod($method) + { + if (!is_string($method) || $method === '') { + throw new \InvalidArgumentException('Method must be a non-empty string.'); + } + } +} diff --git a/vendor/guzzlehttp/psr7/src/Response.php b/vendor/guzzlehttp/psr7/src/Response.php new file mode 100644 index 0000000..e7e04d8 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Response.php @@ -0,0 +1,154 @@ + 'Continue', + 101 => 'Switching Protocols', + 102 => 'Processing', + 200 => 'OK', + 201 => 'Created', + 202 => 'Accepted', + 203 => 'Non-Authoritative Information', + 204 => 'No Content', + 205 => 'Reset Content', + 206 => 'Partial Content', + 207 => 'Multi-status', + 208 => 'Already Reported', + 300 => 'Multiple Choices', + 301 => 'Moved Permanently', + 302 => 'Found', + 303 => 'See Other', + 304 => 'Not Modified', + 305 => 'Use Proxy', + 306 => 'Switch Proxy', + 307 => 'Temporary Redirect', + 400 => 'Bad Request', + 401 => 'Unauthorized', + 402 => 'Payment Required', + 403 => 'Forbidden', + 404 => 'Not Found', + 405 => 'Method Not Allowed', + 406 => 'Not Acceptable', + 407 => 'Proxy Authentication Required', + 408 => 'Request Time-out', + 409 => 'Conflict', + 410 => 'Gone', + 411 => 'Length Required', + 412 => 'Precondition Failed', + 413 => 'Request Entity Too Large', + 414 => 'Request-URI Too Large', + 415 => 'Unsupported Media Type', + 416 => 'Requested range not satisfiable', + 417 => 'Expectation Failed', + 418 => 'I\'m a teapot', + 422 => 'Unprocessable Entity', + 423 => 'Locked', + 424 => 'Failed Dependency', + 425 => 'Unordered Collection', + 426 => 'Upgrade Required', + 428 => 'Precondition Required', + 429 => 'Too Many Requests', + 431 => 'Request Header Fields Too Large', + 451 => 'Unavailable For Legal Reasons', + 500 => 'Internal Server Error', + 501 => 'Not Implemented', + 502 => 'Bad Gateway', + 503 => 'Service Unavailable', + 504 => 'Gateway Time-out', + 505 => 'HTTP Version not supported', + 506 => 'Variant Also Negotiates', + 507 => 'Insufficient Storage', + 508 => 'Loop Detected', + 511 => 'Network Authentication Required', + ]; + + /** @var string */ + private $reasonPhrase = ''; + + /** @var int */ + private $statusCode = 200; + + /** + * @param int $status Status code + * @param array $headers Response headers + * @param string|null|resource|StreamInterface $body Response body + * @param string $version Protocol version + * @param string|null $reason Reason phrase (when empty a default will be used based on the status code) + */ + public function __construct( + $status = 200, + array $headers = [], + $body = null, + $version = '1.1', + $reason = null + ) { + $this->assertStatusCodeIsInteger($status); + $status = (int) $status; + $this->assertStatusCodeRange($status); + + $this->statusCode = $status; + + if ($body !== '' && $body !== null) { + $this->stream = stream_for($body); + } + + $this->setHeaders($headers); + if ($reason == '' && isset(self::$phrases[$this->statusCode])) { + $this->reasonPhrase = self::$phrases[$this->statusCode]; + } else { + $this->reasonPhrase = (string) $reason; + } + + $this->protocol = $version; + } + + public function getStatusCode() + { + return $this->statusCode; + } + + public function getReasonPhrase() + { + return $this->reasonPhrase; + } + + public function withStatus($code, $reasonPhrase = '') + { + $this->assertStatusCodeIsInteger($code); + $code = (int) $code; + $this->assertStatusCodeRange($code); + + $new = clone $this; + $new->statusCode = $code; + if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) { + $reasonPhrase = self::$phrases[$new->statusCode]; + } + $new->reasonPhrase = $reasonPhrase; + return $new; + } + + private function assertStatusCodeIsInteger($statusCode) + { + if (filter_var($statusCode, FILTER_VALIDATE_INT) === false) { + throw new \InvalidArgumentException('Status code must be an integer value.'); + } + } + + private function assertStatusCodeRange($statusCode) + { + if ($statusCode < 100 || $statusCode >= 600) { + throw new \InvalidArgumentException('Status code must be an integer value between 1xx and 5xx.'); + } + } +} diff --git a/vendor/guzzlehttp/psr7/src/Rfc7230.php b/vendor/guzzlehttp/psr7/src/Rfc7230.php new file mode 100644 index 0000000..505e474 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Rfc7230.php @@ -0,0 +1,18 @@ +@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m"; + const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)"; +} diff --git a/vendor/guzzlehttp/psr7/src/ServerRequest.php b/vendor/guzzlehttp/psr7/src/ServerRequest.php new file mode 100644 index 0000000..1a09a6c --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/ServerRequest.php @@ -0,0 +1,376 @@ +serverParams = $serverParams; + + parent::__construct($method, $uri, $headers, $body, $version); + } + + /** + * Return an UploadedFile instance array. + * + * @param array $files A array which respect $_FILES structure + * @throws InvalidArgumentException for unrecognized values + * @return array + */ + public static function normalizeFiles(array $files) + { + $normalized = []; + + foreach ($files as $key => $value) { + if ($value instanceof UploadedFileInterface) { + $normalized[$key] = $value; + } elseif (is_array($value) && isset($value['tmp_name'])) { + $normalized[$key] = self::createUploadedFileFromSpec($value); + } elseif (is_array($value)) { + $normalized[$key] = self::normalizeFiles($value); + continue; + } else { + throw new InvalidArgumentException('Invalid value in files specification'); + } + } + + return $normalized; + } + + /** + * Create and return an UploadedFile instance from a $_FILES specification. + * + * If the specification represents an array of values, this method will + * delegate to normalizeNestedFileSpec() and return that return value. + * + * @param array $value $_FILES struct + * @return array|UploadedFileInterface + */ + private static function createUploadedFileFromSpec(array $value) + { + if (is_array($value['tmp_name'])) { + return self::normalizeNestedFileSpec($value); + } + + return new UploadedFile( + $value['tmp_name'], + (int) $value['size'], + (int) $value['error'], + $value['name'], + $value['type'] + ); + } + + /** + * Normalize an array of file specifications. + * + * Loops through all nested files and returns a normalized array of + * UploadedFileInterface instances. + * + * @param array $files + * @return UploadedFileInterface[] + */ + private static function normalizeNestedFileSpec(array $files = []) + { + $normalizedFiles = []; + + foreach (array_keys($files['tmp_name']) as $key) { + $spec = [ + 'tmp_name' => $files['tmp_name'][$key], + 'size' => $files['size'][$key], + 'error' => $files['error'][$key], + 'name' => $files['name'][$key], + 'type' => $files['type'][$key], + ]; + $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec); + } + + return $normalizedFiles; + } + + /** + * Return a ServerRequest populated with superglobals: + * $_GET + * $_POST + * $_COOKIE + * $_FILES + * $_SERVER + * + * @return ServerRequestInterface + */ + public static function fromGlobals() + { + $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET'; + $headers = getallheaders(); + $uri = self::getUriFromGlobals(); + $body = new CachingStream(new LazyOpenStream('php://input', 'r+')); + $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1'; + + $serverRequest = new ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER); + + return $serverRequest + ->withCookieParams($_COOKIE) + ->withQueryParams($_GET) + ->withParsedBody($_POST) + ->withUploadedFiles(self::normalizeFiles($_FILES)); + } + + private static function extractHostAndPortFromAuthority($authority) + { + $uri = 'http://'.$authority; + $parts = parse_url($uri); + if (false === $parts) { + return [null, null]; + } + + $host = isset($parts['host']) ? $parts['host'] : null; + $port = isset($parts['port']) ? $parts['port'] : null; + + return [$host, $port]; + } + + /** + * Get a Uri populated with values from $_SERVER. + * + * @return UriInterface + */ + public static function getUriFromGlobals() + { + $uri = new Uri(''); + + $uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http'); + + $hasPort = false; + if (isset($_SERVER['HTTP_HOST'])) { + list($host, $port) = self::extractHostAndPortFromAuthority($_SERVER['HTTP_HOST']); + if ($host !== null) { + $uri = $uri->withHost($host); + } + + if ($port !== null) { + $hasPort = true; + $uri = $uri->withPort($port); + } + } elseif (isset($_SERVER['SERVER_NAME'])) { + $uri = $uri->withHost($_SERVER['SERVER_NAME']); + } elseif (isset($_SERVER['SERVER_ADDR'])) { + $uri = $uri->withHost($_SERVER['SERVER_ADDR']); + } + + if (!$hasPort && isset($_SERVER['SERVER_PORT'])) { + $uri = $uri->withPort($_SERVER['SERVER_PORT']); + } + + $hasQuery = false; + if (isset($_SERVER['REQUEST_URI'])) { + $requestUriParts = explode('?', $_SERVER['REQUEST_URI'], 2); + $uri = $uri->withPath($requestUriParts[0]); + if (isset($requestUriParts[1])) { + $hasQuery = true; + $uri = $uri->withQuery($requestUriParts[1]); + } + } + + if (!$hasQuery && isset($_SERVER['QUERY_STRING'])) { + $uri = $uri->withQuery($_SERVER['QUERY_STRING']); + } + + return $uri; + } + + + /** + * {@inheritdoc} + */ + public function getServerParams() + { + return $this->serverParams; + } + + /** + * {@inheritdoc} + */ + public function getUploadedFiles() + { + return $this->uploadedFiles; + } + + /** + * {@inheritdoc} + */ + public function withUploadedFiles(array $uploadedFiles) + { + $new = clone $this; + $new->uploadedFiles = $uploadedFiles; + + return $new; + } + + /** + * {@inheritdoc} + */ + public function getCookieParams() + { + return $this->cookieParams; + } + + /** + * {@inheritdoc} + */ + public function withCookieParams(array $cookies) + { + $new = clone $this; + $new->cookieParams = $cookies; + + return $new; + } + + /** + * {@inheritdoc} + */ + public function getQueryParams() + { + return $this->queryParams; + } + + /** + * {@inheritdoc} + */ + public function withQueryParams(array $query) + { + $new = clone $this; + $new->queryParams = $query; + + return $new; + } + + /** + * {@inheritdoc} + */ + public function getParsedBody() + { + return $this->parsedBody; + } + + /** + * {@inheritdoc} + */ + public function withParsedBody($data) + { + $new = clone $this; + $new->parsedBody = $data; + + return $new; + } + + /** + * {@inheritdoc} + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * {@inheritdoc} + */ + public function getAttribute($attribute, $default = null) + { + if (false === array_key_exists($attribute, $this->attributes)) { + return $default; + } + + return $this->attributes[$attribute]; + } + + /** + * {@inheritdoc} + */ + public function withAttribute($attribute, $value) + { + $new = clone $this; + $new->attributes[$attribute] = $value; + + return $new; + } + + /** + * {@inheritdoc} + */ + public function withoutAttribute($attribute) + { + if (false === array_key_exists($attribute, $this->attributes)) { + return $this; + } + + $new = clone $this; + unset($new->attributes[$attribute]); + + return $new; + } +} diff --git a/vendor/guzzlehttp/psr7/src/Stream.php b/vendor/guzzlehttp/psr7/src/Stream.php new file mode 100644 index 0000000..d9e7409 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Stream.php @@ -0,0 +1,267 @@ +size = $options['size']; + } + + $this->customMetadata = isset($options['metadata']) + ? $options['metadata'] + : []; + + $this->stream = $stream; + $meta = stream_get_meta_data($this->stream); + $this->seekable = $meta['seekable']; + $this->readable = (bool)preg_match(self::READABLE_MODES, $meta['mode']); + $this->writable = (bool)preg_match(self::WRITABLE_MODES, $meta['mode']); + $this->uri = $this->getMetadata('uri'); + } + + /** + * Closes the stream when the destructed + */ + public function __destruct() + { + $this->close(); + } + + public function __toString() + { + try { + $this->seek(0); + return (string) stream_get_contents($this->stream); + } catch (\Exception $e) { + return ''; + } + } + + public function getContents() + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + + $contents = stream_get_contents($this->stream); + + if ($contents === false) { + throw new \RuntimeException('Unable to read stream contents'); + } + + return $contents; + } + + public function close() + { + if (isset($this->stream)) { + if (is_resource($this->stream)) { + fclose($this->stream); + } + $this->detach(); + } + } + + public function detach() + { + if (!isset($this->stream)) { + return null; + } + + $result = $this->stream; + unset($this->stream); + $this->size = $this->uri = null; + $this->readable = $this->writable = $this->seekable = false; + + return $result; + } + + public function getSize() + { + if ($this->size !== null) { + return $this->size; + } + + if (!isset($this->stream)) { + return null; + } + + // Clear the stat cache if the stream has a URI + if ($this->uri) { + clearstatcache(true, $this->uri); + } + + $stats = fstat($this->stream); + if (isset($stats['size'])) { + $this->size = $stats['size']; + return $this->size; + } + + return null; + } + + public function isReadable() + { + return $this->readable; + } + + public function isWritable() + { + return $this->writable; + } + + public function isSeekable() + { + return $this->seekable; + } + + public function eof() + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + + return feof($this->stream); + } + + public function tell() + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + + $result = ftell($this->stream); + + if ($result === false) { + throw new \RuntimeException('Unable to determine stream position'); + } + + return $result; + } + + public function rewind() + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET) + { + $whence = (int) $whence; + + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + if (!$this->seekable) { + throw new \RuntimeException('Stream is not seekable'); + } + if (fseek($this->stream, $offset, $whence) === -1) { + throw new \RuntimeException('Unable to seek to stream position ' + . $offset . ' with whence ' . var_export($whence, true)); + } + } + + public function read($length) + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + if (!$this->readable) { + throw new \RuntimeException('Cannot read from non-readable stream'); + } + if ($length < 0) { + throw new \RuntimeException('Length parameter cannot be negative'); + } + + if (0 === $length) { + return ''; + } + + $string = fread($this->stream, $length); + if (false === $string) { + throw new \RuntimeException('Unable to read from stream'); + } + + return $string; + } + + public function write($string) + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + if (!$this->writable) { + throw new \RuntimeException('Cannot write to a non-writable stream'); + } + + // We can't know the size after writing anything + $this->size = null; + $result = fwrite($this->stream, $string); + + if ($result === false) { + throw new \RuntimeException('Unable to write to stream'); + } + + return $result; + } + + public function getMetadata($key = null) + { + if (!isset($this->stream)) { + return $key ? null : []; + } elseif (!$key) { + return $this->customMetadata + stream_get_meta_data($this->stream); + } elseif (isset($this->customMetadata[$key])) { + return $this->customMetadata[$key]; + } + + $meta = stream_get_meta_data($this->stream); + + return isset($meta[$key]) ? $meta[$key] : null; + } +} diff --git a/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php b/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php new file mode 100644 index 0000000..daec6f5 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php @@ -0,0 +1,149 @@ +stream = $stream; + } + + /** + * Magic method used to create a new stream if streams are not added in + * the constructor of a decorator (e.g., LazyOpenStream). + * + * @param string $name Name of the property (allows "stream" only). + * + * @return StreamInterface + */ + public function __get($name) + { + if ($name == 'stream') { + $this->stream = $this->createStream(); + return $this->stream; + } + + throw new \UnexpectedValueException("$name not found on class"); + } + + public function __toString() + { + try { + if ($this->isSeekable()) { + $this->seek(0); + } + return $this->getContents(); + } catch (\Exception $e) { + // Really, PHP? https://bugs.php.net/bug.php?id=53648 + trigger_error('StreamDecorator::__toString exception: ' + . (string) $e, E_USER_ERROR); + return ''; + } + } + + public function getContents() + { + return copy_to_string($this); + } + + /** + * Allow decorators to implement custom methods + * + * @param string $method Missing method name + * @param array $args Method arguments + * + * @return mixed + */ + public function __call($method, array $args) + { + $result = call_user_func_array([$this->stream, $method], $args); + + // Always return the wrapped object if the result is a return $this + return $result === $this->stream ? $this : $result; + } + + public function close() + { + $this->stream->close(); + } + + public function getMetadata($key = null) + { + return $this->stream->getMetadata($key); + } + + public function detach() + { + return $this->stream->detach(); + } + + public function getSize() + { + return $this->stream->getSize(); + } + + public function eof() + { + return $this->stream->eof(); + } + + public function tell() + { + return $this->stream->tell(); + } + + public function isReadable() + { + return $this->stream->isReadable(); + } + + public function isWritable() + { + return $this->stream->isWritable(); + } + + public function isSeekable() + { + return $this->stream->isSeekable(); + } + + public function rewind() + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET) + { + $this->stream->seek($offset, $whence); + } + + public function read($length) + { + return $this->stream->read($length); + } + + public function write($string) + { + return $this->stream->write($string); + } + + /** + * Implement in subclasses to dynamically create streams when requested. + * + * @return StreamInterface + * @throws \BadMethodCallException + */ + protected function createStream() + { + throw new \BadMethodCallException('Not implemented'); + } +} diff --git a/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/vendor/guzzlehttp/psr7/src/StreamWrapper.php new file mode 100644 index 0000000..0f3a285 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/StreamWrapper.php @@ -0,0 +1,161 @@ +isReadable()) { + $mode = $stream->isWritable() ? 'r+' : 'r'; + } elseif ($stream->isWritable()) { + $mode = 'w'; + } else { + throw new \InvalidArgumentException('The stream must be readable, ' + . 'writable, or both.'); + } + + return fopen('guzzle://stream', $mode, null, self::createStreamContext($stream)); + } + + /** + * Creates a stream context that can be used to open a stream as a php stream resource. + * + * @param StreamInterface $stream + * + * @return resource + */ + public static function createStreamContext(StreamInterface $stream) + { + return stream_context_create([ + 'guzzle' => ['stream' => $stream] + ]); + } + + /** + * Registers the stream wrapper if needed + */ + public static function register() + { + if (!in_array('guzzle', stream_get_wrappers())) { + stream_wrapper_register('guzzle', __CLASS__); + } + } + + public function stream_open($path, $mode, $options, &$opened_path) + { + $options = stream_context_get_options($this->context); + + if (!isset($options['guzzle']['stream'])) { + return false; + } + + $this->mode = $mode; + $this->stream = $options['guzzle']['stream']; + + return true; + } + + public function stream_read($count) + { + return $this->stream->read($count); + } + + public function stream_write($data) + { + return (int) $this->stream->write($data); + } + + public function stream_tell() + { + return $this->stream->tell(); + } + + public function stream_eof() + { + return $this->stream->eof(); + } + + public function stream_seek($offset, $whence) + { + $this->stream->seek($offset, $whence); + + return true; + } + + public function stream_cast($cast_as) + { + $stream = clone($this->stream); + + return $stream->detach(); + } + + public function stream_stat() + { + static $modeMap = [ + 'r' => 33060, + 'rb' => 33060, + 'r+' => 33206, + 'w' => 33188, + 'wb' => 33188 + ]; + + return [ + 'dev' => 0, + 'ino' => 0, + 'mode' => $modeMap[$this->mode], + 'nlink' => 0, + 'uid' => 0, + 'gid' => 0, + 'rdev' => 0, + 'size' => $this->stream->getSize() ?: 0, + 'atime' => 0, + 'mtime' => 0, + 'ctime' => 0, + 'blksize' => 0, + 'blocks' => 0 + ]; + } + + public function url_stat($path, $flags) + { + return [ + 'dev' => 0, + 'ino' => 0, + 'mode' => 0, + 'nlink' => 0, + 'uid' => 0, + 'gid' => 0, + 'rdev' => 0, + 'size' => 0, + 'atime' => 0, + 'mtime' => 0, + 'ctime' => 0, + 'blksize' => 0, + 'blocks' => 0 + ]; + } +} diff --git a/vendor/guzzlehttp/psr7/src/UploadedFile.php b/vendor/guzzlehttp/psr7/src/UploadedFile.php new file mode 100644 index 0000000..e62bd5c --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/UploadedFile.php @@ -0,0 +1,316 @@ +setError($errorStatus); + $this->setSize($size); + $this->setClientFilename($clientFilename); + $this->setClientMediaType($clientMediaType); + + if ($this->isOk()) { + $this->setStreamOrFile($streamOrFile); + } + } + + /** + * Depending on the value set file or stream variable + * + * @param mixed $streamOrFile + * @throws InvalidArgumentException + */ + private function setStreamOrFile($streamOrFile) + { + if (is_string($streamOrFile)) { + $this->file = $streamOrFile; + } elseif (is_resource($streamOrFile)) { + $this->stream = new Stream($streamOrFile); + } elseif ($streamOrFile instanceof StreamInterface) { + $this->stream = $streamOrFile; + } else { + throw new InvalidArgumentException( + 'Invalid stream or file provided for UploadedFile' + ); + } + } + + /** + * @param int $error + * @throws InvalidArgumentException + */ + private function setError($error) + { + if (false === is_int($error)) { + throw new InvalidArgumentException( + 'Upload file error status must be an integer' + ); + } + + if (false === in_array($error, UploadedFile::$errors)) { + throw new InvalidArgumentException( + 'Invalid error status for UploadedFile' + ); + } + + $this->error = $error; + } + + /** + * @param int $size + * @throws InvalidArgumentException + */ + private function setSize($size) + { + if (false === is_int($size)) { + throw new InvalidArgumentException( + 'Upload file size must be an integer' + ); + } + + $this->size = $size; + } + + /** + * @param mixed $param + * @return boolean + */ + private function isStringOrNull($param) + { + return in_array(gettype($param), ['string', 'NULL']); + } + + /** + * @param mixed $param + * @return boolean + */ + private function isStringNotEmpty($param) + { + return is_string($param) && false === empty($param); + } + + /** + * @param string|null $clientFilename + * @throws InvalidArgumentException + */ + private function setClientFilename($clientFilename) + { + if (false === $this->isStringOrNull($clientFilename)) { + throw new InvalidArgumentException( + 'Upload file client filename must be a string or null' + ); + } + + $this->clientFilename = $clientFilename; + } + + /** + * @param string|null $clientMediaType + * @throws InvalidArgumentException + */ + private function setClientMediaType($clientMediaType) + { + if (false === $this->isStringOrNull($clientMediaType)) { + throw new InvalidArgumentException( + 'Upload file client media type must be a string or null' + ); + } + + $this->clientMediaType = $clientMediaType; + } + + /** + * Return true if there is no upload error + * + * @return boolean + */ + private function isOk() + { + return $this->error === UPLOAD_ERR_OK; + } + + /** + * @return boolean + */ + public function isMoved() + { + return $this->moved; + } + + /** + * @throws RuntimeException if is moved or not ok + */ + private function validateActive() + { + if (false === $this->isOk()) { + throw new RuntimeException('Cannot retrieve stream due to upload error'); + } + + if ($this->isMoved()) { + throw new RuntimeException('Cannot retrieve stream after it has already been moved'); + } + } + + /** + * {@inheritdoc} + * @throws RuntimeException if the upload was not successful. + */ + public function getStream() + { + $this->validateActive(); + + if ($this->stream instanceof StreamInterface) { + return $this->stream; + } + + return new LazyOpenStream($this->file, 'r+'); + } + + /** + * {@inheritdoc} + * + * @see http://php.net/is_uploaded_file + * @see http://php.net/move_uploaded_file + * @param string $targetPath Path to which to move the uploaded file. + * @throws RuntimeException if the upload was not successful. + * @throws InvalidArgumentException if the $path specified is invalid. + * @throws RuntimeException on any error during the move operation, or on + * the second or subsequent call to the method. + */ + public function moveTo($targetPath) + { + $this->validateActive(); + + if (false === $this->isStringNotEmpty($targetPath)) { + throw new InvalidArgumentException( + 'Invalid path provided for move operation; must be a non-empty string' + ); + } + + if ($this->file) { + $this->moved = php_sapi_name() == 'cli' + ? rename($this->file, $targetPath) + : move_uploaded_file($this->file, $targetPath); + } else { + copy_to_stream( + $this->getStream(), + new LazyOpenStream($targetPath, 'w') + ); + + $this->moved = true; + } + + if (false === $this->moved) { + throw new RuntimeException( + sprintf('Uploaded file could not be moved to %s', $targetPath) + ); + } + } + + /** + * {@inheritdoc} + * + * @return int|null The file size in bytes or null if unknown. + */ + public function getSize() + { + return $this->size; + } + + /** + * {@inheritdoc} + * + * @see http://php.net/manual/en/features.file-upload.errors.php + * @return int One of PHP's UPLOAD_ERR_XXX constants. + */ + public function getError() + { + return $this->error; + } + + /** + * {@inheritdoc} + * + * @return string|null The filename sent by the client or null if none + * was provided. + */ + public function getClientFilename() + { + return $this->clientFilename; + } + + /** + * {@inheritdoc} + */ + public function getClientMediaType() + { + return $this->clientMediaType; + } +} diff --git a/vendor/guzzlehttp/psr7/src/Uri.php b/vendor/guzzlehttp/psr7/src/Uri.php new file mode 100644 index 0000000..825a25e --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Uri.php @@ -0,0 +1,760 @@ + 80, + 'https' => 443, + 'ftp' => 21, + 'gopher' => 70, + 'nntp' => 119, + 'news' => 119, + 'telnet' => 23, + 'tn3270' => 23, + 'imap' => 143, + 'pop' => 110, + 'ldap' => 389, + ]; + + private static $charUnreserved = 'a-zA-Z0-9_\-\.~'; + private static $charSubDelims = '!\$&\'\(\)\*\+,;='; + private static $replaceQuery = ['=' => '%3D', '&' => '%26']; + + /** @var string Uri scheme. */ + private $scheme = ''; + + /** @var string Uri user info. */ + private $userInfo = ''; + + /** @var string Uri host. */ + private $host = ''; + + /** @var int|null Uri port. */ + private $port; + + /** @var string Uri path. */ + private $path = ''; + + /** @var string Uri query string. */ + private $query = ''; + + /** @var string Uri fragment. */ + private $fragment = ''; + + /** + * @param string $uri URI to parse + */ + public function __construct($uri = '') + { + // weak type check to also accept null until we can add scalar type hints + if ($uri != '') { + $parts = parse_url($uri); + if ($parts === false) { + throw new \InvalidArgumentException("Unable to parse URI: $uri"); + } + $this->applyParts($parts); + } + } + + public function __toString() + { + return self::composeComponents( + $this->scheme, + $this->getAuthority(), + $this->path, + $this->query, + $this->fragment + ); + } + + /** + * Composes a URI reference string from its various components. + * + * Usually this method does not need to be called manually but instead is used indirectly via + * `Psr\Http\Message\UriInterface::__toString`. + * + * PSR-7 UriInterface treats an empty component the same as a missing component as + * getQuery(), getFragment() etc. always return a string. This explains the slight + * difference to RFC 3986 Section 5.3. + * + * Another adjustment is that the authority separator is added even when the authority is missing/empty + * for the "file" scheme. This is because PHP stream functions like `file_get_contents` only work with + * `file:///myfile` but not with `file:/myfile` although they are equivalent according to RFC 3986. But + * `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to + * that format). + * + * @param string $scheme + * @param string $authority + * @param string $path + * @param string $query + * @param string $fragment + * + * @return string + * + * @link https://tools.ietf.org/html/rfc3986#section-5.3 + */ + public static function composeComponents($scheme, $authority, $path, $query, $fragment) + { + $uri = ''; + + // weak type checks to also accept null until we can add scalar type hints + if ($scheme != '') { + $uri .= $scheme . ':'; + } + + if ($authority != ''|| $scheme === 'file') { + $uri .= '//' . $authority; + } + + $uri .= $path; + + if ($query != '') { + $uri .= '?' . $query; + } + + if ($fragment != '') { + $uri .= '#' . $fragment; + } + + return $uri; + } + + /** + * Whether the URI has the default port of the current scheme. + * + * `Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used + * independently of the implementation. + * + * @param UriInterface $uri + * + * @return bool + */ + public static function isDefaultPort(UriInterface $uri) + { + return $uri->getPort() === null + || (isset(self::$defaultPorts[$uri->getScheme()]) && $uri->getPort() === self::$defaultPorts[$uri->getScheme()]); + } + + /** + * Whether the URI is absolute, i.e. it has a scheme. + * + * An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true + * if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative + * to another URI, the base URI. Relative references can be divided into several forms: + * - network-path references, e.g. '//example.com/path' + * - absolute-path references, e.g. '/path' + * - relative-path references, e.g. 'subpath' + * + * @param UriInterface $uri + * + * @return bool + * @see Uri::isNetworkPathReference + * @see Uri::isAbsolutePathReference + * @see Uri::isRelativePathReference + * @link https://tools.ietf.org/html/rfc3986#section-4 + */ + public static function isAbsolute(UriInterface $uri) + { + return $uri->getScheme() !== ''; + } + + /** + * Whether the URI is a network-path reference. + * + * A relative reference that begins with two slash characters is termed an network-path reference. + * + * @param UriInterface $uri + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.2 + */ + public static function isNetworkPathReference(UriInterface $uri) + { + return $uri->getScheme() === '' && $uri->getAuthority() !== ''; + } + + /** + * Whether the URI is a absolute-path reference. + * + * A relative reference that begins with a single slash character is termed an absolute-path reference. + * + * @param UriInterface $uri + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.2 + */ + public static function isAbsolutePathReference(UriInterface $uri) + { + return $uri->getScheme() === '' + && $uri->getAuthority() === '' + && isset($uri->getPath()[0]) + && $uri->getPath()[0] === '/'; + } + + /** + * Whether the URI is a relative-path reference. + * + * A relative reference that does not begin with a slash character is termed a relative-path reference. + * + * @param UriInterface $uri + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.2 + */ + public static function isRelativePathReference(UriInterface $uri) + { + return $uri->getScheme() === '' + && $uri->getAuthority() === '' + && (!isset($uri->getPath()[0]) || $uri->getPath()[0] !== '/'); + } + + /** + * Whether the URI is a same-document reference. + * + * A same-document reference refers to a URI that is, aside from its fragment + * component, identical to the base URI. When no base URI is given, only an empty + * URI reference (apart from its fragment) is considered a same-document reference. + * + * @param UriInterface $uri The URI to check + * @param UriInterface|null $base An optional base URI to compare against + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.4 + */ + public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null) + { + if ($base !== null) { + $uri = UriResolver::resolve($base, $uri); + + return ($uri->getScheme() === $base->getScheme()) + && ($uri->getAuthority() === $base->getAuthority()) + && ($uri->getPath() === $base->getPath()) + && ($uri->getQuery() === $base->getQuery()); + } + + return $uri->getScheme() === '' && $uri->getAuthority() === '' && $uri->getPath() === '' && $uri->getQuery() === ''; + } + + /** + * Removes dot segments from a path and returns the new path. + * + * @param string $path + * + * @return string + * + * @deprecated since version 1.4. Use UriResolver::removeDotSegments instead. + * @see UriResolver::removeDotSegments + */ + public static function removeDotSegments($path) + { + return UriResolver::removeDotSegments($path); + } + + /** + * Converts the relative URI into a new URI that is resolved against the base URI. + * + * @param UriInterface $base Base URI + * @param string|UriInterface $rel Relative URI + * + * @return UriInterface + * + * @deprecated since version 1.4. Use UriResolver::resolve instead. + * @see UriResolver::resolve + */ + public static function resolve(UriInterface $base, $rel) + { + if (!($rel instanceof UriInterface)) { + $rel = new self($rel); + } + + return UriResolver::resolve($base, $rel); + } + + /** + * Creates a new URI with a specific query string value removed. + * + * Any existing query string values that exactly match the provided key are + * removed. + * + * @param UriInterface $uri URI to use as a base. + * @param string $key Query string key to remove. + * + * @return UriInterface + */ + public static function withoutQueryValue(UriInterface $uri, $key) + { + $result = self::getFilteredQueryString($uri, [$key]); + + return $uri->withQuery(implode('&', $result)); + } + + /** + * Creates a new URI with a specific query string value. + * + * Any existing query string values that exactly match the provided key are + * removed and replaced with the given key value pair. + * + * A value of null will set the query string key without a value, e.g. "key" + * instead of "key=value". + * + * @param UriInterface $uri URI to use as a base. + * @param string $key Key to set. + * @param string|null $value Value to set + * + * @return UriInterface + */ + public static function withQueryValue(UriInterface $uri, $key, $value) + { + $result = self::getFilteredQueryString($uri, [$key]); + + $result[] = self::generateQueryString($key, $value); + + return $uri->withQuery(implode('&', $result)); + } + + /** + * Creates a new URI with multiple specific query string values. + * + * It has the same behavior as withQueryValue() but for an associative array of key => value. + * + * @param UriInterface $uri URI to use as a base. + * @param array $keyValueArray Associative array of key and values + * + * @return UriInterface + */ + public static function withQueryValues(UriInterface $uri, array $keyValueArray) + { + $result = self::getFilteredQueryString($uri, array_keys($keyValueArray)); + + foreach ($keyValueArray as $key => $value) { + $result[] = self::generateQueryString($key, $value); + } + + return $uri->withQuery(implode('&', $result)); + } + + /** + * Creates a URI from a hash of `parse_url` components. + * + * @param array $parts + * + * @return UriInterface + * @link http://php.net/manual/en/function.parse-url.php + * + * @throws \InvalidArgumentException If the components do not form a valid URI. + */ + public static function fromParts(array $parts) + { + $uri = new self(); + $uri->applyParts($parts); + $uri->validateState(); + + return $uri; + } + + public function getScheme() + { + return $this->scheme; + } + + public function getAuthority() + { + $authority = $this->host; + if ($this->userInfo !== '') { + $authority = $this->userInfo . '@' . $authority; + } + + if ($this->port !== null) { + $authority .= ':' . $this->port; + } + + return $authority; + } + + public function getUserInfo() + { + return $this->userInfo; + } + + public function getHost() + { + return $this->host; + } + + public function getPort() + { + return $this->port; + } + + public function getPath() + { + return $this->path; + } + + public function getQuery() + { + return $this->query; + } + + public function getFragment() + { + return $this->fragment; + } + + public function withScheme($scheme) + { + $scheme = $this->filterScheme($scheme); + + if ($this->scheme === $scheme) { + return $this; + } + + $new = clone $this; + $new->scheme = $scheme; + $new->removeDefaultPort(); + $new->validateState(); + + return $new; + } + + public function withUserInfo($user, $password = null) + { + $info = $this->filterUserInfoComponent($user); + if ($password !== null) { + $info .= ':' . $this->filterUserInfoComponent($password); + } + + if ($this->userInfo === $info) { + return $this; + } + + $new = clone $this; + $new->userInfo = $info; + $new->validateState(); + + return $new; + } + + public function withHost($host) + { + $host = $this->filterHost($host); + + if ($this->host === $host) { + return $this; + } + + $new = clone $this; + $new->host = $host; + $new->validateState(); + + return $new; + } + + public function withPort($port) + { + $port = $this->filterPort($port); + + if ($this->port === $port) { + return $this; + } + + $new = clone $this; + $new->port = $port; + $new->removeDefaultPort(); + $new->validateState(); + + return $new; + } + + public function withPath($path) + { + $path = $this->filterPath($path); + + if ($this->path === $path) { + return $this; + } + + $new = clone $this; + $new->path = $path; + $new->validateState(); + + return $new; + } + + public function withQuery($query) + { + $query = $this->filterQueryAndFragment($query); + + if ($this->query === $query) { + return $this; + } + + $new = clone $this; + $new->query = $query; + + return $new; + } + + public function withFragment($fragment) + { + $fragment = $this->filterQueryAndFragment($fragment); + + if ($this->fragment === $fragment) { + return $this; + } + + $new = clone $this; + $new->fragment = $fragment; + + return $new; + } + + /** + * Apply parse_url parts to a URI. + * + * @param array $parts Array of parse_url parts to apply. + */ + private function applyParts(array $parts) + { + $this->scheme = isset($parts['scheme']) + ? $this->filterScheme($parts['scheme']) + : ''; + $this->userInfo = isset($parts['user']) + ? $this->filterUserInfoComponent($parts['user']) + : ''; + $this->host = isset($parts['host']) + ? $this->filterHost($parts['host']) + : ''; + $this->port = isset($parts['port']) + ? $this->filterPort($parts['port']) + : null; + $this->path = isset($parts['path']) + ? $this->filterPath($parts['path']) + : ''; + $this->query = isset($parts['query']) + ? $this->filterQueryAndFragment($parts['query']) + : ''; + $this->fragment = isset($parts['fragment']) + ? $this->filterQueryAndFragment($parts['fragment']) + : ''; + if (isset($parts['pass'])) { + $this->userInfo .= ':' . $this->filterUserInfoComponent($parts['pass']); + } + + $this->removeDefaultPort(); + } + + /** + * @param string $scheme + * + * @return string + * + * @throws \InvalidArgumentException If the scheme is invalid. + */ + private function filterScheme($scheme) + { + if (!is_string($scheme)) { + throw new \InvalidArgumentException('Scheme must be a string'); + } + + return strtolower($scheme); + } + + /** + * @param string $component + * + * @return string + * + * @throws \InvalidArgumentException If the user info is invalid. + */ + private function filterUserInfoComponent($component) + { + if (!is_string($component)) { + throw new \InvalidArgumentException('User info must be a string'); + } + + return preg_replace_callback( + '/(?:[^%' . self::$charUnreserved . self::$charSubDelims . ']+|%(?![A-Fa-f0-9]{2}))/', + [$this, 'rawurlencodeMatchZero'], + $component + ); + } + + /** + * @param string $host + * + * @return string + * + * @throws \InvalidArgumentException If the host is invalid. + */ + private function filterHost($host) + { + if (!is_string($host)) { + throw new \InvalidArgumentException('Host must be a string'); + } + + return strtolower($host); + } + + /** + * @param int|null $port + * + * @return int|null + * + * @throws \InvalidArgumentException If the port is invalid. + */ + private function filterPort($port) + { + if ($port === null) { + return null; + } + + $port = (int) $port; + if (0 > $port || 0xffff < $port) { + throw new \InvalidArgumentException( + sprintf('Invalid port: %d. Must be between 0 and 65535', $port) + ); + } + + return $port; + } + + /** + * @param UriInterface $uri + * @param array $keys + * + * @return array + */ + private static function getFilteredQueryString(UriInterface $uri, array $keys) + { + $current = $uri->getQuery(); + + if ($current === '') { + return []; + } + + $decodedKeys = array_map('rawurldecode', $keys); + + return array_filter(explode('&', $current), function ($part) use ($decodedKeys) { + return !in_array(rawurldecode(explode('=', $part)[0]), $decodedKeys, true); + }); + } + + /** + * @param string $key + * @param string|null $value + * + * @return string + */ + private static function generateQueryString($key, $value) + { + // Query string separators ("=", "&") within the key or value need to be encoded + // (while preventing double-encoding) before setting the query string. All other + // chars that need percent-encoding will be encoded by withQuery(). + $queryString = strtr($key, self::$replaceQuery); + + if ($value !== null) { + $queryString .= '=' . strtr($value, self::$replaceQuery); + } + + return $queryString; + } + + private function removeDefaultPort() + { + if ($this->port !== null && self::isDefaultPort($this)) { + $this->port = null; + } + } + + /** + * Filters the path of a URI + * + * @param string $path + * + * @return string + * + * @throws \InvalidArgumentException If the path is invalid. + */ + private function filterPath($path) + { + if (!is_string($path)) { + throw new \InvalidArgumentException('Path must be a string'); + } + + return preg_replace_callback( + '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/]++|%(?![A-Fa-f0-9]{2}))/', + [$this, 'rawurlencodeMatchZero'], + $path + ); + } + + /** + * Filters the query string or fragment of a URI. + * + * @param string $str + * + * @return string + * + * @throws \InvalidArgumentException If the query or fragment is invalid. + */ + private function filterQueryAndFragment($str) + { + if (!is_string($str)) { + throw new \InvalidArgumentException('Query and fragment must be a string'); + } + + return preg_replace_callback( + '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', + [$this, 'rawurlencodeMatchZero'], + $str + ); + } + + private function rawurlencodeMatchZero(array $match) + { + return rawurlencode($match[0]); + } + + private function validateState() + { + if ($this->host === '' && ($this->scheme === 'http' || $this->scheme === 'https')) { + $this->host = self::HTTP_DEFAULT_HOST; + } + + if ($this->getAuthority() === '') { + if (0 === strpos($this->path, '//')) { + throw new \InvalidArgumentException('The path of a URI without an authority must not start with two slashes "//"'); + } + if ($this->scheme === '' && false !== strpos(explode('/', $this->path, 2)[0], ':')) { + throw new \InvalidArgumentException('A relative URI must not have a path beginning with a segment containing a colon'); + } + } elseif (isset($this->path[0]) && $this->path[0] !== '/') { + @trigger_error( + 'The path of a URI with an authority must start with a slash "/" or be empty. Automagically fixing the URI ' . + 'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.', + E_USER_DEPRECATED + ); + $this->path = '/'. $this->path; + //throw new \InvalidArgumentException('The path of a URI with an authority must start with a slash "/" or be empty'); + } + } +} diff --git a/vendor/guzzlehttp/psr7/src/UriNormalizer.php b/vendor/guzzlehttp/psr7/src/UriNormalizer.php new file mode 100644 index 0000000..384c29e --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/UriNormalizer.php @@ -0,0 +1,216 @@ +getPath() === '' && + ($uri->getScheme() === 'http' || $uri->getScheme() === 'https') + ) { + $uri = $uri->withPath('/'); + } + + if ($flags & self::REMOVE_DEFAULT_HOST && $uri->getScheme() === 'file' && $uri->getHost() === 'localhost') { + $uri = $uri->withHost(''); + } + + if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== null && Uri::isDefaultPort($uri)) { + $uri = $uri->withPort(null); + } + + if ($flags & self::REMOVE_DOT_SEGMENTS && !Uri::isRelativePathReference($uri)) { + $uri = $uri->withPath(UriResolver::removeDotSegments($uri->getPath())); + } + + if ($flags & self::REMOVE_DUPLICATE_SLASHES) { + $uri = $uri->withPath(preg_replace('#//++#', '/', $uri->getPath())); + } + + if ($flags & self::SORT_QUERY_PARAMETERS && $uri->getQuery() !== '') { + $queryKeyValues = explode('&', $uri->getQuery()); + sort($queryKeyValues); + $uri = $uri->withQuery(implode('&', $queryKeyValues)); + } + + return $uri; + } + + /** + * Whether two URIs can be considered equivalent. + * + * Both URIs are normalized automatically before comparison with the given $normalizations bitmask. The method also + * accepts relative URI references and returns true when they are equivalent. This of course assumes they will be + * resolved against the same base URI. If this is not the case, determination of equivalence or difference of + * relative references does not mean anything. + * + * @param UriInterface $uri1 An URI to compare + * @param UriInterface $uri2 An URI to compare + * @param int $normalizations A bitmask of normalizations to apply, see constants + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-6.1 + */ + public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS) + { + return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations); + } + + private static function capitalizePercentEncoding(UriInterface $uri) + { + $regex = '/(?:%[A-Fa-f0-9]{2})++/'; + + $callback = function (array $match) { + return strtoupper($match[0]); + }; + + return + $uri->withPath( + preg_replace_callback($regex, $callback, $uri->getPath()) + )->withQuery( + preg_replace_callback($regex, $callback, $uri->getQuery()) + ); + } + + private static function decodeUnreservedCharacters(UriInterface $uri) + { + $regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i'; + + $callback = function (array $match) { + return rawurldecode($match[0]); + }; + + return + $uri->withPath( + preg_replace_callback($regex, $callback, $uri->getPath()) + )->withQuery( + preg_replace_callback($regex, $callback, $uri->getQuery()) + ); + } + + private function __construct() + { + // cannot be instantiated + } +} diff --git a/vendor/guzzlehttp/psr7/src/UriResolver.php b/vendor/guzzlehttp/psr7/src/UriResolver.php new file mode 100644 index 0000000..c1cb8a2 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/UriResolver.php @@ -0,0 +1,219 @@ +getScheme() != '') { + return $rel->withPath(self::removeDotSegments($rel->getPath())); + } + + if ($rel->getAuthority() != '') { + $targetAuthority = $rel->getAuthority(); + $targetPath = self::removeDotSegments($rel->getPath()); + $targetQuery = $rel->getQuery(); + } else { + $targetAuthority = $base->getAuthority(); + if ($rel->getPath() === '') { + $targetPath = $base->getPath(); + $targetQuery = $rel->getQuery() != '' ? $rel->getQuery() : $base->getQuery(); + } else { + if ($rel->getPath()[0] === '/') { + $targetPath = $rel->getPath(); + } else { + if ($targetAuthority != '' && $base->getPath() === '') { + $targetPath = '/' . $rel->getPath(); + } else { + $lastSlashPos = strrpos($base->getPath(), '/'); + if ($lastSlashPos === false) { + $targetPath = $rel->getPath(); + } else { + $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath(); + } + } + } + $targetPath = self::removeDotSegments($targetPath); + $targetQuery = $rel->getQuery(); + } + } + + return new Uri(Uri::composeComponents( + $base->getScheme(), + $targetAuthority, + $targetPath, + $targetQuery, + $rel->getFragment() + )); + } + + /** + * Returns the target URI as a relative reference from the base URI. + * + * This method is the counterpart to resolve(): + * + * (string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) + * + * One use-case is to use the current request URI as base URI and then generate relative links in your documents + * to reduce the document size or offer self-contained downloadable document archives. + * + * $base = new Uri('http://example.com/a/b/'); + * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. + * echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. + * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. + * echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. + * + * This method also accepts a target that is already relative and will try to relativize it further. Only a + * relative-path reference will be returned as-is. + * + * echo UriResolver::relativize($base, new Uri('/a/b/c')); // prints 'c' as well + * + * @param UriInterface $base Base URI + * @param UriInterface $target Target URI + * + * @return UriInterface The relative URI reference + */ + public static function relativize(UriInterface $base, UriInterface $target) + { + if ($target->getScheme() !== '' && + ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '') + ) { + return $target; + } + + if (Uri::isRelativePathReference($target)) { + // As the target is already highly relative we return it as-is. It would be possible to resolve + // the target with `$target = self::resolve($base, $target);` and then try make it more relative + // by removing a duplicate query. But let's not do that automatically. + return $target; + } + + if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) { + return $target->withScheme(''); + } + + // We must remove the path before removing the authority because if the path starts with two slashes, the URI + // would turn invalid. And we also cannot set a relative path before removing the authority, as that is also + // invalid. + $emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(null)->withHost(''); + + if ($base->getPath() !== $target->getPath()) { + return $emptyPathUri->withPath(self::getRelativePath($base, $target)); + } + + if ($base->getQuery() === $target->getQuery()) { + // Only the target fragment is left. And it must be returned even if base and target fragment are the same. + return $emptyPathUri->withQuery(''); + } + + // If the base URI has a query but the target has none, we cannot return an empty path reference as it would + // inherit the base query component when resolving. + if ($target->getQuery() === '') { + $segments = explode('/', $target->getPath()); + $lastSegment = end($segments); + + return $emptyPathUri->withPath($lastSegment === '' ? './' : $lastSegment); + } + + return $emptyPathUri; + } + + private static function getRelativePath(UriInterface $base, UriInterface $target) + { + $sourceSegments = explode('/', $base->getPath()); + $targetSegments = explode('/', $target->getPath()); + array_pop($sourceSegments); + $targetLastSegment = array_pop($targetSegments); + foreach ($sourceSegments as $i => $segment) { + if (isset($targetSegments[$i]) && $segment === $targetSegments[$i]) { + unset($sourceSegments[$i], $targetSegments[$i]); + } else { + break; + } + } + $targetSegments[] = $targetLastSegment; + $relativePath = str_repeat('../', count($sourceSegments)) . implode('/', $targetSegments); + + // A reference to am empty last segment or an empty first sub-segment must be prefixed with "./". + // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used + // as the first segment of a relative-path reference, as it would be mistaken for a scheme name. + if ('' === $relativePath || false !== strpos(explode('/', $relativePath, 2)[0], ':')) { + $relativePath = "./$relativePath"; + } elseif ('/' === $relativePath[0]) { + if ($base->getAuthority() != '' && $base->getPath() === '') { + // In this case an extra slash is added by resolve() automatically. So we must not add one here. + $relativePath = ".$relativePath"; + } else { + $relativePath = "./$relativePath"; + } + } + + return $relativePath; + } + + private function __construct() + { + // cannot be instantiated + } +} diff --git a/vendor/guzzlehttp/psr7/src/functions.php b/vendor/guzzlehttp/psr7/src/functions.php new file mode 100644 index 0000000..8e6dafe --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/functions.php @@ -0,0 +1,899 @@ +getMethod() . ' ' + . $message->getRequestTarget()) + . ' HTTP/' . $message->getProtocolVersion(); + if (!$message->hasHeader('host')) { + $msg .= "\r\nHost: " . $message->getUri()->getHost(); + } + } elseif ($message instanceof ResponseInterface) { + $msg = 'HTTP/' . $message->getProtocolVersion() . ' ' + . $message->getStatusCode() . ' ' + . $message->getReasonPhrase(); + } else { + throw new \InvalidArgumentException('Unknown message type'); + } + + foreach ($message->getHeaders() as $name => $values) { + $msg .= "\r\n{$name}: " . implode(', ', $values); + } + + return "{$msg}\r\n\r\n" . $message->getBody(); +} + +/** + * Returns a UriInterface for the given value. + * + * This function accepts a string or {@see Psr\Http\Message\UriInterface} and + * returns a UriInterface for the given value. If the value is already a + * `UriInterface`, it is returned as-is. + * + * @param string|UriInterface $uri + * + * @return UriInterface + * @throws \InvalidArgumentException + */ +function uri_for($uri) +{ + if ($uri instanceof UriInterface) { + return $uri; + } elseif (is_string($uri)) { + return new Uri($uri); + } + + throw new \InvalidArgumentException('URI must be a string or UriInterface'); +} + +/** + * Create a new stream based on the input type. + * + * Options is an associative array that can contain the following keys: + * - metadata: Array of custom metadata. + * - size: Size of the stream. + * + * @param resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource Entity body data + * @param array $options Additional options + * + * @return StreamInterface + * @throws \InvalidArgumentException if the $resource arg is not valid. + */ +function stream_for($resource = '', array $options = []) +{ + if (is_scalar($resource)) { + $stream = fopen('php://temp', 'r+'); + if ($resource !== '') { + fwrite($stream, $resource); + fseek($stream, 0); + } + return new Stream($stream, $options); + } + + switch (gettype($resource)) { + case 'resource': + return new Stream($resource, $options); + case 'object': + if ($resource instanceof StreamInterface) { + return $resource; + } elseif ($resource instanceof \Iterator) { + return new PumpStream(function () use ($resource) { + if (!$resource->valid()) { + return false; + } + $result = $resource->current(); + $resource->next(); + return $result; + }, $options); + } elseif (method_exists($resource, '__toString')) { + return stream_for((string) $resource, $options); + } + break; + case 'NULL': + return new Stream(fopen('php://temp', 'r+'), $options); + } + + if (is_callable($resource)) { + return new PumpStream($resource, $options); + } + + throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource)); +} + +/** + * Parse an array of header values containing ";" separated data into an + * array of associative arrays representing the header key value pair + * data of the header. When a parameter does not contain a value, but just + * contains a key, this function will inject a key with a '' string value. + * + * @param string|array $header Header to parse into components. + * + * @return array Returns the parsed header values. + */ +function parse_header($header) +{ + static $trimmed = "\"' \n\t\r"; + $params = $matches = []; + + foreach (normalize_header($header) as $val) { + $part = []; + foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) { + if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) { + $m = $matches[0]; + if (isset($m[1])) { + $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed); + } else { + $part[] = trim($m[0], $trimmed); + } + } + } + if ($part) { + $params[] = $part; + } + } + + return $params; +} + +/** + * Converts an array of header values that may contain comma separated + * headers into an array of headers with no comma separated values. + * + * @param string|array $header Header to normalize. + * + * @return array Returns the normalized header field values. + */ +function normalize_header($header) +{ + if (!is_array($header)) { + return array_map('trim', explode(',', $header)); + } + + $result = []; + foreach ($header as $value) { + foreach ((array) $value as $v) { + if (strpos($v, ',') === false) { + $result[] = $v; + continue; + } + foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) { + $result[] = trim($vv); + } + } + } + + return $result; +} + +/** + * Clone and modify a request with the given changes. + * + * The changes can be one of: + * - method: (string) Changes the HTTP method. + * - set_headers: (array) Sets the given headers. + * - remove_headers: (array) Remove the given headers. + * - body: (mixed) Sets the given body. + * - uri: (UriInterface) Set the URI. + * - query: (string) Set the query string value of the URI. + * - version: (string) Set the protocol version. + * + * @param RequestInterface $request Request to clone and modify. + * @param array $changes Changes to apply. + * + * @return RequestInterface + */ +function modify_request(RequestInterface $request, array $changes) +{ + if (!$changes) { + return $request; + } + + $headers = $request->getHeaders(); + + if (!isset($changes['uri'])) { + $uri = $request->getUri(); + } else { + // Remove the host header if one is on the URI + if ($host = $changes['uri']->getHost()) { + $changes['set_headers']['Host'] = $host; + + if ($port = $changes['uri']->getPort()) { + $standardPorts = ['http' => 80, 'https' => 443]; + $scheme = $changes['uri']->getScheme(); + if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) { + $changes['set_headers']['Host'] .= ':'.$port; + } + } + } + $uri = $changes['uri']; + } + + if (!empty($changes['remove_headers'])) { + $headers = _caseless_remove($changes['remove_headers'], $headers); + } + + if (!empty($changes['set_headers'])) { + $headers = _caseless_remove(array_keys($changes['set_headers']), $headers); + $headers = $changes['set_headers'] + $headers; + } + + if (isset($changes['query'])) { + $uri = $uri->withQuery($changes['query']); + } + + if ($request instanceof ServerRequestInterface) { + return (new ServerRequest( + isset($changes['method']) ? $changes['method'] : $request->getMethod(), + $uri, + $headers, + isset($changes['body']) ? $changes['body'] : $request->getBody(), + isset($changes['version']) + ? $changes['version'] + : $request->getProtocolVersion(), + $request->getServerParams() + )) + ->withParsedBody($request->getParsedBody()) + ->withQueryParams($request->getQueryParams()) + ->withCookieParams($request->getCookieParams()) + ->withUploadedFiles($request->getUploadedFiles()); + } + + return new Request( + isset($changes['method']) ? $changes['method'] : $request->getMethod(), + $uri, + $headers, + isset($changes['body']) ? $changes['body'] : $request->getBody(), + isset($changes['version']) + ? $changes['version'] + : $request->getProtocolVersion() + ); +} + +/** + * Attempts to rewind a message body and throws an exception on failure. + * + * The body of the message will only be rewound if a call to `tell()` returns a + * value other than `0`. + * + * @param MessageInterface $message Message to rewind + * + * @throws \RuntimeException + */ +function rewind_body(MessageInterface $message) +{ + $body = $message->getBody(); + + if ($body->tell()) { + $body->rewind(); + } +} + +/** + * Safely opens a PHP stream resource using a filename. + * + * When fopen fails, PHP normally raises a warning. This function adds an + * error handler that checks for errors and throws an exception instead. + * + * @param string $filename File to open + * @param string $mode Mode used to open the file + * + * @return resource + * @throws \RuntimeException if the file cannot be opened + */ +function try_fopen($filename, $mode) +{ + $ex = null; + set_error_handler(function () use ($filename, $mode, &$ex) { + $ex = new \RuntimeException(sprintf( + 'Unable to open %s using mode %s: %s', + $filename, + $mode, + func_get_args()[1] + )); + }); + + $handle = fopen($filename, $mode); + restore_error_handler(); + + if ($ex) { + /** @var $ex \RuntimeException */ + throw $ex; + } + + return $handle; +} + +/** + * Copy the contents of a stream into a string until the given number of + * bytes have been read. + * + * @param StreamInterface $stream Stream to read + * @param int $maxLen Maximum number of bytes to read. Pass -1 + * to read the entire stream. + * @return string + * @throws \RuntimeException on error. + */ +function copy_to_string(StreamInterface $stream, $maxLen = -1) +{ + $buffer = ''; + + if ($maxLen === -1) { + while (!$stream->eof()) { + $buf = $stream->read(1048576); + // Using a loose equality here to match on '' and false. + if ($buf == null) { + break; + } + $buffer .= $buf; + } + return $buffer; + } + + $len = 0; + while (!$stream->eof() && $len < $maxLen) { + $buf = $stream->read($maxLen - $len); + // Using a loose equality here to match on '' and false. + if ($buf == null) { + break; + } + $buffer .= $buf; + $len = strlen($buffer); + } + + return $buffer; +} + +/** + * Copy the contents of a stream into another stream until the given number + * of bytes have been read. + * + * @param StreamInterface $source Stream to read from + * @param StreamInterface $dest Stream to write to + * @param int $maxLen Maximum number of bytes to read. Pass -1 + * to read the entire stream. + * + * @throws \RuntimeException on error. + */ +function copy_to_stream( + StreamInterface $source, + StreamInterface $dest, + $maxLen = -1 +) { + $bufferSize = 8192; + + if ($maxLen === -1) { + while (!$source->eof()) { + if (!$dest->write($source->read($bufferSize))) { + break; + } + } + } else { + $remaining = $maxLen; + while ($remaining > 0 && !$source->eof()) { + $buf = $source->read(min($bufferSize, $remaining)); + $len = strlen($buf); + if (!$len) { + break; + } + $remaining -= $len; + $dest->write($buf); + } + } +} + +/** + * Calculate a hash of a Stream + * + * @param StreamInterface $stream Stream to calculate the hash for + * @param string $algo Hash algorithm (e.g. md5, crc32, etc) + * @param bool $rawOutput Whether or not to use raw output + * + * @return string Returns the hash of the stream + * @throws \RuntimeException on error. + */ +function hash( + StreamInterface $stream, + $algo, + $rawOutput = false +) { + $pos = $stream->tell(); + + if ($pos > 0) { + $stream->rewind(); + } + + $ctx = hash_init($algo); + while (!$stream->eof()) { + hash_update($ctx, $stream->read(1048576)); + } + + $out = hash_final($ctx, (bool) $rawOutput); + $stream->seek($pos); + + return $out; +} + +/** + * Read a line from the stream up to the maximum allowed buffer length + * + * @param StreamInterface $stream Stream to read from + * @param int $maxLength Maximum buffer length + * + * @return string + */ +function readline(StreamInterface $stream, $maxLength = null) +{ + $buffer = ''; + $size = 0; + + while (!$stream->eof()) { + // Using a loose equality here to match on '' and false. + if (null == ($byte = $stream->read(1))) { + return $buffer; + } + $buffer .= $byte; + // Break when a new line is found or the max length - 1 is reached + if ($byte === "\n" || ++$size === $maxLength - 1) { + break; + } + } + + return $buffer; +} + +/** + * Parses a request message string into a request object. + * + * @param string $message Request message string. + * + * @return Request + */ +function parse_request($message) +{ + $data = _parse_message($message); + $matches = []; + if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) { + throw new \InvalidArgumentException('Invalid request string'); + } + $parts = explode(' ', $data['start-line'], 3); + $version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1'; + + $request = new Request( + $parts[0], + $matches[1] === '/' ? _parse_request_uri($parts[1], $data['headers']) : $parts[1], + $data['headers'], + $data['body'], + $version + ); + + return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]); +} + +/** + * Parses a response message string into a response object. + * + * @param string $message Response message string. + * + * @return Response + */ +function parse_response($message) +{ + $data = _parse_message($message); + // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space + // between status-code and reason-phrase is required. But browsers accept + // responses without space and reason as well. + if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) { + throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']); + } + $parts = explode(' ', $data['start-line'], 3); + + return new Response( + $parts[1], + $data['headers'], + $data['body'], + explode('/', $parts[0])[1], + isset($parts[2]) ? $parts[2] : null + ); +} + +/** + * Parse a query string into an associative array. + * + * If multiple values are found for the same key, the value of that key + * value pair will become an array. This function does not parse nested + * PHP style arrays into an associative array (e.g., foo[a]=1&foo[b]=2 will + * be parsed into ['foo[a]' => '1', 'foo[b]' => '2']). + * + * @param string $str Query string to parse + * @param int|bool $urlEncoding How the query string is encoded + * + * @return array + */ +function parse_query($str, $urlEncoding = true) +{ + $result = []; + + if ($str === '') { + return $result; + } + + if ($urlEncoding === true) { + $decoder = function ($value) { + return rawurldecode(str_replace('+', ' ', $value)); + }; + } elseif ($urlEncoding === PHP_QUERY_RFC3986) { + $decoder = 'rawurldecode'; + } elseif ($urlEncoding === PHP_QUERY_RFC1738) { + $decoder = 'urldecode'; + } else { + $decoder = function ($str) { return $str; }; + } + + foreach (explode('&', $str) as $kvp) { + $parts = explode('=', $kvp, 2); + $key = $decoder($parts[0]); + $value = isset($parts[1]) ? $decoder($parts[1]) : null; + if (!isset($result[$key])) { + $result[$key] = $value; + } else { + if (!is_array($result[$key])) { + $result[$key] = [$result[$key]]; + } + $result[$key][] = $value; + } + } + + return $result; +} + +/** + * Build a query string from an array of key value pairs. + * + * This function can use the return value of parse_query() to build a query + * string. This function does not modify the provided keys when an array is + * encountered (like http_build_query would). + * + * @param array $params Query string parameters. + * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 + * to encode using RFC3986, or PHP_QUERY_RFC1738 + * to encode using RFC1738. + * @return string + */ +function build_query(array $params, $encoding = PHP_QUERY_RFC3986) +{ + if (!$params) { + return ''; + } + + if ($encoding === false) { + $encoder = function ($str) { return $str; }; + } elseif ($encoding === PHP_QUERY_RFC3986) { + $encoder = 'rawurlencode'; + } elseif ($encoding === PHP_QUERY_RFC1738) { + $encoder = 'urlencode'; + } else { + throw new \InvalidArgumentException('Invalid type'); + } + + $qs = ''; + foreach ($params as $k => $v) { + $k = $encoder($k); + if (!is_array($v)) { + $qs .= $k; + if ($v !== null) { + $qs .= '=' . $encoder($v); + } + $qs .= '&'; + } else { + foreach ($v as $vv) { + $qs .= $k; + if ($vv !== null) { + $qs .= '=' . $encoder($vv); + } + $qs .= '&'; + } + } + } + + return $qs ? (string) substr($qs, 0, -1) : ''; +} + +/** + * Determines the mimetype of a file by looking at its extension. + * + * @param $filename + * + * @return null|string + */ +function mimetype_from_filename($filename) +{ + return mimetype_from_extension(pathinfo($filename, PATHINFO_EXTENSION)); +} + +/** + * Maps a file extensions to a mimetype. + * + * @param $extension string The file extension. + * + * @return string|null + * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types + */ +function mimetype_from_extension($extension) +{ + static $mimetypes = [ + '3gp' => 'video/3gpp', + '7z' => 'application/x-7z-compressed', + 'aac' => 'audio/x-aac', + 'ai' => 'application/postscript', + 'aif' => 'audio/x-aiff', + 'asc' => 'text/plain', + 'asf' => 'video/x-ms-asf', + 'atom' => 'application/atom+xml', + 'avi' => 'video/x-msvideo', + 'bmp' => 'image/bmp', + 'bz2' => 'application/x-bzip2', + 'cer' => 'application/pkix-cert', + 'crl' => 'application/pkix-crl', + 'crt' => 'application/x-x509-ca-cert', + 'css' => 'text/css', + 'csv' => 'text/csv', + 'cu' => 'application/cu-seeme', + 'deb' => 'application/x-debian-package', + 'doc' => 'application/msword', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'dvi' => 'application/x-dvi', + 'eot' => 'application/vnd.ms-fontobject', + 'eps' => 'application/postscript', + 'epub' => 'application/epub+zip', + 'etx' => 'text/x-setext', + 'flac' => 'audio/flac', + 'flv' => 'video/x-flv', + 'gif' => 'image/gif', + 'gz' => 'application/gzip', + 'htm' => 'text/html', + 'html' => 'text/html', + 'ico' => 'image/x-icon', + 'ics' => 'text/calendar', + 'ini' => 'text/plain', + 'iso' => 'application/x-iso9660-image', + 'jar' => 'application/java-archive', + 'jpe' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'js' => 'text/javascript', + 'json' => 'application/json', + 'latex' => 'application/x-latex', + 'log' => 'text/plain', + 'm4a' => 'audio/mp4', + 'm4v' => 'video/mp4', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mov' => 'video/quicktime', + 'mkv' => 'video/x-matroska', + 'mp3' => 'audio/mpeg', + 'mp4' => 'video/mp4', + 'mp4a' => 'audio/mp4', + 'mp4v' => 'video/mp4', + 'mpe' => 'video/mpeg', + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mpg4' => 'video/mp4', + 'oga' => 'audio/ogg', + 'ogg' => 'audio/ogg', + 'ogv' => 'video/ogg', + 'ogx' => 'application/ogg', + 'pbm' => 'image/x-portable-bitmap', + 'pdf' => 'application/pdf', + 'pgm' => 'image/x-portable-graymap', + 'png' => 'image/png', + 'pnm' => 'image/x-portable-anymap', + 'ppm' => 'image/x-portable-pixmap', + 'ppt' => 'application/vnd.ms-powerpoint', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'ps' => 'application/postscript', + 'qt' => 'video/quicktime', + 'rar' => 'application/x-rar-compressed', + 'ras' => 'image/x-cmu-raster', + 'rss' => 'application/rss+xml', + 'rtf' => 'application/rtf', + 'sgm' => 'text/sgml', + 'sgml' => 'text/sgml', + 'svg' => 'image/svg+xml', + 'swf' => 'application/x-shockwave-flash', + 'tar' => 'application/x-tar', + 'tif' => 'image/tiff', + 'tiff' => 'image/tiff', + 'torrent' => 'application/x-bittorrent', + 'ttf' => 'application/x-font-ttf', + 'txt' => 'text/plain', + 'wav' => 'audio/x-wav', + 'webm' => 'video/webm', + 'webp' => 'image/webp', + 'wma' => 'audio/x-ms-wma', + 'wmv' => 'video/x-ms-wmv', + 'woff' => 'application/x-font-woff', + 'wsdl' => 'application/wsdl+xml', + 'xbm' => 'image/x-xbitmap', + 'xls' => 'application/vnd.ms-excel', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xml' => 'application/xml', + 'xpm' => 'image/x-xpixmap', + 'xwd' => 'image/x-xwindowdump', + 'yaml' => 'text/yaml', + 'yml' => 'text/yaml', + 'zip' => 'application/zip', + ]; + + $extension = strtolower($extension); + + return isset($mimetypes[$extension]) + ? $mimetypes[$extension] + : null; +} + +/** + * Parses an HTTP message into an associative array. + * + * The array contains the "start-line" key containing the start line of + * the message, "headers" key containing an associative array of header + * array values, and a "body" key containing the body of the message. + * + * @param string $message HTTP request or response to parse. + * + * @return array + * @internal + */ +function _parse_message($message) +{ + if (!$message) { + throw new \InvalidArgumentException('Invalid message'); + } + + $message = ltrim($message, "\r\n"); + + $messageParts = preg_split("/\r?\n\r?\n/", $message, 2); + + if ($messageParts === false || count($messageParts) !== 2) { + throw new \InvalidArgumentException('Invalid message: Missing header delimiter'); + } + + list($rawHeaders, $body) = $messageParts; + $rawHeaders .= "\r\n"; // Put back the delimiter we split previously + $headerParts = preg_split("/\r?\n/", $rawHeaders, 2); + + if ($headerParts === false || count($headerParts) !== 2) { + throw new \InvalidArgumentException('Invalid message: Missing status line'); + } + + list($startLine, $rawHeaders) = $headerParts; + + if (preg_match("/(?:^HTTP\/|^[A-Z]+ \S+ HTTP\/)(\d+(?:\.\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') { + // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0 + $rawHeaders = preg_replace(Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders); + } + + /** @var array[] $headerLines */ + $count = preg_match_all(Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, PREG_SET_ORDER); + + // If these aren't the same, then one line didn't match and there's an invalid header. + if ($count !== substr_count($rawHeaders, "\n")) { + // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4 + if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) { + throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding'); + } + + throw new \InvalidArgumentException('Invalid header syntax'); + } + + $headers = []; + + foreach ($headerLines as $headerLine) { + $headers[$headerLine[1]][] = $headerLine[2]; + } + + return [ + 'start-line' => $startLine, + 'headers' => $headers, + 'body' => $body, + ]; +} + +/** + * Constructs a URI for an HTTP request message. + * + * @param string $path Path from the start-line + * @param array $headers Array of headers (each value an array). + * + * @return string + * @internal + */ +function _parse_request_uri($path, array $headers) +{ + $hostKey = array_filter(array_keys($headers), function ($k) { + return strtolower($k) === 'host'; + }); + + // If no host is found, then a full URI cannot be constructed. + if (!$hostKey) { + return $path; + } + + $host = $headers[reset($hostKey)][0]; + $scheme = substr($host, -4) === ':443' ? 'https' : 'http'; + + return $scheme . '://' . $host . '/' . ltrim($path, '/'); +} + +/** + * Get a short summary of the message body + * + * Will return `null` if the response is not printable. + * + * @param MessageInterface $message The message to get the body summary + * @param int $truncateAt The maximum allowed size of the summary + * + * @return null|string + */ +function get_message_body_summary(MessageInterface $message, $truncateAt = 120) +{ + $body = $message->getBody(); + + if (!$body->isSeekable() || !$body->isReadable()) { + return null; + } + + $size = $body->getSize(); + + if ($size === 0) { + return null; + } + + $summary = $body->read($truncateAt); + $body->rewind(); + + if ($size > $truncateAt) { + $summary .= ' (truncated...)'; + } + + // Matches any printable character, including unicode characters: + // letters, marks, numbers, punctuation, spacing, and separators. + if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/', $summary)) { + return null; + } + + return $summary; +} + +/** @internal */ +function _caseless_remove($keys, array $data) +{ + $result = []; + + foreach ($keys as &$key) { + $key = strtolower($key); + } + + foreach ($data as $k => $v) { + if (!in_array(strtolower($k), $keys)) { + $result[$k] = $v; + } + } + + return $result; +} diff --git a/vendor/guzzlehttp/psr7/src/functions_include.php b/vendor/guzzlehttp/psr7/src/functions_include.php new file mode 100644 index 0000000..96a4a83 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/functions_include.php @@ -0,0 +1,6 @@ +`_ +using the ``mtdowling/jmespath.php`` package. + +.. code-block:: php + + require 'vendor/autoload.php'; + + $expression = 'foo.*.baz'; + + $data = [ + 'foo' => [ + 'bar' => ['baz' => 1], + 'bam' => ['baz' => 2], + 'boo' => ['baz' => 3] + ] + ]; + + JmesPath\search($expression, $data); + // Returns: [1, 2, 3] + +- `JMESPath Tutorial `_ +- `JMESPath Grammar `_ +- `JMESPath Python library `_ + +PHP Usage +========= + +The ``JmesPath\search`` function can be used in most cases when using the +library. This function utilizes a JMESPath runtime based on your environment. +The runtime utilized can be configured using environment variables and may at +some point in the future automatically utilize a C extension if available. + +.. code-block:: php + + $result = JmesPath\search($expression, $data); + + // or, if you require PSR-4 compliance. + $result = JmesPath\Env::search($expression, $data); + +Runtimes +-------- + +jmespath.php utilizes *runtimes*. There are currently two runtimes: +AstRuntime and CompilerRuntime. + +AstRuntime is utilized by ``JmesPath\search()`` and ``JmesPath\Env::search()`` +by default. + +AstRuntime +~~~~~~~~~~ + +The AstRuntime will parse an expression, cache the resulting AST in memory, +and interpret the AST using an external tree visitor. AstRuntime provides a +good general approach for interpreting JMESPath expressions that have a low to +moderate level of reuse. + +.. code-block:: php + + $runtime = new JmesPath\AstRuntime(); + $runtime('foo.bar', ['foo' => ['bar' => 'baz']]); + // > 'baz' + +CompilerRuntime +~~~~~~~~~~~~~~~ + +``JmesPath\CompilerRuntime`` provides the most performance for +applications that have a moderate to high level of reuse of JMESPath +expressions. The CompilerRuntime will walk a JMESPath AST and emit PHP source +code, resulting in anywhere from 7x to 60x speed improvements. + +Compiling JMESPath expressions to source code is a slower process than just +walking and interpreting a JMESPath AST (via the AstRuntime). However, +running the compiled JMESPath code results in much better performance than +walking an AST. This essentially means that there is a warm-up period when +using the ``CompilerRuntime``, but after the warm-up period, it will provide +much better performance. + +Use the CompilerRuntime if you know that you will be executing JMESPath +expressions more than once or if you can pre-compile JMESPath expressions +before executing them (for example, server-side applications). + +.. code-block:: php + + // Note: The cache directory argument is optional. + $runtime = new JmesPath\CompilerRuntime('/path/to/compile/folder'); + $runtime('foo.bar', ['foo' => ['bar' => 'baz']]); + // > 'baz' + +Environment Variables +^^^^^^^^^^^^^^^^^^^^^ + +You can utilize the CompilerRuntime in ``JmesPath\search()`` by setting +the ``JP_PHP_COMPILE`` environment variable to "on" or to a directory +on disk used to store cached expressions. + +Testing +======= + +A comprehensive list of test cases can be found at +https://github.com/jmespath/jmespath.php/tree/master/tests/compliance. +These compliance tests are utilized by jmespath.php to ensure consistency with +other implementations, and can serve as examples of the language. + +jmespath.php is tested using PHPUnit. In order to run the tests, you need to +first install the dependencies using Composer as described in the *Installation* +section. Next you just need to run the tests via make: + +.. code-block:: bash + + make test + +You can run a suite of performance tests as well: + +.. code-block:: bash + + make perf diff --git a/vendor/mtdowling/jmespath.php/bin/jp.php b/vendor/mtdowling/jmespath.php/bin/jp.php new file mode 100755 index 0000000..f32e4ec --- /dev/null +++ b/vendor/mtdowling/jmespath.php/bin/jp.php @@ -0,0 +1,65 @@ +#!/usr/bin/env php +=5.4.0" + }, + + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + + "autoload": { + "psr-4": { + "JmesPath\\": "src/" + }, + "files": ["src/JmesPath.php"] + }, + + "bin": ["bin/jp.php"], + + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + } +} diff --git a/vendor/mtdowling/jmespath.php/phpunit.xml.dist b/vendor/mtdowling/jmespath.php/phpunit.xml.dist new file mode 100644 index 0000000..9283ca5 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/phpunit.xml.dist @@ -0,0 +1,17 @@ + + + + + + tests + + + + + + src + + + + diff --git a/vendor/mtdowling/jmespath.php/src/AstRuntime.php b/vendor/mtdowling/jmespath.php/src/AstRuntime.php new file mode 100644 index 0000000..db8a60e --- /dev/null +++ b/vendor/mtdowling/jmespath.php/src/AstRuntime.php @@ -0,0 +1,47 @@ +interpreter = new TreeInterpreter($fnDispatcher); + $this->parser = $parser ?: new Parser(); + } + + /** + * Returns data from the provided input that matches a given JMESPath + * expression. + * + * @param string $expression JMESPath expression to evaluate + * @param mixed $data Data to search. This data should be data that + * is similar to data returned from json_decode + * using associative arrays rather than objects. + * + * @return mixed|null Returns the matching data or null + */ + public function __invoke($expression, $data) + { + if (!isset($this->cache[$expression])) { + // Clear the AST cache when it hits 1024 entries + if (++$this->cachedCount > 1024) { + $this->cache = []; + $this->cachedCount = 0; + } + $this->cache[$expression] = $this->parser->parse($expression); + } + + return $this->interpreter->visit($this->cache[$expression], $data); + } +} diff --git a/vendor/mtdowling/jmespath.php/src/CompilerRuntime.php b/vendor/mtdowling/jmespath.php/src/CompilerRuntime.php new file mode 100644 index 0000000..f2becb9 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/src/CompilerRuntime.php @@ -0,0 +1,83 @@ +parser = $parser ?: new Parser(); + $this->compiler = new TreeCompiler(); + $dir = $dir ?: sys_get_temp_dir(); + + if (!is_dir($dir) && !mkdir($dir, 0755, true)) { + throw new \RuntimeException("Unable to create cache directory: $dir"); + } + + $this->cacheDir = realpath($dir); + $this->interpreter = new TreeInterpreter(); + } + + /** + * Returns data from the provided input that matches a given JMESPath + * expression. + * + * @param string $expression JMESPath expression to evaluate + * @param mixed $data Data to search. This data should be data that + * is similar to data returned from json_decode + * using associative arrays rather than objects. + * + * @return mixed|null Returns the matching data or null + * @throws \RuntimeException + */ + public function __invoke($expression, $data) + { + $functionName = 'jmespath_' . md5($expression); + + if (!function_exists($functionName)) { + $filename = "{$this->cacheDir}/{$functionName}.php"; + if (!file_exists($filename)) { + $this->compile($filename, $expression, $functionName); + } + require $filename; + } + + return $functionName($this->interpreter, $data); + } + + private function compile($filename, $expression, $functionName) + { + $code = $this->compiler->visit( + $this->parser->parse($expression), + $functionName, + $expression + ); + + if (!file_put_contents($filename, $code)) { + throw new \RuntimeException(sprintf( + 'Unable to write the compiled PHP code to: %s (%s)', + $filename, + var_export(error_get_last(), true) + )); + } + } +} diff --git a/vendor/mtdowling/jmespath.php/src/DebugRuntime.php b/vendor/mtdowling/jmespath.php/src/DebugRuntime.php new file mode 100644 index 0000000..4052561 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/src/DebugRuntime.php @@ -0,0 +1,109 @@ +runtime = $runtime; + $this->out = $output ?: STDOUT; + $this->lexer = new Lexer(); + $this->parser = new Parser($this->lexer); + } + + public function __invoke($expression, $data) + { + if ($this->runtime instanceof CompilerRuntime) { + return $this->debugCompiled($expression, $data); + } + + return $this->debugInterpreted($expression, $data); + } + + private function debugInterpreted($expression, $data) + { + return $this->debugCallback( + function () use ($expression, $data) { + $runtime = $this->runtime; + return $runtime($expression, $data); + }, + $expression, + $data + ); + } + + private function debugCompiled($expression, $data) + { + $result = $this->debugCallback( + function () use ($expression, $data) { + $runtime = $this->runtime; + return $runtime($expression, $data); + }, + $expression, + $data + ); + $this->dumpCompiledCode($expression); + + return $result; + } + + private function dumpTokens($expression) + { + $lexer = new Lexer(); + fwrite($this->out, "Tokens\n======\n\n"); + $tokens = $lexer->tokenize($expression); + + foreach ($tokens as $t) { + fprintf( + $this->out, + "%3d %-13s %s\n", $t['pos'], $t['type'], + json_encode($t['value']) + ); + } + + fwrite($this->out, "\n"); + } + + private function dumpAst($expression) + { + $parser = new Parser(); + $ast = $parser->parse($expression); + fwrite($this->out, "AST\n========\n\n"); + fwrite($this->out, json_encode($ast, JSON_PRETTY_PRINT) . "\n"); + } + + private function dumpCompiledCode($expression) + { + fwrite($this->out, "Code\n========\n\n"); + $dir = sys_get_temp_dir(); + $hash = md5($expression); + $functionName = "jmespath_{$hash}"; + $filename = "{$dir}/{$functionName}.php"; + fwrite($this->out, "File: {$filename}\n\n"); + fprintf($this->out, file_get_contents($filename)); + } + + private function debugCallback(callable $debugFn, $expression, $data) + { + fprintf($this->out, "Expression\n==========\n\n%s\n\n", $expression); + $this->dumpTokens($expression); + $this->dumpAst($expression); + fprintf($this->out, "\nData\n====\n\n%s\n\n", json_encode($data, JSON_PRETTY_PRINT)); + $startTime = microtime(true); + $result = $debugFn(); + $total = microtime(true) - $startTime; + fprintf($this->out, "\nResult\n======\n\n%s\n\n", json_encode($result, JSON_PRETTY_PRINT)); + fwrite($this->out, "Time\n====\n\n"); + fprintf($this->out, "Total time: %f ms\n\n", $total); + + return $result; + } +} diff --git a/vendor/mtdowling/jmespath.php/src/Env.php b/vendor/mtdowling/jmespath.php/src/Env.php new file mode 100644 index 0000000..9da5d69 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/src/Env.php @@ -0,0 +1,66 @@ +{'fn_' . $fn}($args); + } + + private function fn_abs(array $args) + { + $this->validate('abs', $args, [['number']]); + return abs($args[0]); + } + + private function fn_avg(array $args) + { + $this->validate('avg', $args, [['array']]); + $sum = $this->reduce('avg:0', $args[0], ['number'], function ($a, $b) { + return $a + $b; + }); + return $args[0] ? ($sum / count($args[0])) : null; + } + + private function fn_ceil(array $args) + { + $this->validate('ceil', $args, [['number']]); + return ceil($args[0]); + } + + private function fn_contains(array $args) + { + $this->validate('contains', $args, [['string', 'array'], ['any']]); + if (is_array($args[0])) { + return in_array($args[1], $args[0]); + } elseif (is_string($args[1])) { + return strpos($args[0], $args[1]) !== false; + } else { + return null; + } + } + + private function fn_ends_with(array $args) + { + $this->validate('ends_with', $args, [['string'], ['string']]); + list($search, $suffix) = $args; + return $suffix === '' || substr($search, -strlen($suffix)) === $suffix; + } + + private function fn_floor(array $args) + { + $this->validate('floor', $args, [['number']]); + return floor($args[0]); + } + + private function fn_not_null(array $args) + { + if (!$args) { + throw new \RuntimeException( + "not_null() expects 1 or more arguments, 0 were provided" + ); + } + + return array_reduce($args, function ($carry, $item) { + return $carry !== null ? $carry : $item; + }); + } + + private function fn_join(array $args) + { + $this->validate('join', $args, [['string'], ['array']]); + $fn = function ($a, $b, $i) use ($args) { + return $i ? ($a . $args[0] . $b) : $b; + }; + return $this->reduce('join:0', $args[1], ['string'], $fn); + } + + private function fn_keys(array $args) + { + $this->validate('keys', $args, [['object']]); + return array_keys((array) $args[0]); + } + + private function fn_length(array $args) + { + $this->validate('length', $args, [['string', 'array', 'object']]); + return is_string($args[0]) ? strlen($args[0]) : count((array) $args[0]); + } + + private function fn_max(array $args) + { + $this->validate('max', $args, [['array']]); + $fn = function ($a, $b) { return $a >= $b ? $a : $b; }; + return $this->reduce('max:0', $args[0], ['number', 'string'], $fn); + } + + private function fn_max_by(array $args) + { + $this->validate('max_by', $args, [['array'], ['expression']]); + $expr = $this->wrapExpression('max_by:1', $args[1], ['number', 'string']); + $fn = function ($carry, $item, $index) use ($expr) { + return $index + ? ($expr($carry) >= $expr($item) ? $carry : $item) + : $item; + }; + return $this->reduce('max_by:1', $args[0], ['any'], $fn); + } + + private function fn_min(array $args) + { + $this->validate('min', $args, [['array']]); + $fn = function ($a, $b, $i) { return $i && $a <= $b ? $a : $b; }; + return $this->reduce('min:0', $args[0], ['number', 'string'], $fn); + } + + private function fn_min_by(array $args) + { + $this->validate('min_by', $args, [['array'], ['expression']]); + $expr = $this->wrapExpression('min_by:1', $args[1], ['number', 'string']); + $i = -1; + $fn = function ($a, $b) use ($expr, &$i) { + return ++$i ? ($expr($a) <= $expr($b) ? $a : $b) : $b; + }; + return $this->reduce('min_by:1', $args[0], ['any'], $fn); + } + + private function fn_reverse(array $args) + { + $this->validate('reverse', $args, [['array', 'string']]); + if (is_array($args[0])) { + return array_reverse($args[0]); + } elseif (is_string($args[0])) { + return strrev($args[0]); + } else { + throw new \RuntimeException('Cannot reverse provided argument'); + } + } + + private function fn_sum(array $args) + { + $this->validate('sum', $args, [['array']]); + $fn = function ($a, $b) { return $a + $b; }; + return $this->reduce('sum:0', $args[0], ['number'], $fn); + } + + private function fn_sort(array $args) + { + $this->validate('sort', $args, [['array']]); + $valid = ['string', 'number']; + return Utils::stableSort($args[0], function ($a, $b) use ($valid) { + $this->validateSeq('sort:0', $valid, $a, $b); + return strnatcmp($a, $b); + }); + } + + private function fn_sort_by(array $args) + { + $this->validate('sort_by', $args, [['array'], ['expression']]); + $expr = $args[1]; + $valid = ['string', 'number']; + return Utils::stableSort( + $args[0], + function ($a, $b) use ($expr, $valid) { + $va = $expr($a); + $vb = $expr($b); + $this->validateSeq('sort_by:0', $valid, $va, $vb); + return strnatcmp($va, $vb); + } + ); + } + + private function fn_starts_with(array $args) + { + $this->validate('starts_with', $args, [['string'], ['string']]); + list($search, $prefix) = $args; + return $prefix === '' || strpos($search, $prefix) === 0; + } + + private function fn_type(array $args) + { + $this->validateArity('type', count($args), 1); + return Utils::type($args[0]); + } + + private function fn_to_string(array $args) + { + $this->validateArity('to_string', count($args), 1); + $v = $args[0]; + if (is_string($v)) { + return $v; + } elseif (is_object($v) + && !($v instanceof \JsonSerializable) + && method_exists($v, '__toString') + ) { + return (string) $v; + } + + return json_encode($v); + } + + private function fn_to_number(array $args) + { + $this->validateArity('to_number', count($args), 1); + $value = $args[0]; + $type = Utils::type($value); + if ($type == 'number') { + return $value; + } elseif ($type == 'string' && is_numeric($value)) { + return strpos($value, '.') ? (float) $value : (int) $value; + } else { + return null; + } + } + + private function fn_values(array $args) + { + $this->validate('values', $args, [['array', 'object']]); + return array_values((array) $args[0]); + } + + private function fn_merge(array $args) + { + if (!$args) { + throw new \RuntimeException( + "merge() expects 1 or more arguments, 0 were provided" + ); + } + + return call_user_func_array('array_replace', $args); + } + + private function fn_to_array(array $args) + { + $this->validate('to_array', $args, [['any']]); + + return Utils::isArray($args[0]) ? $args[0] : [$args[0]]; + } + + private function fn_map(array $args) + { + $this->validate('map', $args, [['expression'], ['any']]); + $result = []; + foreach ($args[1] as $a) { + $result[] = $args[0]($a); + } + return $result; + } + + private function typeError($from, $msg) + { + if (strpos($from, ':')) { + list($fn, $pos) = explode(':', $from); + throw new \RuntimeException( + sprintf('Argument %d of %s %s', $pos, $fn, $msg) + ); + } else { + throw new \RuntimeException( + sprintf('Type error: %s %s', $from, $msg) + ); + } + } + + private function validateArity($from, $given, $expected) + { + if ($given != $expected) { + $err = "%s() expects {$expected} arguments, {$given} were provided"; + throw new \RuntimeException(sprintf($err, $from)); + } + } + + private function validate($from, $args, $types = []) + { + $this->validateArity($from, count($args), count($types)); + foreach ($args as $index => $value) { + if (!isset($types[$index]) || !$types[$index]) { + continue; + } + $this->validateType("{$from}:{$index}", $value, $types[$index]); + } + } + + private function validateType($from, $value, array $types) + { + if ($types[0] == 'any' + || in_array(Utils::type($value), $types) + || ($value === [] && in_array('object', $types)) + ) { + return; + } + $msg = 'must be one of the following types: ' . implode(', ', $types) + . '. ' . Utils::type($value) . ' found'; + $this->typeError($from, $msg); + } + + /** + * Validates value A and B, ensures they both are correctly typed, and of + * the same type. + * + * @param string $from String of function:argument_position + * @param array $types Array of valid value types. + * @param mixed $a Value A + * @param mixed $b Value B + */ + private function validateSeq($from, array $types, $a, $b) + { + $ta = Utils::type($a); + $tb = Utils::type($b); + + if ($ta !== $tb) { + $msg = "encountered a type mismatch in sequence: {$ta}, {$tb}"; + $this->typeError($from, $msg); + } + + $typeMatch = ($types && $types[0] == 'any') || in_array($ta, $types); + if (!$typeMatch) { + $msg = 'encountered a type error in sequence. The argument must be ' + . 'an array of ' . implode('|', $types) . ' types. ' + . "Found {$ta}, {$tb}."; + $this->typeError($from, $msg); + } + } + + /** + * Reduces and validates an array of values to a single value using a fn. + * + * @param string $from String of function:argument_position + * @param array $values Values to reduce. + * @param array $types Array of valid value types. + * @param callable $reduce Reduce function that accepts ($carry, $item). + * + * @return mixed + */ + private function reduce($from, array $values, array $types, callable $reduce) + { + $i = -1; + return array_reduce( + $values, + function ($carry, $item) use ($from, $types, $reduce, &$i) { + if (++$i > 0) { + $this->validateSeq($from, $types, $carry, $item); + } + return $reduce($carry, $item, $i); + } + ); + } + + /** + * Validates the return values of expressions as they are applied. + * + * @param string $from Function name : position + * @param callable $expr Expression function to validate. + * @param array $types Array of acceptable return type values. + * + * @return callable Returns a wrapped function + */ + private function wrapExpression($from, callable $expr, array $types) + { + list($fn, $pos) = explode(':', $from); + $from = "The expression return value of argument {$pos} of {$fn}"; + return function ($value) use ($from, $expr, $types) { + $value = $expr($value); + $this->validateType($from, $value, $types); + return $value; + }; + } + + /** @internal Pass function name validation off to runtime */ + public function __call($name, $args) + { + $name = str_replace('fn_', '', $name); + throw new \RuntimeException("Call to undefined function {$name}"); + } +} diff --git a/vendor/mtdowling/jmespath.php/src/JmesPath.php b/vendor/mtdowling/jmespath.php/src/JmesPath.php new file mode 100644 index 0000000..e2c239a --- /dev/null +++ b/vendor/mtdowling/jmespath.php/src/JmesPath.php @@ -0,0 +1,17 @@ + self::STATE_LT, + '>' => self::STATE_GT, + '=' => self::STATE_EQ, + '!' => self::STATE_NOT, + '[' => self::STATE_LBRACKET, + '|' => self::STATE_PIPE, + '&' => self::STATE_AND, + '`' => self::STATE_JSON_LITERAL, + '"' => self::STATE_QUOTED_STRING, + "'" => self::STATE_STRING_LITERAL, + '-' => self::STATE_NUMBER, + '0' => self::STATE_NUMBER, + '1' => self::STATE_NUMBER, + '2' => self::STATE_NUMBER, + '3' => self::STATE_NUMBER, + '4' => self::STATE_NUMBER, + '5' => self::STATE_NUMBER, + '6' => self::STATE_NUMBER, + '7' => self::STATE_NUMBER, + '8' => self::STATE_NUMBER, + '9' => self::STATE_NUMBER, + ' ' => self::STATE_WHITESPACE, + "\t" => self::STATE_WHITESPACE, + "\n" => self::STATE_WHITESPACE, + "\r" => self::STATE_WHITESPACE, + '.' => self::STATE_SINGLE_CHAR, + '*' => self::STATE_SINGLE_CHAR, + ']' => self::STATE_SINGLE_CHAR, + ',' => self::STATE_SINGLE_CHAR, + ':' => self::STATE_SINGLE_CHAR, + '@' => self::STATE_SINGLE_CHAR, + '(' => self::STATE_SINGLE_CHAR, + ')' => self::STATE_SINGLE_CHAR, + '{' => self::STATE_SINGLE_CHAR, + '}' => self::STATE_SINGLE_CHAR, + '_' => self::STATE_IDENTIFIER, + 'A' => self::STATE_IDENTIFIER, + 'B' => self::STATE_IDENTIFIER, + 'C' => self::STATE_IDENTIFIER, + 'D' => self::STATE_IDENTIFIER, + 'E' => self::STATE_IDENTIFIER, + 'F' => self::STATE_IDENTIFIER, + 'G' => self::STATE_IDENTIFIER, + 'H' => self::STATE_IDENTIFIER, + 'I' => self::STATE_IDENTIFIER, + 'J' => self::STATE_IDENTIFIER, + 'K' => self::STATE_IDENTIFIER, + 'L' => self::STATE_IDENTIFIER, + 'M' => self::STATE_IDENTIFIER, + 'N' => self::STATE_IDENTIFIER, + 'O' => self::STATE_IDENTIFIER, + 'P' => self::STATE_IDENTIFIER, + 'Q' => self::STATE_IDENTIFIER, + 'R' => self::STATE_IDENTIFIER, + 'S' => self::STATE_IDENTIFIER, + 'T' => self::STATE_IDENTIFIER, + 'U' => self::STATE_IDENTIFIER, + 'V' => self::STATE_IDENTIFIER, + 'W' => self::STATE_IDENTIFIER, + 'X' => self::STATE_IDENTIFIER, + 'Y' => self::STATE_IDENTIFIER, + 'Z' => self::STATE_IDENTIFIER, + 'a' => self::STATE_IDENTIFIER, + 'b' => self::STATE_IDENTIFIER, + 'c' => self::STATE_IDENTIFIER, + 'd' => self::STATE_IDENTIFIER, + 'e' => self::STATE_IDENTIFIER, + 'f' => self::STATE_IDENTIFIER, + 'g' => self::STATE_IDENTIFIER, + 'h' => self::STATE_IDENTIFIER, + 'i' => self::STATE_IDENTIFIER, + 'j' => self::STATE_IDENTIFIER, + 'k' => self::STATE_IDENTIFIER, + 'l' => self::STATE_IDENTIFIER, + 'm' => self::STATE_IDENTIFIER, + 'n' => self::STATE_IDENTIFIER, + 'o' => self::STATE_IDENTIFIER, + 'p' => self::STATE_IDENTIFIER, + 'q' => self::STATE_IDENTIFIER, + 'r' => self::STATE_IDENTIFIER, + 's' => self::STATE_IDENTIFIER, + 't' => self::STATE_IDENTIFIER, + 'u' => self::STATE_IDENTIFIER, + 'v' => self::STATE_IDENTIFIER, + 'w' => self::STATE_IDENTIFIER, + 'x' => self::STATE_IDENTIFIER, + 'y' => self::STATE_IDENTIFIER, + 'z' => self::STATE_IDENTIFIER, + ]; + + /** @var array Valid identifier characters after first character */ + private $validIdentifier = [ + 'A' => true, 'B' => true, 'C' => true, 'D' => true, 'E' => true, + 'F' => true, 'G' => true, 'H' => true, 'I' => true, 'J' => true, + 'K' => true, 'L' => true, 'M' => true, 'N' => true, 'O' => true, + 'P' => true, 'Q' => true, 'R' => true, 'S' => true, 'T' => true, + 'U' => true, 'V' => true, 'W' => true, 'X' => true, 'Y' => true, + 'Z' => true, 'a' => true, 'b' => true, 'c' => true, 'd' => true, + 'e' => true, 'f' => true, 'g' => true, 'h' => true, 'i' => true, + 'j' => true, 'k' => true, 'l' => true, 'm' => true, 'n' => true, + 'o' => true, 'p' => true, 'q' => true, 'r' => true, 's' => true, + 't' => true, 'u' => true, 'v' => true, 'w' => true, 'x' => true, + 'y' => true, 'z' => true, '_' => true, '0' => true, '1' => true, + '2' => true, '3' => true, '4' => true, '5' => true, '6' => true, + '7' => true, '8' => true, '9' => true, + ]; + + /** @var array Valid number characters after the first character */ + private $numbers = [ + '0' => true, '1' => true, '2' => true, '3' => true, '4' => true, + '5' => true, '6' => true, '7' => true, '8' => true, '9' => true + ]; + + /** @var array Map of simple single character tokens */ + private $simpleTokens = [ + '.' => self::T_DOT, + '*' => self::T_STAR, + ']' => self::T_RBRACKET, + ',' => self::T_COMMA, + ':' => self::T_COLON, + '@' => self::T_CURRENT, + '(' => self::T_LPAREN, + ')' => self::T_RPAREN, + '{' => self::T_LBRACE, + '}' => self::T_RBRACE, + ]; + + /** + * Tokenize the JMESPath expression into an array of tokens hashes that + * contain a 'type', 'value', and 'key'. + * + * @param string $input JMESPath input + * + * @return array + * @throws SyntaxErrorException + */ + public function tokenize($input) + { + $tokens = []; + + if ($input === '') { + goto eof; + } + + $chars = str_split($input); + + while (false !== ($current = current($chars))) { + + // Every character must be in the transition character table. + if (!isset(self::$transitionTable[$current])) { + $tokens[] = [ + 'type' => self::T_UNKNOWN, + 'pos' => key($chars), + 'value' => $current + ]; + next($chars); + continue; + } + + $state = self::$transitionTable[$current]; + + if ($state === self::STATE_SINGLE_CHAR) { + + // Consume simple tokens like ".", ",", "@", etc. + $tokens[] = [ + 'type' => $this->simpleTokens[$current], + 'pos' => key($chars), + 'value' => $current + ]; + next($chars); + + } elseif ($state === self::STATE_IDENTIFIER) { + + // Consume identifiers + $start = key($chars); + $buffer = ''; + do { + $buffer .= $current; + $current = next($chars); + } while ($current !== false && isset($this->validIdentifier[$current])); + $tokens[] = [ + 'type' => self::T_IDENTIFIER, + 'value' => $buffer, + 'pos' => $start + ]; + + } elseif ($state === self::STATE_WHITESPACE) { + + // Skip whitespace + next($chars); + + } elseif ($state === self::STATE_LBRACKET) { + + // Consume "[", "[?", and "[]" + $position = key($chars); + $actual = next($chars); + if ($actual === ']') { + next($chars); + $tokens[] = [ + 'type' => self::T_FLATTEN, + 'pos' => $position, + 'value' => '[]' + ]; + } elseif ($actual === '?') { + next($chars); + $tokens[] = [ + 'type' => self::T_FILTER, + 'pos' => $position, + 'value' => '[?' + ]; + } else { + $tokens[] = [ + 'type' => self::T_LBRACKET, + 'pos' => $position, + 'value' => '[' + ]; + } + + } elseif ($state === self::STATE_STRING_LITERAL) { + + // Consume raw string literals + $t = $this->inside($chars, "'", self::T_LITERAL); + $t['value'] = str_replace("\\'", "'", $t['value']); + $tokens[] = $t; + + } elseif ($state === self::STATE_PIPE) { + + // Consume pipe and OR + $tokens[] = $this->matchOr($chars, '|', '|', self::T_OR, self::T_PIPE); + + } elseif ($state == self::STATE_JSON_LITERAL) { + + // Consume JSON literals + $token = $this->inside($chars, '`', self::T_LITERAL); + if ($token['type'] === self::T_LITERAL) { + $token['value'] = str_replace('\\`', '`', $token['value']); + $token = $this->parseJson($token); + } + $tokens[] = $token; + + } elseif ($state == self::STATE_NUMBER) { + + // Consume numbers + $start = key($chars); + $buffer = ''; + do { + $buffer .= $current; + $current = next($chars); + } while ($current !== false && isset($this->numbers[$current])); + $tokens[] = [ + 'type' => self::T_NUMBER, + 'value' => (int)$buffer, + 'pos' => $start + ]; + + } elseif ($state === self::STATE_QUOTED_STRING) { + + // Consume quoted identifiers + $token = $this->inside($chars, '"', self::T_QUOTED_IDENTIFIER); + if ($token['type'] === self::T_QUOTED_IDENTIFIER) { + $token['value'] = '"' . $token['value'] . '"'; + $token = $this->parseJson($token); + } + $tokens[] = $token; + + } elseif ($state === self::STATE_EQ) { + + // Consume equals + $tokens[] = $this->matchOr($chars, '=', '=', self::T_COMPARATOR, self::T_UNKNOWN); + + } elseif ($state == self::STATE_AND) { + + $tokens[] = $this->matchOr($chars, '&', '&', self::T_AND, self::T_EXPREF); + + } elseif ($state === self::STATE_NOT) { + + // Consume not equal + $tokens[] = $this->matchOr($chars, '!', '=', self::T_COMPARATOR, self::T_NOT); + + } else { + + // either '<' or '>' + // Consume less than and greater than + $tokens[] = $this->matchOr($chars, $current, '=', self::T_COMPARATOR, self::T_COMPARATOR); + + } + } + + eof: + $tokens[] = [ + 'type' => self::T_EOF, + 'pos' => strlen($input), + 'value' => null + ]; + + return $tokens; + } + + /** + * Returns a token based on whether or not the next token matches the + * expected value. If it does, a token of "$type" is returned. Otherwise, + * a token of "$orElse" type is returned. + * + * @param array $chars Array of characters by reference. + * @param string $current The current character. + * @param string $expected Expected character. + * @param string $type Expected result type. + * @param string $orElse Otherwise return a token of this type. + * + * @return array Returns a conditional token. + */ + private function matchOr(array &$chars, $current, $expected, $type, $orElse) + { + if (next($chars) === $expected) { + next($chars); + return [ + 'type' => $type, + 'pos' => key($chars) - 1, + 'value' => $current . $expected + ]; + } + + return [ + 'type' => $orElse, + 'pos' => key($chars) - 1, + 'value' => $current + ]; + } + + /** + * Returns a token the is the result of consuming inside of delimiter + * characters. Escaped delimiters will be adjusted before returning a + * value. If the token is not closed, "unknown" is returned. + * + * @param array $chars Array of characters by reference. + * @param string $delim The delimiter character. + * @param string $type Token type. + * + * @return array Returns the consumed token. + */ + private function inside(array &$chars, $delim, $type) + { + $position = key($chars); + $current = next($chars); + $buffer = ''; + + while ($current !== $delim) { + if ($current === '\\') { + $buffer .= '\\'; + $current = next($chars); + } + if ($current === false) { + // Unclosed delimiter + return [ + 'type' => self::T_UNKNOWN, + 'value' => $buffer, + 'pos' => $position + ]; + } + $buffer .= $current; + $current = next($chars); + } + + next($chars); + + return ['type' => $type, 'value' => $buffer, 'pos' => $position]; + } + + /** + * Parses a JSON token or sets the token type to "unknown" on error. + * + * @param array $token Token that needs parsing. + * + * @return array Returns a token with a parsed value. + */ + private function parseJson(array $token) + { + $value = json_decode($token['value'], true); + + if ($error = json_last_error()) { + // Legacy support for elided quotes. Try to parse again by adding + // quotes around the bad input value. + $value = json_decode('"' . $token['value'] . '"', true); + if ($error = json_last_error()) { + $token['type'] = self::T_UNKNOWN; + return $token; + } + } + + $token['value'] = $value; + return $token; + } +} diff --git a/vendor/mtdowling/jmespath.php/src/Parser.php b/vendor/mtdowling/jmespath.php/src/Parser.php new file mode 100644 index 0000000..3b0b29a --- /dev/null +++ b/vendor/mtdowling/jmespath.php/src/Parser.php @@ -0,0 +1,518 @@ + T::T_EOF]; + private static $currentNode = ['type' => T::T_CURRENT]; + + private static $bp = [ + T::T_EOF => 0, + T::T_QUOTED_IDENTIFIER => 0, + T::T_IDENTIFIER => 0, + T::T_RBRACKET => 0, + T::T_RPAREN => 0, + T::T_COMMA => 0, + T::T_RBRACE => 0, + T::T_NUMBER => 0, + T::T_CURRENT => 0, + T::T_EXPREF => 0, + T::T_COLON => 0, + T::T_PIPE => 1, + T::T_OR => 2, + T::T_AND => 3, + T::T_COMPARATOR => 5, + T::T_FLATTEN => 9, + T::T_STAR => 20, + T::T_FILTER => 21, + T::T_DOT => 40, + T::T_NOT => 45, + T::T_LBRACE => 50, + T::T_LBRACKET => 55, + T::T_LPAREN => 60, + ]; + + /** @var array Acceptable tokens after a dot token */ + private static $afterDot = [ + T::T_IDENTIFIER => true, // foo.bar + T::T_QUOTED_IDENTIFIER => true, // foo."bar" + T::T_STAR => true, // foo.* + T::T_LBRACE => true, // foo[1] + T::T_LBRACKET => true, // foo{a: 0} + T::T_FILTER => true, // foo.[?bar==10] + ]; + + /** + * @param Lexer $lexer Lexer used to tokenize expressions + */ + public function __construct(Lexer $lexer = null) + { + $this->lexer = $lexer ?: new Lexer(); + } + + /** + * Parses a JMESPath expression into an AST + * + * @param string $expression JMESPath expression to compile + * + * @return array Returns an array based AST + * @throws SyntaxErrorException + */ + public function parse($expression) + { + $this->expression = $expression; + $this->tokens = $this->lexer->tokenize($expression); + $this->tpos = -1; + $this->next(); + $result = $this->expr(); + + if ($this->token['type'] === T::T_EOF) { + return $result; + } + + throw $this->syntax('Did not reach the end of the token stream'); + } + + /** + * Parses an expression while rbp < lbp. + * + * @param int $rbp Right bound precedence + * + * @return array + */ + private function expr($rbp = 0) + { + $left = $this->{"nud_{$this->token['type']}"}(); + while ($rbp < self::$bp[$this->token['type']]) { + $left = $this->{"led_{$this->token['type']}"}($left); + } + + return $left; + } + + private function nud_identifier() + { + $token = $this->token; + $this->next(); + return ['type' => 'field', 'value' => $token['value']]; + } + + private function nud_quoted_identifier() + { + $token = $this->token; + $this->next(); + $this->assertNotToken(T::T_LPAREN); + return ['type' => 'field', 'value' => $token['value']]; + } + + private function nud_current() + { + $this->next(); + return self::$currentNode; + } + + private function nud_literal() + { + $token = $this->token; + $this->next(); + return ['type' => 'literal', 'value' => $token['value']]; + } + + private function nud_expref() + { + $this->next(); + return ['type' => T::T_EXPREF, 'children' => [$this->expr(self::$bp[T::T_EXPREF])]]; + } + + private function nud_not() + { + $this->next(); + return ['type' => T::T_NOT, 'children' => [$this->expr(self::$bp[T::T_NOT])]]; + } + + private function nud_lparen() { + $this->next(); + $result = $this->expr(0); + if ($this->token['type'] !== T::T_RPAREN) { + throw $this->syntax('Unclosed `(`'); + } + $this->next(); + return $result; + } + + private function nud_lbrace() + { + static $validKeys = [T::T_QUOTED_IDENTIFIER => true, T::T_IDENTIFIER => true]; + $this->next($validKeys); + $pairs = []; + + do { + $pairs[] = $this->parseKeyValuePair(); + if ($this->token['type'] == T::T_COMMA) { + $this->next($validKeys); + } + } while ($this->token['type'] !== T::T_RBRACE); + + $this->next(); + + return['type' => 'multi_select_hash', 'children' => $pairs]; + } + + private function nud_flatten() + { + return $this->led_flatten(self::$currentNode); + } + + private function nud_filter() + { + return $this->led_filter(self::$currentNode); + } + + private function nud_star() + { + return $this->parseWildcardObject(self::$currentNode); + } + + private function nud_lbracket() + { + $this->next(); + $type = $this->token['type']; + if ($type == T::T_NUMBER || $type == T::T_COLON) { + return $this->parseArrayIndexExpression(); + } elseif ($type == T::T_STAR && $this->lookahead() == T::T_RBRACKET) { + return $this->parseWildcardArray(); + } else { + return $this->parseMultiSelectList(); + } + } + + private function led_lbracket(array $left) + { + static $nextTypes = [T::T_NUMBER => true, T::T_COLON => true, T::T_STAR => true]; + $this->next($nextTypes); + switch ($this->token['type']) { + case T::T_NUMBER: + case T::T_COLON: + return [ + 'type' => 'subexpression', + 'children' => [$left, $this->parseArrayIndexExpression()] + ]; + default: + return $this->parseWildcardArray($left); + } + } + + private function led_flatten(array $left) + { + $this->next(); + + return [ + 'type' => 'projection', + 'from' => 'array', + 'children' => [ + ['type' => T::T_FLATTEN, 'children' => [$left]], + $this->parseProjection(self::$bp[T::T_FLATTEN]) + ] + ]; + } + + private function led_dot(array $left) + { + $this->next(self::$afterDot); + + if ($this->token['type'] == T::T_STAR) { + return $this->parseWildcardObject($left); + } + + return [ + 'type' => 'subexpression', + 'children' => [$left, $this->parseDot(self::$bp[T::T_DOT])] + ]; + } + + private function led_or(array $left) + { + $this->next(); + return [ + 'type' => T::T_OR, + 'children' => [$left, $this->expr(self::$bp[T::T_OR])] + ]; + } + + private function led_and(array $left) + { + $this->next(); + return [ + 'type' => T::T_AND, + 'children' => [$left, $this->expr(self::$bp[T::T_AND])] + ]; + } + + private function led_pipe(array $left) + { + $this->next(); + return [ + 'type' => T::T_PIPE, + 'children' => [$left, $this->expr(self::$bp[T::T_PIPE])] + ]; + } + + private function led_lparen(array $left) + { + $args = []; + $this->next(); + + while ($this->token['type'] != T::T_RPAREN) { + $args[] = $this->expr(0); + if ($this->token['type'] == T::T_COMMA) { + $this->next(); + } + } + + $this->next(); + + return [ + 'type' => 'function', + 'value' => $left['value'], + 'children' => $args + ]; + } + + private function led_filter(array $left) + { + $this->next(); + $expression = $this->expr(); + if ($this->token['type'] != T::T_RBRACKET) { + throw $this->syntax('Expected a closing rbracket for the filter'); + } + + $this->next(); + $rhs = $this->parseProjection(self::$bp[T::T_FILTER]); + + return [ + 'type' => 'projection', + 'from' => 'array', + 'children' => [ + $left ?: self::$currentNode, + [ + 'type' => 'condition', + 'children' => [$expression, $rhs] + ] + ] + ]; + } + + private function led_comparator(array $left) + { + $token = $this->token; + $this->next(); + + return [ + 'type' => T::T_COMPARATOR, + 'value' => $token['value'], + 'children' => [$left, $this->expr(self::$bp[T::T_COMPARATOR])] + ]; + } + + private function parseProjection($bp) + { + $type = $this->token['type']; + if (self::$bp[$type] < 10) { + return self::$currentNode; + } elseif ($type == T::T_DOT) { + $this->next(self::$afterDot); + return $this->parseDot($bp); + } elseif ($type == T::T_LBRACKET || $type == T::T_FILTER) { + return $this->expr($bp); + } + + throw $this->syntax('Syntax error after projection'); + } + + private function parseDot($bp) + { + if ($this->token['type'] == T::T_LBRACKET) { + $this->next(); + return $this->parseMultiSelectList(); + } + + return $this->expr($bp); + } + + private function parseKeyValuePair() + { + static $validColon = [T::T_COLON => true]; + $key = $this->token['value']; + $this->next($validColon); + $this->next(); + + return [ + 'type' => 'key_val_pair', + 'value' => $key, + 'children' => [$this->expr()] + ]; + } + + private function parseWildcardObject(array $left = null) + { + $this->next(); + + return [ + 'type' => 'projection', + 'from' => 'object', + 'children' => [ + $left ?: self::$currentNode, + $this->parseProjection(self::$bp[T::T_STAR]) + ] + ]; + } + + private function parseWildcardArray(array $left = null) + { + static $getRbracket = [T::T_RBRACKET => true]; + $this->next($getRbracket); + $this->next(); + + return [ + 'type' => 'projection', + 'from' => 'array', + 'children' => [ + $left ?: self::$currentNode, + $this->parseProjection(self::$bp[T::T_STAR]) + ] + ]; + } + + /** + * Parses an array index expression (e.g., [0], [1:2:3] + */ + private function parseArrayIndexExpression() + { + static $matchNext = [ + T::T_NUMBER => true, + T::T_COLON => true, + T::T_RBRACKET => true + ]; + + $pos = 0; + $parts = [null, null, null]; + $expected = $matchNext; + + do { + if ($this->token['type'] == T::T_COLON) { + $pos++; + $expected = $matchNext; + } elseif ($this->token['type'] == T::T_NUMBER) { + $parts[$pos] = $this->token['value']; + $expected = [T::T_COLON => true, T::T_RBRACKET => true]; + } + $this->next($expected); + } while ($this->token['type'] != T::T_RBRACKET); + + // Consume the closing bracket + $this->next(); + + if ($pos === 0) { + // No colons were found so this is a simple index extraction + return ['type' => 'index', 'value' => $parts[0]]; + } + + if ($pos > 2) { + throw $this->syntax('Invalid array slice syntax: too many colons'); + } + + // Sliced array from start (e.g., [2:]) + return [ + 'type' => 'projection', + 'from' => 'array', + 'children' => [ + ['type' => 'slice', 'value' => $parts], + $this->parseProjection(self::$bp[T::T_STAR]) + ] + ]; + } + + private function parseMultiSelectList() + { + $nodes = []; + + do { + $nodes[] = $this->expr(); + if ($this->token['type'] == T::T_COMMA) { + $this->next(); + $this->assertNotToken(T::T_RBRACKET); + } + } while ($this->token['type'] !== T::T_RBRACKET); + $this->next(); + + return ['type' => 'multi_select_list', 'children' => $nodes]; + } + + private function syntax($msg) + { + return new SyntaxErrorException($msg, $this->token, $this->expression); + } + + private function lookahead() + { + return (!isset($this->tokens[$this->tpos + 1])) + ? T::T_EOF + : $this->tokens[$this->tpos + 1]['type']; + } + + private function next(array $match = null) + { + if (!isset($this->tokens[$this->tpos + 1])) { + $this->token = self::$nullToken; + } else { + $this->token = $this->tokens[++$this->tpos]; + } + + if ($match && !isset($match[$this->token['type']])) { + throw $this->syntax($match); + } + } + + private function assertNotToken($type) + { + if ($this->token['type'] == $type) { + throw $this->syntax("Token {$this->tpos} not allowed to be $type"); + } + } + + /** + * @internal Handles undefined tokens without paying the cost of validation + */ + public function __call($method, $args) + { + $prefix = substr($method, 0, 4); + if ($prefix == 'nud_' || $prefix == 'led_') { + $token = substr($method, 4); + $message = "Unexpected \"$token\" token ($method). Expected one of" + . " the following tokens: " + . implode(', ', array_map(function ($i) { + return '"' . substr($i, 4) . '"'; + }, array_filter( + get_class_methods($this), + function ($i) use ($prefix) { + return strpos($i, $prefix) === 0; + } + ))); + throw $this->syntax($message); + } + + throw new \BadMethodCallException("Call to undefined method $method"); + } +} diff --git a/vendor/mtdowling/jmespath.php/src/SyntaxErrorException.php b/vendor/mtdowling/jmespath.php/src/SyntaxErrorException.php new file mode 100644 index 0000000..65be17e --- /dev/null +++ b/vendor/mtdowling/jmespath.php/src/SyntaxErrorException.php @@ -0,0 +1,36 @@ +createTokenMessage($token, $expectedTypesOrMessage); + parent::__construct($message); + } + + private function createTokenMessage(array $token, array $valid) + { + return sprintf( + 'Expected one of the following: %s; found %s "%s"', + implode(', ', array_keys($valid)), + $token['type'], + $token['value'] + ); + } +} diff --git a/vendor/mtdowling/jmespath.php/src/TreeCompiler.php b/vendor/mtdowling/jmespath.php/src/TreeCompiler.php new file mode 100644 index 0000000..afb0d9c --- /dev/null +++ b/vendor/mtdowling/jmespath.php/src/TreeCompiler.php @@ -0,0 +1,419 @@ +vars = []; + $this->source = $this->indentation = ''; + $this->write("write('use JmesPath\\TreeInterpreter as Ti;') + ->write('use JmesPath\\FnDispatcher as Fn;') + ->write('use JmesPath\\Utils;') + ->write('') + ->write('function %s(Ti $interpreter, $value) {', $fnName) + ->indent() + ->dispatch($ast) + ->write('') + ->write('return $value;') + ->outdent() + ->write('}'); + + return $this->source; + } + + /** + * @param array $node + * @return mixed + */ + private function dispatch(array $node) + { + return $this->{"visit_{$node['type']}"}($node); + } + + /** + * Creates a monotonically incrementing unique variable name by prefix. + * + * @param string $prefix Variable name prefix + * + * @return string + */ + private function makeVar($prefix) + { + if (!isset($this->vars[$prefix])) { + $this->vars[$prefix] = 0; + return '$' . $prefix; + } + + return '$' . $prefix . ++$this->vars[$prefix]; + } + + /** + * Writes the given line of source code. Pass positional arguments to write + * that match the format of sprintf. + * + * @param string $str String to write + * @return $this + */ + private function write($str) + { + $this->source .= $this->indentation; + if (func_num_args() == 1) { + $this->source .= $str . "\n"; + return $this; + } + $this->source .= vsprintf($str, array_slice(func_get_args(), 1)) . "\n"; + return $this; + } + + /** + * Decreases the indentation level of code being written + * @return $this + */ + private function outdent() + { + $this->indentation = substr($this->indentation, 0, -4); + return $this; + } + + /** + * Increases the indentation level of code being written + * @return $this + */ + private function indent() + { + $this->indentation .= ' '; + return $this; + } + + private function visit_or(array $node) + { + $a = $this->makeVar('beforeOr'); + return $this + ->write('%s = $value;', $a) + ->dispatch($node['children'][0]) + ->write('if (!$value && $value !== "0" && $value !== 0) {') + ->indent() + ->write('$value = %s;', $a) + ->dispatch($node['children'][1]) + ->outdent() + ->write('}'); + } + + private function visit_and(array $node) + { + $a = $this->makeVar('beforeAnd'); + return $this + ->write('%s = $value;', $a) + ->dispatch($node['children'][0]) + ->write('if ($value || $value === "0" || $value === 0) {') + ->indent() + ->write('$value = %s;', $a) + ->dispatch($node['children'][1]) + ->outdent() + ->write('}'); + } + + private function visit_not(array $node) + { + return $this + ->write('// Visiting not node') + ->dispatch($node['children'][0]) + ->write('// Applying boolean not to result of not node') + ->write('$value = !Utils::isTruthy($value);'); + } + + private function visit_subexpression(array $node) + { + return $this + ->dispatch($node['children'][0]) + ->write('if ($value !== null) {') + ->indent() + ->dispatch($node['children'][1]) + ->outdent() + ->write('}'); + } + + private function visit_field(array $node) + { + $arr = '$value[' . var_export($node['value'], true) . ']'; + $obj = '$value->{' . var_export($node['value'], true) . '}'; + $this->write('if (is_array($value) || $value instanceof \\ArrayAccess) {') + ->indent() + ->write('$value = isset(%s) ? %s : null;', $arr, $arr) + ->outdent() + ->write('} elseif ($value instanceof \\stdClass) {') + ->indent() + ->write('$value = isset(%s) ? %s : null;', $obj, $obj) + ->outdent() + ->write("} else {") + ->indent() + ->write('$value = null;') + ->outdent() + ->write("}"); + + return $this; + } + + private function visit_index(array $node) + { + if ($node['value'] >= 0) { + $check = '$value[' . $node['value'] . ']'; + return $this->write( + '$value = (is_array($value) || $value instanceof \\ArrayAccess)' + . ' && isset(%s) ? %s : null;', + $check, $check + ); + } + + $a = $this->makeVar('count'); + return $this + ->write('if (is_array($value) || ($value instanceof \\ArrayAccess && $value instanceof \\Countable)) {') + ->indent() + ->write('%s = count($value) + %s;', $a, $node['value']) + ->write('$value = isset($value[%s]) ? $value[%s] : null;', $a, $a) + ->outdent() + ->write('} else {') + ->indent() + ->write('$value = null;') + ->outdent() + ->write('}'); + } + + private function visit_literal(array $node) + { + return $this->write('$value = %s;', var_export($node['value'], true)); + } + + private function visit_pipe(array $node) + { + return $this + ->dispatch($node['children'][0]) + ->dispatch($node['children'][1]); + } + + private function visit_multi_select_list(array $node) + { + return $this->visit_multi_select_hash($node); + } + + private function visit_multi_select_hash(array $node) + { + $listVal = $this->makeVar('list'); + $value = $this->makeVar('prev'); + $this->write('if ($value !== null) {') + ->indent() + ->write('%s = [];', $listVal) + ->write('%s = $value;', $value); + + $first = true; + foreach ($node['children'] as $child) { + if (!$first) { + $this->write('$value = %s;', $value); + } + $first = false; + if ($node['type'] == 'multi_select_hash') { + $this->dispatch($child['children'][0]); + $key = var_export($child['value'], true); + $this->write('%s[%s] = $value;', $listVal, $key); + } else { + $this->dispatch($child); + $this->write('%s[] = $value;', $listVal); + } + } + + return $this + ->write('$value = %s;', $listVal) + ->outdent() + ->write('}'); + } + + private function visit_function(array $node) + { + $value = $this->makeVar('val'); + $args = $this->makeVar('args'); + $this->write('%s = $value;', $value) + ->write('%s = [];', $args); + + foreach ($node['children'] as $arg) { + $this->dispatch($arg); + $this->write('%s[] = $value;', $args) + ->write('$value = %s;', $value); + } + + return $this->write( + '$value = Fn::getInstance()->__invoke("%s", %s);', + $node['value'], $args + ); + } + + private function visit_slice(array $node) + { + return $this + ->write('$value = !is_string($value) && !Utils::isArray($value)') + ->write(' ? null : Utils::slice($value, %s, %s, %s);', + var_export($node['value'][0], true), + var_export($node['value'][1], true), + var_export($node['value'][2], true) + ); + } + + private function visit_current(array $node) + { + return $this->write('// Visiting current node (no-op)'); + } + + private function visit_expref(array $node) + { + $child = var_export($node['children'][0], true); + return $this->write('$value = function ($value) use ($interpreter) {') + ->indent() + ->write('return $interpreter->visit(%s, $value);', $child) + ->outdent() + ->write('};'); + } + + private function visit_flatten(array $node) + { + $this->dispatch($node['children'][0]); + $merged = $this->makeVar('merged'); + $val = $this->makeVar('val'); + + $this + ->write('// Visiting merge node') + ->write('if (!Utils::isArray($value)) {') + ->indent() + ->write('$value = null;') + ->outdent() + ->write('} else {') + ->indent() + ->write('%s = [];', $merged) + ->write('foreach ($value as %s) {', $val) + ->indent() + ->write('if (is_array(%s) && isset(%s[0])) {', $val, $val) + ->indent() + ->write('%s = array_merge(%s, %s);', $merged, $merged, $val) + ->outdent() + ->write('} elseif (%s !== []) {', $val) + ->indent() + ->write('%s[] = %s;', $merged, $val) + ->outdent() + ->write('}') + ->outdent() + ->write('}') + ->write('$value = %s;', $merged) + ->outdent() + ->write('}'); + + return $this; + } + + private function visit_projection(array $node) + { + $val = $this->makeVar('val'); + $collected = $this->makeVar('collected'); + $this->write('// Visiting projection node') + ->dispatch($node['children'][0]) + ->write(''); + + if (!isset($node['from'])) { + $this->write('if (!is_array($value) || !($value instanceof \stdClass)) { $value = null; }'); + } elseif ($node['from'] == 'object') { + $this->write('if (!Utils::isObject($value)) { $value = null; }'); + } elseif ($node['from'] == 'array') { + $this->write('if (!Utils::isArray($value)) { $value = null; }'); + } + + $this->write('if ($value !== null) {') + ->indent() + ->write('%s = [];', $collected) + ->write('foreach ((array) $value as %s) {', $val) + ->indent() + ->write('$value = %s;', $val) + ->dispatch($node['children'][1]) + ->write('if ($value !== null) {') + ->indent() + ->write('%s[] = $value;', $collected) + ->outdent() + ->write('}') + ->outdent() + ->write('}') + ->write('$value = %s;', $collected) + ->outdent() + ->write('}'); + + return $this; + } + + private function visit_condition(array $node) + { + $value = $this->makeVar('beforeCondition'); + return $this + ->write('%s = $value;', $value) + ->write('// Visiting condition node') + ->dispatch($node['children'][0]) + ->write('// Checking result of condition node') + ->write('if (Utils::isTruthy($value)) {') + ->indent() + ->write('$value = %s;', $value) + ->dispatch($node['children'][1]) + ->outdent() + ->write('} else {') + ->indent() + ->write('$value = null;') + ->outdent() + ->write('}'); + } + + private function visit_comparator(array $node) + { + $value = $this->makeVar('val'); + $a = $this->makeVar('left'); + $b = $this->makeVar('right'); + + $this + ->write('// Visiting comparator node') + ->write('%s = $value;', $value) + ->dispatch($node['children'][0]) + ->write('%s = $value;', $a) + ->write('$value = %s;', $value) + ->dispatch($node['children'][1]) + ->write('%s = $value;', $b); + + if ($node['value'] == '==') { + $this->write('$value = Utils::isEqual(%s, %s);', $a, $b); + } elseif ($node['value'] == '!=') { + $this->write('$value = !Utils::isEqual(%s, %s);', $a, $b); + } else { + $this->write( + '$value = (is_int(%s) || is_float(%s)) && (is_int(%s) || is_float(%s)) && %s %s %s;', + $a, $a, $b, $b, $a, $node['value'], $b + ); + } + + return $this; + } + + /** @internal */ + public function __call($method, $args) + { + throw new \RuntimeException( + sprintf('Invalid node encountered: %s', json_encode($args[0])) + ); + } +} diff --git a/vendor/mtdowling/jmespath.php/src/TreeInterpreter.php b/vendor/mtdowling/jmespath.php/src/TreeInterpreter.php new file mode 100644 index 0000000..cdfdd99 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/src/TreeInterpreter.php @@ -0,0 +1,235 @@ +fnDispatcher = $fnDispatcher ?: FnDispatcher::getInstance(); + } + + /** + * Visits each node in a JMESPath AST and returns the evaluated result. + * + * @param array $node JMESPath AST node + * @param mixed $data Data to evaluate + * + * @return mixed + */ + public function visit(array $node, $data) + { + return $this->dispatch($node, $data); + } + + /** + * Recursively traverses an AST using depth-first, pre-order traversal. + * The evaluation logic for each node type is embedded into a large switch + * statement to avoid the cost of "double dispatch". + * @return mixed + */ + private function dispatch(array $node, $value) + { + $dispatcher = $this->fnDispatcher; + + switch ($node['type']) { + + case 'field': + if (is_array($value) || $value instanceof \ArrayAccess) { + return isset($value[$node['value']]) ? $value[$node['value']] : null; + } elseif ($value instanceof \stdClass) { + return isset($value->{$node['value']}) ? $value->{$node['value']} : null; + } + return null; + + case 'subexpression': + return $this->dispatch( + $node['children'][1], + $this->dispatch($node['children'][0], $value) + ); + + case 'index': + if (!Utils::isArray($value)) { + return null; + } + $idx = $node['value'] >= 0 + ? $node['value'] + : $node['value'] + count($value); + return isset($value[$idx]) ? $value[$idx] : null; + + case 'projection': + $left = $this->dispatch($node['children'][0], $value); + switch ($node['from']) { + case 'object': + if (!Utils::isObject($left)) { + return null; + } + break; + case 'array': + if (!Utils::isArray($left)) { + return null; + } + break; + default: + if (!is_array($left) || !($left instanceof \stdClass)) { + return null; + } + } + + $collected = []; + foreach ((array) $left as $val) { + $result = $this->dispatch($node['children'][1], $val); + if ($result !== null) { + $collected[] = $result; + } + } + + return $collected; + + case 'flatten': + static $skipElement = []; + $value = $this->dispatch($node['children'][0], $value); + + if (!Utils::isArray($value)) { + return null; + } + + $merged = []; + foreach ($value as $values) { + // Only merge up arrays lists and not hashes + if (is_array($values) && isset($values[0])) { + $merged = array_merge($merged, $values); + } elseif ($values !== $skipElement) { + $merged[] = $values; + } + } + + return $merged; + + case 'literal': + return $node['value']; + + case 'current': + return $value; + + case 'or': + $result = $this->dispatch($node['children'][0], $value); + return Utils::isTruthy($result) + ? $result + : $this->dispatch($node['children'][1], $value); + + case 'and': + $result = $this->dispatch($node['children'][0], $value); + return Utils::isTruthy($result) + ? $this->dispatch($node['children'][1], $value) + : $result; + + case 'not': + return !Utils::isTruthy( + $this->dispatch($node['children'][0], $value) + ); + + case 'pipe': + return $this->dispatch( + $node['children'][1], + $this->dispatch($node['children'][0], $value) + ); + + case 'multi_select_list': + if ($value === null) { + return null; + } + + $collected = []; + foreach ($node['children'] as $node) { + $collected[] = $this->dispatch($node, $value); + } + + return $collected; + + case 'multi_select_hash': + if ($value === null) { + return null; + } + + $collected = []; + foreach ($node['children'] as $node) { + $collected[$node['value']] = $this->dispatch( + $node['children'][0], + $value + ); + } + + return $collected; + + case 'comparator': + $left = $this->dispatch($node['children'][0], $value); + $right = $this->dispatch($node['children'][1], $value); + if ($node['value'] == '==') { + return Utils::isEqual($left, $right); + } elseif ($node['value'] == '!=') { + return !Utils::isEqual($left, $right); + } else { + return self::relativeCmp($left, $right, $node['value']); + } + + case 'condition': + return Utils::isTruthy($this->dispatch($node['children'][0], $value)) + ? $this->dispatch($node['children'][1], $value) + : null; + + case 'function': + $args = []; + foreach ($node['children'] as $arg) { + $args[] = $this->dispatch($arg, $value); + } + return $dispatcher($node['value'], $args); + + case 'slice': + return is_string($value) || Utils::isArray($value) + ? Utils::slice( + $value, + $node['value'][0], + $node['value'][1], + $node['value'][2] + ) : null; + + case 'expref': + $apply = $node['children'][0]; + return function ($value) use ($apply) { + return $this->visit($apply, $value); + }; + + default: + throw new \RuntimeException("Unknown node type: {$node['type']}"); + } + } + + /** + * @return bool + */ + private static function relativeCmp($left, $right, $cmp) + { + if (!(is_int($left) || is_float($left)) || !(is_int($right) || is_float($right))) { + return false; + } + + switch ($cmp) { + case '>': return $left > $right; + case '>=': return $left >= $right; + case '<': return $left < $right; + case '<=': return $left <= $right; + default: throw new \RuntimeException("Invalid comparison: $cmp"); + } + } +} diff --git a/vendor/mtdowling/jmespath.php/src/Utils.php b/vendor/mtdowling/jmespath.php/src/Utils.php new file mode 100644 index 0000000..4d0bf95 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/src/Utils.php @@ -0,0 +1,229 @@ + 'boolean', + 'string' => 'string', + 'NULL' => 'null', + 'double' => 'number', + 'float' => 'number', + 'integer' => 'number' + ]; + + /** + * Returns true if the value is truthy + * + * @param mixed $value Value to check + * + * @return bool + */ + public static function isTruthy($value) + { + if (!$value) { + return $value === 0 || $value === '0'; + } elseif ($value instanceof \stdClass) { + return (bool) get_object_vars($value); + } else { + return true; + } + } + + /** + * Gets the JMESPath type equivalent of a PHP variable. + * + * @param mixed $arg PHP variable + * @return string Returns the JSON data type + * @throws \InvalidArgumentException when an unknown type is given. + */ + public static function type($arg) + { + $type = gettype($arg); + if (isset(self::$typeMap[$type])) { + return self::$typeMap[$type]; + } elseif ($type === 'array') { + if (empty($arg)) { + return 'array'; + } + reset($arg); + return key($arg) === 0 ? 'array' : 'object'; + } elseif ($arg instanceof \stdClass) { + return 'object'; + } elseif ($arg instanceof \Closure) { + return 'expression'; + } elseif ($arg instanceof \ArrayAccess + && $arg instanceof \Countable + ) { + return count($arg) == 0 || $arg->offsetExists(0) + ? 'array' + : 'object'; + } elseif (method_exists($arg, '__toString')) { + return 'string'; + } + + throw new \InvalidArgumentException( + 'Unable to determine JMESPath type from ' . get_class($arg) + ); + } + + /** + * Determine if the provided value is a JMESPath compatible object. + * + * @param mixed $value + * + * @return bool + */ + public static function isObject($value) + { + if (is_array($value)) { + return !$value || array_keys($value)[0] !== 0; + } + + // Handle array-like values. Must be empty or offset 0 does not exist + return $value instanceof \Countable && $value instanceof \ArrayAccess + ? count($value) == 0 || !$value->offsetExists(0) + : $value instanceof \stdClass; + } + + /** + * Determine if the provided value is a JMESPath compatible array. + * + * @param mixed $value + * + * @return bool + */ + public static function isArray($value) + { + if (is_array($value)) { + return !$value || array_keys($value)[0] === 0; + } + + // Handle array-like values. Must be empty or offset 0 exists. + return $value instanceof \Countable && $value instanceof \ArrayAccess + ? count($value) == 0 || $value->offsetExists(0) + : false; + } + + /** + * JSON aware value comparison function. + * + * @param mixed $a First value to compare + * @param mixed $b Second value to compare + * + * @return bool + */ + public static function isEqual($a, $b) + { + if ($a === $b) { + return true; + } elseif ($a instanceof \stdClass) { + return self::isEqual((array) $a, $b); + } elseif ($b instanceof \stdClass) { + return self::isEqual($a, (array) $b); + } else { + return false; + } + } + + /** + * JMESPath requires a stable sorting algorithm, so here we'll implement + * a simple Schwartzian transform that uses array index positions as tie + * breakers. + * + * @param array $data List or map of data to sort + * @param callable $sortFn Callable used to sort values + * + * @return array Returns the sorted array + * @link http://en.wikipedia.org/wiki/Schwartzian_transform + */ + public static function stableSort(array $data, callable $sortFn) + { + // Decorate each item by creating an array of [value, index] + array_walk($data, function (&$v, $k) { $v = [$v, $k]; }); + // Sort by the sort function and use the index as a tie-breaker + uasort($data, function ($a, $b) use ($sortFn) { + return $sortFn($a[0], $b[0]) ?: ($a[1] < $b[1] ? -1 : 1); + }); + + // Undecorate each item and return the resulting sorted array + return array_map(function ($v) { return $v[0]; }, array_values($data)); + } + + /** + * Creates a Python-style slice of a string or array. + * + * @param array|string $value Value to slice + * @param int|null $start Starting position + * @param int|null $stop Stop position + * @param int $step Step (1, 2, -1, -2, etc.) + * + * @return array|string + * @throws \InvalidArgumentException + */ + public static function slice($value, $start = null, $stop = null, $step = 1) + { + if (!is_array($value) && !is_string($value)) { + throw new \InvalidArgumentException('Expects string or array'); + } + + return self::sliceIndices($value, $start, $stop, $step); + } + + private static function adjustEndpoint($length, $endpoint, $step) + { + if ($endpoint < 0) { + $endpoint += $length; + if ($endpoint < 0) { + $endpoint = $step < 0 ? -1 : 0; + } + } elseif ($endpoint >= $length) { + $endpoint = $step < 0 ? $length - 1 : $length; + } + + return $endpoint; + } + + private static function adjustSlice($length, $start, $stop, $step) + { + if ($step === null) { + $step = 1; + } elseif ($step === 0) { + throw new \RuntimeException('step cannot be 0'); + } + + if ($start === null) { + $start = $step < 0 ? $length - 1 : 0; + } else { + $start = self::adjustEndpoint($length, $start, $step); + } + + if ($stop === null) { + $stop = $step < 0 ? -1 : $length; + } else { + $stop = self::adjustEndpoint($length, $stop, $step); + } + + return [$start, $stop, $step]; + } + + private static function sliceIndices($subject, $start, $stop, $step) + { + $type = gettype($subject); + $len = $type == 'string' ? strlen($subject) : count($subject); + list($start, $stop, $step) = self::adjustSlice($len, $start, $stop, $step); + + $result = []; + if ($step > 0) { + for ($i = $start; $i < $stop; $i += $step) { + $result[] = $subject[$i]; + } + } else { + for ($i = $start; $i > $stop; $i += $step) { + $result[] = $subject[$i]; + } + } + + return $type == 'string' ? implode($result, '') : $result; + } +} diff --git a/vendor/mtdowling/jmespath.php/tests/ComplianceTest.php b/vendor/mtdowling/jmespath.php/tests/ComplianceTest.php new file mode 100644 index 0000000..5f27f39 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/ComplianceTest.php @@ -0,0 +1,136 @@ +getMessage(), + $e->getFile(), + $e->getLine() + ); + } + + $file = __DIR__ . '/compliance/' . $file . '.json'; + $failure .= "\n{$compiledStr}php bin/jp.php --file {$file} --suite {$suite} --case {$case}\n\n" + . "Expected: " . $this->prettyJson($result) . "\n\n"; + $failure .= 'Associative? ' . var_export($asAssoc, true) . "\n\n"; + + if (!$error && $failed) { + $this->fail("Should not have failed\n{$failure}=> {$failed} {$failureMsg}"); + } elseif ($error && !$failed) { + $this->fail("Should have failed\n{$failure}"); + } + + $this->assertEquals( + $this->convertAssoc($result), + $this->convertAssoc($evalResult), + $failure + ); + } + + public function complianceProvider() + { + $cases = []; + + $files = array_map(function ($f) { + return basename($f, '.json'); + }, glob(__DIR__ . '/compliance/*.json')); + + foreach ($files as $name) { + $contents = file_get_contents(__DIR__ . "/compliance/{$name}.json"); + foreach ([true, false] as $asAssoc) { + $json = json_decode($contents, true); + $jsonObj = json_decode($contents); + foreach ($json as $suiteNumber => $suite) { + $given = $asAssoc ? $suite['given'] : $jsonObj[$suiteNumber]->given; + foreach ($suite['cases'] as $caseNumber => $case) { + $caseData = [ + $given, + $case['expression'], + isset($case['result']) ? $case['result'] : null, + isset($case['error']) ? $case['error'] : false, + $name, + $suiteNumber, + $caseNumber, + false, + $asAssoc + ]; + $cases[] = $caseData; + $caseData[7] = true; + $cases[] = $caseData; + } + } + } + } + + return $cases; + } + + private function convertAssoc($data) + { + if ($data instanceof \stdClass) { + return $this->convertAssoc((array) $data); + } elseif (is_array($data)) { + return array_map([$this, 'convertAssoc'], $data); + } else { + return $data; + } + } + + private function prettyJson($json) + { + if (defined('JSON_PRETTY_PRINT')) { + return json_encode($json, JSON_PRETTY_PRINT); + } + + return json_encode($json); + } +} diff --git a/vendor/mtdowling/jmespath.php/tests/EnvTest.php b/vendor/mtdowling/jmespath.php/tests/EnvTest.php new file mode 100644 index 0000000..0a2bcaa --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/EnvTest.php @@ -0,0 +1,31 @@ + 123); + $this->assertEquals(123, Env::search('foo', $data)); + $this->assertEquals(123, Env::search('foo', $data)); + } + + public function testSearchesWithFunction() + { + $data = array('foo' => 123); + $this->assertEquals(123, \JmesPath\search('foo', $data)); + } + + public function testCleansCompileDir() + { + $dir = sys_get_temp_dir(); + $runtime = new CompilerRuntime($dir); + $runtime('@ | @ | @[0][0][0]', []); + $this->assertNotEmpty(glob($dir . '/jmespath_*.php')); + $this->assertGreaterThan(0, Env::cleanCompileDir()); + $this->assertEmpty(glob($dir . '/jmespath_*.php')); + } +} diff --git a/vendor/mtdowling/jmespath.php/tests/FnDispatcherTest.php b/vendor/mtdowling/jmespath.php/tests/FnDispatcherTest.php new file mode 100644 index 0000000..7252b3e --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/FnDispatcherTest.php @@ -0,0 +1,41 @@ +assertEquals('foo', $fn('to_string', ['foo'])); + $this->assertEquals('1', $fn('to_string', [1])); + $this->assertEquals('["foo"]', $fn('to_string', [['foo']])); + $std = new \stdClass(); + $std->foo = 'bar'; + $this->assertEquals('{"foo":"bar"}', $fn('to_string', [$std])); + $this->assertEquals('foo', $fn('to_string', [new _TestStringClass()])); + $this->assertEquals('"foo"', $fn('to_string', [new _TestJsonStringClass()])); + } +} + +class _TestStringClass +{ + public function __toString() + { + return 'foo'; + } +} + +class _TestJsonStringClass implements \JsonSerializable +{ + public function __toString() + { + return 'no!'; + } + + public function jsonSerialize() + { + return 'foo'; + } +} diff --git a/vendor/mtdowling/jmespath.php/tests/LexerTest.php b/vendor/mtdowling/jmespath.php/tests/LexerTest.php new file mode 100644 index 0000000..3c026da --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/LexerTest.php @@ -0,0 +1,88 @@ +tokenize($input); + $this->assertEquals($tokens[0]['type'], $type); + } + + public function testTokenizesJsonLiterals() + { + $l = new Lexer(); + $tokens = $l->tokenize('`null`, `false`, `true`, `"abc"`, `"ab\\"c"`,' + . '`0`, `0.45`, `-0.5`'); + $this->assertNull($tokens[0]['value']); + $this->assertFalse($tokens[2]['value']); + $this->assertTrue($tokens[4]['value']); + $this->assertEquals('abc', $tokens[6]['value']); + $this->assertEquals('ab"c', $tokens[8]['value']); + $this->assertSame(0, $tokens[10]['value']); + $this->assertSame(0.45, $tokens[12]['value']); + $this->assertSame(-0.5, $tokens[14]['value']); + } + + public function testTokenizesJsonNumbers() + { + $l = new Lexer(); + $tokens = $l->tokenize('`10`, `1.2`, `-10.20e-10`, `1.2E+2`'); + $this->assertEquals(10, $tokens[0]['value']); + $this->assertEquals(1.2, $tokens[2]['value']); + $this->assertEquals(-1.02E-9, $tokens[4]['value']); + $this->assertEquals(120, $tokens[6]['value']); + } + + public function testCanWorkWithElidedJsonLiterals() + { + $l = new Lexer(); + $tokens = $l->tokenize('`foo`'); + $this->assertEquals('foo', $tokens[0]['value']); + $this->assertEquals('literal', $tokens[0]['type']); + } +} diff --git a/vendor/mtdowling/jmespath.php/tests/ParserTest.php b/vendor/mtdowling/jmespath.php/tests/ParserTest.php new file mode 100644 index 0000000..e9288da --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/ParserTest.php @@ -0,0 +1,50 @@ +parse('.bar'); + } + + /** + * @expectedException \JmesPath\SyntaxErrorException + * @expectedExceptionMessage Syntax error at character 1 + */ + public function testThrowsSyntaxErrorForInvalidSequence() + { + $p = new Parser(new Lexer()); + $p->parse('a,'); + } + + /** + * @expectedException \JmesPath\SyntaxErrorException + * @expectedExceptionMessage Syntax error at character 2 + */ + public function testMatchesAfterFirstToken() + { + $p = new Parser(new Lexer()); + $p->parse('a.,'); + } + + /** + * @expectedException \JmesPath\SyntaxErrorException + * @expectedExceptionMessage Unexpected "eof" token + */ + public function testHandlesEmptyExpressions() + { + (new Parser(new Lexer()))->parse(''); + } +} diff --git a/vendor/mtdowling/jmespath.php/tests/SyntaxErrorExceptionTest.php b/vendor/mtdowling/jmespath.php/tests/SyntaxErrorExceptionTest.php new file mode 100644 index 0000000..3ba6b6f --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/SyntaxErrorExceptionTest.php @@ -0,0 +1,42 @@ + 'comma', 'pos' => 3, 'value' => ','], + 'abc,def' + ); + $expected = <<assertContains($expected, $e->getMessage()); + } + + public function testCreatesWithArray() + { + $e = new SyntaxErrorException( + ['dot' => true, 'eof' => true], + ['type' => 'comma', 'pos' => 3, 'value' => ','], + 'abc,def' + ); + $expected = <<assertContains($expected, $e->getMessage()); + } +} diff --git a/vendor/mtdowling/jmespath.php/tests/TreeCompilerTest.php b/vendor/mtdowling/jmespath.php/tests/TreeCompilerTest.php new file mode 100644 index 0000000..62b7075 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/TreeCompilerTest.php @@ -0,0 +1,23 @@ +visit( + ['type' => 'field', 'value' => 'foo'], + 'testing', + 'foo' + ); + $this->assertContains('assertContains('$value = isset($value->{\'foo\'}) ? $value->{\'foo\'} : null;', $source); + $this->assertContains('$value = isset($value[\'foo\']) ? $value[\'foo\'] : null;', $source); + } +} diff --git a/vendor/mtdowling/jmespath.php/tests/TreeInterpreterTest.php b/vendor/mtdowling/jmespath.php/tests/TreeInterpreterTest.php new file mode 100644 index 0000000..2599eb0 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/TreeInterpreterTest.php @@ -0,0 +1,71 @@ +assertNull($t->visit(array( + 'type' => 'flatten', + 'children' => array( + array('type' => 'literal', 'value' => 1), + array('type' => 'literal', 'value' => 1) + ) + ), array(), array( + 'runtime' => new AstRuntime() + ))); + } + + public function testWorksWithArrayObjectAsObject() + { + $runtime = new AstRuntime(); + $this->assertEquals('baz', $runtime('foo.bar', new \ArrayObject([ + 'foo' => new \ArrayObject(['bar' => 'baz']) + ]))); + } + + public function testWorksWithArrayObjectAsArray() + { + $runtime = new AstRuntime(); + $this->assertEquals('baz', $runtime('foo[0].bar', new \ArrayObject([ + 'foo' => new \ArrayObject([new \ArrayObject(['bar' => 'baz'])]) + ]))); + } + + public function testWorksWithArrayProjections() + { + $runtime = new AstRuntime(); + $this->assertEquals( + ['baz'], + $runtime('foo[*].bar', new \ArrayObject([ + 'foo' => new \ArrayObject([ + new \ArrayObject([ + 'bar' => 'baz' + ]) + ]) + ])) + ); + } + + public function testWorksWithObjectProjections() + { + $runtime = new AstRuntime(); + $this->assertEquals( + ['baz'], + $runtime('foo.*.bar', new \ArrayObject([ + 'foo' => new \ArrayObject([ + 'abc' => new \ArrayObject([ + 'bar' => 'baz' + ]) + ]) + ])) + ); + } +} diff --git a/vendor/mtdowling/jmespath.php/tests/UtilsTest.php b/vendor/mtdowling/jmespath.php/tests/UtilsTest.php new file mode 100644 index 0000000..249bc77 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/UtilsTest.php @@ -0,0 +1,130 @@ + 1], 'object'], + [new \stdClass(), 'object'], + [function () {}, 'expression'], + [new \ArrayObject(), 'array'], + [new \ArrayObject([1, 2]), 'array'], + [new \ArrayObject(['foo' => 'bar']), 'object'], + [new _TestStr(), 'string'] + ]; + } + + /** + * @dataProvider typeProvider + */ + public function testGetsTypes($given, $type) + { + $this->assertEquals($type, Utils::type($given)); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testThrowsForInvalidArg() + { + Utils::type(new _TestClass()); + } + + public function isArrayProvider() + { + return [ + [[], true], + [[1, 2], true], + [['a' => 1], false], + [new _TestClass(), false], + [new \ArrayObject(['a' => 'b']), false], + [new \ArrayObject([1]), true], + [new \stdClass(), false] + ]; + } + + /** + * @dataProvider isArrayProvider + */ + public function testChecksIfArray($given, $result) + { + $this->assertSame($result, Utils::isArray($given)); + } + + public function isObjectProvider() + { + return [ + [[], true], + [[1, 2], false], + [['a' => 1], true], + [new _TestClass(), false], + [new \ArrayObject(['a' => 'b']), true], + [new \ArrayObject([1]), false], + [new \stdClass(), true] + ]; + } + + /** + * @dataProvider isObjectProvider + */ + public function testChecksIfObject($given, $result) + { + $this->assertSame($result, Utils::isObject($given)); + } + + public function testHasStableSort() + { + $data = [new _TestStr(), new _TestStr(), 0, 10, 2]; + $result = Utils::stableSort($data, function ($a, $b) { + $a = (int) (string) $a; + $b = (int) (string) $b; + return $a > $b ? -1 : ($a == $b ? 0 : 1); + }); + $this->assertSame($data[0], $result[0]); + $this->assertSame($data[1], $result[1]); + $this->assertEquals(10, $result[2]); + $this->assertEquals(2, $result[3]); + $this->assertEquals(0, $result[4]); + } + + public function testSlicesArrays() + { + $this->assertEquals([3, 2, 1], Utils::slice([1, 2, 3], null, null, -1)); + $this->assertEquals([1, 3], Utils::slice([1, 2, 3], null, null, 2)); + $this->assertEquals([2, 3], Utils::slice([1, 2, 3], 1)); + } + + public function testSlicesStrings() + { + $this->assertEquals('cba', Utils::slice('abc', null, null, -1)); + $this->assertEquals('ac', Utils::slice('abc', null, null, 2)); + $this->assertEquals('bc', Utils::slice('abc', 1)); + } +} + +class _TestClass implements \ArrayAccess +{ + public function offsetExists($offset) {} + public function offsetGet($offset) {} + public function offsetSet($offset, $value) {} + public function offsetUnset($offset) {} +} + +class _TestStr +{ + public function __toString() + { + return '100'; + } +} diff --git a/vendor/mtdowling/jmespath.php/tests/compliance/basic.json b/vendor/mtdowling/jmespath.php/tests/compliance/basic.json new file mode 100644 index 0000000..d550e96 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/compliance/basic.json @@ -0,0 +1,96 @@ +[{ + "given": + {"foo": {"bar": {"baz": "correct"}}}, + "cases": [ + { + "expression": "foo", + "result": {"bar": {"baz": "correct"}} + }, + { + "expression": "foo.bar", + "result": {"baz": "correct"} + }, + { + "expression": "foo.bar.baz", + "result": "correct" + }, + { + "expression": "foo\n.\nbar\n.baz", + "result": "correct" + }, + { + "expression": "foo.bar.baz.bad", + "result": null + }, + { + "expression": "foo.bar.bad", + "result": null + }, + { + "expression": "foo.bad", + "result": null + }, + { + "expression": "bad", + "result": null + }, + { + "expression": "bad.morebad.morebad", + "result": null + } + ] +}, +{ + "given": + {"foo": {"bar": ["one", "two", "three"]}}, + "cases": [ + { + "expression": "foo", + "result": {"bar": ["one", "two", "three"]} + }, + { + "expression": "foo.bar", + "result": ["one", "two", "three"] + } + ] +}, +{ + "given": ["one", "two", "three"], + "cases": [ + { + "expression": "one", + "result": null + }, + { + "expression": "two", + "result": null + }, + { + "expression": "three", + "result": null + }, + { + "expression": "one.two", + "result": null + } + ] +}, +{ + "given": + {"foo": {"1": ["one", "two", "three"], "-1": "bar"}}, + "cases": [ + { + "expression": "foo.\"1\"", + "result": ["one", "two", "three"] + }, + { + "expression": "foo.\"1\"[0]", + "result": "one" + }, + { + "expression": "foo.\"-1\"", + "result": "bar" + } + ] +} +] diff --git a/vendor/mtdowling/jmespath.php/tests/compliance/boolean.json b/vendor/mtdowling/jmespath.php/tests/compliance/boolean.json new file mode 100644 index 0000000..e3fa196 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/compliance/boolean.json @@ -0,0 +1,257 @@ +[ + { + "given": { + "outer": { + "foo": "foo", + "bar": "bar", + "baz": "baz" + } + }, + "cases": [ + { + "expression": "outer.foo || outer.bar", + "result": "foo" + }, + { + "expression": "outer.foo||outer.bar", + "result": "foo" + }, + { + "expression": "outer.bar || outer.baz", + "result": "bar" + }, + { + "expression": "outer.bar||outer.baz", + "result": "bar" + }, + { + "expression": "outer.bad || outer.foo", + "result": "foo" + }, + { + "expression": "outer.bad||outer.foo", + "result": "foo" + }, + { + "expression": "outer.foo || outer.bad", + "result": "foo" + }, + { + "expression": "outer.foo||outer.bad", + "result": "foo" + }, + { + "expression": "outer.bad || outer.alsobad", + "result": null + }, + { + "expression": "outer.bad||outer.alsobad", + "result": null + } + ] + }, + { + "given": { + "outer": { + "foo": "foo", + "bool": false, + "empty_list": [], + "empty_string": "" + } + }, + "cases": [ + { + "expression": "outer.empty_string || outer.foo", + "result": "foo" + }, + { + "expression": "outer.nokey || outer.bool || outer.empty_list || outer.empty_string || outer.foo", + "result": "foo" + } + ] + }, + { + "given": { + "True": true, + "False": false, + "Number": 5, + "EmptyList": [], + "Zero": 0 + }, + "cases": [ + { + "expression": "True && False", + "result": false + }, + { + "expression": "False && True", + "result": false + }, + { + "expression": "True && True", + "result": true + }, + { + "expression": "False && False", + "result": false + }, + { + "expression": "True && Number", + "result": 5 + }, + { + "expression": "Number && True", + "result": true + }, + { + "expression": "Number && False", + "result": false + }, + { + "expression": "Number && EmptyList", + "result": [] + }, + { + "expression": "Number && True", + "result": true + }, + { + "expression": "EmptyList && True", + "result": [] + }, + { + "expression": "EmptyList && False", + "result": [] + }, + { + "expression": "True || False", + "result": true + }, + { + "expression": "True || True", + "result": true + }, + { + "expression": "False || True", + "result": true + }, + { + "expression": "False || False", + "result": false + }, + { + "expression": "Number || EmptyList", + "result": 5 + }, + { + "expression": "Number || True", + "result": 5 + }, + { + "expression": "Number || True && False", + "result": 5 + }, + { + "expression": "(Number || True) && False", + "result": false + }, + { + "expression": "Number || (True && False)", + "result": 5 + }, + { + "expression": "!True", + "result": false + }, + { + "expression": "!False", + "result": true + }, + { + "expression": "!Number", + "result": false + }, + { + "expression": "!EmptyList", + "result": true + }, + { + "expression": "True && !False", + "result": true + }, + { + "expression": "True && !EmptyList", + "result": true + }, + { + "expression": "!False && !EmptyList", + "result": true + }, + { + "expression": "!(True && False)", + "result": true + }, + { + "expression": "!Zero", + "result": false + }, + { + "expression": "!!Zero", + "result": true + } + ] + }, + { + "given": { + "one": 1, + "two": 2, + "three": 3 + }, + "cases": [ + { + "expression": "one < two", + "result": true + }, + { + "expression": "one <= two", + "result": true + }, + { + "expression": "one == one", + "result": true + }, + { + "expression": "one == two", + "result": false + }, + { + "expression": "one > two", + "result": false + }, + { + "expression": "one >= two", + "result": false + }, + { + "expression": "one != two", + "result": true + }, + { + "expression": "one < two && three > one", + "result": true + }, + { + "expression": "one < two || three > one", + "result": true + }, + { + "expression": "one < two || three < one", + "result": true + }, + { + "expression": "two < one || three < one", + "result": false + } + ] + } +] diff --git a/vendor/mtdowling/jmespath.php/tests/compliance/current.json b/vendor/mtdowling/jmespath.php/tests/compliance/current.json new file mode 100644 index 0000000..0c26248 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/compliance/current.json @@ -0,0 +1,25 @@ +[ + { + "given": { + "foo": [{"name": "a"}, {"name": "b"}], + "bar": {"baz": "qux"} + }, + "cases": [ + { + "expression": "@", + "result": { + "foo": [{"name": "a"}, {"name": "b"}], + "bar": {"baz": "qux"} + } + }, + { + "expression": "@.bar", + "result": {"baz": "qux"} + }, + { + "expression": "@.foo[0]", + "result": {"name": "a"} + } + ] + } +] diff --git a/vendor/mtdowling/jmespath.php/tests/compliance/escape.json b/vendor/mtdowling/jmespath.php/tests/compliance/escape.json new file mode 100644 index 0000000..4a62d95 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/compliance/escape.json @@ -0,0 +1,46 @@ +[{ + "given": { + "foo.bar": "dot", + "foo bar": "space", + "foo\nbar": "newline", + "foo\"bar": "doublequote", + "c:\\\\windows\\path": "windows", + "/unix/path": "unix", + "\"\"\"": "threequotes", + "bar": {"baz": "qux"} + }, + "cases": [ + { + "expression": "\"foo.bar\"", + "result": "dot" + }, + { + "expression": "\"foo bar\"", + "result": "space" + }, + { + "expression": "\"foo\\nbar\"", + "result": "newline" + }, + { + "expression": "\"foo\\\"bar\"", + "result": "doublequote" + }, + { + "expression": "\"c:\\\\\\\\windows\\\\path\"", + "result": "windows" + }, + { + "expression": "\"/unix/path\"", + "result": "unix" + }, + { + "expression": "\"\\\"\\\"\\\"\"", + "result": "threequotes" + }, + { + "expression": "\"bar\".\"baz\"", + "result": "qux" + } + ] +}] diff --git a/vendor/mtdowling/jmespath.php/tests/compliance/filters.json b/vendor/mtdowling/jmespath.php/tests/compliance/filters.json new file mode 100644 index 0000000..c4fa26a --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/compliance/filters.json @@ -0,0 +1,512 @@ +[ + { + "given": {"foo": [{"name": "a"}, {"name": "b"}]}, + "cases": [ + { + "comment": "Matching a literal", + "expression": "foo[?name == 'a']", + "result": [{"name": "a"}] + } + ] + }, + { + "given": {"foo": [0, 1], "bar": [2, 3]}, + "cases": [ + { + "comment": "Matching a literal", + "expression": "*[?[0] == `0`]", + "result": [[], []] + } + ] + }, + { + "given": {"foo": [{"first": "foo", "last": "bar"}, + {"first": "foo", "last": "foo"}, + {"first": "foo", "last": "baz"}]}, + "cases": [ + { + "comment": "Matching an expression", + "expression": "foo[?first == last]", + "result": [{"first": "foo", "last": "foo"}] + }, + { + "comment": "Verify projection created from filter", + "expression": "foo[?first == last].first", + "result": ["foo"] + } + ] + }, + { + "given": {"foo": [{"age": 20}, + {"age": 25}, + {"age": 30}]}, + "cases": [ + { + "comment": "Greater than with a number", + "expression": "foo[?age > `25`]", + "result": [{"age": 30}] + }, + { + "expression": "foo[?age >= `25`]", + "result": [{"age": 25}, {"age": 30}] + }, + { + "comment": "Greater than with a number", + "expression": "foo[?age > `30`]", + "result": [] + }, + { + "comment": "Greater than with a number", + "expression": "foo[?age < `25`]", + "result": [{"age": 20}] + }, + { + "comment": "Greater than with a number", + "expression": "foo[?age <= `25`]", + "result": [{"age": 20}, {"age": 25}] + }, + { + "comment": "Greater than with a number", + "expression": "foo[?age < `20`]", + "result": [] + }, + { + "expression": "foo[?age == `20`]", + "result": [{"age": 20}] + }, + { + "expression": "foo[?age != `20`]", + "result": [{"age": 25}, {"age": 30}] + } + ] + }, + { + "given": {"foo": [{"weight": 33.3}, + {"weight": 44.4}, + {"weight": 55.5}]}, + "cases": [ + { + "comment": "Greater than with a number", + "expression": "foo[?weight > `44.4`]", + "result": [{"weight": 55.5}] + }, + { + "expression": "foo[?weight >= `44.4`]", + "result": [{"weight": 44.4}, {"weight": 55.5}] + }, + { + "comment": "Greater than with a number", + "expression": "foo[?weight > `55.5`]", + "result": [] + }, + { + "comment": "Greater than with a number", + "expression": "foo[?weight < `44.4`]", + "result": [{"weight": 33.3}] + }, + { + "comment": "Greater than with a number", + "expression": "foo[?weight <= `44.4`]", + "result": [{"weight": 33.3}, {"weight": 44.4}] + }, + { + "comment": "Greater than with a number", + "expression": "foo[?weight < `33.3`]", + "result": [] + }, + { + "expression": "foo[?weight == `33.3`]", + "result": [{"weight": 33.3}] + }, + { + "expression": "foo[?weight != `33.3`]", + "result": [{"weight": 44.4}, {"weight": 55.5}] + } + ] + }, + { + "given": {"foo": [{"top": {"name": "a"}}, + {"top": {"name": "b"}}]}, + "cases": [ + { + "comment": "Filter with subexpression", + "expression": "foo[?top.name == 'a']", + "result": [{"top": {"name": "a"}}] + } + ] + }, + { + "given": {"foo": [{"top": {"first": "foo", "last": "bar"}}, + {"top": {"first": "foo", "last": "foo"}}, + {"top": {"first": "foo", "last": "baz"}}]}, + "cases": [ + { + "comment": "Matching an expression", + "expression": "foo[?top.first == top.last]", + "result": [{"top": {"first": "foo", "last": "foo"}}] + }, + { + "comment": "Matching a JSON array", + "expression": "foo[?top == `{\"first\": \"foo\", \"last\": \"bar\"}`]", + "result": [{"top": {"first": "foo", "last": "bar"}}] + } + ] + }, + { + "given": {"foo": [ + {"key": true}, + {"key": false}, + {"key": 0}, + {"key": 1}, + {"key": [0]}, + {"key": {"bar": [0]}}, + {"key": null}, + {"key": [1]}, + {"key": {"a":2}} + ]}, + "cases": [ + { + "expression": "foo[?key == `true`]", + "result": [{"key": true}] + }, + { + "expression": "foo[?key == `false`]", + "result": [{"key": false}] + }, + { + "expression": "foo[?key == `0`]", + "result": [{"key": 0}] + }, + { + "expression": "foo[?key == `1`]", + "result": [{"key": 1}] + }, + { + "expression": "foo[?key == `[0]`]", + "result": [{"key": [0]}] + }, + { + "expression": "foo[?key == `{\"bar\": [0]}`]", + "result": [{"key": {"bar": [0]}}] + }, + { + "expression": "foo[?key == `null`]", + "result": [{"key": null}] + }, + { + "expression": "foo[?key == `[1]`]", + "result": [{"key": [1]}] + }, + { + "expression": "foo[?key == `{\"a\":2}`]", + "result": [{"key": {"a":2}}] + }, + { + "expression": "foo[?`true` == key]", + "result": [{"key": true}] + }, + { + "expression": "foo[?`false` == key]", + "result": [{"key": false}] + }, + { + "expression": "foo[?`0` == key]", + "result": [{"key": 0}] + }, + { + "expression": "foo[?`1` == key]", + "result": [{"key": 1}] + }, + { + "expression": "foo[?`[0]` == key]", + "result": [{"key": [0]}] + }, + { + "expression": "foo[?`{\"bar\": [0]}` == key]", + "result": [{"key": {"bar": [0]}}] + }, + { + "expression": "foo[?`null` == key]", + "result": [{"key": null}] + }, + { + "expression": "foo[?`[1]` == key]", + "result": [{"key": [1]}] + }, + { + "expression": "foo[?`{\"a\":2}` == key]", + "result": [{"key": {"a":2}}] + }, + { + "expression": "foo[?key != `true`]", + "result": [{"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, + {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] + }, + { + "expression": "foo[?key != `false`]", + "result": [{"key": true}, {"key": 0}, {"key": 1}, {"key": [0]}, + {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] + }, + { + "expression": "foo[?key != `0`]", + "result": [{"key": true}, {"key": false}, {"key": 1}, {"key": [0]}, + {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] + }, + { + "expression": "foo[?key != `1`]", + "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": [0]}, + {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] + }, + { + "expression": "foo[?key != `null`]", + "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, + {"key": {"bar": [0]}}, {"key": [1]}, {"key": {"a":2}}] + }, + { + "expression": "foo[?key != `[1]`]", + "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, + {"key": {"bar": [0]}}, {"key": null}, {"key": {"a":2}}] + }, + { + "expression": "foo[?key != `{\"a\":2}`]", + "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, + {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}] + }, + { + "expression": "foo[?`true` != key]", + "result": [{"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, + {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] + }, + { + "expression": "foo[?`false` != key]", + "result": [{"key": true}, {"key": 0}, {"key": 1}, {"key": [0]}, + {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] + }, + { + "expression": "foo[?`0` != key]", + "result": [{"key": true}, {"key": false}, {"key": 1}, {"key": [0]}, + {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] + }, + { + "expression": "foo[?`1` != key]", + "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": [0]}, + {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] + }, + { + "expression": "foo[?`null` != key]", + "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, + {"key": {"bar": [0]}}, {"key": [1]}, {"key": {"a":2}}] + }, + { + "expression": "foo[?`[1]` != key]", + "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, + {"key": {"bar": [0]}}, {"key": null}, {"key": {"a":2}}] + }, + { + "expression": "foo[?`{\"a\":2}` != key]", + "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, + {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}] + } + ] + }, + { + "given": {"reservations": [ + {"instances": [ + {"foo": 1, "bar": 2}, {"foo": 1, "bar": 3}, + {"foo": 1, "bar": 2}, {"foo": 2, "bar": 1}]}]}, + "cases": [ + { + "expression": "reservations[].instances[?bar==`1`]", + "result": [[{"foo": 2, "bar": 1}]] + }, + { + "expression": "reservations[*].instances[?bar==`1`]", + "result": [[{"foo": 2, "bar": 1}]] + }, + { + "expression": "reservations[].instances[?bar==`1`][]", + "result": [{"foo": 2, "bar": 1}] + } + ] + }, + { + "given": { + "baz": "other", + "foo": [ + {"bar": 1}, {"bar": 2}, {"bar": 3}, {"bar": 4}, {"bar": 1, "baz": 2} + ] + }, + "cases": [ + { + "expression": "foo[?bar==`1`].bar[0]", + "result": [] + } + ] + }, + { + "given": { + "foo": [ + {"a": 1, "b": {"c": "x"}}, + {"a": 1, "b": {"c": "y"}}, + {"a": 1, "b": {"c": "z"}}, + {"a": 2, "b": {"c": "z"}}, + {"a": 1, "baz": 2} + ] + }, + "cases": [ + { + "expression": "foo[?a==`1`].b.c", + "result": ["x", "y", "z"] + } + ] + }, + { + "given": {"foo": [{"name": "a"}, {"name": "b"}, {"name": "c"}]}, + "cases": [ + { + "comment": "Filter with or expression", + "expression": "foo[?name == 'a' || name == 'b']", + "result": [{"name": "a"}, {"name": "b"}] + }, + { + "expression": "foo[?name == 'a' || name == 'e']", + "result": [{"name": "a"}] + }, + { + "expression": "foo[?name == 'a' || name == 'b' || name == 'c']", + "result": [{"name": "a"}, {"name": "b"}, {"name": "c"}] + } + ] + }, + { + "given": {"foo": [{"a": 1, "b": 2}, {"a": 1, "b": 3}]}, + "cases": [ + { + "comment": "Filter with and expression", + "expression": "foo[?a == `1` && b == `2`]", + "result": [{"a": 1, "b": 2}] + }, + { + "expression": "foo[?a == `1` && b == `4`]", + "result": [] + } + ] + }, + { + "given": {"foo": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}]}, + "cases": [ + { + "comment": "Filter with Or and And expressions", + "expression": "foo[?c == `3` || a == `1` && b == `4`]", + "result": [{"a": 1, "b": 2, "c": 3}] + }, + { + "expression": "foo[?b == `2` || a == `3` && b == `4`]", + "result": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}] + }, + { + "expression": "foo[?a == `3` && b == `4` || b == `2`]", + "result": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}] + }, + { + "expression": "foo[?(a == `3` && b == `4`) || b == `2`]", + "result": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}] + }, + { + "expression": "foo[?((a == `3` && b == `4`)) || b == `2`]", + "result": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}] + }, + { + "expression": "foo[?a == `3` && (b == `4` || b == `2`)]", + "result": [{"a": 3, "b": 4}] + }, + { + "expression": "foo[?a == `3` && ((b == `4` || b == `2`))]", + "result": [{"a": 3, "b": 4}] + } + ] + }, + { + "given": {"foo": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}]}, + "cases": [ + { + "comment": "Verify precedence of or/and expressions", + "expression": "foo[?a == `1` || b ==`2` && c == `5`]", + "result": [{"a": 1, "b": 2, "c": 3}] + }, + { + "comment": "Parentheses can alter precedence", + "expression": "foo[?(a == `1` || b ==`2`) && c == `5`]", + "result": [] + }, + { + "comment": "Not expressions combined with and/or", + "expression": "foo[?!(a == `1` || b ==`2`)]", + "result": [{"a": 3, "b": 4}] + } + ] + }, + { + "given": { + "foo": [ + {"key": true}, + {"key": false}, + {"key": []}, + {"key": {}}, + {"key": [0]}, + {"key": {"a": "b"}}, + {"key": 0}, + {"key": 1}, + {"key": null}, + {"notkey": true} + ] + }, + "cases": [ + { + "comment": "Unary filter expression", + "expression": "foo[?key]", + "result": [ + {"key": true}, {"key": [0]}, {"key": {"a": "b"}}, + {"key": 0}, {"key": 1} + ] + }, + { + "comment": "Unary not filter expression", + "expression": "foo[?!key]", + "result": [ + {"key": false}, {"key": []}, {"key": {}}, + {"key": null}, {"notkey": true} + ] + }, + { + "comment": "Equality with null RHS", + "expression": "foo[?key == `null`]", + "result": [ + {"key": null}, {"notkey": true} + ] + } + ] + }, + { + "given": { + "foo": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + }, + "cases": [ + { + "comment": "Using @ in a filter expression", + "expression": "foo[?@ < `5`]", + "result": [0, 1, 2, 3, 4] + }, + { + "comment": "Using @ in a filter expression", + "expression": "foo[?`5` > @]", + "result": [0, 1, 2, 3, 4] + }, + { + "comment": "Using @ in a filter expression", + "expression": "foo[?@ == @]", + "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + } + ] + } +] diff --git a/vendor/mtdowling/jmespath.php/tests/compliance/functions.json b/vendor/mtdowling/jmespath.php/tests/compliance/functions.json new file mode 100644 index 0000000..79295ae --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/compliance/functions.json @@ -0,0 +1,821 @@ +[{ + "given": + { + "foo": -1, + "zero": 0, + "numbers": [-1, 3, 4, 5], + "array": [-1, 3, 4, 5, "a", "100"], + "strings": ["a", "b", "c"], + "decimals": [1.01, 1.2, -1.5], + "str": "Str", + "false": false, + "empty_list": [], + "empty_hash": {}, + "objects": {"foo": "bar", "bar": "baz"}, + "null_key": null + }, + "cases": [ + { + "expression": "abs(foo)", + "result": 1 + }, + { + "expression": "abs(foo)", + "result": 1 + }, + { + "expression": "abs(str)", + "error": "invalid-type" + }, + { + "expression": "abs(array[1])", + "result": 3 + }, + { + "expression": "abs(array[1])", + "result": 3 + }, + { + "expression": "abs(`false`)", + "error": "invalid-type" + }, + { + "expression": "abs(`-24`)", + "result": 24 + }, + { + "expression": "abs(`-24`)", + "result": 24 + }, + { + "expression": "abs(`1`, `2`)", + "error": "invalid-arity" + }, + { + "expression": "abs()", + "error": "invalid-arity" + }, + { + "expression": "unknown_function(`1`, `2`)", + "error": "unknown-function" + }, + { + "expression": "avg(numbers)", + "result": 2.75 + }, + { + "expression": "avg(array)", + "error": "invalid-type" + }, + { + "expression": "avg('abc')", + "error": "invalid-type" + }, + { + "expression": "avg(foo)", + "error": "invalid-type" + }, + { + "expression": "avg(@)", + "error": "invalid-type" + }, + { + "expression": "avg(strings)", + "error": "invalid-type" + }, + { + "expression": "ceil(`1.2`)", + "result": 2 + }, + { + "expression": "ceil(decimals[0])", + "result": 2 + }, + { + "expression": "ceil(decimals[1])", + "result": 2 + }, + { + "expression": "ceil(decimals[2])", + "result": -1 + }, + { + "expression": "ceil('string')", + "error": "invalid-type" + }, + { + "expression": "contains('abc', 'a')", + "result": true + }, + { + "expression": "contains('abc', 'd')", + "result": false + }, + { + "expression": "contains(`false`, 'd')", + "error": "invalid-type" + }, + { + "expression": "contains(strings, 'a')", + "result": true + }, + { + "expression": "contains(decimals, `1.2`)", + "result": true + }, + { + "expression": "contains(decimals, `false`)", + "result": false + }, + { + "expression": "ends_with(str, 'r')", + "result": true + }, + { + "expression": "ends_with(str, 'tr')", + "result": true + }, + { + "expression": "ends_with(str, 'Str')", + "result": true + }, + { + "expression": "ends_with(str, 'SStr')", + "result": false + }, + { + "expression": "ends_with(str, 'foo')", + "result": false + }, + { + "expression": "ends_with(str, `0`)", + "error": "invalid-type" + }, + { + "expression": "floor(`1.2`)", + "result": 1 + }, + { + "expression": "floor('string')", + "error": "invalid-type" + }, + { + "expression": "floor(decimals[0])", + "result": 1 + }, + { + "expression": "floor(foo)", + "result": -1 + }, + { + "expression": "floor(str)", + "error": "invalid-type" + }, + { + "expression": "length('abc')", + "result": 3 + }, + { + "expression": "length('')", + "result": 0 + }, + { + "expression": "length(@)", + "result": 12 + }, + { + "expression": "length(strings[0])", + "result": 1 + }, + { + "expression": "length(str)", + "result": 3 + }, + { + "expression": "length(array)", + "result": 6 + }, + { + "expression": "length(objects)", + "result": 2 + }, + { + "expression": "length(`false`)", + "error": "invalid-type" + }, + { + "expression": "length(foo)", + "error": "invalid-type" + }, + { + "expression": "length(strings[0])", + "result": 1 + }, + { + "expression": "max(numbers)", + "result": 5 + }, + { + "expression": "max(decimals)", + "result": 1.2 + }, + { + "expression": "max(strings)", + "result": "c" + }, + { + "expression": "max(abc)", + "error": "invalid-type" + }, + { + "expression": "max(array)", + "error": "invalid-type" + }, + { + "expression": "max(decimals)", + "result": 1.2 + }, + { + "expression": "max(empty_list)", + "result": null + }, + { + "expression": "merge(`{}`)", + "result": {} + }, + { + "expression": "merge(`{}`, `{}`)", + "result": {} + }, + { + "expression": "merge(`{\"a\": 1}`, `{\"b\": 2}`)", + "result": {"a": 1, "b": 2} + }, + { + "expression": "merge(`{\"a\": 1}`, `{\"a\": 2}`)", + "result": {"a": 2} + }, + { + "expression": "merge(`{\"a\": 1, \"b\": 2}`, `{\"a\": 2, \"c\": 3}`, `{\"d\": 4}`)", + "result": {"a": 2, "b": 2, "c": 3, "d": 4} + }, + { + "expression": "min(numbers)", + "result": -1 + }, + { + "expression": "min(decimals)", + "result": -1.5 + }, + { + "expression": "min(abc)", + "error": "invalid-type" + }, + { + "expression": "min(array)", + "error": "invalid-type" + }, + { + "expression": "min(empty_list)", + "result": null + }, + { + "expression": "min(decimals)", + "result": -1.5 + }, + { + "expression": "min(strings)", + "result": "a" + }, + { + "expression": "type('abc')", + "result": "string" + }, + { + "expression": "type(`1.0`)", + "result": "number" + }, + { + "expression": "type(`2`)", + "result": "number" + }, + { + "expression": "type(`true`)", + "result": "boolean" + }, + { + "expression": "type(`false`)", + "result": "boolean" + }, + { + "expression": "type(`null`)", + "result": "null" + }, + { + "expression": "type(`[0]`)", + "result": "array" + }, + { + "expression": "type(`{\"a\": \"b\"}`)", + "result": "object" + }, + { + "expression": "type(@)", + "result": "object" + }, + { + "expression": "sort(keys(objects))", + "result": ["bar", "foo"] + }, + { + "expression": "keys(foo)", + "error": "invalid-type" + }, + { + "expression": "keys(strings)", + "error": "invalid-type" + }, + { + "expression": "keys(`false`)", + "error": "invalid-type" + }, + { + "expression": "sort(values(objects))", + "result": ["bar", "baz"] + }, + { + "expression": "keys(empty_hash)", + "result": [] + }, + { + "expression": "values(foo)", + "error": "invalid-type" + }, + { + "expression": "join(', ', strings)", + "result": "a, b, c" + }, + { + "expression": "join(', ', strings)", + "result": "a, b, c" + }, + { + "expression": "join(',', `[\"a\", \"b\"]`)", + "result": "a,b" + }, + { + "expression": "join(',', `[\"a\", 0]`)", + "error": "invalid-type" + }, + { + "expression": "join(', ', str)", + "error": "invalid-type" + }, + { + "expression": "join('|', strings)", + "result": "a|b|c" + }, + { + "expression": "join(`2`, strings)", + "error": "invalid-type" + }, + { + "expression": "join('|', decimals)", + "error": "invalid-type" + }, + { + "expression": "join('|', decimals[].to_string(@))", + "result": "1.01|1.2|-1.5" + }, + { + "expression": "join('|', empty_list)", + "result": "" + }, + { + "expression": "reverse(numbers)", + "result": [5, 4, 3, -1] + }, + { + "expression": "reverse(array)", + "result": ["100", "a", 5, 4, 3, -1] + }, + { + "expression": "reverse(`[]`)", + "result": [] + }, + { + "expression": "reverse('')", + "result": "" + }, + { + "expression": "reverse('hello world')", + "result": "dlrow olleh" + }, + { + "expression": "starts_with(str, 'S')", + "result": true + }, + { + "expression": "starts_with(str, 'St')", + "result": true + }, + { + "expression": "starts_with(str, 'Str')", + "result": true + }, + { + "expression": "starts_with(str, 'String')", + "result": false + }, + { + "expression": "starts_with(str, `0`)", + "error": "invalid-type" + }, + { + "expression": "sum(numbers)", + "result": 11 + }, + { + "expression": "sum(decimals)", + "result": 0.71 + }, + { + "expression": "sum(array)", + "error": "invalid-type" + }, + { + "expression": "sum(array[].to_number(@))", + "result": 111 + }, + { + "expression": "sum(`[]`)", + "result": 0 + }, + { + "expression": "to_array('foo')", + "result": ["foo"] + }, + { + "expression": "to_array(`0`)", + "result": [0] + }, + { + "expression": "to_array(objects)", + "result": [{"foo": "bar", "bar": "baz"}] + }, + { + "expression": "to_array(`[1, 2, 3]`)", + "result": [1, 2, 3] + }, + { + "expression": "to_array(false)", + "result": [false] + }, + { + "expression": "to_string('foo')", + "result": "foo" + }, + { + "expression": "to_string(`1.2`)", + "result": "1.2" + }, + { + "expression": "to_string(`[0, 1]`)", + "result": "[0,1]" + }, + { + "expression": "to_number('1.0')", + "result": 1.0 + }, + { + "expression": "to_number('1.1')", + "result": 1.1 + }, + { + "expression": "to_number('4')", + "result": 4 + }, + { + "expression": "to_number('notanumber')", + "result": null + }, + { + "expression": "to_number(`false`)", + "result": null + }, + { + "expression": "to_number(`null`)", + "result": null + }, + { + "expression": "to_number(`[0]`)", + "result": null + }, + { + "expression": "to_number(`{\"foo\": 0}`)", + "result": null + }, + { + "expression": "\"to_string\"(`1.0`)", + "error": "syntax" + }, + { + "expression": "sort(numbers)", + "result": [-1, 3, 4, 5] + }, + { + "expression": "sort(strings)", + "result": ["a", "b", "c"] + }, + { + "expression": "sort(decimals)", + "result": [-1.5, 1.01, 1.2] + }, + { + "expression": "sort(array)", + "error": "invalid-type" + }, + { + "expression": "sort(abc)", + "error": "invalid-type" + }, + { + "expression": "sort(empty_list)", + "result": [] + }, + { + "expression": "sort(@)", + "error": "invalid-type" + }, + { + "expression": "not_null(unknown_key, str)", + "result": "Str" + }, + { + "expression": "not_null(unknown_key, foo.bar, empty_list, str)", + "result": [] + }, + { + "expression": "not_null(unknown_key, null_key, empty_list, str)", + "result": [] + }, + { + "expression": "not_null(all, expressions, are_null)", + "result": null + }, + { + "expression": "not_null()", + "error": "invalid-arity" + }, + { + "description": "function projection on single arg function", + "expression": "numbers[].to_string(@)", + "result": ["-1", "3", "4", "5"] + }, + { + "description": "function projection on single arg function", + "expression": "array[].to_number(@)", + "result": [-1, 3, 4, 5, 100] + } + ] +}, { + "given": + { + "foo": [ + {"b": "b", "a": "a"}, + {"c": "c", "b": "b"}, + {"d": "d", "c": "c"}, + {"e": "e", "d": "d"}, + {"f": "f", "e": "e"} + ] + }, + "cases": [ + { + "description": "function projection on variadic function", + "expression": "foo[].not_null(f, e, d, c, b, a)", + "result": ["b", "c", "d", "e", "f"] + } + ] +}, { + "given": + { + "people": [ + {"age": 20, "age_str": "20", "bool": true, "name": "a", "extra": "foo"}, + {"age": 40, "age_str": "40", "bool": false, "name": "b", "extra": "bar"}, + {"age": 30, "age_str": "30", "bool": true, "name": "c"}, + {"age": 50, "age_str": "50", "bool": false, "name": "d"}, + {"age": 10, "age_str": "10", "bool": true, "name": 3} + ] + }, + "cases": [ + { + "description": "sort by field expression", + "expression": "sort_by(people, &age)", + "result": [ + {"age": 10, "age_str": "10", "bool": true, "name": 3}, + {"age": 20, "age_str": "20", "bool": true, "name": "a", "extra": "foo"}, + {"age": 30, "age_str": "30", "bool": true, "name": "c"}, + {"age": 40, "age_str": "40", "bool": false, "name": "b", "extra": "bar"}, + {"age": 50, "age_str": "50", "bool": false, "name": "d"} + ] + }, + { + "expression": "sort_by(people, &age_str)", + "result": [ + {"age": 10, "age_str": "10", "bool": true, "name": 3}, + {"age": 20, "age_str": "20", "bool": true, "name": "a", "extra": "foo"}, + {"age": 30, "age_str": "30", "bool": true, "name": "c"}, + {"age": 40, "age_str": "40", "bool": false, "name": "b", "extra": "bar"}, + {"age": 50, "age_str": "50", "bool": false, "name": "d"} + ] + }, + { + "description": "sort by function expression", + "expression": "sort_by(people, &to_number(age_str))", + "result": [ + {"age": 10, "age_str": "10", "bool": true, "name": 3}, + {"age": 20, "age_str": "20", "bool": true, "name": "a", "extra": "foo"}, + {"age": 30, "age_str": "30", "bool": true, "name": "c"}, + {"age": 40, "age_str": "40", "bool": false, "name": "b", "extra": "bar"}, + {"age": 50, "age_str": "50", "bool": false, "name": "d"} + ] + }, + { + "description": "function projection on sort_by function", + "expression": "sort_by(people, &age)[].name", + "result": [3, "a", "c", "b", "d"] + }, + { + "expression": "sort_by(people, &extra)", + "error": "invalid-type" + }, + { + "expression": "sort_by(people, &bool)", + "error": "invalid-type" + }, + { + "expression": "sort_by(people, &name)", + "error": "invalid-type" + }, + { + "expression": "sort_by(people, name)", + "error": "invalid-type" + }, + { + "expression": "sort_by(people, &age)[].extra", + "result": ["foo", "bar"] + }, + { + "expression": "sort_by(`[]`, &age)", + "result": [] + }, + { + "expression": "max_by(people, &age)", + "result": {"age": 50, "age_str": "50", "bool": false, "name": "d"} + }, + { + "expression": "max_by(people, &age_str)", + "result": {"age": 50, "age_str": "50", "bool": false, "name": "d"} + }, + { + "expression": "max_by(people, &bool)", + "error": "invalid-type" + }, + { + "expression": "max_by(people, &extra)", + "error": "invalid-type" + }, + { + "expression": "max_by(people, &to_number(age_str))", + "result": {"age": 50, "age_str": "50", "bool": false, "name": "d"} + }, + { + "expression": "min_by(people, &age)", + "result": {"age": 10, "age_str": "10", "bool": true, "name": 3} + }, + { + "expression": "min_by(people, &age_str)", + "result": {"age": 10, "age_str": "10", "bool": true, "name": 3} + }, + { + "expression": "min_by(people, &bool)", + "error": "invalid-type" + }, + { + "expression": "min_by(people, &extra)", + "error": "invalid-type" + }, + { + "expression": "min_by(people, &to_number(age_str))", + "result": {"age": 10, "age_str": "10", "bool": true, "name": 3} + } + ] +}, { + "given": + { + "people": [ + {"age": 10, "order": "1"}, + {"age": 10, "order": "2"}, + {"age": 10, "order": "3"}, + {"age": 10, "order": "4"}, + {"age": 10, "order": "5"}, + {"age": 10, "order": "6"}, + {"age": 10, "order": "7"}, + {"age": 10, "order": "8"}, + {"age": 10, "order": "9"}, + {"age": 10, "order": "10"}, + {"age": 10, "order": "11"} + ] + }, + "cases": [ + { + "description": "stable sort order", + "expression": "sort_by(people, &age)", + "result": [ + {"age": 10, "order": "1"}, + {"age": 10, "order": "2"}, + {"age": 10, "order": "3"}, + {"age": 10, "order": "4"}, + {"age": 10, "order": "5"}, + {"age": 10, "order": "6"}, + {"age": 10, "order": "7"}, + {"age": 10, "order": "8"}, + {"age": 10, "order": "9"}, + {"age": 10, "order": "10"}, + {"age": 10, "order": "11"} + ] + } + ] +}, { + "given": + { + "people": [ + {"a": 10, "b": 1, "c": "z"}, + {"a": 10, "b": 2, "c": null}, + {"a": 10, "b": 3}, + {"a": 10, "b": 4, "c": "z"}, + {"a": 10, "b": 5, "c": null}, + {"a": 10, "b": 6}, + {"a": 10, "b": 7, "c": "z"}, + {"a": 10, "b": 8, "c": null}, + {"a": 10, "b": 9} + ], + "empty": [] + }, + "cases": [ + { + "expression": "map(&a, people)", + "result": [10, 10, 10, 10, 10, 10, 10, 10, 10] + }, + { + "expression": "map(&c, people)", + "result": ["z", null, null, "z", null, null, "z", null, null] + }, + { + "expression": "map(&a, badkey)", + "error": "invalid-type" + }, + { + "expression": "map(&foo, empty)", + "result": [] + } + ] +}, { + "given": { + "array": [ + { + "foo": {"bar": "yes1"} + }, + { + "foo": {"bar": "yes2"} + }, + { + "foo1": {"bar": "no"} + } + ]}, + "cases": [ + { + "expression": "map(&foo.bar, array)", + "result": ["yes1", "yes2", null] + }, + { + "expression": "map(&foo1.bar, array)", + "result": [null, null, "no"] + }, + { + "expression": "map(&foo.bar.baz, array)", + "result": [null, null, null] + } + ] +}, { + "given": { + "array": [[1, 2, 3, [4]], [5, 6, 7, [8, 9]]] + }, + "cases": [ + { + "expression": "map(&[], array)", + "result": [[1, 2, 3, 4], [5, 6, 7, 8, 9]] + } + ] +} +] diff --git a/vendor/mtdowling/jmespath.php/tests/compliance/identifiers.json b/vendor/mtdowling/jmespath.php/tests/compliance/identifiers.json new file mode 100644 index 0000000..7998a41 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/compliance/identifiers.json @@ -0,0 +1,1377 @@ +[ + { + "given": { + "__L": true + }, + "cases": [ + { + "expression": "__L", + "result": true + } + ] + }, + { + "given": { + "!\r": true + }, + "cases": [ + { + "expression": "\"!\\r\"", + "result": true + } + ] + }, + { + "given": { + "Y_1623": true + }, + "cases": [ + { + "expression": "Y_1623", + "result": true + } + ] + }, + { + "given": { + "x": true + }, + "cases": [ + { + "expression": "x", + "result": true + } + ] + }, + { + "given": { + "\tF\uCebb": true + }, + "cases": [ + { + "expression": "\"\\tF\\uCebb\"", + "result": true + } + ] + }, + { + "given": { + " \t": true + }, + "cases": [ + { + "expression": "\" \\t\"", + "result": true + } + ] + }, + { + "given": { + " ": true + }, + "cases": [ + { + "expression": "\" \"", + "result": true + } + ] + }, + { + "given": { + "v2": true + }, + "cases": [ + { + "expression": "v2", + "result": true + } + ] + }, + { + "given": { + "\t": true + }, + "cases": [ + { + "expression": "\"\\t\"", + "result": true + } + ] + }, + { + "given": { + "_X": true + }, + "cases": [ + { + "expression": "_X", + "result": true + } + ] + }, + { + "given": { + "\t4\ud9da\udd15": true + }, + "cases": [ + { + "expression": "\"\\t4\\ud9da\\udd15\"", + "result": true + } + ] + }, + { + "given": { + "v24_W": true + }, + "cases": [ + { + "expression": "v24_W", + "result": true + } + ] + }, + { + "given": { + "H": true + }, + "cases": [ + { + "expression": "\"H\"", + "result": true + } + ] + }, + { + "given": { + "\f": true + }, + "cases": [ + { + "expression": "\"\\f\"", + "result": true + } + ] + }, + { + "given": { + "E4": true + }, + "cases": [ + { + "expression": "\"E4\"", + "result": true + } + ] + }, + { + "given": { + "!": true + }, + "cases": [ + { + "expression": "\"!\"", + "result": true + } + ] + }, + { + "given": { + "tM": true + }, + "cases": [ + { + "expression": "tM", + "result": true + } + ] + }, + { + "given": { + " [": true + }, + "cases": [ + { + "expression": "\" [\"", + "result": true + } + ] + }, + { + "given": { + "R!": true + }, + "cases": [ + { + "expression": "\"R!\"", + "result": true + } + ] + }, + { + "given": { + "_6W": true + }, + "cases": [ + { + "expression": "_6W", + "result": true + } + ] + }, + { + "given": { + "\uaBA1\r": true + }, + "cases": [ + { + "expression": "\"\\uaBA1\\r\"", + "result": true + } + ] + }, + { + "given": { + "tL7": true + }, + "cases": [ + { + "expression": "tL7", + "result": true + } + ] + }, + { + "given": { + "<": true + }, + "cases": [ + { + "expression": "\">\"", + "result": true + } + ] + }, + { + "given": { + "hvu": true + }, + "cases": [ + { + "expression": "hvu", + "result": true + } + ] + }, + { + "given": { + "; !": true + }, + "cases": [ + { + "expression": "\"; !\"", + "result": true + } + ] + }, + { + "given": { + "hU": true + }, + "cases": [ + { + "expression": "hU", + "result": true + } + ] + }, + { + "given": { + "!I\n\/": true + }, + "cases": [ + { + "expression": "\"!I\\n\\/\"", + "result": true + } + ] + }, + { + "given": { + "\uEEbF": true + }, + "cases": [ + { + "expression": "\"\\uEEbF\"", + "result": true + } + ] + }, + { + "given": { + "U)\t": true + }, + "cases": [ + { + "expression": "\"U)\\t\"", + "result": true + } + ] + }, + { + "given": { + "fa0_9": true + }, + "cases": [ + { + "expression": "fa0_9", + "result": true + } + ] + }, + { + "given": { + "/": true + }, + "cases": [ + { + "expression": "\"/\"", + "result": true + } + ] + }, + { + "given": { + "Gy": true + }, + "cases": [ + { + "expression": "Gy", + "result": true + } + ] + }, + { + "given": { + "\b": true + }, + "cases": [ + { + "expression": "\"\\b\"", + "result": true + } + ] + }, + { + "given": { + "<": true + }, + "cases": [ + { + "expression": "\"<\"", + "result": true + } + ] + }, + { + "given": { + "\t": true + }, + "cases": [ + { + "expression": "\"\\t\"", + "result": true + } + ] + }, + { + "given": { + "\t&\\\r": true + }, + "cases": [ + { + "expression": "\"\\t&\\\\\\r\"", + "result": true + } + ] + }, + { + "given": { + "#": true + }, + "cases": [ + { + "expression": "\"#\"", + "result": true + } + ] + }, + { + "given": { + "B__": true + }, + "cases": [ + { + "expression": "B__", + "result": true + } + ] + }, + { + "given": { + "\nS \n": true + }, + "cases": [ + { + "expression": "\"\\nS \\n\"", + "result": true + } + ] + }, + { + "given": { + "Bp": true + }, + "cases": [ + { + "expression": "Bp", + "result": true + } + ] + }, + { + "given": { + ",\t;": true + }, + "cases": [ + { + "expression": "\",\\t;\"", + "result": true + } + ] + }, + { + "given": { + "B_q": true + }, + "cases": [ + { + "expression": "B_q", + "result": true + } + ] + }, + { + "given": { + "\/+\t\n\b!Z": true + }, + "cases": [ + { + "expression": "\"\\/+\\t\\n\\b!Z\"", + "result": true + } + ] + }, + { + "given": { + "\udadd\udfc7\\ueFAc": true + }, + "cases": [ + { + "expression": "\"\udadd\udfc7\\\\ueFAc\"", + "result": true + } + ] + }, + { + "given": { + ":\f": true + }, + "cases": [ + { + "expression": "\":\\f\"", + "result": true + } + ] + }, + { + "given": { + "\/": true + }, + "cases": [ + { + "expression": "\"\\/\"", + "result": true + } + ] + }, + { + "given": { + "_BW_6Hg_Gl": true + }, + "cases": [ + { + "expression": "_BW_6Hg_Gl", + "result": true + } + ] + }, + { + "given": { + "\udbcf\udc02": true + }, + "cases": [ + { + "expression": "\"\udbcf\udc02\"", + "result": true + } + ] + }, + { + "given": { + "zs1DC": true + }, + "cases": [ + { + "expression": "zs1DC", + "result": true + } + ] + }, + { + "given": { + "__434": true + }, + "cases": [ + { + "expression": "__434", + "result": true + } + ] + }, + { + "given": { + "\udb94\udd41": true + }, + "cases": [ + { + "expression": "\"\udb94\udd41\"", + "result": true + } + ] + }, + { + "given": { + "Z_5": true + }, + "cases": [ + { + "expression": "Z_5", + "result": true + } + ] + }, + { + "given": { + "z_M_": true + }, + "cases": [ + { + "expression": "z_M_", + "result": true + } + ] + }, + { + "given": { + "YU_2": true + }, + "cases": [ + { + "expression": "YU_2", + "result": true + } + ] + }, + { + "given": { + "_0": true + }, + "cases": [ + { + "expression": "_0", + "result": true + } + ] + }, + { + "given": { + "\b+": true + }, + "cases": [ + { + "expression": "\"\\b+\"", + "result": true + } + ] + }, + { + "given": { + "\"": true + }, + "cases": [ + { + "expression": "\"\\\"\"", + "result": true + } + ] + }, + { + "given": { + "D7": true + }, + "cases": [ + { + "expression": "D7", + "result": true + } + ] + }, + { + "given": { + "_62L": true + }, + "cases": [ + { + "expression": "_62L", + "result": true + } + ] + }, + { + "given": { + "\tK\t": true + }, + "cases": [ + { + "expression": "\"\\tK\\t\"", + "result": true + } + ] + }, + { + "given": { + "\n\\\f": true + }, + "cases": [ + { + "expression": "\"\\n\\\\\\f\"", + "result": true + } + ] + }, + { + "given": { + "I_": true + }, + "cases": [ + { + "expression": "I_", + "result": true + } + ] + }, + { + "given": { + "W_a0_": true + }, + "cases": [ + { + "expression": "W_a0_", + "result": true + } + ] + }, + { + "given": { + "BQ": true + }, + "cases": [ + { + "expression": "BQ", + "result": true + } + ] + }, + { + "given": { + "\tX$\uABBb": true + }, + "cases": [ + { + "expression": "\"\\tX$\\uABBb\"", + "result": true + } + ] + }, + { + "given": { + "Z9": true + }, + "cases": [ + { + "expression": "Z9", + "result": true + } + ] + }, + { + "given": { + "\b%\"\uda38\udd0f": true + }, + "cases": [ + { + "expression": "\"\\b%\\\"\uda38\udd0f\"", + "result": true + } + ] + }, + { + "given": { + "_F": true + }, + "cases": [ + { + "expression": "_F", + "result": true + } + ] + }, + { + "given": { + "!,": true + }, + "cases": [ + { + "expression": "\"!,\"", + "result": true + } + ] + }, + { + "given": { + "\"!": true + }, + "cases": [ + { + "expression": "\"\\\"!\"", + "result": true + } + ] + }, + { + "given": { + "Hh": true + }, + "cases": [ + { + "expression": "Hh", + "result": true + } + ] + }, + { + "given": { + "&": true + }, + "cases": [ + { + "expression": "\"&\"", + "result": true + } + ] + }, + { + "given": { + "9\r\\R": true + }, + "cases": [ + { + "expression": "\"9\\r\\\\R\"", + "result": true + } + ] + }, + { + "given": { + "M_k": true + }, + "cases": [ + { + "expression": "M_k", + "result": true + } + ] + }, + { + "given": { + "!\b\n\udb06\ude52\"\"": true + }, + "cases": [ + { + "expression": "\"!\\b\\n\udb06\ude52\\\"\\\"\"", + "result": true + } + ] + }, + { + "given": { + "6": true + }, + "cases": [ + { + "expression": "\"6\"", + "result": true + } + ] + }, + { + "given": { + "_7": true + }, + "cases": [ + { + "expression": "_7", + "result": true + } + ] + }, + { + "given": { + "0": true + }, + "cases": [ + { + "expression": "\"0\"", + "result": true + } + ] + }, + { + "given": { + "\\8\\": true + }, + "cases": [ + { + "expression": "\"\\\\8\\\\\"", + "result": true + } + ] + }, + { + "given": { + "b7eo": true + }, + "cases": [ + { + "expression": "b7eo", + "result": true + } + ] + }, + { + "given": { + "xIUo9": true + }, + "cases": [ + { + "expression": "xIUo9", + "result": true + } + ] + }, + { + "given": { + "5": true + }, + "cases": [ + { + "expression": "\"5\"", + "result": true + } + ] + }, + { + "given": { + "?": true + }, + "cases": [ + { + "expression": "\"?\"", + "result": true + } + ] + }, + { + "given": { + "sU": true + }, + "cases": [ + { + "expression": "sU", + "result": true + } + ] + }, + { + "given": { + "VH2&H\\\/": true + }, + "cases": [ + { + "expression": "\"VH2&H\\\\\\/\"", + "result": true + } + ] + }, + { + "given": { + "_C": true + }, + "cases": [ + { + "expression": "_C", + "result": true + } + ] + }, + { + "given": { + "_": true + }, + "cases": [ + { + "expression": "_", + "result": true + } + ] + }, + { + "given": { + "<\t": true + }, + "cases": [ + { + "expression": "\"<\\t\"", + "result": true + } + ] + }, + { + "given": { + "\uD834\uDD1E": true + }, + "cases": [ + { + "expression": "\"\\uD834\\uDD1E\"", + "result": true + } + ] + } +] diff --git a/vendor/mtdowling/jmespath.php/tests/compliance/indices.json b/vendor/mtdowling/jmespath.php/tests/compliance/indices.json new file mode 100644 index 0000000..aa03b35 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/compliance/indices.json @@ -0,0 +1,346 @@ +[{ + "given": + {"foo": {"bar": ["zero", "one", "two"]}}, + "cases": [ + { + "expression": "foo.bar[0]", + "result": "zero" + }, + { + "expression": "foo.bar[1]", + "result": "one" + }, + { + "expression": "foo.bar[2]", + "result": "two" + }, + { + "expression": "foo.bar[3]", + "result": null + }, + { + "expression": "foo.bar[-1]", + "result": "two" + }, + { + "expression": "foo.bar[-2]", + "result": "one" + }, + { + "expression": "foo.bar[-3]", + "result": "zero" + }, + { + "expression": "foo.bar[-4]", + "result": null + } + ] +}, +{ + "given": + {"foo": [{"bar": "one"}, {"bar": "two"}, {"bar": "three"}, {"notbar": "four"}]}, + "cases": [ + { + "expression": "foo.bar", + "result": null + }, + { + "expression": "foo[0].bar", + "result": "one" + }, + { + "expression": "foo[1].bar", + "result": "two" + }, + { + "expression": "foo[2].bar", + "result": "three" + }, + { + "expression": "foo[3].notbar", + "result": "four" + }, + { + "expression": "foo[3].bar", + "result": null + }, + { + "expression": "foo[0]", + "result": {"bar": "one"} + }, + { + "expression": "foo[1]", + "result": {"bar": "two"} + }, + { + "expression": "foo[2]", + "result": {"bar": "three"} + }, + { + "expression": "foo[3]", + "result": {"notbar": "four"} + }, + { + "expression": "foo[4]", + "result": null + } + ] +}, +{ + "given": [ + "one", "two", "three" + ], + "cases": [ + { + "expression": "[0]", + "result": "one" + }, + { + "expression": "[1]", + "result": "two" + }, + { + "expression": "[2]", + "result": "three" + }, + { + "expression": "[-1]", + "result": "three" + }, + { + "expression": "[-2]", + "result": "two" + }, + { + "expression": "[-3]", + "result": "one" + } + ] +}, +{ + "given": {"reservations": [ + {"instances": [{"foo": 1}, {"foo": 2}]} + ]}, + "cases": [ + { + "expression": "reservations[].instances[].foo", + "result": [1, 2] + }, + { + "expression": "reservations[].instances[].bar", + "result": [] + }, + { + "expression": "reservations[].notinstances[].foo", + "result": [] + }, + { + "expression": "reservations[].notinstances[].foo", + "result": [] + } + ] +}, +{ + "given": {"reservations": [{ + "instances": [ + {"foo": [{"bar": 1}, {"bar": 2}, {"notbar": 3}, {"bar": 4}]}, + {"foo": [{"bar": 5}, {"bar": 6}, {"notbar": [7]}, {"bar": 8}]}, + {"foo": "bar"}, + {"notfoo": [{"bar": 20}, {"bar": 21}, {"notbar": [7]}, {"bar": 22}]}, + {"bar": [{"baz": [1]}, {"baz": [2]}, {"baz": [3]}, {"baz": [4]}]}, + {"baz": [{"baz": [1, 2]}, {"baz": []}, {"baz": []}, {"baz": [3, 4]}]}, + {"qux": [{"baz": []}, {"baz": [1, 2, 3]}, {"baz": [4]}, {"baz": []}]} + ], + "otherkey": {"foo": [{"bar": 1}, {"bar": 2}, {"notbar": 3}, {"bar": 4}]} + }, { + "instances": [ + {"a": [{"bar": 1}, {"bar": 2}, {"notbar": 3}, {"bar": 4}]}, + {"b": [{"bar": 5}, {"bar": 6}, {"notbar": [7]}, {"bar": 8}]}, + {"c": "bar"}, + {"notfoo": [{"bar": 23}, {"bar": 24}, {"notbar": [7]}, {"bar": 25}]}, + {"qux": [{"baz": []}, {"baz": [1, 2, 3]}, {"baz": [4]}, {"baz": []}]} + ], + "otherkey": {"foo": [{"bar": 1}, {"bar": 2}, {"notbar": 3}, {"bar": 4}]} + } + ]}, + "cases": [ + { + "expression": "reservations[].instances[].foo[].bar", + "result": [1, 2, 4, 5, 6, 8] + }, + { + "expression": "reservations[].instances[].foo[].baz", + "result": [] + }, + { + "expression": "reservations[].instances[].notfoo[].bar", + "result": [20, 21, 22, 23, 24, 25] + }, + { + "expression": "reservations[].instances[].notfoo[].notbar", + "result": [[7], [7]] + }, + { + "expression": "reservations[].notinstances[].foo", + "result": [] + }, + { + "expression": "reservations[].instances[].foo[].notbar", + "result": [3, [7]] + }, + { + "expression": "reservations[].instances[].bar[].baz", + "result": [[1], [2], [3], [4]] + }, + { + "expression": "reservations[].instances[].baz[].baz", + "result": [[1, 2], [], [], [3, 4]] + }, + { + "expression": "reservations[].instances[].qux[].baz", + "result": [[], [1, 2, 3], [4], [], [], [1, 2, 3], [4], []] + }, + { + "expression": "reservations[].instances[].qux[].baz[]", + "result": [1, 2, 3, 4, 1, 2, 3, 4] + } + ] +}, +{ + "given": { + "foo": [ + [["one", "two"], ["three", "four"]], + [["five", "six"], ["seven", "eight"]], + [["nine"], ["ten"]] + ] + }, + "cases": [ + { + "expression": "foo[]", + "result": [["one", "two"], ["three", "four"], ["five", "six"], + ["seven", "eight"], ["nine"], ["ten"]] + }, + { + "expression": "foo[][0]", + "result": ["one", "three", "five", "seven", "nine", "ten"] + }, + { + "expression": "foo[][1]", + "result": ["two", "four", "six", "eight"] + }, + { + "expression": "foo[][0][0]", + "result": [] + }, + { + "expression": "foo[][2][2]", + "result": [] + }, + { + "expression": "foo[][0][0][100]", + "result": [] + } + ] +}, +{ + "given": { + "foo": [{ + "bar": [ + { + "qux": 2, + "baz": 1 + }, + { + "qux": 4, + "baz": 3 + } + ] + }, + { + "bar": [ + { + "qux": 6, + "baz": 5 + }, + { + "qux": 8, + "baz": 7 + } + ] + } + ] + }, + "cases": [ + { + "expression": "foo", + "result": [{"bar": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}]}, + {"bar": [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]}] + }, + { + "expression": "foo[]", + "result": [{"bar": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}]}, + {"bar": [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]}] + }, + { + "expression": "foo[].bar", + "result": [[{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}], + [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]] + }, + { + "expression": "foo[].bar[]", + "result": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}, + {"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}] + }, + { + "expression": "foo[].bar[].baz", + "result": [1, 3, 5, 7] + } + ] +}, +{ + "given": { + "string": "string", + "hash": {"foo": "bar", "bar": "baz"}, + "number": 23, + "nullvalue": null + }, + "cases": [ + { + "expression": "string[]", + "result": null + }, + { + "expression": "hash[]", + "result": null + }, + { + "expression": "number[]", + "result": null + }, + { + "expression": "nullvalue[]", + "result": null + }, + { + "expression": "string[].foo", + "result": null + }, + { + "expression": "hash[].foo", + "result": null + }, + { + "expression": "number[].foo", + "result": null + }, + { + "expression": "nullvalue[].foo", + "result": null + }, + { + "expression": "nullvalue[].foo[].bar", + "result": null + } + ] +} +] diff --git a/vendor/mtdowling/jmespath.php/tests/compliance/literal.json b/vendor/mtdowling/jmespath.php/tests/compliance/literal.json new file mode 100644 index 0000000..b796d36 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/compliance/literal.json @@ -0,0 +1,190 @@ +[ + { + "given": { + "foo": [{"name": "a"}, {"name": "b"}], + "bar": {"baz": "qux"} + }, + "cases": [ + { + "expression": "`\"foo\"`", + "result": "foo" + }, + { + "comment": "Interpret escaped unicode.", + "expression": "`\"\\u03a6\"`", + "result": "Φ" + }, + { + "expression": "`\"✓\"`", + "result": "✓" + }, + { + "expression": "`[1, 2, 3]`", + "result": [1, 2, 3] + }, + { + "expression": "`{\"a\": \"b\"}`", + "result": {"a": "b"} + }, + { + "expression": "`true`", + "result": true + }, + { + "expression": "`false`", + "result": false + }, + { + "expression": "`null`", + "result": null + }, + { + "expression": "`0`", + "result": 0 + }, + { + "expression": "`1`", + "result": 1 + }, + { + "expression": "`2`", + "result": 2 + }, + { + "expression": "`3`", + "result": 3 + }, + { + "expression": "`4`", + "result": 4 + }, + { + "expression": "`5`", + "result": 5 + }, + { + "expression": "`6`", + "result": 6 + }, + { + "expression": "`7`", + "result": 7 + }, + { + "expression": "`8`", + "result": 8 + }, + { + "expression": "`9`", + "result": 9 + }, + { + "comment": "Escaping a backtick in quotes", + "expression": "`\"foo\\`bar\"`", + "result": "foo`bar" + }, + { + "comment": "Double quote in literal", + "expression": "`\"foo\\\"bar\"`", + "result": "foo\"bar" + }, + { + "expression": "`\"1\\`\"`", + "result": "1`" + }, + { + "comment": "Multiple literal expressions with escapes", + "expression": "`\"\\\\\"`.{a:`\"b\"`}", + "result": {"a": "b"} + }, + { + "comment": "literal . identifier", + "expression": "`{\"a\": \"b\"}`.a", + "result": "b" + }, + { + "comment": "literal . identifier . identifier", + "expression": "`{\"a\": {\"b\": \"c\"}}`.a.b", + "result": "c" + }, + { + "comment": "literal . identifier bracket-expr", + "expression": "`[0, 1, 2]`[1]", + "result": 1 + } + ] + }, + { + "comment": "Literals", + "given": {"type": "object"}, + "cases": [ + { + "comment": "Literal with leading whitespace", + "expression": "` {\"foo\": true}`", + "result": {"foo": true} + }, + { + "comment": "Literal with trailing whitespace", + "expression": "`{\"foo\": true} `", + "result": {"foo": true} + }, + { + "comment": "Literal on RHS of subexpr not allowed", + "expression": "foo.`\"bar\"`", + "error": "syntax" + } + ] + }, + { + "comment": "Raw String Literals", + "given": {}, + "cases": [ + { + "expression": "'foo'", + "result": "foo" + }, + { + "expression": "' foo '", + "result": " foo " + }, + { + "expression": "'0'", + "result": "0" + }, + { + "expression": "'newline\n'", + "result": "newline\n" + }, + { + "expression": "'\n'", + "result": "\n" + }, + { + "expression": "'✓'", + "result": "✓" + }, + { + "expression": "'𝄞'", + "result": "𝄞" + }, + { + "expression": "' [foo] '", + "result": " [foo] " + }, + { + "expression": "'[foo]'", + "result": "[foo]" + }, + { + "comment": "Do not interpret escaped unicode.", + "expression": "'\\u03a6'", + "result": "\\u03a6" + }, + { + "comment": "Can escape the single quote", + "expression": "'foo\\'bar'", + "result": "foo'bar" + } + ] + } +] diff --git a/vendor/mtdowling/jmespath.php/tests/compliance/multiselect.json b/vendor/mtdowling/jmespath.php/tests/compliance/multiselect.json new file mode 100644 index 0000000..8f2a481 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/compliance/multiselect.json @@ -0,0 +1,393 @@ +[{ + "given": { + "foo": { + "bar": "bar", + "baz": "baz", + "qux": "qux", + "nested": { + "one": { + "a": "first", + "b": "second", + "c": "third" + }, + "two": { + "a": "first", + "b": "second", + "c": "third" + }, + "three": { + "a": "first", + "b": "second", + "c": {"inner": "third"} + } + } + }, + "bar": 1, + "baz": 2, + "qux\"": 3 + }, + "cases": [ + { + "expression": "foo.{bar: bar}", + "result": {"bar": "bar"} + }, + { + "expression": "foo.{\"bar\": bar}", + "result": {"bar": "bar"} + }, + { + "expression": "foo.{\"foo.bar\": bar}", + "result": {"foo.bar": "bar"} + }, + { + "expression": "foo.{bar: bar, baz: baz}", + "result": {"bar": "bar", "baz": "baz"} + }, + { + "expression": "foo.{\"bar\": bar, \"baz\": baz}", + "result": {"bar": "bar", "baz": "baz"} + }, + { + "expression": "{\"baz\": baz, \"qux\\\"\": \"qux\\\"\"}", + "result": {"baz": 2, "qux\"": 3} + }, + { + "expression": "foo.{bar:bar,baz:baz}", + "result": {"bar": "bar", "baz": "baz"} + }, + { + "expression": "foo.{bar: bar,qux: qux}", + "result": {"bar": "bar", "qux": "qux"} + }, + { + "expression": "foo.{bar: bar, noexist: noexist}", + "result": {"bar": "bar", "noexist": null} + }, + { + "expression": "foo.{noexist: noexist, alsonoexist: alsonoexist}", + "result": {"noexist": null, "alsonoexist": null} + }, + { + "expression": "foo.badkey.{nokey: nokey, alsonokey: alsonokey}", + "result": null + }, + { + "expression": "foo.nested.*.{a: a,b: b}", + "result": [{"a": "first", "b": "second"}, + {"a": "first", "b": "second"}, + {"a": "first", "b": "second"}] + }, + { + "expression": "foo.nested.three.{a: a, cinner: c.inner}", + "result": {"a": "first", "cinner": "third"} + }, + { + "expression": "foo.nested.three.{a: a, c: c.inner.bad.key}", + "result": {"a": "first", "c": null} + }, + { + "expression": "foo.{a: nested.one.a, b: nested.two.b}", + "result": {"a": "first", "b": "second"} + }, + { + "expression": "{bar: bar, baz: baz}", + "result": {"bar": 1, "baz": 2} + }, + { + "expression": "{bar: bar}", + "result": {"bar": 1} + }, + { + "expression": "{otherkey: bar}", + "result": {"otherkey": 1} + }, + { + "expression": "{no: no, exist: exist}", + "result": {"no": null, "exist": null} + }, + { + "expression": "foo.[bar]", + "result": ["bar"] + }, + { + "expression": "foo.[bar,baz]", + "result": ["bar", "baz"] + }, + { + "expression": "foo.[bar,qux]", + "result": ["bar", "qux"] + }, + { + "expression": "foo.[bar,noexist]", + "result": ["bar", null] + }, + { + "expression": "foo.[noexist,alsonoexist]", + "result": [null, null] + } + ] +}, { + "given": { + "foo": {"bar": 1, "baz": [2, 3, 4]} + }, + "cases": [ + { + "expression": "foo.{bar:bar,baz:baz}", + "result": {"bar": 1, "baz": [2, 3, 4]} + }, + { + "expression": "foo.[bar,baz[0]]", + "result": [1, 2] + }, + { + "expression": "foo.[bar,baz[1]]", + "result": [1, 3] + }, + { + "expression": "foo.[bar,baz[2]]", + "result": [1, 4] + }, + { + "expression": "foo.[bar,baz[3]]", + "result": [1, null] + }, + { + "expression": "foo.[bar[0],baz[3]]", + "result": [null, null] + } + ] +}, { + "given": { + "foo": {"bar": 1, "baz": 2} + }, + "cases": [ + { + "expression": "foo.{bar: bar, baz: baz}", + "result": {"bar": 1, "baz": 2} + }, + { + "expression": "foo.[bar,baz]", + "result": [1, 2] + } + ] +}, { + "given": { + "foo": { + "bar": {"baz": [{"common": "first", "one": 1}, + {"common": "second", "two": 2}]}, + "ignoreme": 1, + "includeme": true + } + }, + "cases": [ + { + "expression": "foo.{bar: bar.baz[1],includeme: includeme}", + "result": {"bar": {"common": "second", "two": 2}, "includeme": true} + }, + { + "expression": "foo.{\"bar.baz.two\": bar.baz[1].two, includeme: includeme}", + "result": {"bar.baz.two": 2, "includeme": true} + }, + { + "expression": "foo.[includeme, bar.baz[*].common]", + "result": [true, ["first", "second"]] + }, + { + "expression": "foo.[includeme, bar.baz[*].none]", + "result": [true, []] + }, + { + "expression": "foo.[includeme, bar.baz[].common]", + "result": [true, ["first", "second"]] + } + ] +}, { + "given": { + "reservations": [{ + "instances": [ + {"id": "id1", + "name": "first"}, + {"id": "id2", + "name": "second"} + ]}, { + "instances": [ + {"id": "id3", + "name": "third"}, + {"id": "id4", + "name": "fourth"} + ]} + ]}, + "cases": [ + { + "expression": "reservations[*].instances[*].{id: id, name: name}", + "result": [[{"id": "id1", "name": "first"}, {"id": "id2", "name": "second"}], + [{"id": "id3", "name": "third"}, {"id": "id4", "name": "fourth"}]] + }, + { + "expression": "reservations[].instances[].{id: id, name: name}", + "result": [{"id": "id1", "name": "first"}, + {"id": "id2", "name": "second"}, + {"id": "id3", "name": "third"}, + {"id": "id4", "name": "fourth"}] + }, + { + "expression": "reservations[].instances[].[id, name]", + "result": [["id1", "first"], + ["id2", "second"], + ["id3", "third"], + ["id4", "fourth"]] + } + ] +}, +{ + "given": { + "foo": [{ + "bar": [ + { + "qux": 2, + "baz": 1 + }, + { + "qux": 4, + "baz": 3 + } + ] + }, + { + "bar": [ + { + "qux": 6, + "baz": 5 + }, + { + "qux": 8, + "baz": 7 + } + ] + } + ] + }, + "cases": [ + { + "expression": "foo", + "result": [{"bar": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}]}, + {"bar": [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]}] + }, + { + "expression": "foo[]", + "result": [{"bar": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}]}, + {"bar": [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]}] + }, + { + "expression": "foo[].bar", + "result": [[{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}], + [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]] + }, + { + "expression": "foo[].bar[]", + "result": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}, + {"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}] + }, + { + "expression": "foo[].bar[].[baz, qux]", + "result": [[1, 2], [3, 4], [5, 6], [7, 8]] + }, + { + "expression": "foo[].bar[].[baz]", + "result": [[1], [3], [5], [7]] + }, + { + "expression": "foo[].bar[].[baz, qux][]", + "result": [1, 2, 3, 4, 5, 6, 7, 8] + } + ] +}, +{ + "given": { + "foo": { + "baz": [ + { + "bar": "abc" + }, { + "bar": "def" + } + ], + "qux": ["zero"] + } + }, + "cases": [ + { + "expression": "foo.[baz[*].bar, qux[0]]", + "result": [["abc", "def"], "zero"] + } + ] +}, +{ + "given": { + "foo": { + "baz": [ + { + "bar": "a", + "bam": "b", + "boo": "c" + }, { + "bar": "d", + "bam": "e", + "boo": "f" + } + ], + "qux": ["zero"] + } + }, + "cases": [ + { + "expression": "foo.[baz[*].[bar, boo], qux[0]]", + "result": [[["a", "c" ], ["d", "f" ]], "zero"] + } + ] +}, +{ + "given": { + "foo": { + "baz": [ + { + "bar": "a", + "bam": "b", + "boo": "c" + }, { + "bar": "d", + "bam": "e", + "boo": "f" + } + ], + "qux": ["zero"] + } + }, + "cases": [ + { + "expression": "foo.[baz[*].not_there || baz[*].bar, qux[0]]", + "result": [["a", "d"], "zero"] + } + ] +}, +{ + "given": {"type": "object"}, + "cases": [ + { + "comment": "Nested multiselect", + "expression": "[[*],*]", + "result": [null, ["object"]] + } + ] +}, +{ + "given": [], + "cases": [ + { + "comment": "Nested multiselect", + "expression": "[[*]]", + "result": [[]] + } + ] +} +] diff --git a/vendor/mtdowling/jmespath.php/tests/compliance/perf/basic.json b/vendor/mtdowling/jmespath.php/tests/compliance/perf/basic.json new file mode 100644 index 0000000..0e70fd1 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/compliance/perf/basic.json @@ -0,0 +1,27 @@ +[{ + "description": "Basic minimal case", + "given": + {"foo": {"bar": {"baz": "correct"}}}, + "cases": [ + { + "name": "single_expression", + "expression": "foo", + "result": {"bar": {"baz": "correct"}} + }, + { + "name": "single_dot_expression", + "expression": "foo.bar", + "result": {"baz": "correct"} + }, + { + "name": "double_dot_expression", + "expression": "foo.bar.baz", + "result": "correct" + }, + { + "name": "dot_no_match", + "expression": "foo.bar.baz.bad", + "result": null + } + ] +}] diff --git a/vendor/mtdowling/jmespath.php/tests/compliance/perf/deep_hierarchy.json b/vendor/mtdowling/jmespath.php/tests/compliance/perf/deep_hierarchy.json new file mode 100644 index 0000000..aecffe2 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/compliance/perf/deep_hierarchy.json @@ -0,0 +1,27 @@ +[{ + "description": "Deeply nested dict", + "given": + {"j49": {"j48": {"j47": {"j46": {"j45": {"j44": {"j43": {"j42": {"j41": {"j40": {"j39": {"j38": {"j37": {"j36": {"j35": {"j34": {"j33": {"j32": {"j31": {"j30": {"j29": {"j28": {"j27": {"j26": {"j25": {"j24": {"j23": {"j22": {"j21": {"j20": {"j19": {"j18": {"j17": {"j16": {"j15": {"j14": {"j13": {"j12": {"j11": {"j10": {"j9": {"j8": {"j7": {"j6": {"j5": {"j4": {"j3": {"j2": {"j1": {"j0": {}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}, + "cases": [ + { + "name": "deep_nesting_10", + "expression": "j49.j48.j47.j46.j45.j44.j43.j42.j41.j40", + "result": {"j39": {"j38": {"j37": {"j36": {"j35": {"j34": {"j33": {"j32": {"j31": {"j30": {"j29": {"j28": {"j27": {"j26": {"j25": {"j24": {"j23": {"j22": {"j21": {"j20": {"j19": {"j18": {"j17": {"j16": {"j15": {"j14": {"j13": {"j12": {"j11": {"j10": {"j9": {"j8": {"j7": {"j6": {"j5": {"j4": {"j3": {"j2": {"j1": {"j0": {}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} + }, + { + "name": "deep_nesting_50", + "expression": "j49.j48.j47.j46.j45.j44.j43.j42.j41.j40.j39.j38.j37.j36.j35.j34.j33.j32.j31.j30.j29.j28.j27.j26.j25.j24.j23.j22.j21.j20.j19.j18.j17.j16.j15.j14.j13.j12.j11.j10.j9.j8.j7.j6.j5.j4.j3.j2.j1.j0", + "result": {} + }, + { + "name": "deep_nesting_50_pipe", + "expression": "j49|j48|j47|j46|j45|j44|j43|j42|j41|j40|j39|j38|j37|j36|j35|j34|j33|j32|j31|j30|j29|j28|j27|j26|j25|j24|j23|j22|j21|j20|j19|j18|j17|j16|j15|j14|j13|j12|j11|j10|j9|j8|j7|j6|j5|j4|j3|j2|j1|j0", + "result": {} + }, + { + "name": "deep_nesting_50_index", + "expression": "[49][48][47][46][45][44][43][42][41][40][39][38][37][36][35][34][33][32][31][30][29][28][27][26][25][24][23][22][21][20][19][18][17][16][15][14][13][12][11][10][9][8][7][6][5][4][3][2][1][0]", + "result": null + } + ] +}] diff --git a/vendor/mtdowling/jmespath.php/tests/compliance/perf/deep_projection.json b/vendor/mtdowling/jmespath.php/tests/compliance/perf/deep_projection.json new file mode 100644 index 0000000..fecd6af --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/compliance/perf/deep_projection.json @@ -0,0 +1,12 @@ +[{ + "description": "Deep projections", + "given": + {"a": []}, + "cases": [ + { + "name": "deep_projection_104", + "expression": "a[*].b[*].c[*].d[*].e[*].f[*].g[*].h[*].i[*].j[*].k[*].l[*].m[*].n[*].o[*].p[*].q[*].r[*].s[*].t[*].u[*].v[*].w[*].x[*].y[*].z[*].a[*].b[*].c[*].d[*].e[*].f[*].g[*].h[*].i[*].j[*].k[*].l[*].m[*].n[*].o[*].p[*].q[*].r[*].s[*].t[*].u[*].v[*].w[*].x[*].y[*].z[*].a[*].b[*].c[*].d[*].e[*].f[*].g[*].h[*].i[*].j[*].k[*].l[*].m[*].n[*].o[*].p[*].q[*].r[*].s[*].t[*].u[*].v[*].w[*].x[*].y[*].z[*].a[*].b[*].c[*].d[*].e[*].f[*].g[*].h[*].i[*].j[*].k[*].l[*].m[*].n[*].o[*].p[*].q[*].r[*].s[*].t[*].u[*].v[*].w[*].x[*].y[*].z[*]", + "result": [] + } + ] +}] diff --git a/vendor/mtdowling/jmespath.php/tests/compliance/perf/functions.json b/vendor/mtdowling/jmespath.php/tests/compliance/perf/functions.json new file mode 100644 index 0000000..0122283 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/compliance/perf/functions.json @@ -0,0 +1,17 @@ +[{ + "description": "Deep projections", + "given": + [749, 222, 102, 148, 869, 848, 326, 644, 402, 150, 361, 827, 741, 60, 842, 943, 214, 519, 134, 866, 621, 851, 59, 580, 760, 576, 951, 989, 266, 259, 809, 643, 292, 731, 129, 970, 589, 430, 690, 715, 901, 491, 276, 88, 738, 282, 547, 349, 236, 879, 403, 557, 554, 23, 649, 720, 531, 2, 601, 152, 530, 477, 568, 122, 811, 75, 181, 203, 683, 152, 794, 155, 54, 314, 957, 468, 740, 532, 504, 806, 927, 827, 840, 100, 519, 357, 536, 398, 417, 543, 599, 383, 144, 772, 988, 184, 118, 921, 497, 193, 320, 919, 583, 346, 575, 143, 866, 907, 570, 255, 539, 164, 764, 256, 315, 305, 960, 587, 804, 577, 667, 869, 563, 956, 677, 469, 934, 52, 323, 933, 398, 305, 138, 133, 443, 419, 717, 838, 287, 177, 192, 210, 892, 319, 470, 76, 643, 737, 135, 425, 586, 882, 844, 113, 268, 323, 938, 569, 374, 295, 648, 27, 703, 530, 667, 118, 176, 972, 611, 60, 47, 19, 500, 344, 332, 452, 647, 388, 188, 235, 151, 353, 219, 766, 626, 885, 456, 182, 363, 617, 236, 285, 152, 87, 666, 429, 599, 762, 13, 778, 634, 43, 199, 361, 300, 370, 957, 488, 359, 354, 972, 368, 482, 88, 766, 709, 804, 637, 368, 950, 752, 932, 638, 291, 177, 739, 740, 357, 928, 964, 621, 472, 813, 36, 271, 642, 3, 771, 397, 670, 324, 244, 827, 194, 693, 846, 351, 668, 911, 600, 682, 735, 26, 876, 581, 915, 184, 263, 857, 960, 5, 523, 932, 694, 457, 739, 897, 28, 794, 885, 77, 768, 39, 763, 748, 792, 60, 582, 667, 909, 820, 898, 569, 252, 583, 237, 677, 613, 914, 956, 541, 297, 853, 581, 118, 888, 368, 156, 582, 183], + "cases": [ + { + "name": "min sort with slice", + "expression": "sort(@)[:3]", + "result": [2, 3, 5] + }, + { + "name": "max sort with slice", + "expression": "sort(@)[-3:]", + "result": [972, 988, 989] + } + ] +}] diff --git a/vendor/mtdowling/jmespath.php/tests/compliance/perf/multiwildcard.json b/vendor/mtdowling/jmespath.php/tests/compliance/perf/multiwildcard.json new file mode 100644 index 0000000..c2a2c0b --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/compliance/perf/multiwildcard.json @@ -0,0 +1,22 @@ +[{ + "description": "Multiple wildcards in an expression", + "given": { + "foo": [ + {"bar": [{"kind": "basic"}, {"kind": "intermediate"}]}, + {"bar": [{"kind": "advanced"}, {"kind": "expert"}]} + ] + + }, + "cases": [ + { + "name": "multi_wildcard_field", + "expression": "foo[*].bar[*].kind", + "result": [["basic", "intermediate"], ["advanced", "expert"]] + }, + { + "name": "wildcard_with_index", + "expression": "foo[*].bar[0].kind", + "result": ["basic", "advanced"] + } + ] +}] diff --git a/vendor/mtdowling/jmespath.php/tests/compliance/perf/wildcardindex.json b/vendor/mtdowling/jmespath.php/tests/compliance/perf/wildcardindex.json new file mode 100644 index 0000000..57208f9 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/compliance/perf/wildcardindex.json @@ -0,0 +1,17 @@ +[{ + "description": "Multiple wildcards", + "given": + {"foo": [{"bar": "one"}, {"bar": "two"}, {"bar": "three"}, {"notbar": "four"}]}, + "cases": [ + { + "name": "wildcard_with_field_match", + "expression": "foo[*].bar", + "result": ["one", "two", "three"] + }, + { + "name": "wildcard_with_field_match2", + "expression": "foo[*].notbar", + "result": ["four"] + } + ] +}] diff --git a/vendor/mtdowling/jmespath.php/tests/compliance/pipe.json b/vendor/mtdowling/jmespath.php/tests/compliance/pipe.json new file mode 100644 index 0000000..b10c0a4 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/compliance/pipe.json @@ -0,0 +1,131 @@ +[{ + "given": { + "foo": { + "bar": { + "baz": "subkey" + }, + "other": { + "baz": "subkey" + }, + "other2": { + "baz": "subkey" + }, + "other3": { + "notbaz": ["a", "b", "c"] + }, + "other4": { + "notbaz": ["a", "b", "c"] + } + } + }, + "cases": [ + { + "expression": "foo.*.baz | [0]", + "result": "subkey" + }, + { + "expression": "foo.*.baz | [1]", + "result": "subkey" + }, + { + "expression": "foo.*.baz | [2]", + "result": "subkey" + }, + { + "expression": "foo.bar.* | [0]", + "result": "subkey" + }, + { + "expression": "foo.*.notbaz | [*]", + "result": [["a", "b", "c"], ["a", "b", "c"]] + }, + { + "expression": "{\"a\": foo.bar, \"b\": foo.other} | *.baz", + "result": ["subkey", "subkey"] + } + ] +}, { + "given": { + "foo": { + "bar": { + "baz": "one" + }, + "other": { + "baz": "two" + }, + "other2": { + "baz": "three" + }, + "other3": { + "notbaz": ["a", "b", "c"] + }, + "other4": { + "notbaz": ["d", "e", "f"] + } + } + }, + "cases": [ + { + "expression": "foo | bar", + "result": {"baz": "one"} + }, + { + "expression": "foo | bar | baz", + "result": "one" + }, + { + "expression": "foo|bar| baz", + "result": "one" + }, + { + "expression": "not_there | [0]", + "result": null + }, + { + "expression": "not_there | [0]", + "result": null + }, + { + "expression": "[foo.bar, foo.other] | [0]", + "result": {"baz": "one"} + }, + { + "expression": "{\"a\": foo.bar, \"b\": foo.other} | a", + "result": {"baz": "one"} + }, + { + "expression": "{\"a\": foo.bar, \"b\": foo.other} | b", + "result": {"baz": "two"} + }, + { + "expression": "foo.bam || foo.bar | baz", + "result": "one" + }, + { + "expression": "foo | not_there || bar", + "result": {"baz": "one"} + } + ] +}, { + "given": { + "foo": [{ + "bar": [{ + "baz": "one" + }, { + "baz": "two" + }] + }, { + "bar": [{ + "baz": "three" + }, { + "baz": "four" + }] + }] + }, + "cases": [ + { + "expression": "foo[*].bar[*] | [0][0]", + "result": {"baz": "one"} + } + ] +}] diff --git a/vendor/mtdowling/jmespath.php/tests/compliance/slice.json b/vendor/mtdowling/jmespath.php/tests/compliance/slice.json new file mode 100644 index 0000000..3594772 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/compliance/slice.json @@ -0,0 +1,187 @@ +[{ + "given": { + "foo": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], + "bar": { + "baz": 1 + } + }, + "cases": [ + { + "expression": "bar[0:10]", + "result": null + }, + { + "expression": "foo[0:10:1]", + "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + }, + { + "expression": "foo[0:10]", + "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + }, + { + "expression": "foo[0:10:]", + "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + }, + { + "expression": "foo[0::1]", + "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + }, + { + "expression": "foo[0::]", + "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + }, + { + "expression": "foo[0:]", + "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + }, + { + "expression": "foo[:10:1]", + "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + }, + { + "expression": "foo[::1]", + "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + }, + { + "expression": "foo[:10:]", + "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + }, + { + "expression": "foo[::]", + "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + }, + { + "expression": "foo[:]", + "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + }, + { + "expression": "foo[1:9]", + "result": [1, 2, 3, 4, 5, 6, 7, 8] + }, + { + "expression": "foo[0:10:2]", + "result": [0, 2, 4, 6, 8] + }, + { + "expression": "foo[5:]", + "result": [5, 6, 7, 8, 9] + }, + { + "expression": "foo[5::2]", + "result": [5, 7, 9] + }, + { + "expression": "foo[::2]", + "result": [0, 2, 4, 6, 8] + }, + { + "expression": "foo[::-1]", + "result": [9, 8, 7, 6, 5, 4, 3, 2, 1, 0] + }, + { + "expression": "foo[1::2]", + "result": [1, 3, 5, 7, 9] + }, + { + "expression": "foo[10:0:-1]", + "result": [9, 8, 7, 6, 5, 4, 3, 2, 1] + }, + { + "expression": "foo[10:5:-1]", + "result": [9, 8, 7, 6] + }, + { + "expression": "foo[8:2:-2]", + "result": [8, 6, 4] + }, + { + "expression": "foo[0:20]", + "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + }, + { + "expression": "foo[10:-20:-1]", + "result": [9, 8, 7, 6, 5, 4, 3, 2, 1, 0] + }, + { + "expression": "foo[10:-20]", + "result": [] + }, + { + "expression": "foo[-4:-1]", + "result": [6, 7, 8] + }, + { + "expression": "foo[:-5:-1]", + "result": [9, 8, 7, 6] + }, + { + "expression": "foo[8:2:0]", + "error": "invalid-value" + }, + { + "expression": "foo[8:2:0:1]", + "error": "syntax" + }, + { + "expression": "foo[8:2&]", + "error": "syntax" + }, + { + "expression": "foo[2:a:3]", + "error": "syntax" + } + ] +}, { + "given": { + "foo": [{"a": 1}, {"a": 2}, {"a": 3}], + "bar": [{"a": {"b": 1}}, {"a": {"b": 2}}, + {"a": {"b": 3}}], + "baz": 50 + }, + "cases": [ + { + "expression": "foo[:2].a", + "result": [1, 2] + }, + { + "expression": "foo[:2].b", + "result": [] + }, + { + "expression": "foo[:2].a.b", + "result": [] + }, + { + "expression": "bar[::-1].a.b", + "result": [3, 2, 1] + }, + { + "expression": "bar[:2].a.b", + "result": [1, 2] + }, + { + "expression": "baz[:2].a", + "result": null + } + ] +}, { + "given": [{"a": 1}, {"a": 2}, {"a": 3}], + "cases": [ + { + "expression": "[:]", + "result": [{"a": 1}, {"a": 2}, {"a": 3}] + }, + { + "expression": "[:2].a", + "result": [1, 2] + }, + { + "expression": "[::-1].a", + "result": [3, 2, 1] + }, + { + "expression": "[:2].b", + "result": [] + } + ] +}] diff --git a/vendor/mtdowling/jmespath.php/tests/compliance/syntax.json b/vendor/mtdowling/jmespath.php/tests/compliance/syntax.json new file mode 100644 index 0000000..8b17f88 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/compliance/syntax.json @@ -0,0 +1,616 @@ +[{ + "comment": "Dot syntax", + "given": {"type": "object"}, + "cases": [ + { + "expression": "foo.bar", + "result": null + }, + { + "expression": "foo.1", + "error": "syntax" + }, + { + "expression": "foo.-11", + "error": "syntax" + }, + { + "expression": "foo", + "result": null + }, + { + "expression": "foo.", + "error": "syntax" + }, + { + "expression": "foo.", + "error": "syntax" + }, + { + "expression": ".foo", + "error": "syntax" + }, + { + "expression": "foo..bar", + "error": "syntax" + }, + { + "expression": "foo.bar.", + "error": "syntax" + }, + { + "expression": "foo[.]", + "error": "syntax" + } + ] +}, + { + "comment": "Simple token errors", + "given": {"type": "object"}, + "cases": [ + { + "expression": ".", + "error": "syntax" + }, + { + "expression": ":", + "error": "syntax" + }, + { + "expression": ",", + "error": "syntax" + }, + { + "expression": "]", + "error": "syntax" + }, + { + "expression": "[", + "error": "syntax" + }, + { + "expression": "}", + "error": "syntax" + }, + { + "expression": "{", + "error": "syntax" + }, + { + "expression": ")", + "error": "syntax" + }, + { + "expression": "(", + "error": "syntax" + }, + { + "expression": "((&", + "error": "syntax" + }, + { + "expression": "a[", + "error": "syntax" + }, + { + "expression": "a]", + "error": "syntax" + }, + { + "expression": "a][", + "error": "syntax" + }, + { + "expression": "!", + "error": "syntax" + } + ] + }, + { + "comment": "Boolean syntax errors", + "given": {"type": "object"}, + "cases": [ + { + "expression": "![!(!", + "error": "syntax" + } + ] + }, + { + "comment": "Wildcard syntax", + "given": {"type": "object"}, + "cases": [ + { + "expression": "*", + "result": ["object"] + }, + { + "expression": "*.*", + "result": [] + }, + { + "expression": "*.foo", + "result": [] + }, + { + "expression": "*[0]", + "result": [] + }, + { + "expression": ".*", + "error": "syntax" + }, + { + "expression": "*foo", + "error": "syntax" + }, + { + "expression": "*0", + "error": "syntax" + }, + { + "expression": "foo[*]bar", + "error": "syntax" + }, + { + "expression": "foo[*]*", + "error": "syntax" + } + ] + }, + { + "comment": "Flatten syntax", + "given": {"type": "object"}, + "cases": [ + { + "expression": "[]", + "result": null + } + ] + }, + { + "comment": "Simple bracket syntax", + "given": {"type": "object"}, + "cases": [ + { + "expression": "[0]", + "result": null + }, + { + "expression": "[*]", + "result": null + }, + { + "expression": "*.[0]", + "error": "syntax" + }, + { + "expression": "*.[\"0\"]", + "result": [[null]] + }, + { + "expression": "[*].bar", + "result": null + }, + { + "expression": "[*][0]", + "result": null + }, + { + "expression": "foo[#]", + "error": "syntax" + } + ] + }, + { + "comment": "Multi-select list syntax", + "given": {"type": "object"}, + "cases": [ + { + "expression": "foo[0]", + "result": null + }, + { + "comment": "Valid multi-select of a list", + "expression": "foo[0, 1]", + "error": "syntax" + }, + { + "expression": "foo.[0]", + "error": "syntax" + }, + { + "expression": "foo.[*]", + "result": null + }, + { + "comment": "Multi-select of a list with trailing comma", + "expression": "foo[0, ]", + "error": "syntax" + }, + { + "comment": "Multi-select of a list with trailing comma and no close", + "expression": "foo[0,", + "error": "syntax" + }, + { + "comment": "Multi-select of a list with trailing comma and no close", + "expression": "foo.[a", + "error": "syntax" + }, + { + "comment": "Multi-select of a list with extra comma", + "expression": "foo[0,, 1]", + "error": "syntax" + }, + { + "comment": "Multi-select of a list using an identifier index", + "expression": "foo[abc]", + "error": "syntax" + }, + { + "comment": "Multi-select of a list using identifier indices", + "expression": "foo[abc, def]", + "error": "syntax" + }, + { + "comment": "Multi-select of a list using an identifier index", + "expression": "foo[abc, 1]", + "error": "syntax" + }, + { + "comment": "Multi-select of a list using an identifier index with trailing comma", + "expression": "foo[abc, ]", + "error": "syntax" + }, + { + "comment": "Valid multi-select of a hash using an identifier index", + "expression": "foo.[abc]", + "result": null + }, + { + "comment": "Valid multi-select of a hash", + "expression": "foo.[abc, def]", + "result": null + }, + { + "comment": "Multi-select of a hash using a numeric index", + "expression": "foo.[abc, 1]", + "error": "syntax" + }, + { + "comment": "Multi-select of a hash with a trailing comma", + "expression": "foo.[abc, ]", + "error": "syntax" + }, + { + "comment": "Multi-select of a hash with extra commas", + "expression": "foo.[abc,, def]", + "error": "syntax" + }, + { + "comment": "Multi-select of a hash using number indices", + "expression": "foo.[0, 1]", + "error": "syntax" + } + ] + }, + { + "comment": "Multi-select hash syntax", + "given": {"type": "object"}, + "cases": [ + { + "comment": "No key or value", + "expression": "a{}", + "error": "syntax" + }, + { + "comment": "No closing token", + "expression": "a{", + "error": "syntax" + }, + { + "comment": "Not a key value pair", + "expression": "a{foo}", + "error": "syntax" + }, + { + "comment": "Missing value and closing character", + "expression": "a{foo:", + "error": "syntax" + }, + { + "comment": "Missing closing character", + "expression": "a{foo: 0", + "error": "syntax" + }, + { + "comment": "Missing value", + "expression": "a{foo:}", + "error": "syntax" + }, + { + "comment": "Trailing comma and no closing character", + "expression": "a{foo: 0, ", + "error": "syntax" + }, + { + "comment": "Missing value with trailing comma", + "expression": "a{foo: ,}", + "error": "syntax" + }, + { + "comment": "Accessing Array using an identifier", + "expression": "a{foo: bar}", + "error": "syntax" + }, + { + "expression": "a{foo: 0}", + "error": "syntax" + }, + { + "comment": "Missing key-value pair", + "expression": "a.{}", + "error": "syntax" + }, + { + "comment": "Not a key-value pair", + "expression": "a.{foo}", + "error": "syntax" + }, + { + "comment": "Missing value", + "expression": "a.{foo:}", + "error": "syntax" + }, + { + "comment": "Missing value with trailing comma", + "expression": "a.{foo: ,}", + "error": "syntax" + }, + { + "comment": "Valid multi-select hash extraction", + "expression": "a.{foo: bar}", + "result": null + }, + { + "comment": "Valid multi-select hash extraction", + "expression": "a.{foo: bar, baz: bam}", + "result": null + }, + { + "comment": "Trailing comma", + "expression": "a.{foo: bar, }", + "error": "syntax" + }, + { + "comment": "Missing key in second key-value pair", + "expression": "a.{foo: bar, baz}", + "error": "syntax" + }, + { + "comment": "Missing value in second key-value pair", + "expression": "a.{foo: bar, baz:}", + "error": "syntax" + }, + { + "comment": "Trailing comma", + "expression": "a.{foo: bar, baz: bam, }", + "error": "syntax" + }, + { + "comment": "Nested multi select", + "expression": "{\"\\\\\":{\" \":*}}", + "result": {"\\": {" ": ["object"]}} + } + ] + }, + { + "comment": "Or expressions", + "given": {"type": "object"}, + "cases": [ + { + "expression": "foo || bar", + "result": null + }, + { + "expression": "foo ||", + "error": "syntax" + }, + { + "expression": "foo.|| bar", + "error": "syntax" + }, + { + "expression": " || foo", + "error": "syntax" + }, + { + "expression": "foo || || foo", + "error": "syntax" + }, + { + "expression": "foo.[a || b]", + "result": null + }, + { + "expression": "foo.[a ||]", + "error": "syntax" + }, + { + "expression": "\"foo", + "error": "syntax" + } + ] + }, + { + "comment": "Filter expressions", + "given": {"type": "object"}, + "cases": [ + { + "expression": "foo[?bar==`\"baz\"`]", + "result": null + }, + { + "expression": "foo[? bar == `\"baz\"` ]", + "result": null + }, + { + "expression": "foo[ ?bar==`\"baz\"`]", + "error": "syntax" + }, + { + "expression": "foo[?bar==]", + "error": "syntax" + }, + { + "expression": "foo[?==]", + "error": "syntax" + }, + { + "expression": "foo[?==bar]", + "error": "syntax" + }, + { + "expression": "foo[?bar==baz?]", + "error": "syntax" + }, + { + "expression": "foo[?a.b.c==d.e.f]", + "result": null + }, + { + "expression": "foo[?bar==`[0, 1, 2]`]", + "result": null + }, + { + "expression": "foo[?bar==`[\"a\", \"b\", \"c\"]`]", + "result": null + }, + { + "comment": "Literal char not escaped", + "expression": "foo[?bar==`[\"foo`bar\"]`]", + "error": "syntax" + }, + { + "comment": "Literal char escaped", + "expression": "foo[?bar==`[\"foo\\`bar\"]`]", + "result": null + }, + { + "comment": "Unknown comparator", + "expression": "foo[?bar<>baz]", + "error": "syntax" + }, + { + "comment": "Unknown comparator", + "expression": "foo[?bar^baz]", + "error": "syntax" + }, + { + "expression": "foo[bar==baz]", + "error": "syntax" + }, + { + "comment": "Quoted identifier in filter expression no spaces", + "expression": "[?\"\\\\\">`\"foo\"`]", + "result": null + }, + { + "comment": "Quoted identifier in filter expression with spaces", + "expression": "[?\"\\\\\" > `\"foo\"`]", + "result": null + } + ] + }, + { + "comment": "Filter expression errors", + "given": {"type": "object"}, + "cases": [ + { + "expression": "bar.`\"anything\"`", + "error": "syntax" + }, + { + "expression": "bar.baz.noexists.`\"literal\"`", + "error": "syntax" + }, + { + "comment": "Literal wildcard projection", + "expression": "foo[*].`\"literal\"`", + "error": "syntax" + }, + { + "expression": "foo[*].name.`\"literal\"`", + "error": "syntax" + }, + { + "expression": "foo[].name.`\"literal\"`", + "error": "syntax" + }, + { + "expression": "foo[].name.`\"literal\"`.`\"subliteral\"`", + "error": "syntax" + }, + { + "comment": "Projecting a literal onto an empty list", + "expression": "foo[*].name.noexist.`\"literal\"`", + "error": "syntax" + }, + { + "expression": "foo[].name.noexist.`\"literal\"`", + "error": "syntax" + }, + { + "expression": "twolen[*].`\"foo\"`", + "error": "syntax" + }, + { + "comment": "Two level projection of a literal", + "expression": "twolen[*].threelen[*].`\"bar\"`", + "error": "syntax" + }, + { + "comment": "Two level flattened projection of a literal", + "expression": "twolen[].threelen[].`\"bar\"`", + "error": "syntax" + } + ] + }, + { + "comment": "Identifiers", + "given": {"type": "object"}, + "cases": [ + { + "expression": "foo", + "result": null + }, + { + "expression": "\"foo\"", + "result": null + }, + { + "expression": "\"\\\\\"", + "result": null + } + ] + }, + { + "comment": "Combined syntax", + "given": [], + "cases": [ + { + "expression": "*||*|*|*", + "result": [] + }, + { + "expression": "*[]||[*]", + "result": [] + }, + { + "expression": "[*.*]", + "result": [[]] + } + ] + } +] diff --git a/vendor/mtdowling/jmespath.php/tests/compliance/unicode.json b/vendor/mtdowling/jmespath.php/tests/compliance/unicode.json new file mode 100644 index 0000000..6b07b0b --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/compliance/unicode.json @@ -0,0 +1,38 @@ +[ + { + "given": {"foo": [{"✓": "✓"}, {"✓": "✗"}]}, + "cases": [ + { + "expression": "foo[].\"✓\"", + "result": ["✓", "✗"] + } + ] + }, + { + "given": {"☯": true}, + "cases": [ + { + "expression": "\"☯\"", + "result": true + } + ] + }, + { + "given": {"♪♫•*¨*•.¸¸❤¸¸.•*¨*•♫♪": true}, + "cases": [ + { + "expression": "\"♪♫•*¨*•.¸¸❤¸¸.•*¨*•♫♪\"", + "result": true + } + ] + }, + { + "given": {"☃": true}, + "cases": [ + { + "expression": "\"☃\"", + "result": true + } + ] + } +] diff --git a/vendor/mtdowling/jmespath.php/tests/compliance/wildcard.json b/vendor/mtdowling/jmespath.php/tests/compliance/wildcard.json new file mode 100644 index 0000000..3bcec30 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/tests/compliance/wildcard.json @@ -0,0 +1,460 @@ +[{ + "given": { + "foo": { + "bar": { + "baz": "val" + }, + "other": { + "baz": "val" + }, + "other2": { + "baz": "val" + }, + "other3": { + "notbaz": ["a", "b", "c"] + }, + "other4": { + "notbaz": ["a", "b", "c"] + }, + "other5": { + "other": { + "a": 1, + "b": 1, + "c": 1 + } + } + } + }, + "cases": [ + { + "expression": "foo.*.baz", + "result": ["val", "val", "val"] + }, + { + "expression": "foo.bar.*", + "result": ["val"] + }, + { + "expression": "foo.*.notbaz", + "result": [["a", "b", "c"], ["a", "b", "c"]] + }, + { + "expression": "foo.*.notbaz[0]", + "result": ["a", "a"] + }, + { + "expression": "foo.*.notbaz[-1]", + "result": ["c", "c"] + } + ] +}, { + "given": { + "foo": { + "first-1": { + "second-1": "val" + }, + "first-2": { + "second-1": "val" + }, + "first-3": { + "second-1": "val" + } + } + }, + "cases": [ + { + "expression": "foo.*", + "result": [{"second-1": "val"}, {"second-1": "val"}, + {"second-1": "val"}] + }, + { + "expression": "foo.*.*", + "result": [["val"], ["val"], ["val"]] + }, + { + "expression": "foo.*.*.*", + "result": [[], [], []] + }, + { + "expression": "foo.*.*.*.*", + "result": [[], [], []] + } + ] +}, { + "given": { + "foo": { + "bar": "one" + }, + "other": { + "bar": "one" + }, + "nomatch": { + "notbar": "three" + } + }, + "cases": [ + { + "expression": "*.bar", + "result": ["one", "one"] + } + ] +}, { + "given": { + "top1": { + "sub1": {"foo": "one"} + }, + "top2": { + "sub1": {"foo": "one"} + } + }, + "cases": [ + { + "expression": "*", + "result": [{"sub1": {"foo": "one"}}, + {"sub1": {"foo": "one"}}] + }, + { + "expression": "*.sub1", + "result": [{"foo": "one"}, + {"foo": "one"}] + }, + { + "expression": "*.*", + "result": [[{"foo": "one"}], + [{"foo": "one"}]] + }, + { + "expression": "*.*.foo[]", + "result": ["one", "one"] + }, + { + "expression": "*.sub1.foo", + "result": ["one", "one"] + } + ] +}, +{ + "given": + {"foo": [{"bar": "one"}, {"bar": "two"}, {"bar": "three"}, {"notbar": "four"}]}, + "cases": [ + { + "expression": "foo[*].bar", + "result": ["one", "two", "three"] + }, + { + "expression": "foo[*].notbar", + "result": ["four"] + } + ] +}, +{ + "given": + [{"bar": "one"}, {"bar": "two"}, {"bar": "three"}, {"notbar": "four"}], + "cases": [ + { + "expression": "[*]", + "result": [{"bar": "one"}, {"bar": "two"}, {"bar": "three"}, {"notbar": "four"}] + }, + { + "expression": "[*].bar", + "result": ["one", "two", "three"] + }, + { + "expression": "[*].notbar", + "result": ["four"] + } + ] +}, +{ + "given": { + "foo": { + "bar": [ + {"baz": ["one", "two", "three"]}, + {"baz": ["four", "five", "six"]}, + {"baz": ["seven", "eight", "nine"]} + ] + } + }, + "cases": [ + { + "expression": "foo.bar[*].baz", + "result": [["one", "two", "three"], ["four", "five", "six"], ["seven", "eight", "nine"]] + }, + { + "expression": "foo.bar[*].baz[0]", + "result": ["one", "four", "seven"] + }, + { + "expression": "foo.bar[*].baz[1]", + "result": ["two", "five", "eight"] + }, + { + "expression": "foo.bar[*].baz[2]", + "result": ["three", "six", "nine"] + }, + { + "expression": "foo.bar[*].baz[3]", + "result": [] + } + ] +}, +{ + "given": { + "foo": { + "bar": [["one", "two"], ["three", "four"]] + } + }, + "cases": [ + { + "expression": "foo.bar[*]", + "result": [["one", "two"], ["three", "four"]] + }, + { + "expression": "foo.bar[0]", + "result": ["one", "two"] + }, + { + "expression": "foo.bar[0][0]", + "result": "one" + }, + { + "expression": "foo.bar[0][0][0]", + "result": null + }, + { + "expression": "foo.bar[0][0][0][0]", + "result": null + }, + { + "expression": "foo[0][0]", + "result": null + } + ] +}, +{ + "given": { + "foo": [ + {"bar": [{"kind": "basic"}, {"kind": "intermediate"}]}, + {"bar": [{"kind": "advanced"}, {"kind": "expert"}]}, + {"bar": "string"} + ] + + }, + "cases": [ + { + "expression": "foo[*].bar[*].kind", + "result": [["basic", "intermediate"], ["advanced", "expert"]] + }, + { + "expression": "foo[*].bar[0].kind", + "result": ["basic", "advanced"] + } + ] +}, +{ + "given": { + "foo": [ + {"bar": {"kind": "basic"}}, + {"bar": {"kind": "intermediate"}}, + {"bar": {"kind": "advanced"}}, + {"bar": {"kind": "expert"}}, + {"bar": "string"} + ] + }, + "cases": [ + { + "expression": "foo[*].bar.kind", + "result": ["basic", "intermediate", "advanced", "expert"] + } + ] +}, +{ + "given": { + "foo": [{"bar": ["one", "two"]}, {"bar": ["three", "four"]}, {"bar": ["five"]}] + }, + "cases": [ + { + "expression": "foo[*].bar[0]", + "result": ["one", "three", "five"] + }, + { + "expression": "foo[*].bar[1]", + "result": ["two", "four"] + }, + { + "expression": "foo[*].bar[2]", + "result": [] + } + ] +}, +{ + "given": { + "foo": [{"bar": []}, {"bar": []}, {"bar": []}] + }, + "cases": [ + { + "expression": "foo[*].bar[0]", + "result": [] + } + ] +}, +{ + "given": { + "foo": [["one", "two"], ["three", "four"], ["five"]] + }, + "cases": [ + { + "expression": "foo[*][0]", + "result": ["one", "three", "five"] + }, + { + "expression": "foo[*][1]", + "result": ["two", "four"] + } + ] +}, +{ + "given": { + "foo": [ + [ + ["one", "two"], ["three", "four"] + ], [ + ["five", "six"], ["seven", "eight"] + ], [ + ["nine"], ["ten"] + ] + ] + }, + "cases": [ + { + "expression": "foo[*][0]", + "result": [["one", "two"], ["five", "six"], ["nine"]] + }, + { + "expression": "foo[*][1]", + "result": [["three", "four"], ["seven", "eight"], ["ten"]] + }, + { + "expression": "foo[*][0][0]", + "result": ["one", "five", "nine"] + }, + { + "expression": "foo[*][1][0]", + "result": ["three", "seven", "ten"] + }, + { + "expression": "foo[*][0][1]", + "result": ["two", "six"] + }, + { + "expression": "foo[*][1][1]", + "result": ["four", "eight"] + }, + { + "expression": "foo[*][2]", + "result": [] + }, + { + "expression": "foo[*][2][2]", + "result": [] + }, + { + "expression": "bar[*]", + "result": null + }, + { + "expression": "bar[*].baz[*]", + "result": null + } + ] +}, +{ + "given": { + "string": "string", + "hash": {"foo": "bar", "bar": "baz"}, + "number": 23, + "nullvalue": null + }, + "cases": [ + { + "expression": "string[*]", + "result": null + }, + { + "expression": "hash[*]", + "result": null + }, + { + "expression": "number[*]", + "result": null + }, + { + "expression": "nullvalue[*]", + "result": null + }, + { + "expression": "string[*].foo", + "result": null + }, + { + "expression": "hash[*].foo", + "result": null + }, + { + "expression": "number[*].foo", + "result": null + }, + { + "expression": "nullvalue[*].foo", + "result": null + }, + { + "expression": "nullvalue[*].foo[*].bar", + "result": null + } + ] +}, +{ + "given": { + "string": "string", + "hash": {"foo": "val", "bar": "val"}, + "number": 23, + "array": [1, 2, 3], + "nullvalue": null + }, + "cases": [ + { + "expression": "string.*", + "result": null + }, + { + "expression": "hash.*", + "result": ["val", "val"] + }, + { + "expression": "number.*", + "result": null + }, + { + "expression": "array.*", + "result": null + }, + { + "expression": "nullvalue.*", + "result": null + } + ] +}, +{ + "given": { + "a": [0, 1, 2], + "b": [0, 1, 2] + }, + "cases": [ + { + "expression": "*[0]", + "result": [0, 0] + } + ] +} +] diff --git a/vendor/psr/http-message/CHANGELOG.md b/vendor/psr/http-message/CHANGELOG.md new file mode 100644 index 0000000..74b1ef9 --- /dev/null +++ b/vendor/psr/http-message/CHANGELOG.md @@ -0,0 +1,36 @@ +# Changelog + +All notable changes to this project will be documented in this file, in reverse chronological order by release. + +## 1.0.1 - 2016-08-06 + +### Added + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- Updated all `@return self` annotation references in interfaces to use + `@return static`, which more closelly follows the semantics of the + specification. +- Updated the `MessageInterface::getHeaders()` return annotation to use the + value `string[][]`, indicating the format is a nested array of strings. +- Updated the `@link` annotation for `RequestInterface::withRequestTarget()` + to point to the correct section of RFC 7230. +- Updated the `ServerRequestInterface::withUploadedFiles()` parameter annotation + to add the parameter name (`$uploadedFiles`). +- Updated a `@throws` annotation for the `UploadedFileInterface::moveTo()` + method to correctly reference the method parameter (it was referencing an + incorrect parameter name previously). + +## 1.0.0 - 2016-05-18 + +Initial stable release; reflects accepted PSR-7 specification. diff --git a/vendor/psr/http-message/LICENSE b/vendor/psr/http-message/LICENSE new file mode 100644 index 0000000..c2d8e45 --- /dev/null +++ b/vendor/psr/http-message/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014 PHP Framework Interoperability Group + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/psr/http-message/README.md b/vendor/psr/http-message/README.md new file mode 100644 index 0000000..2818533 --- /dev/null +++ b/vendor/psr/http-message/README.md @@ -0,0 +1,13 @@ +PSR Http Message +================ + +This repository holds all interfaces/classes/traits related to +[PSR-7](http://www.php-fig.org/psr/psr-7/). + +Note that this is not a HTTP message implementation of its own. It is merely an +interface that describes a HTTP message. See the specification for more details. + +Usage +----- + +We'll certainly need some stuff in here. \ No newline at end of file diff --git a/vendor/psr/http-message/composer.json b/vendor/psr/http-message/composer.json new file mode 100644 index 0000000..b0d2937 --- /dev/null +++ b/vendor/psr/http-message/composer.json @@ -0,0 +1,26 @@ +{ + "name": "psr/http-message", + "description": "Common interface for HTTP messages", + "keywords": ["psr", "psr-7", "http", "http-message", "request", "response"], + "homepage": "https://github.com/php-fig/http-message", + "license": "MIT", + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "require": { + "php": ">=5.3.0" + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} diff --git a/vendor/psr/http-message/src/MessageInterface.php b/vendor/psr/http-message/src/MessageInterface.php new file mode 100644 index 0000000..dd46e5e --- /dev/null +++ b/vendor/psr/http-message/src/MessageInterface.php @@ -0,0 +1,187 @@ +getHeaders() as $name => $values) { + * echo $name . ": " . implode(", ", $values); + * } + * + * // Emit headers iteratively: + * foreach ($message->getHeaders() as $name => $values) { + * foreach ($values as $value) { + * header(sprintf('%s: %s', $name, $value), false); + * } + * } + * + * While header names are not case-sensitive, getHeaders() will preserve the + * exact case in which headers were originally specified. + * + * @return string[][] Returns an associative array of the message's headers. Each + * key MUST be a header name, and each value MUST be an array of strings + * for that header. + */ + public function getHeaders(); + + /** + * Checks if a header exists by the given case-insensitive name. + * + * @param string $name Case-insensitive header field name. + * @return bool Returns true if any header names match the given header + * name using a case-insensitive string comparison. Returns false if + * no matching header name is found in the message. + */ + public function hasHeader($name); + + /** + * Retrieves a message header value by the given case-insensitive name. + * + * This method returns an array of all the header values of the given + * case-insensitive header name. + * + * If the header does not appear in the message, this method MUST return an + * empty array. + * + * @param string $name Case-insensitive header field name. + * @return string[] An array of string values as provided for the given + * header. If the header does not appear in the message, this method MUST + * return an empty array. + */ + public function getHeader($name); + + /** + * Retrieves a comma-separated string of the values for a single header. + * + * This method returns all of the header values of the given + * case-insensitive header name as a string concatenated together using + * a comma. + * + * NOTE: Not all header values may be appropriately represented using + * comma concatenation. For such headers, use getHeader() instead + * and supply your own delimiter when concatenating. + * + * If the header does not appear in the message, this method MUST return + * an empty string. + * + * @param string $name Case-insensitive header field name. + * @return string A string of values as provided for the given header + * concatenated together using a comma. If the header does not appear in + * the message, this method MUST return an empty string. + */ + public function getHeaderLine($name); + + /** + * Return an instance with the provided value replacing the specified header. + * + * While header names are case-insensitive, the casing of the header will + * be preserved by this function, and returned from getHeaders(). + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * new and/or updated header and value. + * + * @param string $name Case-insensitive header field name. + * @param string|string[] $value Header value(s). + * @return static + * @throws \InvalidArgumentException for invalid header names or values. + */ + public function withHeader($name, $value); + + /** + * Return an instance with the specified header appended with the given value. + * + * Existing values for the specified header will be maintained. The new + * value(s) will be appended to the existing list. If the header did not + * exist previously, it will be added. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * new header and/or value. + * + * @param string $name Case-insensitive header field name to add. + * @param string|string[] $value Header value(s). + * @return static + * @throws \InvalidArgumentException for invalid header names or values. + */ + public function withAddedHeader($name, $value); + + /** + * Return an instance without the specified header. + * + * Header resolution MUST be done without case-sensitivity. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that removes + * the named header. + * + * @param string $name Case-insensitive header field name to remove. + * @return static + */ + public function withoutHeader($name); + + /** + * Gets the body of the message. + * + * @return StreamInterface Returns the body as a stream. + */ + public function getBody(); + + /** + * Return an instance with the specified message body. + * + * The body MUST be a StreamInterface object. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return a new instance that has the + * new body stream. + * + * @param StreamInterface $body Body. + * @return static + * @throws \InvalidArgumentException When the body is not valid. + */ + public function withBody(StreamInterface $body); +} diff --git a/vendor/psr/http-message/src/RequestInterface.php b/vendor/psr/http-message/src/RequestInterface.php new file mode 100644 index 0000000..a96d4fd --- /dev/null +++ b/vendor/psr/http-message/src/RequestInterface.php @@ -0,0 +1,129 @@ +getQuery()` + * or from the `QUERY_STRING` server param. + * + * @return array + */ + public function getQueryParams(); + + /** + * Return an instance with the specified query string arguments. + * + * These values SHOULD remain immutable over the course of the incoming + * request. They MAY be injected during instantiation, such as from PHP's + * $_GET superglobal, or MAY be derived from some other value such as the + * URI. In cases where the arguments are parsed from the URI, the data + * MUST be compatible with what PHP's parse_str() would return for + * purposes of how duplicate query parameters are handled, and how nested + * sets are handled. + * + * Setting query string arguments MUST NOT change the URI stored by the + * request, nor the values in the server params. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated query string arguments. + * + * @param array $query Array of query string arguments, typically from + * $_GET. + * @return static + */ + public function withQueryParams(array $query); + + /** + * Retrieve normalized file upload data. + * + * This method returns upload metadata in a normalized tree, with each leaf + * an instance of Psr\Http\Message\UploadedFileInterface. + * + * These values MAY be prepared from $_FILES or the message body during + * instantiation, or MAY be injected via withUploadedFiles(). + * + * @return array An array tree of UploadedFileInterface instances; an empty + * array MUST be returned if no data is present. + */ + public function getUploadedFiles(); + + /** + * Create a new instance with the specified uploaded files. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated body parameters. + * + * @param array $uploadedFiles An array tree of UploadedFileInterface instances. + * @return static + * @throws \InvalidArgumentException if an invalid structure is provided. + */ + public function withUploadedFiles(array $uploadedFiles); + + /** + * Retrieve any parameters provided in the request body. + * + * If the request Content-Type is either application/x-www-form-urlencoded + * or multipart/form-data, and the request method is POST, this method MUST + * return the contents of $_POST. + * + * Otherwise, this method may return any results of deserializing + * the request body content; as parsing returns structured content, the + * potential types MUST be arrays or objects only. A null value indicates + * the absence of body content. + * + * @return null|array|object The deserialized body parameters, if any. + * These will typically be an array or object. + */ + public function getParsedBody(); + + /** + * Return an instance with the specified body parameters. + * + * These MAY be injected during instantiation. + * + * If the request Content-Type is either application/x-www-form-urlencoded + * or multipart/form-data, and the request method is POST, use this method + * ONLY to inject the contents of $_POST. + * + * The data IS NOT REQUIRED to come from $_POST, but MUST be the results of + * deserializing the request body content. Deserialization/parsing returns + * structured data, and, as such, this method ONLY accepts arrays or objects, + * or a null value if nothing was available to parse. + * + * As an example, if content negotiation determines that the request data + * is a JSON payload, this method could be used to create a request + * instance with the deserialized parameters. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated body parameters. + * + * @param null|array|object $data The deserialized body data. This will + * typically be in an array or object. + * @return static + * @throws \InvalidArgumentException if an unsupported argument type is + * provided. + */ + public function withParsedBody($data); + + /** + * Retrieve attributes derived from the request. + * + * The request "attributes" may be used to allow injection of any + * parameters derived from the request: e.g., the results of path + * match operations; the results of decrypting cookies; the results of + * deserializing non-form-encoded message bodies; etc. Attributes + * will be application and request specific, and CAN be mutable. + * + * @return array Attributes derived from the request. + */ + public function getAttributes(); + + /** + * Retrieve a single derived request attribute. + * + * Retrieves a single derived request attribute as described in + * getAttributes(). If the attribute has not been previously set, returns + * the default value as provided. + * + * This method obviates the need for a hasAttribute() method, as it allows + * specifying a default value to return if the attribute is not found. + * + * @see getAttributes() + * @param string $name The attribute name. + * @param mixed $default Default value to return if the attribute does not exist. + * @return mixed + */ + public function getAttribute($name, $default = null); + + /** + * Return an instance with the specified derived request attribute. + * + * This method allows setting a single derived request attribute as + * described in getAttributes(). + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated attribute. + * + * @see getAttributes() + * @param string $name The attribute name. + * @param mixed $value The value of the attribute. + * @return static + */ + public function withAttribute($name, $value); + + /** + * Return an instance that removes the specified derived request attribute. + * + * This method allows removing a single derived request attribute as + * described in getAttributes(). + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that removes + * the attribute. + * + * @see getAttributes() + * @param string $name The attribute name. + * @return static + */ + public function withoutAttribute($name); +} diff --git a/vendor/psr/http-message/src/StreamInterface.php b/vendor/psr/http-message/src/StreamInterface.php new file mode 100644 index 0000000..f68f391 --- /dev/null +++ b/vendor/psr/http-message/src/StreamInterface.php @@ -0,0 +1,158 @@ + + * [user-info@]host[:port] + * + * + * If the port component is not set or is the standard port for the current + * scheme, it SHOULD NOT be included. + * + * @see https://tools.ietf.org/html/rfc3986#section-3.2 + * @return string The URI authority, in "[user-info@]host[:port]" format. + */ + public function getAuthority(); + + /** + * Retrieve the user information component of the URI. + * + * If no user information is present, this method MUST return an empty + * string. + * + * If a user is present in the URI, this will return that value; + * additionally, if the password is also present, it will be appended to the + * user value, with a colon (":") separating the values. + * + * The trailing "@" character is not part of the user information and MUST + * NOT be added. + * + * @return string The URI user information, in "username[:password]" format. + */ + public function getUserInfo(); + + /** + * Retrieve the host component of the URI. + * + * If no host is present, this method MUST return an empty string. + * + * The value returned MUST be normalized to lowercase, per RFC 3986 + * Section 3.2.2. + * + * @see http://tools.ietf.org/html/rfc3986#section-3.2.2 + * @return string The URI host. + */ + public function getHost(); + + /** + * Retrieve the port component of the URI. + * + * If a port is present, and it is non-standard for the current scheme, + * this method MUST return it as an integer. If the port is the standard port + * used with the current scheme, this method SHOULD return null. + * + * If no port is present, and no scheme is present, this method MUST return + * a null value. + * + * If no port is present, but a scheme is present, this method MAY return + * the standard port for that scheme, but SHOULD return null. + * + * @return null|int The URI port. + */ + public function getPort(); + + /** + * Retrieve the path component of the URI. + * + * The path can either be empty or absolute (starting with a slash) or + * rootless (not starting with a slash). Implementations MUST support all + * three syntaxes. + * + * Normally, the empty path "" and absolute path "/" are considered equal as + * defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically + * do this normalization because in contexts with a trimmed base path, e.g. + * the front controller, this difference becomes significant. It's the task + * of the user to handle both "" and "/". + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.3. + * + * As an example, if the value should include a slash ("/") not intended as + * delimiter between path segments, that value MUST be passed in encoded + * form (e.g., "%2F") to the instance. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.3 + * @return string The URI path. + */ + public function getPath(); + + /** + * Retrieve the query string of the URI. + * + * If no query string is present, this method MUST return an empty string. + * + * The leading "?" character is not part of the query and MUST NOT be + * added. + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.4. + * + * As an example, if a value in a key/value pair of the query string should + * include an ampersand ("&") not intended as a delimiter between values, + * that value MUST be passed in encoded form (e.g., "%26") to the instance. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.4 + * @return string The URI query string. + */ + public function getQuery(); + + /** + * Retrieve the fragment component of the URI. + * + * If no fragment is present, this method MUST return an empty string. + * + * The leading "#" character is not part of the fragment and MUST NOT be + * added. + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.5. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.5 + * @return string The URI fragment. + */ + public function getFragment(); + + /** + * Return an instance with the specified scheme. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified scheme. + * + * Implementations MUST support the schemes "http" and "https" case + * insensitively, and MAY accommodate other schemes if required. + * + * An empty scheme is equivalent to removing the scheme. + * + * @param string $scheme The scheme to use with the new instance. + * @return static A new instance with the specified scheme. + * @throws \InvalidArgumentException for invalid or unsupported schemes. + */ + public function withScheme($scheme); + + /** + * Return an instance with the specified user information. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified user information. + * + * Password is optional, but the user information MUST include the + * user; an empty string for the user is equivalent to removing user + * information. + * + * @param string $user The user name to use for authority. + * @param null|string $password The password associated with $user. + * @return static A new instance with the specified user information. + */ + public function withUserInfo($user, $password = null); + + /** + * Return an instance with the specified host. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified host. + * + * An empty host value is equivalent to removing the host. + * + * @param string $host The hostname to use with the new instance. + * @return static A new instance with the specified host. + * @throws \InvalidArgumentException for invalid hostnames. + */ + public function withHost($host); + + /** + * Return an instance with the specified port. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified port. + * + * Implementations MUST raise an exception for ports outside the + * established TCP and UDP port ranges. + * + * A null value provided for the port is equivalent to removing the port + * information. + * + * @param null|int $port The port to use with the new instance; a null value + * removes the port information. + * @return static A new instance with the specified port. + * @throws \InvalidArgumentException for invalid ports. + */ + public function withPort($port); + + /** + * Return an instance with the specified path. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified path. + * + * The path can either be empty or absolute (starting with a slash) or + * rootless (not starting with a slash). Implementations MUST support all + * three syntaxes. + * + * If the path is intended to be domain-relative rather than path relative then + * it must begin with a slash ("/"). Paths not starting with a slash ("/") + * are assumed to be relative to some base path known to the application or + * consumer. + * + * Users can provide both encoded and decoded path characters. + * Implementations ensure the correct encoding as outlined in getPath(). + * + * @param string $path The path to use with the new instance. + * @return static A new instance with the specified path. + * @throws \InvalidArgumentException for invalid paths. + */ + public function withPath($path); + + /** + * Return an instance with the specified query string. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified query string. + * + * Users can provide both encoded and decoded query characters. + * Implementations ensure the correct encoding as outlined in getQuery(). + * + * An empty query string value is equivalent to removing the query string. + * + * @param string $query The query string to use with the new instance. + * @return static A new instance with the specified query string. + * @throws \InvalidArgumentException for invalid query strings. + */ + public function withQuery($query); + + /** + * Return an instance with the specified URI fragment. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified URI fragment. + * + * Users can provide both encoded and decoded fragment characters. + * Implementations ensure the correct encoding as outlined in getFragment(). + * + * An empty fragment value is equivalent to removing the fragment. + * + * @param string $fragment The fragment to use with the new instance. + * @return static A new instance with the specified fragment. + */ + public function withFragment($fragment); + + /** + * Return the string representation as a URI reference. + * + * Depending on which components of the URI are present, the resulting + * string is either a full URI or relative reference according to RFC 3986, + * Section 4.1. The method concatenates the various components of the URI, + * using the appropriate delimiters: + * + * - If a scheme is present, it MUST be suffixed by ":". + * - If an authority is present, it MUST be prefixed by "//". + * - The path can be concatenated without delimiters. But there are two + * cases where the path has to be adjusted to make the URI reference + * valid as PHP does not allow to throw an exception in __toString(): + * - If the path is rootless and an authority is present, the path MUST + * be prefixed by "/". + * - If the path is starting with more than one "/" and no authority is + * present, the starting slashes MUST be reduced to one. + * - If a query is present, it MUST be prefixed by "?". + * - If a fragment is present, it MUST be prefixed by "#". + * + * @see http://tools.ietf.org/html/rfc3986#section-4.1 + * @return string + */ + public function __toString(); +} diff --git a/vendor/ralouphie/getallheaders/LICENSE b/vendor/ralouphie/getallheaders/LICENSE new file mode 100644 index 0000000..be5540c --- /dev/null +++ b/vendor/ralouphie/getallheaders/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Ralph Khattar + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/ralouphie/getallheaders/README.md b/vendor/ralouphie/getallheaders/README.md new file mode 100644 index 0000000..9430d76 --- /dev/null +++ b/vendor/ralouphie/getallheaders/README.md @@ -0,0 +1,27 @@ +getallheaders +============= + +PHP `getallheaders()` polyfill. Compatible with PHP >= 5.3. + +[![Build Status](https://travis-ci.org/ralouphie/getallheaders.svg?branch=master)](https://travis-ci.org/ralouphie/getallheaders) +[![Coverage Status](https://coveralls.io/repos/ralouphie/getallheaders/badge.png?branch=master)](https://coveralls.io/r/ralouphie/getallheaders?branch=master) +[![Latest Stable Version](https://poser.pugx.org/ralouphie/getallheaders/v/stable.png)](https://packagist.org/packages/ralouphie/getallheaders) +[![Latest Unstable Version](https://poser.pugx.org/ralouphie/getallheaders/v/unstable.png)](https://packagist.org/packages/ralouphie/getallheaders) +[![License](https://poser.pugx.org/ralouphie/getallheaders/license.png)](https://packagist.org/packages/ralouphie/getallheaders) + + +This is a simple polyfill for [`getallheaders()`](http://www.php.net/manual/en/function.getallheaders.php). + +## Install + +For PHP version **`>= 5.6`**: + +``` +composer require ralouphie/getallheaders +``` + +For PHP version **`< 5.6`**: + +``` +composer require ralouphie/getallheaders "^2" +``` diff --git a/vendor/ralouphie/getallheaders/composer.json b/vendor/ralouphie/getallheaders/composer.json new file mode 100644 index 0000000..de8ce62 --- /dev/null +++ b/vendor/ralouphie/getallheaders/composer.json @@ -0,0 +1,26 @@ +{ + "name": "ralouphie/getallheaders", + "description": "A polyfill for getallheaders.", + "license": "MIT", + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^5 || ^6.5", + "php-coveralls/php-coveralls": "^2.1" + }, + "autoload": { + "files": ["src/getallheaders.php"] + }, + "autoload-dev": { + "psr-4": { + "getallheaders\\Tests\\": "tests/" + } + } +} diff --git a/vendor/ralouphie/getallheaders/src/getallheaders.php b/vendor/ralouphie/getallheaders/src/getallheaders.php new file mode 100644 index 0000000..c7285a5 --- /dev/null +++ b/vendor/ralouphie/getallheaders/src/getallheaders.php @@ -0,0 +1,46 @@ + 'Content-Type', + 'CONTENT_LENGTH' => 'Content-Length', + 'CONTENT_MD5' => 'Content-Md5', + ); + + foreach ($_SERVER as $key => $value) { + if (substr($key, 0, 5) === 'HTTP_') { + $key = substr($key, 5); + if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) { + $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key)))); + $headers[$key] = $value; + } + } elseif (isset($copy_server[$key])) { + $headers[$copy_server[$key]] = $value; + } + } + + if (!isset($headers['Authorization'])) { + if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) { + $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION']; + } elseif (isset($_SERVER['PHP_AUTH_USER'])) { + $basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : ''; + $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass); + } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) { + $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST']; + } + } + + return $headers; + } + +} diff --git a/vendor/symfony/polyfill-mbstring/LICENSE b/vendor/symfony/polyfill-mbstring/LICENSE new file mode 100644 index 0000000..4cd8bdd --- /dev/null +++ b/vendor/symfony/polyfill-mbstring/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015-2019 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/symfony/polyfill-mbstring/Mbstring.php b/vendor/symfony/polyfill-mbstring/Mbstring.php new file mode 100644 index 0000000..bf882ba --- /dev/null +++ b/vendor/symfony/polyfill-mbstring/Mbstring.php @@ -0,0 +1,840 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Mbstring; + +/** + * Partial mbstring implementation in PHP, iconv based, UTF-8 centric. + * + * Implemented: + * - mb_chr - Returns a specific character from its Unicode code point + * - mb_convert_encoding - Convert character encoding + * - mb_convert_variables - Convert character code in variable(s) + * - mb_decode_mimeheader - Decode string in MIME header field + * - mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED + * - mb_decode_numericentity - Decode HTML numeric string reference to character + * - mb_encode_numericentity - Encode character to HTML numeric string reference + * - mb_convert_case - Perform case folding on a string + * - mb_detect_encoding - Detect character encoding + * - mb_get_info - Get internal settings of mbstring + * - mb_http_input - Detect HTTP input character encoding + * - mb_http_output - Set/Get HTTP output character encoding + * - mb_internal_encoding - Set/Get internal character encoding + * - mb_list_encodings - Returns an array of all supported encodings + * - mb_ord - Returns the Unicode code point of a character + * - mb_output_handler - Callback function converts character encoding in output buffer + * - mb_scrub - Replaces ill-formed byte sequences with substitute characters + * - mb_strlen - Get string length + * - mb_strpos - Find position of first occurrence of string in a string + * - mb_strrpos - Find position of last occurrence of a string in a string + * - mb_str_split - Convert a string to an array + * - mb_strtolower - Make a string lowercase + * - mb_strtoupper - Make a string uppercase + * - mb_substitute_character - Set/Get substitution character + * - mb_substr - Get part of string + * - mb_stripos - Finds position of first occurrence of a string within another, case insensitive + * - mb_stristr - Finds first occurrence of a string within another, case insensitive + * - mb_strrchr - Finds the last occurrence of a character in a string within another + * - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive + * - mb_strripos - Finds position of last occurrence of a string within another, case insensitive + * - mb_strstr - Finds first occurrence of a string within another + * - mb_strwidth - Return width of string + * - mb_substr_count - Count the number of substring occurrences + * + * Not implemented: + * - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more) + * - mb_ereg_* - Regular expression with multibyte support + * - mb_parse_str - Parse GET/POST/COOKIE data and set global variable + * - mb_preferred_mime_name - Get MIME charset string + * - mb_regex_encoding - Returns current encoding for multibyte regex as string + * - mb_regex_set_options - Set/Get the default options for mbregex functions + * - mb_send_mail - Send encoded mail + * - mb_split - Split multibyte string using regular expression + * - mb_strcut - Get part of string + * - mb_strimwidth - Get truncated string with specified width + * + * @author Nicolas Grekas + * + * @internal + */ +final class Mbstring +{ + const MB_CASE_FOLD = PHP_INT_MAX; + + private static $encodingList = array('ASCII', 'UTF-8'); + private static $language = 'neutral'; + private static $internalEncoding = 'UTF-8'; + private static $caseFold = array( + array('µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"), + array('μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'), + ); + + public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) + { + if (\is_array($fromEncoding) || false !== strpos($fromEncoding, ',')) { + $fromEncoding = self::mb_detect_encoding($s, $fromEncoding); + } else { + $fromEncoding = self::getEncoding($fromEncoding); + } + + $toEncoding = self::getEncoding($toEncoding); + + if ('BASE64' === $fromEncoding) { + $s = base64_decode($s); + $fromEncoding = $toEncoding; + } + + if ('BASE64' === $toEncoding) { + return base64_encode($s); + } + + if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) { + if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) { + $fromEncoding = 'Windows-1252'; + } + if ('UTF-8' !== $fromEncoding) { + $s = iconv($fromEncoding, 'UTF-8//IGNORE', $s); + } + + return preg_replace_callback('/[\x80-\xFF]+/', array(__CLASS__, 'html_encoding_callback'), $s); + } + + if ('HTML-ENTITIES' === $fromEncoding) { + $s = html_entity_decode($s, ENT_COMPAT, 'UTF-8'); + $fromEncoding = 'UTF-8'; + } + + return iconv($fromEncoding, $toEncoding.'//IGNORE', $s); + } + + public static function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) + { + $vars = array(&$a, &$b, &$c, &$d, &$e, &$f); + + $ok = true; + array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) { + if (false === $v = Mbstring::mb_convert_encoding($v, $toEncoding, $fromEncoding)) { + $ok = false; + } + }); + + return $ok ? $fromEncoding : false; + } + + public static function mb_decode_mimeheader($s) + { + return iconv_mime_decode($s, 2, self::$internalEncoding); + } + + public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null) + { + trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', E_USER_WARNING); + } + + public static function mb_decode_numericentity($s, $convmap, $encoding = null) + { + if (null !== $s && !\is_scalar($s) && !(\is_object($s) && \method_exists($s, '__toString'))) { + trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return null; + } + + if (!\is_array($convmap) || !$convmap) { + return false; + } + + if (null !== $encoding && !\is_scalar($encoding)) { + trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return ''; // Instead of null (cf. mb_encode_numericentity). + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $cnt = floor(\count($convmap) / 4) * 4; + + for ($i = 0; $i < $cnt; $i += 4) { + // collector_decode_htmlnumericentity ignores $convmap[$i + 3] + $convmap[$i] += $convmap[$i + 2]; + $convmap[$i + 1] += $convmap[$i + 2]; + } + + $s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) { + $c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1]; + for ($i = 0; $i < $cnt; $i += 4) { + if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) { + return Mbstring::mb_chr($c - $convmap[$i + 2]); + } + } + + return $m[0]; + }, $s); + + if (null === $encoding) { + return $s; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false) + { + if (null !== $s && !\is_scalar($s) && !(\is_object($s) && \method_exists($s, '__toString'))) { + trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return null; + } + + if (!\is_array($convmap) || !$convmap) { + return false; + } + + if (null !== $encoding && !\is_scalar($encoding)) { + trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return null; // Instead of '' (cf. mb_decode_numericentity). + } + + if (null !== $is_hex && !\is_scalar($is_hex)) { + trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', E_USER_WARNING); + + return null; + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + static $ulenMask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4); + + $cnt = floor(\count($convmap) / 4) * 4; + $i = 0; + $len = \strlen($s); + $result = ''; + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + $c = self::mb_ord($uchr); + + for ($j = 0; $j < $cnt; $j += 4) { + if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) { + $cOffset = ($c + $convmap[$j + 2]) & $convmap[$j + 3]; + $result .= $is_hex ? sprintf('&#x%X;', $cOffset) : '&#'.$cOffset.';'; + continue 2; + } + } + $result .= $uchr; + } + + if (null === $encoding) { + return $result; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $result); + } + + public static function mb_convert_case($s, $mode, $encoding = null) + { + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + if (MB_CASE_TITLE == $mode) { + static $titleRegexp = null; + if (null === $titleRegexp) { + $titleRegexp = self::getData('titleCaseRegexp'); + } + $s = preg_replace_callback($titleRegexp, array(__CLASS__, 'title_case'), $s); + } else { + if (MB_CASE_UPPER == $mode) { + static $upper = null; + if (null === $upper) { + $upper = self::getData('upperCase'); + } + $map = $upper; + } else { + if (self::MB_CASE_FOLD === $mode) { + $s = str_replace(self::$caseFold[0], self::$caseFold[1], $s); + } + + static $lower = null; + if (null === $lower) { + $lower = self::getData('lowerCase'); + } + $map = $lower; + } + + static $ulenMask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4); + + $i = 0; + $len = \strlen($s); + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + + if (isset($map[$uchr])) { + $uchr = $map[$uchr]; + $nlen = \strlen($uchr); + + if ($nlen == $ulen) { + $nlen = $i; + do { + $s[--$nlen] = $uchr[--$ulen]; + } while ($ulen); + } else { + $s = substr_replace($s, $uchr, $i - $ulen, $ulen); + $len += $nlen - $ulen; + $i += $nlen - $ulen; + } + } + } + } + + if (null === $encoding) { + return $s; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_internal_encoding($encoding = null) + { + if (null === $encoding) { + return self::$internalEncoding; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding || false !== @iconv($encoding, $encoding, ' ')) { + self::$internalEncoding = $encoding; + + return true; + } + + return false; + } + + public static function mb_language($lang = null) + { + if (null === $lang) { + return self::$language; + } + + switch ($lang = strtolower($lang)) { + case 'uni': + case 'neutral': + self::$language = $lang; + + return true; + } + + return false; + } + + public static function mb_list_encodings() + { + return array('UTF-8'); + } + + public static function mb_encoding_aliases($encoding) + { + switch (strtoupper($encoding)) { + case 'UTF8': + case 'UTF-8': + return array('utf8'); + } + + return false; + } + + public static function mb_check_encoding($var = null, $encoding = null) + { + if (null === $encoding) { + if (null === $var) { + return false; + } + $encoding = self::$internalEncoding; + } + + return self::mb_detect_encoding($var, array($encoding)) || false !== @iconv($encoding, $encoding, $var); + } + + public static function mb_detect_encoding($str, $encodingList = null, $strict = false) + { + if (null === $encodingList) { + $encodingList = self::$encodingList; + } else { + if (!\is_array($encodingList)) { + $encodingList = array_map('trim', explode(',', $encodingList)); + } + $encodingList = array_map('strtoupper', $encodingList); + } + + foreach ($encodingList as $enc) { + switch ($enc) { + case 'ASCII': + if (!preg_match('/[\x80-\xFF]/', $str)) { + return $enc; + } + break; + + case 'UTF8': + case 'UTF-8': + if (preg_match('//u', $str)) { + return 'UTF-8'; + } + break; + + default: + if (0 === strncmp($enc, 'ISO-8859-', 9)) { + return $enc; + } + } + } + + return false; + } + + public static function mb_detect_order($encodingList = null) + { + if (null === $encodingList) { + return self::$encodingList; + } + + if (!\is_array($encodingList)) { + $encodingList = array_map('trim', explode(',', $encodingList)); + } + $encodingList = array_map('strtoupper', $encodingList); + + foreach ($encodingList as $enc) { + switch ($enc) { + default: + if (strncmp($enc, 'ISO-8859-', 9)) { + return false; + } + // no break + case 'ASCII': + case 'UTF8': + case 'UTF-8': + } + } + + self::$encodingList = $encodingList; + + return true; + } + + public static function mb_strlen($s, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return \strlen($s); + } + + return @iconv_strlen($s, $encoding); + } + + public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strpos($haystack, $needle, $offset); + } + + $needle = (string) $needle; + if ('' === $needle) { + trigger_error(__METHOD__.': Empty delimiter', E_USER_WARNING); + + return false; + } + + return iconv_strpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strrpos($haystack, $needle, $offset); + } + + if ($offset != (int) $offset) { + $offset = 0; + } elseif ($offset = (int) $offset) { + if ($offset < 0) { + if (0 > $offset += self::mb_strlen($needle)) { + $haystack = self::mb_substr($haystack, 0, $offset, $encoding); + } + $offset = 0; + } else { + $haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding); + } + } + + $pos = iconv_strrpos($haystack, $needle, $encoding); + + return false !== $pos ? $offset + $pos : false; + } + + public static function mb_str_split($string, $split_length = 1, $encoding = null) + { + if (null !== $string && !\is_scalar($string) && !(\is_object($string) && \method_exists($string, '__toString'))) { + trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', E_USER_WARNING); + + return null; + } + + if (1 > $split_length = (int) $split_length) { + trigger_error('The length of each segment must be greater than zero', E_USER_WARNING); + + return false; + } + + if (null === $encoding) { + $encoding = mb_internal_encoding(); + } + + if ('UTF-8' === $encoding = self::getEncoding($encoding)) { + return preg_split("/(.{{$split_length}})/u", $string, null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); + } + + $result = array(); + $length = mb_strlen($string, $encoding); + + for ($i = 0; $i < $length; $i += $split_length) { + $result[] = mb_substr($string, $i, $split_length, $encoding); + } + + return $result; + } + + public static function mb_strtolower($s, $encoding = null) + { + return self::mb_convert_case($s, MB_CASE_LOWER, $encoding); + } + + public static function mb_strtoupper($s, $encoding = null) + { + return self::mb_convert_case($s, MB_CASE_UPPER, $encoding); + } + + public static function mb_substitute_character($c = null) + { + if (0 === strcasecmp($c, 'none')) { + return true; + } + + return null !== $c ? false : 'none'; + } + + public static function mb_substr($s, $start, $length = null, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return (string) substr($s, $start, null === $length ? 2147483647 : $length); + } + + if ($start < 0) { + $start = iconv_strlen($s, $encoding) + $start; + if ($start < 0) { + $start = 0; + } + } + + if (null === $length) { + $length = 2147483647; + } elseif ($length < 0) { + $length = iconv_strlen($s, $encoding) + $length - $start; + if ($length < 0) { + return ''; + } + } + + return (string) iconv_substr($s, $start, $length, $encoding); + } + + public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) + { + $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); + $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); + + return self::mb_strpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_stristr($haystack, $needle, $part = false, $encoding = null) + { + $pos = self::mb_stripos($haystack, $needle, 0, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strrchr($haystack, $needle, $part); + } + $needle = self::mb_substr($needle, 0, 1, $encoding); + $pos = iconv_strrpos($haystack, $needle, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strrichr($haystack, $needle, $part = false, $encoding = null) + { + $needle = self::mb_substr($needle, 0, 1, $encoding); + $pos = self::mb_strripos($haystack, $needle, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) + { + $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); + $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); + + return self::mb_strrpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_strstr($haystack, $needle, $part = false, $encoding = null) + { + $pos = strpos($haystack, $needle); + if (false === $pos) { + return false; + } + if ($part) { + return substr($haystack, 0, $pos); + } + + return substr($haystack, $pos); + } + + public static function mb_get_info($type = 'all') + { + $info = array( + 'internal_encoding' => self::$internalEncoding, + 'http_output' => 'pass', + 'http_output_conv_mimetypes' => '^(text/|application/xhtml\+xml)', + 'func_overload' => 0, + 'func_overload_list' => 'no overload', + 'mail_charset' => 'UTF-8', + 'mail_header_encoding' => 'BASE64', + 'mail_body_encoding' => 'BASE64', + 'illegal_chars' => 0, + 'encoding_translation' => 'Off', + 'language' => self::$language, + 'detect_order' => self::$encodingList, + 'substitute_character' => 'none', + 'strict_detection' => 'Off', + ); + + if ('all' === $type) { + return $info; + } + if (isset($info[$type])) { + return $info[$type]; + } + + return false; + } + + public static function mb_http_input($type = '') + { + return false; + } + + public static function mb_http_output($encoding = null) + { + return null !== $encoding ? 'pass' === $encoding : 'pass'; + } + + public static function mb_strwidth($s, $encoding = null) + { + $encoding = self::getEncoding($encoding); + + if ('UTF-8' !== $encoding) { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide); + + return ($wide << 1) + iconv_strlen($s, 'UTF-8'); + } + + public static function mb_substr_count($haystack, $needle, $encoding = null) + { + return substr_count($haystack, $needle); + } + + public static function mb_output_handler($contents, $status) + { + return $contents; + } + + public static function mb_chr($code, $encoding = null) + { + if (0x80 > $code %= 0x200000) { + $s = \chr($code); + } elseif (0x800 > $code) { + $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); + } elseif (0x10000 > $code) { + $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } else { + $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } + + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, $encoding, 'UTF-8'); + } + + return $s; + } + + public static function mb_ord($s, $encoding = null) + { + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, 'UTF-8', $encoding); + } + + if (1 === \strlen($s)) { + return \ord($s); + } + + $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; + if (0xF0 <= $code) { + return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; + } + if (0xE0 <= $code) { + return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; + } + if (0xC0 <= $code) { + return (($code - 0xC0) << 6) + $s[2] - 0x80; + } + + return $code; + } + + private static function getSubpart($pos, $part, $haystack, $encoding) + { + if (false === $pos) { + return false; + } + if ($part) { + return self::mb_substr($haystack, 0, $pos, $encoding); + } + + return self::mb_substr($haystack, $pos, null, $encoding); + } + + private static function html_encoding_callback(array $m) + { + $i = 1; + $entities = ''; + $m = unpack('C*', htmlentities($m[0], ENT_COMPAT, 'UTF-8')); + + while (isset($m[$i])) { + if (0x80 > $m[$i]) { + $entities .= \chr($m[$i++]); + continue; + } + if (0xF0 <= $m[$i]) { + $c = (($m[$i++] - 0xF0) << 18) + (($m[$i++] - 0x80) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; + } elseif (0xE0 <= $m[$i]) { + $c = (($m[$i++] - 0xE0) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; + } else { + $c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80; + } + + $entities .= '&#'.$c.';'; + } + + return $entities; + } + + private static function title_case(array $s) + { + return self::mb_convert_case($s[1], MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], MB_CASE_LOWER, 'UTF-8'); + } + + private static function getData($file) + { + if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { + return require $file; + } + + return false; + } + + private static function getEncoding($encoding) + { + if (null === $encoding) { + return self::$internalEncoding; + } + + if ('UTF-8' === $encoding) { + return 'UTF-8'; + } + + $encoding = strtoupper($encoding); + + if ('8BIT' === $encoding || 'BINARY' === $encoding) { + return 'CP850'; + } + + if ('UTF8' === $encoding) { + return 'UTF-8'; + } + + return $encoding; + } +} diff --git a/vendor/symfony/polyfill-mbstring/README.md b/vendor/symfony/polyfill-mbstring/README.md new file mode 100644 index 0000000..342e828 --- /dev/null +++ b/vendor/symfony/polyfill-mbstring/README.md @@ -0,0 +1,13 @@ +Symfony Polyfill / Mbstring +=========================== + +This component provides a partial, native PHP implementation for the +[Mbstring](http://php.net/mbstring) extension. + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php new file mode 100644 index 0000000..e6fbfa6 --- /dev/null +++ b/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php @@ -0,0 +1,1096 @@ + 'a', + 'B' => 'b', + 'C' => 'c', + 'D' => 'd', + 'E' => 'e', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'M' => 'm', + 'N' => 'n', + 'O' => 'o', + 'P' => 'p', + 'Q' => 'q', + 'R' => 'r', + 'S' => 's', + 'T' => 't', + 'U' => 'u', + 'V' => 'v', + 'W' => 'w', + 'X' => 'x', + 'Y' => 'y', + 'Z' => 'z', + 'À' => 'à', + 'Á' => 'á', + 'Â' => 'â', + 'Ã' => 'ã', + 'Ä' => 'ä', + 'Å' => 'å', + 'Æ' => 'æ', + 'Ç' => 'ç', + 'È' => 'è', + 'É' => 'é', + 'Ê' => 'ê', + 'Ë' => 'ë', + 'Ì' => 'ì', + 'Í' => 'í', + 'Î' => 'î', + 'Ï' => 'ï', + 'Ð' => 'ð', + 'Ñ' => 'ñ', + 'Ò' => 'ò', + 'Ó' => 'ó', + 'Ô' => 'ô', + 'Õ' => 'õ', + 'Ö' => 'ö', + 'Ø' => 'ø', + 'Ù' => 'ù', + 'Ú' => 'ú', + 'Û' => 'û', + 'Ü' => 'ü', + 'Ý' => 'ý', + 'Þ' => 'þ', + 'Ā' => 'ā', + 'Ă' => 'ă', + 'Ą' => 'ą', + 'Ć' => 'ć', + 'Ĉ' => 'ĉ', + 'Ċ' => 'ċ', + 'Č' => 'č', + 'Ď' => 'ď', + 'Đ' => 'đ', + 'Ē' => 'ē', + 'Ĕ' => 'ĕ', + 'Ė' => 'ė', + 'Ę' => 'ę', + 'Ě' => 'ě', + 'Ĝ' => 'ĝ', + 'Ğ' => 'ğ', + 'Ġ' => 'ġ', + 'Ģ' => 'ģ', + 'Ĥ' => 'ĥ', + 'Ħ' => 'ħ', + 'Ĩ' => 'ĩ', + 'Ī' => 'ī', + 'Ĭ' => 'ĭ', + 'Į' => 'į', + 'İ' => 'i', + 'IJ' => 'ij', + 'Ĵ' => 'ĵ', + 'Ķ' => 'ķ', + 'Ĺ' => 'ĺ', + 'Ļ' => 'ļ', + 'Ľ' => 'ľ', + 'Ŀ' => 'ŀ', + 'Ł' => 'ł', + 'Ń' => 'ń', + 'Ņ' => 'ņ', + 'Ň' => 'ň', + 'Ŋ' => 'ŋ', + 'Ō' => 'ō', + 'Ŏ' => 'ŏ', + 'Ő' => 'ő', + 'Œ' => 'œ', + 'Ŕ' => 'ŕ', + 'Ŗ' => 'ŗ', + 'Ř' => 'ř', + 'Ś' => 'ś', + 'Ŝ' => 'ŝ', + 'Ş' => 'ş', + 'Š' => 'š', + 'Ţ' => 'ţ', + 'Ť' => 'ť', + 'Ŧ' => 'ŧ', + 'Ũ' => 'ũ', + 'Ū' => 'ū', + 'Ŭ' => 'ŭ', + 'Ů' => 'ů', + 'Ű' => 'ű', + 'Ų' => 'ų', + 'Ŵ' => 'ŵ', + 'Ŷ' => 'ŷ', + 'Ÿ' => 'ÿ', + 'Ź' => 'ź', + 'Ż' => 'ż', + 'Ž' => 'ž', + 'Ɓ' => 'ɓ', + 'Ƃ' => 'ƃ', + 'Ƅ' => 'ƅ', + 'Ɔ' => 'ɔ', + 'Ƈ' => 'ƈ', + 'Ɖ' => 'ɖ', + 'Ɗ' => 'ɗ', + 'Ƌ' => 'ƌ', + 'Ǝ' => 'ǝ', + 'Ə' => 'ə', + 'Ɛ' => 'ɛ', + 'Ƒ' => 'ƒ', + 'Ɠ' => 'ɠ', + 'Ɣ' => 'ɣ', + 'Ɩ' => 'ɩ', + 'Ɨ' => 'ɨ', + 'Ƙ' => 'ƙ', + 'Ɯ' => 'ɯ', + 'Ɲ' => 'ɲ', + 'Ɵ' => 'ɵ', + 'Ơ' => 'ơ', + 'Ƣ' => 'ƣ', + 'Ƥ' => 'ƥ', + 'Ʀ' => 'ʀ', + 'Ƨ' => 'ƨ', + 'Ʃ' => 'ʃ', + 'Ƭ' => 'ƭ', + 'Ʈ' => 'ʈ', + 'Ư' => 'ư', + 'Ʊ' => 'ʊ', + 'Ʋ' => 'ʋ', + 'Ƴ' => 'ƴ', + 'Ƶ' => 'ƶ', + 'Ʒ' => 'ʒ', + 'Ƹ' => 'ƹ', + 'Ƽ' => 'ƽ', + 'DŽ' => 'dž', + 'Dž' => 'dž', + 'LJ' => 'lj', + 'Lj' => 'lj', + 'NJ' => 'nj', + 'Nj' => 'nj', + 'Ǎ' => 'ǎ', + 'Ǐ' => 'ǐ', + 'Ǒ' => 'ǒ', + 'Ǔ' => 'ǔ', + 'Ǖ' => 'ǖ', + 'Ǘ' => 'ǘ', + 'Ǚ' => 'ǚ', + 'Ǜ' => 'ǜ', + 'Ǟ' => 'ǟ', + 'Ǡ' => 'ǡ', + 'Ǣ' => 'ǣ', + 'Ǥ' => 'ǥ', + 'Ǧ' => 'ǧ', + 'Ǩ' => 'ǩ', + 'Ǫ' => 'ǫ', + 'Ǭ' => 'ǭ', + 'Ǯ' => 'ǯ', + 'DZ' => 'dz', + 'Dz' => 'dz', + 'Ǵ' => 'ǵ', + 'Ƕ' => 'ƕ', + 'Ƿ' => 'ƿ', + 'Ǹ' => 'ǹ', + 'Ǻ' => 'ǻ', + 'Ǽ' => 'ǽ', + 'Ǿ' => 'ǿ', + 'Ȁ' => 'ȁ', + 'Ȃ' => 'ȃ', + 'Ȅ' => 'ȅ', + 'Ȇ' => 'ȇ', + 'Ȉ' => 'ȉ', + 'Ȋ' => 'ȋ', + 'Ȍ' => 'ȍ', + 'Ȏ' => 'ȏ', + 'Ȑ' => 'ȑ', + 'Ȓ' => 'ȓ', + 'Ȕ' => 'ȕ', + 'Ȗ' => 'ȗ', + 'Ș' => 'ș', + 'Ț' => 'ț', + 'Ȝ' => 'ȝ', + 'Ȟ' => 'ȟ', + 'Ƞ' => 'ƞ', + 'Ȣ' => 'ȣ', + 'Ȥ' => 'ȥ', + 'Ȧ' => 'ȧ', + 'Ȩ' => 'ȩ', + 'Ȫ' => 'ȫ', + 'Ȭ' => 'ȭ', + 'Ȯ' => 'ȯ', + 'Ȱ' => 'ȱ', + 'Ȳ' => 'ȳ', + 'Ⱥ' => 'ⱥ', + 'Ȼ' => 'ȼ', + 'Ƚ' => 'ƚ', + 'Ⱦ' => 'ⱦ', + 'Ɂ' => 'ɂ', + 'Ƀ' => 'ƀ', + 'Ʉ' => 'ʉ', + 'Ʌ' => 'ʌ', + 'Ɇ' => 'ɇ', + 'Ɉ' => 'ɉ', + 'Ɋ' => 'ɋ', + 'Ɍ' => 'ɍ', + 'Ɏ' => 'ɏ', + 'Ͱ' => 'ͱ', + 'Ͳ' => 'ͳ', + 'Ͷ' => 'ͷ', + 'Ϳ' => 'ϳ', + 'Ά' => 'ά', + 'Έ' => 'έ', + 'Ή' => 'ή', + 'Ί' => 'ί', + 'Ό' => 'ό', + 'Ύ' => 'ύ', + 'Ώ' => 'ώ', + 'Α' => 'α', + 'Β' => 'β', + 'Γ' => 'γ', + 'Δ' => 'δ', + 'Ε' => 'ε', + 'Ζ' => 'ζ', + 'Η' => 'η', + 'Θ' => 'θ', + 'Ι' => 'ι', + 'Κ' => 'κ', + 'Λ' => 'λ', + 'Μ' => 'μ', + 'Ν' => 'ν', + 'Ξ' => 'ξ', + 'Ο' => 'ο', + 'Π' => 'π', + 'Ρ' => 'ρ', + 'Σ' => 'σ', + 'Τ' => 'τ', + 'Υ' => 'υ', + 'Φ' => 'φ', + 'Χ' => 'χ', + 'Ψ' => 'ψ', + 'Ω' => 'ω', + 'Ϊ' => 'ϊ', + 'Ϋ' => 'ϋ', + 'Ϗ' => 'ϗ', + 'Ϙ' => 'ϙ', + 'Ϛ' => 'ϛ', + 'Ϝ' => 'ϝ', + 'Ϟ' => 'ϟ', + 'Ϡ' => 'ϡ', + 'Ϣ' => 'ϣ', + 'Ϥ' => 'ϥ', + 'Ϧ' => 'ϧ', + 'Ϩ' => 'ϩ', + 'Ϫ' => 'ϫ', + 'Ϭ' => 'ϭ', + 'Ϯ' => 'ϯ', + 'ϴ' => 'θ', + 'Ϸ' => 'ϸ', + 'Ϲ' => 'ϲ', + 'Ϻ' => 'ϻ', + 'Ͻ' => 'ͻ', + 'Ͼ' => 'ͼ', + 'Ͽ' => 'ͽ', + 'Ѐ' => 'ѐ', + 'Ё' => 'ё', + 'Ђ' => 'ђ', + 'Ѓ' => 'ѓ', + 'Є' => 'є', + 'Ѕ' => 'ѕ', + 'І' => 'і', + 'Ї' => 'ї', + 'Ј' => 'ј', + 'Љ' => 'љ', + 'Њ' => 'њ', + 'Ћ' => 'ћ', + 'Ќ' => 'ќ', + 'Ѝ' => 'ѝ', + 'Ў' => 'ў', + 'Џ' => 'џ', + 'А' => 'а', + 'Б' => 'б', + 'В' => 'в', + 'Г' => 'г', + 'Д' => 'д', + 'Е' => 'е', + 'Ж' => 'ж', + 'З' => 'з', + 'И' => 'и', + 'Й' => 'й', + 'К' => 'к', + 'Л' => 'л', + 'М' => 'м', + 'Н' => 'н', + 'О' => 'о', + 'П' => 'п', + 'Р' => 'р', + 'С' => 'с', + 'Т' => 'т', + 'У' => 'у', + 'Ф' => 'ф', + 'Х' => 'х', + 'Ц' => 'ц', + 'Ч' => 'ч', + 'Ш' => 'ш', + 'Щ' => 'щ', + 'Ъ' => 'ъ', + 'Ы' => 'ы', + 'Ь' => 'ь', + 'Э' => 'э', + 'Ю' => 'ю', + 'Я' => 'я', + 'Ѡ' => 'ѡ', + 'Ѣ' => 'ѣ', + 'Ѥ' => 'ѥ', + 'Ѧ' => 'ѧ', + 'Ѩ' => 'ѩ', + 'Ѫ' => 'ѫ', + 'Ѭ' => 'ѭ', + 'Ѯ' => 'ѯ', + 'Ѱ' => 'ѱ', + 'Ѳ' => 'ѳ', + 'Ѵ' => 'ѵ', + 'Ѷ' => 'ѷ', + 'Ѹ' => 'ѹ', + 'Ѻ' => 'ѻ', + 'Ѽ' => 'ѽ', + 'Ѿ' => 'ѿ', + 'Ҁ' => 'ҁ', + 'Ҋ' => 'ҋ', + 'Ҍ' => 'ҍ', + 'Ҏ' => 'ҏ', + 'Ґ' => 'ґ', + 'Ғ' => 'ғ', + 'Ҕ' => 'ҕ', + 'Җ' => 'җ', + 'Ҙ' => 'ҙ', + 'Қ' => 'қ', + 'Ҝ' => 'ҝ', + 'Ҟ' => 'ҟ', + 'Ҡ' => 'ҡ', + 'Ң' => 'ң', + 'Ҥ' => 'ҥ', + 'Ҧ' => 'ҧ', + 'Ҩ' => 'ҩ', + 'Ҫ' => 'ҫ', + 'Ҭ' => 'ҭ', + 'Ү' => 'ү', + 'Ұ' => 'ұ', + 'Ҳ' => 'ҳ', + 'Ҵ' => 'ҵ', + 'Ҷ' => 'ҷ', + 'Ҹ' => 'ҹ', + 'Һ' => 'һ', + 'Ҽ' => 'ҽ', + 'Ҿ' => 'ҿ', + 'Ӏ' => 'ӏ', + 'Ӂ' => 'ӂ', + 'Ӄ' => 'ӄ', + 'Ӆ' => 'ӆ', + 'Ӈ' => 'ӈ', + 'Ӊ' => 'ӊ', + 'Ӌ' => 'ӌ', + 'Ӎ' => 'ӎ', + 'Ӑ' => 'ӑ', + 'Ӓ' => 'ӓ', + 'Ӕ' => 'ӕ', + 'Ӗ' => 'ӗ', + 'Ә' => 'ә', + 'Ӛ' => 'ӛ', + 'Ӝ' => 'ӝ', + 'Ӟ' => 'ӟ', + 'Ӡ' => 'ӡ', + 'Ӣ' => 'ӣ', + 'Ӥ' => 'ӥ', + 'Ӧ' => 'ӧ', + 'Ө' => 'ө', + 'Ӫ' => 'ӫ', + 'Ӭ' => 'ӭ', + 'Ӯ' => 'ӯ', + 'Ӱ' => 'ӱ', + 'Ӳ' => 'ӳ', + 'Ӵ' => 'ӵ', + 'Ӷ' => 'ӷ', + 'Ӹ' => 'ӹ', + 'Ӻ' => 'ӻ', + 'Ӽ' => 'ӽ', + 'Ӿ' => 'ӿ', + 'Ԁ' => 'ԁ', + 'Ԃ' => 'ԃ', + 'Ԅ' => 'ԅ', + 'Ԇ' => 'ԇ', + 'Ԉ' => 'ԉ', + 'Ԋ' => 'ԋ', + 'Ԍ' => 'ԍ', + 'Ԏ' => 'ԏ', + 'Ԑ' => 'ԑ', + 'Ԓ' => 'ԓ', + 'Ԕ' => 'ԕ', + 'Ԗ' => 'ԗ', + 'Ԙ' => 'ԙ', + 'Ԛ' => 'ԛ', + 'Ԝ' => 'ԝ', + 'Ԟ' => 'ԟ', + 'Ԡ' => 'ԡ', + 'Ԣ' => 'ԣ', + 'Ԥ' => 'ԥ', + 'Ԧ' => 'ԧ', + 'Ԩ' => 'ԩ', + 'Ԫ' => 'ԫ', + 'Ԭ' => 'ԭ', + 'Ԯ' => 'ԯ', + 'Ա' => 'ա', + 'Բ' => 'բ', + 'Գ' => 'գ', + 'Դ' => 'դ', + 'Ե' => 'ե', + 'Զ' => 'զ', + 'Է' => 'է', + 'Ը' => 'ը', + 'Թ' => 'թ', + 'Ժ' => 'ժ', + 'Ի' => 'ի', + 'Լ' => 'լ', + 'Խ' => 'խ', + 'Ծ' => 'ծ', + 'Կ' => 'կ', + 'Հ' => 'հ', + 'Ձ' => 'ձ', + 'Ղ' => 'ղ', + 'Ճ' => 'ճ', + 'Մ' => 'մ', + 'Յ' => 'յ', + 'Ն' => 'ն', + 'Շ' => 'շ', + 'Ո' => 'ո', + 'Չ' => 'չ', + 'Պ' => 'պ', + 'Ջ' => 'ջ', + 'Ռ' => 'ռ', + 'Ս' => 'ս', + 'Վ' => 'վ', + 'Տ' => 'տ', + 'Ր' => 'ր', + 'Ց' => 'ց', + 'Ւ' => 'ւ', + 'Փ' => 'փ', + 'Ք' => 'ք', + 'Օ' => 'օ', + 'Ֆ' => 'ֆ', + 'Ⴀ' => 'ⴀ', + 'Ⴁ' => 'ⴁ', + 'Ⴂ' => 'ⴂ', + 'Ⴃ' => 'ⴃ', + 'Ⴄ' => 'ⴄ', + 'Ⴅ' => 'ⴅ', + 'Ⴆ' => 'ⴆ', + 'Ⴇ' => 'ⴇ', + 'Ⴈ' => 'ⴈ', + 'Ⴉ' => 'ⴉ', + 'Ⴊ' => 'ⴊ', + 'Ⴋ' => 'ⴋ', + 'Ⴌ' => 'ⴌ', + 'Ⴍ' => 'ⴍ', + 'Ⴎ' => 'ⴎ', + 'Ⴏ' => 'ⴏ', + 'Ⴐ' => 'ⴐ', + 'Ⴑ' => 'ⴑ', + 'Ⴒ' => 'ⴒ', + 'Ⴓ' => 'ⴓ', + 'Ⴔ' => 'ⴔ', + 'Ⴕ' => 'ⴕ', + 'Ⴖ' => 'ⴖ', + 'Ⴗ' => 'ⴗ', + 'Ⴘ' => 'ⴘ', + 'Ⴙ' => 'ⴙ', + 'Ⴚ' => 'ⴚ', + 'Ⴛ' => 'ⴛ', + 'Ⴜ' => 'ⴜ', + 'Ⴝ' => 'ⴝ', + 'Ⴞ' => 'ⴞ', + 'Ⴟ' => 'ⴟ', + 'Ⴠ' => 'ⴠ', + 'Ⴡ' => 'ⴡ', + 'Ⴢ' => 'ⴢ', + 'Ⴣ' => 'ⴣ', + 'Ⴤ' => 'ⴤ', + 'Ⴥ' => 'ⴥ', + 'Ⴧ' => 'ⴧ', + 'Ⴭ' => 'ⴭ', + 'Ḁ' => 'ḁ', + 'Ḃ' => 'ḃ', + 'Ḅ' => 'ḅ', + 'Ḇ' => 'ḇ', + 'Ḉ' => 'ḉ', + 'Ḋ' => 'ḋ', + 'Ḍ' => 'ḍ', + 'Ḏ' => 'ḏ', + 'Ḑ' => 'ḑ', + 'Ḓ' => 'ḓ', + 'Ḕ' => 'ḕ', + 'Ḗ' => 'ḗ', + 'Ḙ' => 'ḙ', + 'Ḛ' => 'ḛ', + 'Ḝ' => 'ḝ', + 'Ḟ' => 'ḟ', + 'Ḡ' => 'ḡ', + 'Ḣ' => 'ḣ', + 'Ḥ' => 'ḥ', + 'Ḧ' => 'ḧ', + 'Ḩ' => 'ḩ', + 'Ḫ' => 'ḫ', + 'Ḭ' => 'ḭ', + 'Ḯ' => 'ḯ', + 'Ḱ' => 'ḱ', + 'Ḳ' => 'ḳ', + 'Ḵ' => 'ḵ', + 'Ḷ' => 'ḷ', + 'Ḹ' => 'ḹ', + 'Ḻ' => 'ḻ', + 'Ḽ' => 'ḽ', + 'Ḿ' => 'ḿ', + 'Ṁ' => 'ṁ', + 'Ṃ' => 'ṃ', + 'Ṅ' => 'ṅ', + 'Ṇ' => 'ṇ', + 'Ṉ' => 'ṉ', + 'Ṋ' => 'ṋ', + 'Ṍ' => 'ṍ', + 'Ṏ' => 'ṏ', + 'Ṑ' => 'ṑ', + 'Ṓ' => 'ṓ', + 'Ṕ' => 'ṕ', + 'Ṗ' => 'ṗ', + 'Ṙ' => 'ṙ', + 'Ṛ' => 'ṛ', + 'Ṝ' => 'ṝ', + 'Ṟ' => 'ṟ', + 'Ṡ' => 'ṡ', + 'Ṣ' => 'ṣ', + 'Ṥ' => 'ṥ', + 'Ṧ' => 'ṧ', + 'Ṩ' => 'ṩ', + 'Ṫ' => 'ṫ', + 'Ṭ' => 'ṭ', + 'Ṯ' => 'ṯ', + 'Ṱ' => 'ṱ', + 'Ṳ' => 'ṳ', + 'Ṵ' => 'ṵ', + 'Ṷ' => 'ṷ', + 'Ṹ' => 'ṹ', + 'Ṻ' => 'ṻ', + 'Ṽ' => 'ṽ', + 'Ṿ' => 'ṿ', + 'Ẁ' => 'ẁ', + 'Ẃ' => 'ẃ', + 'Ẅ' => 'ẅ', + 'Ẇ' => 'ẇ', + 'Ẉ' => 'ẉ', + 'Ẋ' => 'ẋ', + 'Ẍ' => 'ẍ', + 'Ẏ' => 'ẏ', + 'Ẑ' => 'ẑ', + 'Ẓ' => 'ẓ', + 'Ẕ' => 'ẕ', + 'ẞ' => 'ß', + 'Ạ' => 'ạ', + 'Ả' => 'ả', + 'Ấ' => 'ấ', + 'Ầ' => 'ầ', + 'Ẩ' => 'ẩ', + 'Ẫ' => 'ẫ', + 'Ậ' => 'ậ', + 'Ắ' => 'ắ', + 'Ằ' => 'ằ', + 'Ẳ' => 'ẳ', + 'Ẵ' => 'ẵ', + 'Ặ' => 'ặ', + 'Ẹ' => 'ẹ', + 'Ẻ' => 'ẻ', + 'Ẽ' => 'ẽ', + 'Ế' => 'ế', + 'Ề' => 'ề', + 'Ể' => 'ể', + 'Ễ' => 'ễ', + 'Ệ' => 'ệ', + 'Ỉ' => 'ỉ', + 'Ị' => 'ị', + 'Ọ' => 'ọ', + 'Ỏ' => 'ỏ', + 'Ố' => 'ố', + 'Ồ' => 'ồ', + 'Ổ' => 'ổ', + 'Ỗ' => 'ỗ', + 'Ộ' => 'ộ', + 'Ớ' => 'ớ', + 'Ờ' => 'ờ', + 'Ở' => 'ở', + 'Ỡ' => 'ỡ', + 'Ợ' => 'ợ', + 'Ụ' => 'ụ', + 'Ủ' => 'ủ', + 'Ứ' => 'ứ', + 'Ừ' => 'ừ', + 'Ử' => 'ử', + 'Ữ' => 'ữ', + 'Ự' => 'ự', + 'Ỳ' => 'ỳ', + 'Ỵ' => 'ỵ', + 'Ỷ' => 'ỷ', + 'Ỹ' => 'ỹ', + 'Ỻ' => 'ỻ', + 'Ỽ' => 'ỽ', + 'Ỿ' => 'ỿ', + 'Ἀ' => 'ἀ', + 'Ἁ' => 'ἁ', + 'Ἂ' => 'ἂ', + 'Ἃ' => 'ἃ', + 'Ἄ' => 'ἄ', + 'Ἅ' => 'ἅ', + 'Ἆ' => 'ἆ', + 'Ἇ' => 'ἇ', + 'Ἐ' => 'ἐ', + 'Ἑ' => 'ἑ', + 'Ἒ' => 'ἒ', + 'Ἓ' => 'ἓ', + 'Ἔ' => 'ἔ', + 'Ἕ' => 'ἕ', + 'Ἠ' => 'ἠ', + 'Ἡ' => 'ἡ', + 'Ἢ' => 'ἢ', + 'Ἣ' => 'ἣ', + 'Ἤ' => 'ἤ', + 'Ἥ' => 'ἥ', + 'Ἦ' => 'ἦ', + 'Ἧ' => 'ἧ', + 'Ἰ' => 'ἰ', + 'Ἱ' => 'ἱ', + 'Ἲ' => 'ἲ', + 'Ἳ' => 'ἳ', + 'Ἴ' => 'ἴ', + 'Ἵ' => 'ἵ', + 'Ἶ' => 'ἶ', + 'Ἷ' => 'ἷ', + 'Ὀ' => 'ὀ', + 'Ὁ' => 'ὁ', + 'Ὂ' => 'ὂ', + 'Ὃ' => 'ὃ', + 'Ὄ' => 'ὄ', + 'Ὅ' => 'ὅ', + 'Ὑ' => 'ὑ', + 'Ὓ' => 'ὓ', + 'Ὕ' => 'ὕ', + 'Ὗ' => 'ὗ', + 'Ὠ' => 'ὠ', + 'Ὡ' => 'ὡ', + 'Ὢ' => 'ὢ', + 'Ὣ' => 'ὣ', + 'Ὤ' => 'ὤ', + 'Ὥ' => 'ὥ', + 'Ὦ' => 'ὦ', + 'Ὧ' => 'ὧ', + 'ᾈ' => 'ᾀ', + 'ᾉ' => 'ᾁ', + 'ᾊ' => 'ᾂ', + 'ᾋ' => 'ᾃ', + 'ᾌ' => 'ᾄ', + 'ᾍ' => 'ᾅ', + 'ᾎ' => 'ᾆ', + 'ᾏ' => 'ᾇ', + 'ᾘ' => 'ᾐ', + 'ᾙ' => 'ᾑ', + 'ᾚ' => 'ᾒ', + 'ᾛ' => 'ᾓ', + 'ᾜ' => 'ᾔ', + 'ᾝ' => 'ᾕ', + 'ᾞ' => 'ᾖ', + 'ᾟ' => 'ᾗ', + 'ᾨ' => 'ᾠ', + 'ᾩ' => 'ᾡ', + 'ᾪ' => 'ᾢ', + 'ᾫ' => 'ᾣ', + 'ᾬ' => 'ᾤ', + 'ᾭ' => 'ᾥ', + 'ᾮ' => 'ᾦ', + 'ᾯ' => 'ᾧ', + 'Ᾰ' => 'ᾰ', + 'Ᾱ' => 'ᾱ', + 'Ὰ' => 'ὰ', + 'Ά' => 'ά', + 'ᾼ' => 'ᾳ', + 'Ὲ' => 'ὲ', + 'Έ' => 'έ', + 'Ὴ' => 'ὴ', + 'Ή' => 'ή', + 'ῌ' => 'ῃ', + 'Ῐ' => 'ῐ', + 'Ῑ' => 'ῑ', + 'Ὶ' => 'ὶ', + 'Ί' => 'ί', + 'Ῠ' => 'ῠ', + 'Ῡ' => 'ῡ', + 'Ὺ' => 'ὺ', + 'Ύ' => 'ύ', + 'Ῥ' => 'ῥ', + 'Ὸ' => 'ὸ', + 'Ό' => 'ό', + 'Ὼ' => 'ὼ', + 'Ώ' => 'ώ', + 'ῼ' => 'ῳ', + 'Ω' => 'ω', + 'K' => 'k', + 'Å' => 'å', + 'Ⅎ' => 'ⅎ', + 'Ⅰ' => 'ⅰ', + 'Ⅱ' => 'ⅱ', + 'Ⅲ' => 'ⅲ', + 'Ⅳ' => 'ⅳ', + 'Ⅴ' => 'ⅴ', + 'Ⅵ' => 'ⅵ', + 'Ⅶ' => 'ⅶ', + 'Ⅷ' => 'ⅷ', + 'Ⅸ' => 'ⅸ', + 'Ⅹ' => 'ⅹ', + 'Ⅺ' => 'ⅺ', + 'Ⅻ' => 'ⅻ', + 'Ⅼ' => 'ⅼ', + 'Ⅽ' => 'ⅽ', + 'Ⅾ' => 'ⅾ', + 'Ⅿ' => 'ⅿ', + 'Ↄ' => 'ↄ', + 'Ⓐ' => 'ⓐ', + 'Ⓑ' => 'ⓑ', + 'Ⓒ' => 'ⓒ', + 'Ⓓ' => 'ⓓ', + 'Ⓔ' => 'ⓔ', + 'Ⓕ' => 'ⓕ', + 'Ⓖ' => 'ⓖ', + 'Ⓗ' => 'ⓗ', + 'Ⓘ' => 'ⓘ', + 'Ⓙ' => 'ⓙ', + 'Ⓚ' => 'ⓚ', + 'Ⓛ' => 'ⓛ', + 'Ⓜ' => 'ⓜ', + 'Ⓝ' => 'ⓝ', + 'Ⓞ' => 'ⓞ', + 'Ⓟ' => 'ⓟ', + 'Ⓠ' => 'ⓠ', + 'Ⓡ' => 'ⓡ', + 'Ⓢ' => 'ⓢ', + 'Ⓣ' => 'ⓣ', + 'Ⓤ' => 'ⓤ', + 'Ⓥ' => 'ⓥ', + 'Ⓦ' => 'ⓦ', + 'Ⓧ' => 'ⓧ', + 'Ⓨ' => 'ⓨ', + 'Ⓩ' => 'ⓩ', + 'Ⰰ' => 'ⰰ', + 'Ⰱ' => 'ⰱ', + 'Ⰲ' => 'ⰲ', + 'Ⰳ' => 'ⰳ', + 'Ⰴ' => 'ⰴ', + 'Ⰵ' => 'ⰵ', + 'Ⰶ' => 'ⰶ', + 'Ⰷ' => 'ⰷ', + 'Ⰸ' => 'ⰸ', + 'Ⰹ' => 'ⰹ', + 'Ⰺ' => 'ⰺ', + 'Ⰻ' => 'ⰻ', + 'Ⰼ' => 'ⰼ', + 'Ⰽ' => 'ⰽ', + 'Ⰾ' => 'ⰾ', + 'Ⰿ' => 'ⰿ', + 'Ⱀ' => 'ⱀ', + 'Ⱁ' => 'ⱁ', + 'Ⱂ' => 'ⱂ', + 'Ⱃ' => 'ⱃ', + 'Ⱄ' => 'ⱄ', + 'Ⱅ' => 'ⱅ', + 'Ⱆ' => 'ⱆ', + 'Ⱇ' => 'ⱇ', + 'Ⱈ' => 'ⱈ', + 'Ⱉ' => 'ⱉ', + 'Ⱊ' => 'ⱊ', + 'Ⱋ' => 'ⱋ', + 'Ⱌ' => 'ⱌ', + 'Ⱍ' => 'ⱍ', + 'Ⱎ' => 'ⱎ', + 'Ⱏ' => 'ⱏ', + 'Ⱐ' => 'ⱐ', + 'Ⱑ' => 'ⱑ', + 'Ⱒ' => 'ⱒ', + 'Ⱓ' => 'ⱓ', + 'Ⱔ' => 'ⱔ', + 'Ⱕ' => 'ⱕ', + 'Ⱖ' => 'ⱖ', + 'Ⱗ' => 'ⱗ', + 'Ⱘ' => 'ⱘ', + 'Ⱙ' => 'ⱙ', + 'Ⱚ' => 'ⱚ', + 'Ⱛ' => 'ⱛ', + 'Ⱜ' => 'ⱜ', + 'Ⱝ' => 'ⱝ', + 'Ⱞ' => 'ⱞ', + 'Ⱡ' => 'ⱡ', + 'Ɫ' => 'ɫ', + 'Ᵽ' => 'ᵽ', + 'Ɽ' => 'ɽ', + 'Ⱨ' => 'ⱨ', + 'Ⱪ' => 'ⱪ', + 'Ⱬ' => 'ⱬ', + 'Ɑ' => 'ɑ', + 'Ɱ' => 'ɱ', + 'Ɐ' => 'ɐ', + 'Ɒ' => 'ɒ', + 'Ⱳ' => 'ⱳ', + 'Ⱶ' => 'ⱶ', + 'Ȿ' => 'ȿ', + 'Ɀ' => 'ɀ', + 'Ⲁ' => 'ⲁ', + 'Ⲃ' => 'ⲃ', + 'Ⲅ' => 'ⲅ', + 'Ⲇ' => 'ⲇ', + 'Ⲉ' => 'ⲉ', + 'Ⲋ' => 'ⲋ', + 'Ⲍ' => 'ⲍ', + 'Ⲏ' => 'ⲏ', + 'Ⲑ' => 'ⲑ', + 'Ⲓ' => 'ⲓ', + 'Ⲕ' => 'ⲕ', + 'Ⲗ' => 'ⲗ', + 'Ⲙ' => 'ⲙ', + 'Ⲛ' => 'ⲛ', + 'Ⲝ' => 'ⲝ', + 'Ⲟ' => 'ⲟ', + 'Ⲡ' => 'ⲡ', + 'Ⲣ' => 'ⲣ', + 'Ⲥ' => 'ⲥ', + 'Ⲧ' => 'ⲧ', + 'Ⲩ' => 'ⲩ', + 'Ⲫ' => 'ⲫ', + 'Ⲭ' => 'ⲭ', + 'Ⲯ' => 'ⲯ', + 'Ⲱ' => 'ⲱ', + 'Ⲳ' => 'ⲳ', + 'Ⲵ' => 'ⲵ', + 'Ⲷ' => 'ⲷ', + 'Ⲹ' => 'ⲹ', + 'Ⲻ' => 'ⲻ', + 'Ⲽ' => 'ⲽ', + 'Ⲿ' => 'ⲿ', + 'Ⳁ' => 'ⳁ', + 'Ⳃ' => 'ⳃ', + 'Ⳅ' => 'ⳅ', + 'Ⳇ' => 'ⳇ', + 'Ⳉ' => 'ⳉ', + 'Ⳋ' => 'ⳋ', + 'Ⳍ' => 'ⳍ', + 'Ⳏ' => 'ⳏ', + 'Ⳑ' => 'ⳑ', + 'Ⳓ' => 'ⳓ', + 'Ⳕ' => 'ⳕ', + 'Ⳗ' => 'ⳗ', + 'Ⳙ' => 'ⳙ', + 'Ⳛ' => 'ⳛ', + 'Ⳝ' => 'ⳝ', + 'Ⳟ' => 'ⳟ', + 'Ⳡ' => 'ⳡ', + 'Ⳣ' => 'ⳣ', + 'Ⳬ' => 'ⳬ', + 'Ⳮ' => 'ⳮ', + 'Ⳳ' => 'ⳳ', + 'Ꙁ' => 'ꙁ', + 'Ꙃ' => 'ꙃ', + 'Ꙅ' => 'ꙅ', + 'Ꙇ' => 'ꙇ', + 'Ꙉ' => 'ꙉ', + 'Ꙋ' => 'ꙋ', + 'Ꙍ' => 'ꙍ', + 'Ꙏ' => 'ꙏ', + 'Ꙑ' => 'ꙑ', + 'Ꙓ' => 'ꙓ', + 'Ꙕ' => 'ꙕ', + 'Ꙗ' => 'ꙗ', + 'Ꙙ' => 'ꙙ', + 'Ꙛ' => 'ꙛ', + 'Ꙝ' => 'ꙝ', + 'Ꙟ' => 'ꙟ', + 'Ꙡ' => 'ꙡ', + 'Ꙣ' => 'ꙣ', + 'Ꙥ' => 'ꙥ', + 'Ꙧ' => 'ꙧ', + 'Ꙩ' => 'ꙩ', + 'Ꙫ' => 'ꙫ', + 'Ꙭ' => 'ꙭ', + 'Ꚁ' => 'ꚁ', + 'Ꚃ' => 'ꚃ', + 'Ꚅ' => 'ꚅ', + 'Ꚇ' => 'ꚇ', + 'Ꚉ' => 'ꚉ', + 'Ꚋ' => 'ꚋ', + 'Ꚍ' => 'ꚍ', + 'Ꚏ' => 'ꚏ', + 'Ꚑ' => 'ꚑ', + 'Ꚓ' => 'ꚓ', + 'Ꚕ' => 'ꚕ', + 'Ꚗ' => 'ꚗ', + 'Ꚙ' => 'ꚙ', + 'Ꚛ' => 'ꚛ', + 'Ꜣ' => 'ꜣ', + 'Ꜥ' => 'ꜥ', + 'Ꜧ' => 'ꜧ', + 'Ꜩ' => 'ꜩ', + 'Ꜫ' => 'ꜫ', + 'Ꜭ' => 'ꜭ', + 'Ꜯ' => 'ꜯ', + 'Ꜳ' => 'ꜳ', + 'Ꜵ' => 'ꜵ', + 'Ꜷ' => 'ꜷ', + 'Ꜹ' => 'ꜹ', + 'Ꜻ' => 'ꜻ', + 'Ꜽ' => 'ꜽ', + 'Ꜿ' => 'ꜿ', + 'Ꝁ' => 'ꝁ', + 'Ꝃ' => 'ꝃ', + 'Ꝅ' => 'ꝅ', + 'Ꝇ' => 'ꝇ', + 'Ꝉ' => 'ꝉ', + 'Ꝋ' => 'ꝋ', + 'Ꝍ' => 'ꝍ', + 'Ꝏ' => 'ꝏ', + 'Ꝑ' => 'ꝑ', + 'Ꝓ' => 'ꝓ', + 'Ꝕ' => 'ꝕ', + 'Ꝗ' => 'ꝗ', + 'Ꝙ' => 'ꝙ', + 'Ꝛ' => 'ꝛ', + 'Ꝝ' => 'ꝝ', + 'Ꝟ' => 'ꝟ', + 'Ꝡ' => 'ꝡ', + 'Ꝣ' => 'ꝣ', + 'Ꝥ' => 'ꝥ', + 'Ꝧ' => 'ꝧ', + 'Ꝩ' => 'ꝩ', + 'Ꝫ' => 'ꝫ', + 'Ꝭ' => 'ꝭ', + 'Ꝯ' => 'ꝯ', + 'Ꝺ' => 'ꝺ', + 'Ꝼ' => 'ꝼ', + 'Ᵹ' => 'ᵹ', + 'Ꝿ' => 'ꝿ', + 'Ꞁ' => 'ꞁ', + 'Ꞃ' => 'ꞃ', + 'Ꞅ' => 'ꞅ', + 'Ꞇ' => 'ꞇ', + 'Ꞌ' => 'ꞌ', + 'Ɥ' => 'ɥ', + 'Ꞑ' => 'ꞑ', + 'Ꞓ' => 'ꞓ', + 'Ꞗ' => 'ꞗ', + 'Ꞙ' => 'ꞙ', + 'Ꞛ' => 'ꞛ', + 'Ꞝ' => 'ꞝ', + 'Ꞟ' => 'ꞟ', + 'Ꞡ' => 'ꞡ', + 'Ꞣ' => 'ꞣ', + 'Ꞥ' => 'ꞥ', + 'Ꞧ' => 'ꞧ', + 'Ꞩ' => 'ꞩ', + 'Ɦ' => 'ɦ', + 'Ɜ' => 'ɜ', + 'Ɡ' => 'ɡ', + 'Ɬ' => 'ɬ', + 'Ʞ' => 'ʞ', + 'Ʇ' => 'ʇ', + 'A' => 'a', + 'B' => 'b', + 'C' => 'c', + 'D' => 'd', + 'E' => 'e', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'M' => 'm', + 'N' => 'n', + 'O' => 'o', + 'P' => 'p', + 'Q' => 'q', + 'R' => 'r', + 'S' => 's', + 'T' => 't', + 'U' => 'u', + 'V' => 'v', + 'W' => 'w', + 'X' => 'x', + 'Y' => 'y', + 'Z' => 'z', + '𐐀' => '𐐨', + '𐐁' => '𐐩', + '𐐂' => '𐐪', + '𐐃' => '𐐫', + '𐐄' => '𐐬', + '𐐅' => '𐐭', + '𐐆' => '𐐮', + '𐐇' => '𐐯', + '𐐈' => '𐐰', + '𐐉' => '𐐱', + '𐐊' => '𐐲', + '𐐋' => '𐐳', + '𐐌' => '𐐴', + '𐐍' => '𐐵', + '𐐎' => '𐐶', + '𐐏' => '𐐷', + '𐐐' => '𐐸', + '𐐑' => '𐐹', + '𐐒' => '𐐺', + '𐐓' => '𐐻', + '𐐔' => '𐐼', + '𐐕' => '𐐽', + '𐐖' => '𐐾', + '𐐗' => '𐐿', + '𐐘' => '𐑀', + '𐐙' => '𐑁', + '𐐚' => '𐑂', + '𐐛' => '𐑃', + '𐐜' => '𐑄', + '𐐝' => '𐑅', + '𐐞' => '𐑆', + '𐐟' => '𐑇', + '𐐠' => '𐑈', + '𐐡' => '𐑉', + '𐐢' => '𐑊', + '𐐣' => '𐑋', + '𐐤' => '𐑌', + '𐐥' => '𐑍', + '𐐦' => '𐑎', + '𐐧' => '𐑏', + '𑢠' => '𑣀', + '𑢡' => '𑣁', + '𑢢' => '𑣂', + '𑢣' => '𑣃', + '𑢤' => '𑣄', + '𑢥' => '𑣅', + '𑢦' => '𑣆', + '𑢧' => '𑣇', + '𑢨' => '𑣈', + '𑢩' => '𑣉', + '𑢪' => '𑣊', + '𑢫' => '𑣋', + '𑢬' => '𑣌', + '𑢭' => '𑣍', + '𑢮' => '𑣎', + '𑢯' => '𑣏', + '𑢰' => '𑣐', + '𑢱' => '𑣑', + '𑢲' => '𑣒', + '𑢳' => '𑣓', + '𑢴' => '𑣔', + '𑢵' => '𑣕', + '𑢶' => '𑣖', + '𑢷' => '𑣗', + '𑢸' => '𑣘', + '𑢹' => '𑣙', + '𑢺' => '𑣚', + '𑢻' => '𑣛', + '𑢼' => '𑣜', + '𑢽' => '𑣝', + '𑢾' => '𑣞', + '𑢿' => '𑣟', +); diff --git a/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php b/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php new file mode 100644 index 0000000..2a8f6e7 --- /dev/null +++ b/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php @@ -0,0 +1,5 @@ + 'A', + 'b' => 'B', + 'c' => 'C', + 'd' => 'D', + 'e' => 'E', + 'f' => 'F', + 'g' => 'G', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'm' => 'M', + 'n' => 'N', + 'o' => 'O', + 'p' => 'P', + 'q' => 'Q', + 'r' => 'R', + 's' => 'S', + 't' => 'T', + 'u' => 'U', + 'v' => 'V', + 'w' => 'W', + 'x' => 'X', + 'y' => 'Y', + 'z' => 'Z', + 'µ' => 'Μ', + 'à' => 'À', + 'á' => 'Á', + 'â' => 'Â', + 'ã' => 'Ã', + 'ä' => 'Ä', + 'å' => 'Å', + 'æ' => 'Æ', + 'ç' => 'Ç', + 'è' => 'È', + 'é' => 'É', + 'ê' => 'Ê', + 'ë' => 'Ë', + 'ì' => 'Ì', + 'í' => 'Í', + 'î' => 'Î', + 'ï' => 'Ï', + 'ð' => 'Ð', + 'ñ' => 'Ñ', + 'ò' => 'Ò', + 'ó' => 'Ó', + 'ô' => 'Ô', + 'õ' => 'Õ', + 'ö' => 'Ö', + 'ø' => 'Ø', + 'ù' => 'Ù', + 'ú' => 'Ú', + 'û' => 'Û', + 'ü' => 'Ü', + 'ý' => 'Ý', + 'þ' => 'Þ', + 'ÿ' => 'Ÿ', + 'ā' => 'Ā', + 'ă' => 'Ă', + 'ą' => 'Ą', + 'ć' => 'Ć', + 'ĉ' => 'Ĉ', + 'ċ' => 'Ċ', + 'č' => 'Č', + 'ď' => 'Ď', + 'đ' => 'Đ', + 'ē' => 'Ē', + 'ĕ' => 'Ĕ', + 'ė' => 'Ė', + 'ę' => 'Ę', + 'ě' => 'Ě', + 'ĝ' => 'Ĝ', + 'ğ' => 'Ğ', + 'ġ' => 'Ġ', + 'ģ' => 'Ģ', + 'ĥ' => 'Ĥ', + 'ħ' => 'Ħ', + 'ĩ' => 'Ĩ', + 'ī' => 'Ī', + 'ĭ' => 'Ĭ', + 'į' => 'Į', + 'ı' => 'I', + 'ij' => 'IJ', + 'ĵ' => 'Ĵ', + 'ķ' => 'Ķ', + 'ĺ' => 'Ĺ', + 'ļ' => 'Ļ', + 'ľ' => 'Ľ', + 'ŀ' => 'Ŀ', + 'ł' => 'Ł', + 'ń' => 'Ń', + 'ņ' => 'Ņ', + 'ň' => 'Ň', + 'ŋ' => 'Ŋ', + 'ō' => 'Ō', + 'ŏ' => 'Ŏ', + 'ő' => 'Ő', + 'œ' => 'Œ', + 'ŕ' => 'Ŕ', + 'ŗ' => 'Ŗ', + 'ř' => 'Ř', + 'ś' => 'Ś', + 'ŝ' => 'Ŝ', + 'ş' => 'Ş', + 'š' => 'Š', + 'ţ' => 'Ţ', + 'ť' => 'Ť', + 'ŧ' => 'Ŧ', + 'ũ' => 'Ũ', + 'ū' => 'Ū', + 'ŭ' => 'Ŭ', + 'ů' => 'Ů', + 'ű' => 'Ű', + 'ų' => 'Ų', + 'ŵ' => 'Ŵ', + 'ŷ' => 'Ŷ', + 'ź' => 'Ź', + 'ż' => 'Ż', + 'ž' => 'Ž', + 'ſ' => 'S', + 'ƀ' => 'Ƀ', + 'ƃ' => 'Ƃ', + 'ƅ' => 'Ƅ', + 'ƈ' => 'Ƈ', + 'ƌ' => 'Ƌ', + 'ƒ' => 'Ƒ', + 'ƕ' => 'Ƕ', + 'ƙ' => 'Ƙ', + 'ƚ' => 'Ƚ', + 'ƞ' => 'Ƞ', + 'ơ' => 'Ơ', + 'ƣ' => 'Ƣ', + 'ƥ' => 'Ƥ', + 'ƨ' => 'Ƨ', + 'ƭ' => 'Ƭ', + 'ư' => 'Ư', + 'ƴ' => 'Ƴ', + 'ƶ' => 'Ƶ', + 'ƹ' => 'Ƹ', + 'ƽ' => 'Ƽ', + 'ƿ' => 'Ƿ', + 'Dž' => 'DŽ', + 'dž' => 'DŽ', + 'Lj' => 'LJ', + 'lj' => 'LJ', + 'Nj' => 'NJ', + 'nj' => 'NJ', + 'ǎ' => 'Ǎ', + 'ǐ' => 'Ǐ', + 'ǒ' => 'Ǒ', + 'ǔ' => 'Ǔ', + 'ǖ' => 'Ǖ', + 'ǘ' => 'Ǘ', + 'ǚ' => 'Ǚ', + 'ǜ' => 'Ǜ', + 'ǝ' => 'Ǝ', + 'ǟ' => 'Ǟ', + 'ǡ' => 'Ǡ', + 'ǣ' => 'Ǣ', + 'ǥ' => 'Ǥ', + 'ǧ' => 'Ǧ', + 'ǩ' => 'Ǩ', + 'ǫ' => 'Ǫ', + 'ǭ' => 'Ǭ', + 'ǯ' => 'Ǯ', + 'Dz' => 'DZ', + 'dz' => 'DZ', + 'ǵ' => 'Ǵ', + 'ǹ' => 'Ǹ', + 'ǻ' => 'Ǻ', + 'ǽ' => 'Ǽ', + 'ǿ' => 'Ǿ', + 'ȁ' => 'Ȁ', + 'ȃ' => 'Ȃ', + 'ȅ' => 'Ȅ', + 'ȇ' => 'Ȇ', + 'ȉ' => 'Ȉ', + 'ȋ' => 'Ȋ', + 'ȍ' => 'Ȍ', + 'ȏ' => 'Ȏ', + 'ȑ' => 'Ȑ', + 'ȓ' => 'Ȓ', + 'ȕ' => 'Ȕ', + 'ȗ' => 'Ȗ', + 'ș' => 'Ș', + 'ț' => 'Ț', + 'ȝ' => 'Ȝ', + 'ȟ' => 'Ȟ', + 'ȣ' => 'Ȣ', + 'ȥ' => 'Ȥ', + 'ȧ' => 'Ȧ', + 'ȩ' => 'Ȩ', + 'ȫ' => 'Ȫ', + 'ȭ' => 'Ȭ', + 'ȯ' => 'Ȯ', + 'ȱ' => 'Ȱ', + 'ȳ' => 'Ȳ', + 'ȼ' => 'Ȼ', + 'ȿ' => 'Ȿ', + 'ɀ' => 'Ɀ', + 'ɂ' => 'Ɂ', + 'ɇ' => 'Ɇ', + 'ɉ' => 'Ɉ', + 'ɋ' => 'Ɋ', + 'ɍ' => 'Ɍ', + 'ɏ' => 'Ɏ', + 'ɐ' => 'Ɐ', + 'ɑ' => 'Ɑ', + 'ɒ' => 'Ɒ', + 'ɓ' => 'Ɓ', + 'ɔ' => 'Ɔ', + 'ɖ' => 'Ɖ', + 'ɗ' => 'Ɗ', + 'ə' => 'Ə', + 'ɛ' => 'Ɛ', + 'ɜ' => 'Ɜ', + 'ɠ' => 'Ɠ', + 'ɡ' => 'Ɡ', + 'ɣ' => 'Ɣ', + 'ɥ' => 'Ɥ', + 'ɦ' => 'Ɦ', + 'ɨ' => 'Ɨ', + 'ɩ' => 'Ɩ', + 'ɫ' => 'Ɫ', + 'ɬ' => 'Ɬ', + 'ɯ' => 'Ɯ', + 'ɱ' => 'Ɱ', + 'ɲ' => 'Ɲ', + 'ɵ' => 'Ɵ', + 'ɽ' => 'Ɽ', + 'ʀ' => 'Ʀ', + 'ʃ' => 'Ʃ', + 'ʇ' => 'Ʇ', + 'ʈ' => 'Ʈ', + 'ʉ' => 'Ʉ', + 'ʊ' => 'Ʊ', + 'ʋ' => 'Ʋ', + 'ʌ' => 'Ʌ', + 'ʒ' => 'Ʒ', + 'ʞ' => 'Ʞ', + 'ͅ' => 'Ι', + 'ͱ' => 'Ͱ', + 'ͳ' => 'Ͳ', + 'ͷ' => 'Ͷ', + 'ͻ' => 'Ͻ', + 'ͼ' => 'Ͼ', + 'ͽ' => 'Ͽ', + 'ά' => 'Ά', + 'έ' => 'Έ', + 'ή' => 'Ή', + 'ί' => 'Ί', + 'α' => 'Α', + 'β' => 'Β', + 'γ' => 'Γ', + 'δ' => 'Δ', + 'ε' => 'Ε', + 'ζ' => 'Ζ', + 'η' => 'Η', + 'θ' => 'Θ', + 'ι' => 'Ι', + 'κ' => 'Κ', + 'λ' => 'Λ', + 'μ' => 'Μ', + 'ν' => 'Ν', + 'ξ' => 'Ξ', + 'ο' => 'Ο', + 'π' => 'Π', + 'ρ' => 'Ρ', + 'ς' => 'Σ', + 'σ' => 'Σ', + 'τ' => 'Τ', + 'υ' => 'Υ', + 'φ' => 'Φ', + 'χ' => 'Χ', + 'ψ' => 'Ψ', + 'ω' => 'Ω', + 'ϊ' => 'Ϊ', + 'ϋ' => 'Ϋ', + 'ό' => 'Ό', + 'ύ' => 'Ύ', + 'ώ' => 'Ώ', + 'ϐ' => 'Β', + 'ϑ' => 'Θ', + 'ϕ' => 'Φ', + 'ϖ' => 'Π', + 'ϗ' => 'Ϗ', + 'ϙ' => 'Ϙ', + 'ϛ' => 'Ϛ', + 'ϝ' => 'Ϝ', + 'ϟ' => 'Ϟ', + 'ϡ' => 'Ϡ', + 'ϣ' => 'Ϣ', + 'ϥ' => 'Ϥ', + 'ϧ' => 'Ϧ', + 'ϩ' => 'Ϩ', + 'ϫ' => 'Ϫ', + 'ϭ' => 'Ϭ', + 'ϯ' => 'Ϯ', + 'ϰ' => 'Κ', + 'ϱ' => 'Ρ', + 'ϲ' => 'Ϲ', + 'ϳ' => 'Ϳ', + 'ϵ' => 'Ε', + 'ϸ' => 'Ϸ', + 'ϻ' => 'Ϻ', + 'а' => 'А', + 'б' => 'Б', + 'в' => 'В', + 'г' => 'Г', + 'д' => 'Д', + 'е' => 'Е', + 'ж' => 'Ж', + 'з' => 'З', + 'и' => 'И', + 'й' => 'Й', + 'к' => 'К', + 'л' => 'Л', + 'м' => 'М', + 'н' => 'Н', + 'о' => 'О', + 'п' => 'П', + 'р' => 'Р', + 'с' => 'С', + 'т' => 'Т', + 'у' => 'У', + 'ф' => 'Ф', + 'х' => 'Х', + 'ц' => 'Ц', + 'ч' => 'Ч', + 'ш' => 'Ш', + 'щ' => 'Щ', + 'ъ' => 'Ъ', + 'ы' => 'Ы', + 'ь' => 'Ь', + 'э' => 'Э', + 'ю' => 'Ю', + 'я' => 'Я', + 'ѐ' => 'Ѐ', + 'ё' => 'Ё', + 'ђ' => 'Ђ', + 'ѓ' => 'Ѓ', + 'є' => 'Є', + 'ѕ' => 'Ѕ', + 'і' => 'І', + 'ї' => 'Ї', + 'ј' => 'Ј', + 'љ' => 'Љ', + 'њ' => 'Њ', + 'ћ' => 'Ћ', + 'ќ' => 'Ќ', + 'ѝ' => 'Ѝ', + 'ў' => 'Ў', + 'џ' => 'Џ', + 'ѡ' => 'Ѡ', + 'ѣ' => 'Ѣ', + 'ѥ' => 'Ѥ', + 'ѧ' => 'Ѧ', + 'ѩ' => 'Ѩ', + 'ѫ' => 'Ѫ', + 'ѭ' => 'Ѭ', + 'ѯ' => 'Ѯ', + 'ѱ' => 'Ѱ', + 'ѳ' => 'Ѳ', + 'ѵ' => 'Ѵ', + 'ѷ' => 'Ѷ', + 'ѹ' => 'Ѹ', + 'ѻ' => 'Ѻ', + 'ѽ' => 'Ѽ', + 'ѿ' => 'Ѿ', + 'ҁ' => 'Ҁ', + 'ҋ' => 'Ҋ', + 'ҍ' => 'Ҍ', + 'ҏ' => 'Ҏ', + 'ґ' => 'Ґ', + 'ғ' => 'Ғ', + 'ҕ' => 'Ҕ', + 'җ' => 'Җ', + 'ҙ' => 'Ҙ', + 'қ' => 'Қ', + 'ҝ' => 'Ҝ', + 'ҟ' => 'Ҟ', + 'ҡ' => 'Ҡ', + 'ң' => 'Ң', + 'ҥ' => 'Ҥ', + 'ҧ' => 'Ҧ', + 'ҩ' => 'Ҩ', + 'ҫ' => 'Ҫ', + 'ҭ' => 'Ҭ', + 'ү' => 'Ү', + 'ұ' => 'Ұ', + 'ҳ' => 'Ҳ', + 'ҵ' => 'Ҵ', + 'ҷ' => 'Ҷ', + 'ҹ' => 'Ҹ', + 'һ' => 'Һ', + 'ҽ' => 'Ҽ', + 'ҿ' => 'Ҿ', + 'ӂ' => 'Ӂ', + 'ӄ' => 'Ӄ', + 'ӆ' => 'Ӆ', + 'ӈ' => 'Ӈ', + 'ӊ' => 'Ӊ', + 'ӌ' => 'Ӌ', + 'ӎ' => 'Ӎ', + 'ӏ' => 'Ӏ', + 'ӑ' => 'Ӑ', + 'ӓ' => 'Ӓ', + 'ӕ' => 'Ӕ', + 'ӗ' => 'Ӗ', + 'ә' => 'Ә', + 'ӛ' => 'Ӛ', + 'ӝ' => 'Ӝ', + 'ӟ' => 'Ӟ', + 'ӡ' => 'Ӡ', + 'ӣ' => 'Ӣ', + 'ӥ' => 'Ӥ', + 'ӧ' => 'Ӧ', + 'ө' => 'Ө', + 'ӫ' => 'Ӫ', + 'ӭ' => 'Ӭ', + 'ӯ' => 'Ӯ', + 'ӱ' => 'Ӱ', + 'ӳ' => 'Ӳ', + 'ӵ' => 'Ӵ', + 'ӷ' => 'Ӷ', + 'ӹ' => 'Ӹ', + 'ӻ' => 'Ӻ', + 'ӽ' => 'Ӽ', + 'ӿ' => 'Ӿ', + 'ԁ' => 'Ԁ', + 'ԃ' => 'Ԃ', + 'ԅ' => 'Ԅ', + 'ԇ' => 'Ԇ', + 'ԉ' => 'Ԉ', + 'ԋ' => 'Ԋ', + 'ԍ' => 'Ԍ', + 'ԏ' => 'Ԏ', + 'ԑ' => 'Ԑ', + 'ԓ' => 'Ԓ', + 'ԕ' => 'Ԕ', + 'ԗ' => 'Ԗ', + 'ԙ' => 'Ԙ', + 'ԛ' => 'Ԛ', + 'ԝ' => 'Ԝ', + 'ԟ' => 'Ԟ', + 'ԡ' => 'Ԡ', + 'ԣ' => 'Ԣ', + 'ԥ' => 'Ԥ', + 'ԧ' => 'Ԧ', + 'ԩ' => 'Ԩ', + 'ԫ' => 'Ԫ', + 'ԭ' => 'Ԭ', + 'ԯ' => 'Ԯ', + 'ա' => 'Ա', + 'բ' => 'Բ', + 'գ' => 'Գ', + 'դ' => 'Դ', + 'ե' => 'Ե', + 'զ' => 'Զ', + 'է' => 'Է', + 'ը' => 'Ը', + 'թ' => 'Թ', + 'ժ' => 'Ժ', + 'ի' => 'Ի', + 'լ' => 'Լ', + 'խ' => 'Խ', + 'ծ' => 'Ծ', + 'կ' => 'Կ', + 'հ' => 'Հ', + 'ձ' => 'Ձ', + 'ղ' => 'Ղ', + 'ճ' => 'Ճ', + 'մ' => 'Մ', + 'յ' => 'Յ', + 'ն' => 'Ն', + 'շ' => 'Շ', + 'ո' => 'Ո', + 'չ' => 'Չ', + 'պ' => 'Պ', + 'ջ' => 'Ջ', + 'ռ' => 'Ռ', + 'ս' => 'Ս', + 'վ' => 'Վ', + 'տ' => 'Տ', + 'ր' => 'Ր', + 'ց' => 'Ց', + 'ւ' => 'Ւ', + 'փ' => 'Փ', + 'ք' => 'Ք', + 'օ' => 'Օ', + 'ֆ' => 'Ֆ', + 'ᵹ' => 'Ᵹ', + 'ᵽ' => 'Ᵽ', + 'ḁ' => 'Ḁ', + 'ḃ' => 'Ḃ', + 'ḅ' => 'Ḅ', + 'ḇ' => 'Ḇ', + 'ḉ' => 'Ḉ', + 'ḋ' => 'Ḋ', + 'ḍ' => 'Ḍ', + 'ḏ' => 'Ḏ', + 'ḑ' => 'Ḑ', + 'ḓ' => 'Ḓ', + 'ḕ' => 'Ḕ', + 'ḗ' => 'Ḗ', + 'ḙ' => 'Ḙ', + 'ḛ' => 'Ḛ', + 'ḝ' => 'Ḝ', + 'ḟ' => 'Ḟ', + 'ḡ' => 'Ḡ', + 'ḣ' => 'Ḣ', + 'ḥ' => 'Ḥ', + 'ḧ' => 'Ḧ', + 'ḩ' => 'Ḩ', + 'ḫ' => 'Ḫ', + 'ḭ' => 'Ḭ', + 'ḯ' => 'Ḯ', + 'ḱ' => 'Ḱ', + 'ḳ' => 'Ḳ', + 'ḵ' => 'Ḵ', + 'ḷ' => 'Ḷ', + 'ḹ' => 'Ḹ', + 'ḻ' => 'Ḻ', + 'ḽ' => 'Ḽ', + 'ḿ' => 'Ḿ', + 'ṁ' => 'Ṁ', + 'ṃ' => 'Ṃ', + 'ṅ' => 'Ṅ', + 'ṇ' => 'Ṇ', + 'ṉ' => 'Ṉ', + 'ṋ' => 'Ṋ', + 'ṍ' => 'Ṍ', + 'ṏ' => 'Ṏ', + 'ṑ' => 'Ṑ', + 'ṓ' => 'Ṓ', + 'ṕ' => 'Ṕ', + 'ṗ' => 'Ṗ', + 'ṙ' => 'Ṙ', + 'ṛ' => 'Ṛ', + 'ṝ' => 'Ṝ', + 'ṟ' => 'Ṟ', + 'ṡ' => 'Ṡ', + 'ṣ' => 'Ṣ', + 'ṥ' => 'Ṥ', + 'ṧ' => 'Ṧ', + 'ṩ' => 'Ṩ', + 'ṫ' => 'Ṫ', + 'ṭ' => 'Ṭ', + 'ṯ' => 'Ṯ', + 'ṱ' => 'Ṱ', + 'ṳ' => 'Ṳ', + 'ṵ' => 'Ṵ', + 'ṷ' => 'Ṷ', + 'ṹ' => 'Ṹ', + 'ṻ' => 'Ṻ', + 'ṽ' => 'Ṽ', + 'ṿ' => 'Ṿ', + 'ẁ' => 'Ẁ', + 'ẃ' => 'Ẃ', + 'ẅ' => 'Ẅ', + 'ẇ' => 'Ẇ', + 'ẉ' => 'Ẉ', + 'ẋ' => 'Ẋ', + 'ẍ' => 'Ẍ', + 'ẏ' => 'Ẏ', + 'ẑ' => 'Ẑ', + 'ẓ' => 'Ẓ', + 'ẕ' => 'Ẕ', + 'ẛ' => 'Ṡ', + 'ạ' => 'Ạ', + 'ả' => 'Ả', + 'ấ' => 'Ấ', + 'ầ' => 'Ầ', + 'ẩ' => 'Ẩ', + 'ẫ' => 'Ẫ', + 'ậ' => 'Ậ', + 'ắ' => 'Ắ', + 'ằ' => 'Ằ', + 'ẳ' => 'Ẳ', + 'ẵ' => 'Ẵ', + 'ặ' => 'Ặ', + 'ẹ' => 'Ẹ', + 'ẻ' => 'Ẻ', + 'ẽ' => 'Ẽ', + 'ế' => 'Ế', + 'ề' => 'Ề', + 'ể' => 'Ể', + 'ễ' => 'Ễ', + 'ệ' => 'Ệ', + 'ỉ' => 'Ỉ', + 'ị' => 'Ị', + 'ọ' => 'Ọ', + 'ỏ' => 'Ỏ', + 'ố' => 'Ố', + 'ồ' => 'Ồ', + 'ổ' => 'Ổ', + 'ỗ' => 'Ỗ', + 'ộ' => 'Ộ', + 'ớ' => 'Ớ', + 'ờ' => 'Ờ', + 'ở' => 'Ở', + 'ỡ' => 'Ỡ', + 'ợ' => 'Ợ', + 'ụ' => 'Ụ', + 'ủ' => 'Ủ', + 'ứ' => 'Ứ', + 'ừ' => 'Ừ', + 'ử' => 'Ử', + 'ữ' => 'Ữ', + 'ự' => 'Ự', + 'ỳ' => 'Ỳ', + 'ỵ' => 'Ỵ', + 'ỷ' => 'Ỷ', + 'ỹ' => 'Ỹ', + 'ỻ' => 'Ỻ', + 'ỽ' => 'Ỽ', + 'ỿ' => 'Ỿ', + 'ἀ' => 'Ἀ', + 'ἁ' => 'Ἁ', + 'ἂ' => 'Ἂ', + 'ἃ' => 'Ἃ', + 'ἄ' => 'Ἄ', + 'ἅ' => 'Ἅ', + 'ἆ' => 'Ἆ', + 'ἇ' => 'Ἇ', + 'ἐ' => 'Ἐ', + 'ἑ' => 'Ἑ', + 'ἒ' => 'Ἒ', + 'ἓ' => 'Ἓ', + 'ἔ' => 'Ἔ', + 'ἕ' => 'Ἕ', + 'ἠ' => 'Ἠ', + 'ἡ' => 'Ἡ', + 'ἢ' => 'Ἢ', + 'ἣ' => 'Ἣ', + 'ἤ' => 'Ἤ', + 'ἥ' => 'Ἥ', + 'ἦ' => 'Ἦ', + 'ἧ' => 'Ἧ', + 'ἰ' => 'Ἰ', + 'ἱ' => 'Ἱ', + 'ἲ' => 'Ἲ', + 'ἳ' => 'Ἳ', + 'ἴ' => 'Ἴ', + 'ἵ' => 'Ἵ', + 'ἶ' => 'Ἶ', + 'ἷ' => 'Ἷ', + 'ὀ' => 'Ὀ', + 'ὁ' => 'Ὁ', + 'ὂ' => 'Ὂ', + 'ὃ' => 'Ὃ', + 'ὄ' => 'Ὄ', + 'ὅ' => 'Ὅ', + 'ὑ' => 'Ὑ', + 'ὓ' => 'Ὓ', + 'ὕ' => 'Ὕ', + 'ὗ' => 'Ὗ', + 'ὠ' => 'Ὠ', + 'ὡ' => 'Ὡ', + 'ὢ' => 'Ὢ', + 'ὣ' => 'Ὣ', + 'ὤ' => 'Ὤ', + 'ὥ' => 'Ὥ', + 'ὦ' => 'Ὦ', + 'ὧ' => 'Ὧ', + 'ὰ' => 'Ὰ', + 'ά' => 'Ά', + 'ὲ' => 'Ὲ', + 'έ' => 'Έ', + 'ὴ' => 'Ὴ', + 'ή' => 'Ή', + 'ὶ' => 'Ὶ', + 'ί' => 'Ί', + 'ὸ' => 'Ὸ', + 'ό' => 'Ό', + 'ὺ' => 'Ὺ', + 'ύ' => 'Ύ', + 'ὼ' => 'Ὼ', + 'ώ' => 'Ώ', + 'ᾀ' => 'ᾈ', + 'ᾁ' => 'ᾉ', + 'ᾂ' => 'ᾊ', + 'ᾃ' => 'ᾋ', + 'ᾄ' => 'ᾌ', + 'ᾅ' => 'ᾍ', + 'ᾆ' => 'ᾎ', + 'ᾇ' => 'ᾏ', + 'ᾐ' => 'ᾘ', + 'ᾑ' => 'ᾙ', + 'ᾒ' => 'ᾚ', + 'ᾓ' => 'ᾛ', + 'ᾔ' => 'ᾜ', + 'ᾕ' => 'ᾝ', + 'ᾖ' => 'ᾞ', + 'ᾗ' => 'ᾟ', + 'ᾠ' => 'ᾨ', + 'ᾡ' => 'ᾩ', + 'ᾢ' => 'ᾪ', + 'ᾣ' => 'ᾫ', + 'ᾤ' => 'ᾬ', + 'ᾥ' => 'ᾭ', + 'ᾦ' => 'ᾮ', + 'ᾧ' => 'ᾯ', + 'ᾰ' => 'Ᾰ', + 'ᾱ' => 'Ᾱ', + 'ᾳ' => 'ᾼ', + 'ι' => 'Ι', + 'ῃ' => 'ῌ', + 'ῐ' => 'Ῐ', + 'ῑ' => 'Ῑ', + 'ῠ' => 'Ῠ', + 'ῡ' => 'Ῡ', + 'ῥ' => 'Ῥ', + 'ῳ' => 'ῼ', + 'ⅎ' => 'Ⅎ', + 'ⅰ' => 'Ⅰ', + 'ⅱ' => 'Ⅱ', + 'ⅲ' => 'Ⅲ', + 'ⅳ' => 'Ⅳ', + 'ⅴ' => 'Ⅴ', + 'ⅵ' => 'Ⅵ', + 'ⅶ' => 'Ⅶ', + 'ⅷ' => 'Ⅷ', + 'ⅸ' => 'Ⅸ', + 'ⅹ' => 'Ⅹ', + 'ⅺ' => 'Ⅺ', + 'ⅻ' => 'Ⅻ', + 'ⅼ' => 'Ⅼ', + 'ⅽ' => 'Ⅽ', + 'ⅾ' => 'Ⅾ', + 'ⅿ' => 'Ⅿ', + 'ↄ' => 'Ↄ', + 'ⓐ' => 'Ⓐ', + 'ⓑ' => 'Ⓑ', + 'ⓒ' => 'Ⓒ', + 'ⓓ' => 'Ⓓ', + 'ⓔ' => 'Ⓔ', + 'ⓕ' => 'Ⓕ', + 'ⓖ' => 'Ⓖ', + 'ⓗ' => 'Ⓗ', + 'ⓘ' => 'Ⓘ', + 'ⓙ' => 'Ⓙ', + 'ⓚ' => 'Ⓚ', + 'ⓛ' => 'Ⓛ', + 'ⓜ' => 'Ⓜ', + 'ⓝ' => 'Ⓝ', + 'ⓞ' => 'Ⓞ', + 'ⓟ' => 'Ⓟ', + 'ⓠ' => 'Ⓠ', + 'ⓡ' => 'Ⓡ', + 'ⓢ' => 'Ⓢ', + 'ⓣ' => 'Ⓣ', + 'ⓤ' => 'Ⓤ', + 'ⓥ' => 'Ⓥ', + 'ⓦ' => 'Ⓦ', + 'ⓧ' => 'Ⓧ', + 'ⓨ' => 'Ⓨ', + 'ⓩ' => 'Ⓩ', + 'ⰰ' => 'Ⰰ', + 'ⰱ' => 'Ⰱ', + 'ⰲ' => 'Ⰲ', + 'ⰳ' => 'Ⰳ', + 'ⰴ' => 'Ⰴ', + 'ⰵ' => 'Ⰵ', + 'ⰶ' => 'Ⰶ', + 'ⰷ' => 'Ⰷ', + 'ⰸ' => 'Ⰸ', + 'ⰹ' => 'Ⰹ', + 'ⰺ' => 'Ⰺ', + 'ⰻ' => 'Ⰻ', + 'ⰼ' => 'Ⰼ', + 'ⰽ' => 'Ⰽ', + 'ⰾ' => 'Ⰾ', + 'ⰿ' => 'Ⰿ', + 'ⱀ' => 'Ⱀ', + 'ⱁ' => 'Ⱁ', + 'ⱂ' => 'Ⱂ', + 'ⱃ' => 'Ⱃ', + 'ⱄ' => 'Ⱄ', + 'ⱅ' => 'Ⱅ', + 'ⱆ' => 'Ⱆ', + 'ⱇ' => 'Ⱇ', + 'ⱈ' => 'Ⱈ', + 'ⱉ' => 'Ⱉ', + 'ⱊ' => 'Ⱊ', + 'ⱋ' => 'Ⱋ', + 'ⱌ' => 'Ⱌ', + 'ⱍ' => 'Ⱍ', + 'ⱎ' => 'Ⱎ', + 'ⱏ' => 'Ⱏ', + 'ⱐ' => 'Ⱐ', + 'ⱑ' => 'Ⱑ', + 'ⱒ' => 'Ⱒ', + 'ⱓ' => 'Ⱓ', + 'ⱔ' => 'Ⱔ', + 'ⱕ' => 'Ⱕ', + 'ⱖ' => 'Ⱖ', + 'ⱗ' => 'Ⱗ', + 'ⱘ' => 'Ⱘ', + 'ⱙ' => 'Ⱙ', + 'ⱚ' => 'Ⱚ', + 'ⱛ' => 'Ⱛ', + 'ⱜ' => 'Ⱜ', + 'ⱝ' => 'Ⱝ', + 'ⱞ' => 'Ⱞ', + 'ⱡ' => 'Ⱡ', + 'ⱥ' => 'Ⱥ', + 'ⱦ' => 'Ⱦ', + 'ⱨ' => 'Ⱨ', + 'ⱪ' => 'Ⱪ', + 'ⱬ' => 'Ⱬ', + 'ⱳ' => 'Ⱳ', + 'ⱶ' => 'Ⱶ', + 'ⲁ' => 'Ⲁ', + 'ⲃ' => 'Ⲃ', + 'ⲅ' => 'Ⲅ', + 'ⲇ' => 'Ⲇ', + 'ⲉ' => 'Ⲉ', + 'ⲋ' => 'Ⲋ', + 'ⲍ' => 'Ⲍ', + 'ⲏ' => 'Ⲏ', + 'ⲑ' => 'Ⲑ', + 'ⲓ' => 'Ⲓ', + 'ⲕ' => 'Ⲕ', + 'ⲗ' => 'Ⲗ', + 'ⲙ' => 'Ⲙ', + 'ⲛ' => 'Ⲛ', + 'ⲝ' => 'Ⲝ', + 'ⲟ' => 'Ⲟ', + 'ⲡ' => 'Ⲡ', + 'ⲣ' => 'Ⲣ', + 'ⲥ' => 'Ⲥ', + 'ⲧ' => 'Ⲧ', + 'ⲩ' => 'Ⲩ', + 'ⲫ' => 'Ⲫ', + 'ⲭ' => 'Ⲭ', + 'ⲯ' => 'Ⲯ', + 'ⲱ' => 'Ⲱ', + 'ⲳ' => 'Ⲳ', + 'ⲵ' => 'Ⲵ', + 'ⲷ' => 'Ⲷ', + 'ⲹ' => 'Ⲹ', + 'ⲻ' => 'Ⲻ', + 'ⲽ' => 'Ⲽ', + 'ⲿ' => 'Ⲿ', + 'ⳁ' => 'Ⳁ', + 'ⳃ' => 'Ⳃ', + 'ⳅ' => 'Ⳅ', + 'ⳇ' => 'Ⳇ', + 'ⳉ' => 'Ⳉ', + 'ⳋ' => 'Ⳋ', + 'ⳍ' => 'Ⳍ', + 'ⳏ' => 'Ⳏ', + 'ⳑ' => 'Ⳑ', + 'ⳓ' => 'Ⳓ', + 'ⳕ' => 'Ⳕ', + 'ⳗ' => 'Ⳗ', + 'ⳙ' => 'Ⳙ', + 'ⳛ' => 'Ⳛ', + 'ⳝ' => 'Ⳝ', + 'ⳟ' => 'Ⳟ', + 'ⳡ' => 'Ⳡ', + 'ⳣ' => 'Ⳣ', + 'ⳬ' => 'Ⳬ', + 'ⳮ' => 'Ⳮ', + 'ⳳ' => 'Ⳳ', + 'ⴀ' => 'Ⴀ', + 'ⴁ' => 'Ⴁ', + 'ⴂ' => 'Ⴂ', + 'ⴃ' => 'Ⴃ', + 'ⴄ' => 'Ⴄ', + 'ⴅ' => 'Ⴅ', + 'ⴆ' => 'Ⴆ', + 'ⴇ' => 'Ⴇ', + 'ⴈ' => 'Ⴈ', + 'ⴉ' => 'Ⴉ', + 'ⴊ' => 'Ⴊ', + 'ⴋ' => 'Ⴋ', + 'ⴌ' => 'Ⴌ', + 'ⴍ' => 'Ⴍ', + 'ⴎ' => 'Ⴎ', + 'ⴏ' => 'Ⴏ', + 'ⴐ' => 'Ⴐ', + 'ⴑ' => 'Ⴑ', + 'ⴒ' => 'Ⴒ', + 'ⴓ' => 'Ⴓ', + 'ⴔ' => 'Ⴔ', + 'ⴕ' => 'Ⴕ', + 'ⴖ' => 'Ⴖ', + 'ⴗ' => 'Ⴗ', + 'ⴘ' => 'Ⴘ', + 'ⴙ' => 'Ⴙ', + 'ⴚ' => 'Ⴚ', + 'ⴛ' => 'Ⴛ', + 'ⴜ' => 'Ⴜ', + 'ⴝ' => 'Ⴝ', + 'ⴞ' => 'Ⴞ', + 'ⴟ' => 'Ⴟ', + 'ⴠ' => 'Ⴠ', + 'ⴡ' => 'Ⴡ', + 'ⴢ' => 'Ⴢ', + 'ⴣ' => 'Ⴣ', + 'ⴤ' => 'Ⴤ', + 'ⴥ' => 'Ⴥ', + 'ⴧ' => 'Ⴧ', + 'ⴭ' => 'Ⴭ', + 'ꙁ' => 'Ꙁ', + 'ꙃ' => 'Ꙃ', + 'ꙅ' => 'Ꙅ', + 'ꙇ' => 'Ꙇ', + 'ꙉ' => 'Ꙉ', + 'ꙋ' => 'Ꙋ', + 'ꙍ' => 'Ꙍ', + 'ꙏ' => 'Ꙏ', + 'ꙑ' => 'Ꙑ', + 'ꙓ' => 'Ꙓ', + 'ꙕ' => 'Ꙕ', + 'ꙗ' => 'Ꙗ', + 'ꙙ' => 'Ꙙ', + 'ꙛ' => 'Ꙛ', + 'ꙝ' => 'Ꙝ', + 'ꙟ' => 'Ꙟ', + 'ꙡ' => 'Ꙡ', + 'ꙣ' => 'Ꙣ', + 'ꙥ' => 'Ꙥ', + 'ꙧ' => 'Ꙧ', + 'ꙩ' => 'Ꙩ', + 'ꙫ' => 'Ꙫ', + 'ꙭ' => 'Ꙭ', + 'ꚁ' => 'Ꚁ', + 'ꚃ' => 'Ꚃ', + 'ꚅ' => 'Ꚅ', + 'ꚇ' => 'Ꚇ', + 'ꚉ' => 'Ꚉ', + 'ꚋ' => 'Ꚋ', + 'ꚍ' => 'Ꚍ', + 'ꚏ' => 'Ꚏ', + 'ꚑ' => 'Ꚑ', + 'ꚓ' => 'Ꚓ', + 'ꚕ' => 'Ꚕ', + 'ꚗ' => 'Ꚗ', + 'ꚙ' => 'Ꚙ', + 'ꚛ' => 'Ꚛ', + 'ꜣ' => 'Ꜣ', + 'ꜥ' => 'Ꜥ', + 'ꜧ' => 'Ꜧ', + 'ꜩ' => 'Ꜩ', + 'ꜫ' => 'Ꜫ', + 'ꜭ' => 'Ꜭ', + 'ꜯ' => 'Ꜯ', + 'ꜳ' => 'Ꜳ', + 'ꜵ' => 'Ꜵ', + 'ꜷ' => 'Ꜷ', + 'ꜹ' => 'Ꜹ', + 'ꜻ' => 'Ꜻ', + 'ꜽ' => 'Ꜽ', + 'ꜿ' => 'Ꜿ', + 'ꝁ' => 'Ꝁ', + 'ꝃ' => 'Ꝃ', + 'ꝅ' => 'Ꝅ', + 'ꝇ' => 'Ꝇ', + 'ꝉ' => 'Ꝉ', + 'ꝋ' => 'Ꝋ', + 'ꝍ' => 'Ꝍ', + 'ꝏ' => 'Ꝏ', + 'ꝑ' => 'Ꝑ', + 'ꝓ' => 'Ꝓ', + 'ꝕ' => 'Ꝕ', + 'ꝗ' => 'Ꝗ', + 'ꝙ' => 'Ꝙ', + 'ꝛ' => 'Ꝛ', + 'ꝝ' => 'Ꝝ', + 'ꝟ' => 'Ꝟ', + 'ꝡ' => 'Ꝡ', + 'ꝣ' => 'Ꝣ', + 'ꝥ' => 'Ꝥ', + 'ꝧ' => 'Ꝧ', + 'ꝩ' => 'Ꝩ', + 'ꝫ' => 'Ꝫ', + 'ꝭ' => 'Ꝭ', + 'ꝯ' => 'Ꝯ', + 'ꝺ' => 'Ꝺ', + 'ꝼ' => 'Ꝼ', + 'ꝿ' => 'Ꝿ', + 'ꞁ' => 'Ꞁ', + 'ꞃ' => 'Ꞃ', + 'ꞅ' => 'Ꞅ', + 'ꞇ' => 'Ꞇ', + 'ꞌ' => 'Ꞌ', + 'ꞑ' => 'Ꞑ', + 'ꞓ' => 'Ꞓ', + 'ꞗ' => 'Ꞗ', + 'ꞙ' => 'Ꞙ', + 'ꞛ' => 'Ꞛ', + 'ꞝ' => 'Ꞝ', + 'ꞟ' => 'Ꞟ', + 'ꞡ' => 'Ꞡ', + 'ꞣ' => 'Ꞣ', + 'ꞥ' => 'Ꞥ', + 'ꞧ' => 'Ꞧ', + 'ꞩ' => 'Ꞩ', + 'a' => 'A', + 'b' => 'B', + 'c' => 'C', + 'd' => 'D', + 'e' => 'E', + 'f' => 'F', + 'g' => 'G', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'm' => 'M', + 'n' => 'N', + 'o' => 'O', + 'p' => 'P', + 'q' => 'Q', + 'r' => 'R', + 's' => 'S', + 't' => 'T', + 'u' => 'U', + 'v' => 'V', + 'w' => 'W', + 'x' => 'X', + 'y' => 'Y', + 'z' => 'Z', + '𐐨' => '𐐀', + '𐐩' => '𐐁', + '𐐪' => '𐐂', + '𐐫' => '𐐃', + '𐐬' => '𐐄', + '𐐭' => '𐐅', + '𐐮' => '𐐆', + '𐐯' => '𐐇', + '𐐰' => '𐐈', + '𐐱' => '𐐉', + '𐐲' => '𐐊', + '𐐳' => '𐐋', + '𐐴' => '𐐌', + '𐐵' => '𐐍', + '𐐶' => '𐐎', + '𐐷' => '𐐏', + '𐐸' => '𐐐', + '𐐹' => '𐐑', + '𐐺' => '𐐒', + '𐐻' => '𐐓', + '𐐼' => '𐐔', + '𐐽' => '𐐕', + '𐐾' => '𐐖', + '𐐿' => '𐐗', + '𐑀' => '𐐘', + '𐑁' => '𐐙', + '𐑂' => '𐐚', + '𐑃' => '𐐛', + '𐑄' => '𐐜', + '𐑅' => '𐐝', + '𐑆' => '𐐞', + '𐑇' => '𐐟', + '𐑈' => '𐐠', + '𐑉' => '𐐡', + '𐑊' => '𐐢', + '𐑋' => '𐐣', + '𐑌' => '𐐤', + '𐑍' => '𐐥', + '𐑎' => '𐐦', + '𐑏' => '𐐧', + '𑣀' => '𑢠', + '𑣁' => '𑢡', + '𑣂' => '𑢢', + '𑣃' => '𑢣', + '𑣄' => '𑢤', + '𑣅' => '𑢥', + '𑣆' => '𑢦', + '𑣇' => '𑢧', + '𑣈' => '𑢨', + '𑣉' => '𑢩', + '𑣊' => '𑢪', + '𑣋' => '𑢫', + '𑣌' => '𑢬', + '𑣍' => '𑢭', + '𑣎' => '𑢮', + '𑣏' => '𑢯', + '𑣐' => '𑢰', + '𑣑' => '𑢱', + '𑣒' => '𑢲', + '𑣓' => '𑢳', + '𑣔' => '𑢴', + '𑣕' => '𑢵', + '𑣖' => '𑢶', + '𑣗' => '𑢷', + '𑣘' => '𑢸', + '𑣙' => '𑢹', + '𑣚' => '𑢺', + '𑣛' => '𑢻', + '𑣜' => '𑢼', + '𑣝' => '𑢽', + '𑣞' => '𑢾', + '𑣟' => '𑢿', +); diff --git a/vendor/symfony/polyfill-mbstring/bootstrap.php b/vendor/symfony/polyfill-mbstring/bootstrap.php new file mode 100644 index 0000000..204a41b --- /dev/null +++ b/vendor/symfony/polyfill-mbstring/bootstrap.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Mbstring as p; + +if (!function_exists('mb_strlen')) { + define('MB_CASE_UPPER', 0); + define('MB_CASE_LOWER', 1); + define('MB_CASE_TITLE', 2); + + function mb_convert_encoding($s, $to, $from = null) { return p\Mbstring::mb_convert_encoding($s, $to, $from); } + function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); } + function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); } + function mb_decode_numericentity($s, $convmap, $enc = null) { return p\Mbstring::mb_decode_numericentity($s, $convmap, $enc); } + function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = false) { return p\Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex); } + function mb_convert_case($s, $mode, $enc = null) { return p\Mbstring::mb_convert_case($s, $mode, $enc); } + function mb_internal_encoding($enc = null) { return p\Mbstring::mb_internal_encoding($enc); } + function mb_language($lang = null) { return p\Mbstring::mb_language($lang); } + function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); } + function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); } + function mb_check_encoding($var = null, $encoding = null) { return p\Mbstring::mb_check_encoding($var, $encoding); } + function mb_detect_encoding($str, $encodingList = null, $strict = false) { return p\Mbstring::mb_detect_encoding($str, $encodingList, $strict); } + function mb_detect_order($encodingList = null) { return p\Mbstring::mb_detect_order($encodingList); } + function mb_parse_str($s, &$result = array()) { parse_str($s, $result); } + function mb_strlen($s, $enc = null) { return p\Mbstring::mb_strlen($s, $enc); } + function mb_strpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strpos($s, $needle, $offset, $enc); } + function mb_strtolower($s, $enc = null) { return p\Mbstring::mb_strtolower($s, $enc); } + function mb_strtoupper($s, $enc = null) { return p\Mbstring::mb_strtoupper($s, $enc); } + function mb_substitute_character($char = null) { return p\Mbstring::mb_substitute_character($char); } + function mb_substr($s, $start, $length = 2147483647, $enc = null) { return p\Mbstring::mb_substr($s, $start, $length, $enc); } + function mb_stripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_stripos($s, $needle, $offset, $enc); } + function mb_stristr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_stristr($s, $needle, $part, $enc); } + function mb_strrchr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrchr($s, $needle, $part, $enc); } + function mb_strrichr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrichr($s, $needle, $part, $enc); } + function mb_strripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strripos($s, $needle, $offset, $enc); } + function mb_strrpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strrpos($s, $needle, $offset, $enc); } + function mb_strstr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strstr($s, $needle, $part, $enc); } + function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); } + function mb_http_output($enc = null) { return p\Mbstring::mb_http_output($enc); } + function mb_strwidth($s, $enc = null) { return p\Mbstring::mb_strwidth($s, $enc); } + function mb_substr_count($haystack, $needle, $enc = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $enc); } + function mb_output_handler($contents, $status) { return p\Mbstring::mb_output_handler($contents, $status); } + function mb_http_input($type = '') { return p\Mbstring::mb_http_input($type); } + function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) { return p\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f); } +} +if (!function_exists('mb_chr')) { + function mb_ord($s, $enc = null) { return p\Mbstring::mb_ord($s, $enc); } + function mb_chr($code, $enc = null) { return p\Mbstring::mb_chr($code, $enc); } + function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); } +} + +if (!function_exists('mb_str_split')) { + function mb_str_split($string, $split_length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $split_length, $encoding); } +} diff --git a/vendor/symfony/polyfill-mbstring/composer.json b/vendor/symfony/polyfill-mbstring/composer.json new file mode 100644 index 0000000..c968074 --- /dev/null +++ b/vendor/symfony/polyfill-mbstring/composer.json @@ -0,0 +1,34 @@ +{ + "name": "symfony/polyfill-mbstring", + "type": "library", + "description": "Symfony polyfill for the Mbstring extension", + "keywords": ["polyfill", "shim", "compatibility", "portable", "mbstring"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.3.3" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" }, + "files": [ "bootstrap.php" ] + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.13-dev" + } + } +} diff --git a/view/button_javascript.php b/view/button_javascript.php new file mode 100644 index 0000000..22c87c2 --- /dev/null +++ b/view/button_javascript.php @@ -0,0 +1,56 @@ + + diff --git a/view/settings.php b/view/settings.php index c93aab3..840fa74 100644 --- a/view/settings.php +++ b/view/settings.php @@ -1,7 +1,7 @@
-

-
+

+
-

- -

- -

-

-

https://cdn.aliyun.com', $d ), 'https://cdn.aliyun.com' ) ?>

-

https://www.alibabacloud.com/help/doc-detail/27200.htm', $d ); ?>

+

+ +

+ +

+

+

ver to the Ignore Parameters, which will increase the cache hit ratio.', $_d ) ?>

-

+

    /> + value="1" />
    /> + value="2" />
    /> + value="3" />
- -
-
-

-

-

-
-

+

-

/', $d ); ?>

- - + name="custom_urls" id="c_url"> +

+

/ at the end.', $_d ); ?>

+


- + + + +