Official Facebook Pixel - Version 3.0.1

Version Description

Download this release

Release Info

Developer Facebook
Plugin Icon Official Facebook Pixel
Version 3.0.1
Comparing to
See all releases

Code changes from version 3.0.0 to 3.0.1

Files changed (285) hide show
  1. changelog.txt +6 -0
  2. composer.json +1 -1
  3. composer.lock +261 -504
  4. core/FacebookPluginConfig.php +6 -1
  5. core/FacebookWordpressSettingsPage.php +34 -4
  6. core/ServerEventFactory.php +1 -0
  7. facebook-for-wordpress.php +1 -1
  8. languages/official-facebook-pixel-ar_AR.po +1 -1
  9. languages/official-facebook-pixel-cs_CZ.po +1 -1
  10. languages/official-facebook-pixel-da_DK.po +1 -1
  11. languages/official-facebook-pixel-de_DE.po +1 -1
  12. languages/official-facebook-pixel-en_GB.po +1 -1
  13. languages/official-facebook-pixel-es_ES.po +1 -1
  14. languages/official-facebook-pixel-es_LA.po +1 -1
  15. languages/official-facebook-pixel-fi_FI.po +1 -1
  16. languages/official-facebook-pixel-fr_CA.po +1 -1
  17. languages/official-facebook-pixel-fr_FR.po +1 -1
  18. languages/official-facebook-pixel-he_IL.po +1 -1
  19. languages/official-facebook-pixel-it_IT.po +1 -1
  20. languages/official-facebook-pixel-ja_JP.po +1 -1
  21. languages/official-facebook-pixel-ko_KR.po +1 -1
  22. languages/official-facebook-pixel-nb_NO.po +1 -1
  23. languages/official-facebook-pixel-nl_NL.po +1 -1
  24. languages/official-facebook-pixel-pl_PL.po +1 -1
  25. languages/official-facebook-pixel-pt_BR.po +1 -1
  26. languages/official-facebook-pixel-pt_PT.po +1 -1
  27. languages/official-facebook-pixel-ru_RU.po +1 -1
  28. languages/official-facebook-pixel-sv_SE.po +1 -1
  29. languages/official-facebook-pixel-th_TH.po +1 -1
  30. languages/official-facebook-pixel-tr_TR.po +1 -1
  31. languages/official-facebook-pixel-vi_VN.po +1 -1
  32. languages/official-facebook-pixel-zh_CN.po +1 -1
  33. languages/official-facebook-pixel-zh_TW.po +1 -1
  34. readme.txt +14 -5
  35. vendor/autoload.php +1 -1
  36. vendor/composer/autoload_classmap.php +0 -8
  37. vendor/composer/autoload_files.php +0 -4
  38. vendor/composer/autoload_psr4.php +1 -4
  39. vendor/composer/autoload_real.php +7 -7
  40. vendor/composer/autoload_static.php +9 -39
  41. vendor/composer/installed.json +95 -387
  42. vendor/facebook/php-business-sdk/.github/workflows/ci.yml +28 -0
  43. vendor/facebook/php-business-sdk/.travis.yml +0 -30
  44. vendor/facebook/php-business-sdk/CHANGELOG.md +9 -0
  45. vendor/facebook/php-business-sdk/README.md +1 -1
  46. vendor/facebook/php-business-sdk/examples/{AdAccountAdCreativesPostCreateAdCreativePageLike.php → AdAccountAdCreativesPost3CreateAdCreativePageLike.php} +0 -0
  47. vendor/facebook/php-business-sdk/examples/{AdAccountAdCreativesPostCreateAssetFeedSpec.php → AdAccountAdCreativesPost3CreateAssetFeedSpec.php} +0 -0
  48. vendor/facebook/php-business-sdk/examples/{AdAccountAdCreativesPost2CreateCarouselCallToActionAppInstall.php → AdAccountAdCreativesPost3CreateCarouselCallToActionAppInstall.php} +0 -0
  49. vendor/facebook/php-business-sdk/examples/{AdAccountAdCreativesPostCreateDynamicAdCustomization.php → AdAccountAdCreativesPost3CreateDynamicAdCustomization.php} +0 -0
  50. vendor/facebook/php-business-sdk/examples/AdAccountAdCreativesPostCreateAdCreativeLinkAd.php +0 -48
  51. vendor/facebook/php-business-sdk/examples/AdAccountAdCreativesPostCreateCarouselCallToActionAppInstall.php +0 -48
  52. vendor/facebook/php-business-sdk/examples/AdAccountAdCreativesPostCreateLinkAdCallToActionAppInstall.php +0 -48
  53. vendor/facebook/php-business-sdk/examples/AdAccountAdCreativesPostCreateLinkAdImageCrop.php +0 -48
  54. vendor/facebook/php-business-sdk/examples/AdAccountAdCreativesPostCreateLinkAdNotToPage.php +0 -52
  55. vendor/facebook/php-business-sdk/examples/AdAccountAdCreativesPostCreateMAIDPA.php +0 -49
  56. vendor/facebook/php-business-sdk/examples/AdAccountAdCreativesPostCreateVideoLeadAd.php +0 -47
  57. vendor/facebook/php-business-sdk/examples/AdAccountAdCreativesPostCreateVideoPageLikeAd.php +0 -48
  58. vendor/facebook/php-business-sdk/examples/AdAccountAdSetsPostAdSetCreateCpa.php +2 -2
  59. vendor/facebook/php-business-sdk/examples/AdAccountAdSetsPostAdSetCreateCpaAppEvents.php +2 -2
  60. vendor/facebook/php-business-sdk/examples/AdAccountAdSetsPostCreateAdSet.php +2 -2
  61. vendor/facebook/php-business-sdk/examples/AdAccountAdSetsPostCreateCampaign.php +0 -49
  62. vendor/facebook/php-business-sdk/examples/AdAccountAdSetsPostDailyBudget20.php +2 -2
  63. vendor/facebook/php-business-sdk/examples/AdAccountAdSetsPostLifetimeBudget200Duration10Days.php +2 -2
  64. vendor/facebook/php-business-sdk/examples/AdAccountAdSetsPostOfferClaim.php +2 -2
  65. vendor/facebook/php-business-sdk/examples/AdAccountAdSetsPostOptimizePostEngagement.php +2 -2
  66. vendor/facebook/php-business-sdk/examples/AdgroupLeadsEdgeAdgroupLeadsFiltered.php +1 -1
  67. vendor/facebook/php-business-sdk/examples/AdsPixelEventsPost.php +1 -1
  68. vendor/facebook/php-business-sdk/examples/MultiPageFeedCreateThenDelete.php +1 -1
  69. vendor/facebook/php-business-sdk/examples/MultiPromoteYourPage.php +3 -2
  70. vendor/facebook/php-business-sdk/src/FacebookAds/ApiConfig.php +1 -1
  71. vendor/facebook/php-business-sdk/src/FacebookAds/Object/AbstractCrudObject.php +1 -1
  72. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Ad.php +3 -0
  73. vendor/facebook/php-business-sdk/src/FacebookAds/Object/AdAccount.php +6 -27
  74. vendor/facebook/php-business-sdk/src/FacebookAds/Object/{UserPaymentModulesOptions.php → AdCreativeOmnichannelLinkSpec.php} +4 -4
  75. vendor/facebook/php-business-sdk/src/FacebookAds/Object/AdSet.php +2 -0
  76. vendor/facebook/php-business-sdk/src/FacebookAds/Object/AdVideo.php +0 -49
  77. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Album.php +0 -49
  78. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Application.php +0 -49
  79. vendor/facebook/php-business-sdk/src/FacebookAds/Object/BusinessDataAPI/Content.php +148 -0
  80. vendor/facebook/php-business-sdk/src/FacebookAds/Object/BusinessDataAPI/CustomData.php +301 -0
  81. vendor/facebook/php-business-sdk/src/FacebookAds/Object/BusinessDataAPI/Event.php +244 -0
  82. vendor/facebook/php-business-sdk/src/FacebookAds/Object/BusinessDataAPI/EventRequest.php +141 -0
  83. vendor/facebook/php-business-sdk/src/FacebookAds/Object/BusinessDataAPI/EventResponse.php +119 -0
  84. vendor/facebook/php-business-sdk/src/FacebookAds/Object/BusinessDataAPI/UserData.php +320 -0
  85. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Campaign.php +3 -0
  86. vendor/facebook/php-business-sdk/src/FacebookAds/Object/{UserPaymentMethodsInfo.php → CatalogItemChannelsToIntegrityStatus.php} +4 -4
  87. vendor/facebook/php-business-sdk/src/FacebookAds/Object/CustomAudience.php +26 -0
  88. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/AdAccountCreationRequestFields.php +0 -111
  89. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/AdAccountFields.php +0 -2
  90. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/{FriendListFields.php → AdCreativeOmnichannelLinkSpecFields.php} +5 -9
  91. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/AdFields.php +2 -0
  92. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/AdReportRunFields.php +2 -0
  93. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/CampaignFields.php +4 -2
  94. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/{UserPaymentModulesOptionsFields.php → CatalogItemChannelsToIntegrityStatusFields.php} +5 -9
  95. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/EventTourFields.php +0 -73
  96. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/GroupFields.php +0 -2
  97. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/IGMediaFields.php +0 -2
  98. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/IGUserFields.php +0 -2
  99. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/MessengerProfileFields.php +2 -0
  100. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/PagePostFields.php +0 -20
  101. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/{UserPaymentMethodsInfoFields.php → PaymentEnginePaymentFields.php} +37 -13
  102. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/PaymentSubscriptionFields.php +3 -3
  103. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/PostFields.php +1 -21
  104. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/ProductItemFields.php +2 -0
  105. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/UnifiedThreadFields.php +0 -2
  106. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/UserFields.php +0 -20
  107. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/{OfflineTermsOfServiceFields.php → WhatsAppBusinessProfileFields.php} +3 -5
  108. vendor/facebook/php-business-sdk/src/FacebookAds/Object/FriendList.php +0 -80
  109. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Group.php +68 -46
  110. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Link.php +0 -56
  111. vendor/facebook/php-business-sdk/src/FacebookAds/Object/LiveVideo.php +1 -1
  112. vendor/facebook/php-business-sdk/src/FacebookAds/Object/OfflineTermsOfService.php +0 -80
  113. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Page.php +3 -27
  114. vendor/facebook/php-business-sdk/src/FacebookAds/Object/{EventTour.php → PaymentEnginePayment.php} +24 -16
  115. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Photo.php +0 -49
  116. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Post.php +2 -127
  117. vendor/facebook/php-business-sdk/src/FacebookAds/Object/ProductFeedSchedule.php +0 -47
  118. vendor/facebook/php-business-sdk/src/FacebookAds/Object/ProductGroup.php +37 -0
  119. vendor/facebook/php-business-sdk/src/FacebookAds/Object/ProductItem.php +52 -0
  120. vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/ActionSource.php +77 -0
  121. vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/Event.php +31 -1
  122. vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/Normalizer.php +23 -0
  123. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Signal/Content.php +233 -0
  124. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Signal/CustomData.php +517 -0
  125. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Signal/Event.php +269 -0
  126. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Signal/EventRequest.php +233 -0
  127. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Signal/UserData.php +592 -0
  128. vendor/facebook/php-business-sdk/{examples/AdsPixelNodeGetPixelCode.php → src/FacebookAds/Object/Signal/Util.php} +15 -21
  129. vendor/facebook/php-business-sdk/src/FacebookAds/Object/User.php +33 -27
  130. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdAccountDeliveryEstimateOptimizationGoalValues.php +1 -0
  131. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdAccountMatchedSearchApplicationsEdgeDataAppStoreValues.php +1 -0
  132. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdAccountPermittedTasksValues.php +1 -0
  133. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdAccountTargetingUnifiedAppStoreValues.php +1 -0
  134. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdAccountTasksValues.php +1 -0
  135. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdAssetFeedSpecCallToActionTypesValues.php +1 -0
  136. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdCampaignActivityBidStrategyNewValues.php +0 -1
  137. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdCampaignActivityBidStrategyOldValues.php +0 -1
  138. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdCampaignActivityOptimizationGoalNewValues.php +1 -0
  139. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdCampaignActivityOptimizationGoalOldValues.php +1 -0
  140. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdCampaignDeliveryEstimateOptimizationGoalValues.php +1 -0
  141. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdCreativeCallToActionTypeValues.php +1 -0
  142. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdCreativeLinkDataCallToActionTypeValues.php +1 -0
  143. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdSetBidStrategyValues.php +0 -1
  144. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdSetOptimizationGoalValues.php +1 -0
  145. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdVideoContainerTypeValues.php +1 -0
  146. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/ApplicationSupportedPlatformsValues.php +1 -0
  147. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/BusinessAssetGroupAdaccountTasksValues.php +1 -0
  148. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/BusinessPermittedTasksValues.php +1 -0
  149. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/CampaignBidStrategyValues.php +0 -1
  150. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/GroupGroupTypeValues.php +1 -0
  151. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/GroupPurposeValues.php +1 -0
  152. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/LiveVideoBroadcastStatusValues.php +9 -9
  153. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/PaymentEnginePaymentReasonValues.php +43 -0
  154. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/TargetingDevicePlatformsValues.php +0 -1
  155. vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/TargetingEffectiveDevicePlatformsValues.php +0 -1
  156. vendor/facebook/php-business-sdk/src/FacebookAds/Object/{AdAccountCreationRequest.php → WhatsAppBusinessProfile.php} +13 -13
  157. vendor/facebook/php-business-sdk/test/FacebookAdsTest/Object/ServerSide/EventTest.php +101 -0
  158. vendor/facebook/php-business-sdk/test/FacebookAdsTest/Object/Signal/EventTest.php +75 -0
  159. vendor/guzzlehttp/guzzle/.php_cs +0 -23
  160. vendor/guzzlehttp/guzzle/CHANGELOG.md +128 -16
  161. vendor/guzzlehttp/guzzle/Dockerfile +0 -18
  162. vendor/guzzlehttp/guzzle/LICENSE +1 -1
  163. vendor/guzzlehttp/guzzle/README.md +20 -31
  164. vendor/guzzlehttp/guzzle/UPGRADING.md +53 -3
  165. vendor/guzzlehttp/guzzle/composer.json +20 -7
  166. vendor/guzzlehttp/guzzle/src/BodySummarizer.php +28 -0
  167. vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php +13 -0
  168. vendor/guzzlehttp/guzzle/src/Client.php +102 -129
  169. vendor/guzzlehttp/guzzle/src/ClientInterface.php +10 -13
  170. vendor/guzzlehttp/guzzle/src/ClientTrait.php +241 -0
  171. vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php +63 -66
  172. vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php +9 -14
  173. vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php +28 -18
  174. vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php +20 -15
  175. vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php +91 -84
  176. vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php +21 -9
  177. vendor/guzzlehttp/guzzle/src/Exception/ClientException.php +1 -0
  178. vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php +29 -10
  179. vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php +4 -18
  180. vendor/guzzlehttp/guzzle/src/Exception/RequestException.php +40 -66
  181. vendor/guzzlehttp/guzzle/src/Exception/SeekException.php +0 -27
  182. vendor/guzzlehttp/guzzle/src/Exception/ServerException.php +1 -0
  183. vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php +1 -0
  184. vendor/guzzlehttp/guzzle/src/Exception/TransferException.php +1 -0
  185. vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php +201 -200
  186. vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php +3 -5
  187. vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php +13 -9
  188. vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php +82 -48
  189. vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php +51 -25
  190. vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php +78 -62
  191. vendor/guzzlehttp/guzzle/src/Handler/Proxy.php +18 -22
  192. vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php +158 -176
  193. vendor/guzzlehttp/guzzle/src/HandlerStack.php +66 -72
  194. vendor/guzzlehttp/guzzle/src/MessageFormatter.php +49 -36
  195. vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php +18 -0
  196. vendor/guzzlehttp/guzzle/src/Middleware.php +60 -54
  197. vendor/guzzlehttp/guzzle/src/Pool.php +27 -36
  198. vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php +13 -20
  199. vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php +41 -80
  200. vendor/guzzlehttp/guzzle/src/RequestOptions.php +32 -31
  201. vendor/guzzlehttp/guzzle/src/RetryMiddleware.php +36 -48
  202. vendor/guzzlehttp/guzzle/src/TransferStats.php +31 -24
  203. vendor/guzzlehttp/guzzle/src/UriTemplate.php +0 -237
  204. vendor/guzzlehttp/guzzle/src/Utils.php +326 -31
  205. vendor/guzzlehttp/guzzle/src/functions.php +54 -221
  206. vendor/guzzlehttp/guzzle/src/functions_include.php +1 -1
  207. vendor/guzzlehttp/promises/.php_cs.dist +88 -0
  208. vendor/guzzlehttp/promises/CHANGELOG.md +16 -0
  209. vendor/guzzlehttp/promises/README.md +35 -7
  210. vendor/guzzlehttp/promises/composer.json +9 -4
  211. vendor/guzzlehttp/promises/phpstan-baseline.neon +7 -0
  212. vendor/guzzlehttp/promises/phpstan.neon.dist +10 -0
  213. vendor/guzzlehttp/promises/psalm.xml +15 -0
  214. vendor/guzzlehttp/promises/src/AggregateException.php +1 -0
  215. vendor/guzzlehttp/promises/src/CancellationException.php +1 -0
  216. vendor/guzzlehttp/promises/src/Coroutine.php +23 -5
  217. vendor/guzzlehttp/promises/src/Create.php +84 -0
  218. vendor/guzzlehttp/promises/src/Each.php +90 -0
  219. vendor/guzzlehttp/promises/src/EachPromise.php +47 -23
  220. vendor/guzzlehttp/promises/src/FulfilledPromise.php +6 -4
  221. vendor/guzzlehttp/promises/src/Is.php +46 -0
  222. vendor/guzzlehttp/promises/src/Promise.php +33 -35
  223. vendor/guzzlehttp/promises/src/PromiseInterface.php +4 -0
  224. vendor/guzzlehttp/promises/src/PromisorInterface.php +1 -0
  225. vendor/guzzlehttp/promises/src/RejectedPromise.php +9 -5
  226. vendor/guzzlehttp/promises/src/RejectionException.php +2 -1
  227. vendor/guzzlehttp/promises/src/TaskQueue.php +3 -2
  228. vendor/guzzlehttp/promises/src/TaskQueueInterface.php +1 -2
  229. vendor/guzzlehttp/promises/src/Utils.php +274 -0
  230. vendor/guzzlehttp/promises/src/functions.php +80 -174
  231. vendor/guzzlehttp/psr7/CHANGELOG.md +25 -1
  232. vendor/guzzlehttp/psr7/README.md +193 -129
  233. vendor/guzzlehttp/psr7/composer.json +3 -3
  234. vendor/guzzlehttp/psr7/src/AppendStream.php +4 -1
  235. vendor/guzzlehttp/psr7/src/BufferStream.php +3 -0
  236. vendor/guzzlehttp/psr7/src/CachingStream.php +2 -1
  237. vendor/guzzlehttp/psr7/src/DroppingStream.php +1 -0
  238. vendor/guzzlehttp/psr7/src/FnStream.php +2 -0
  239. vendor/guzzlehttp/psr7/src/Header.php +71 -0
  240. vendor/guzzlehttp/psr7/src/InflateStream.php +1 -0
  241. vendor/guzzlehttp/psr7/src/LazyOpenStream.php +2 -1
  242. vendor/guzzlehttp/psr7/src/LimitStream.php +1 -0
  243. vendor/guzzlehttp/psr7/src/Message.php +252 -0
  244. vendor/guzzlehttp/psr7/src/MessageTrait.php +4 -3
  245. vendor/guzzlehttp/psr7/src/MimeType.php +140 -0
  246. vendor/guzzlehttp/psr7/src/MultipartStream.php +6 -5
  247. vendor/guzzlehttp/psr7/src/NoSeekStream.php +1 -0
  248. vendor/guzzlehttp/psr7/src/PumpStream.php +4 -1
  249. vendor/guzzlehttp/psr7/src/Query.php +108 -0
  250. vendor/guzzlehttp/psr7/src/Request.php +2 -1
  251. vendor/guzzlehttp/psr7/src/Response.php +3 -2
  252. vendor/guzzlehttp/psr7/src/ServerRequest.php +3 -1
  253. vendor/guzzlehttp/psr7/src/Stream.php +6 -3
  254. vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php +3 -1
  255. vendor/guzzlehttp/psr7/src/StreamWrapper.php +2 -0
  256. vendor/guzzlehttp/psr7/src/UploadedFile.php +10 -1
  257. vendor/guzzlehttp/psr7/src/Uri.php +1 -0
  258. vendor/guzzlehttp/psr7/src/UriNormalizer.php +1 -0
  259. vendor/guzzlehttp/psr7/src/UriResolver.php +1 -0
  260. vendor/guzzlehttp/psr7/src/Utils.php +398 -0
  261. vendor/guzzlehttp/psr7/src/functions.php +130 -612
  262. vendor/paragonie/random_compat/build-phar.sh +0 -5
  263. vendor/paragonie/random_compat/composer.json +0 -34
  264. vendor/paragonie/random_compat/dist/random_compat.phar.pubkey +0 -5
  265. vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc +0 -11
  266. vendor/paragonie/random_compat/lib/random.php +0 -32
  267. vendor/paragonie/random_compat/other/build_phar.php +0 -57
  268. vendor/paragonie/random_compat/psalm-autoload.php +0 -9
  269. vendor/paragonie/random_compat/psalm.xml +0 -19
  270. vendor/psr/http-client/CHANGELOG.md +23 -0
  271. vendor/{paragonie/random_compat → psr/http-client}/LICENSE +9 -12
  272. vendor/psr/http-client/README.md +12 -0
  273. vendor/psr/http-client/composer.json +27 -0
  274. vendor/psr/http-client/src/ClientExceptionInterface.php +10 -0
  275. vendor/psr/http-client/src/ClientInterface.php +20 -0
  276. vendor/psr/http-client/src/NetworkExceptionInterface.php +24 -0
  277. vendor/psr/http-client/src/RequestExceptionInterface.php +24 -0
  278. vendor/symfony/polyfill-intl-idn/Idn.php +0 -915
  279. vendor/symfony/polyfill-intl-idn/Info.php +0 -23
  280. vendor/symfony/polyfill-intl-idn/LICENSE +0 -19
  281. vendor/symfony/polyfill-intl-idn/README.md +0 -12
  282. vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php +0 -375
  283. vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php +0 -24
  284. vendor/symfony/polyfill-intl-idn/Resources/unidata/deviation.php +0 -8
  285. vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php +0 -1996
changelog.txt CHANGED
@@ -1,4 +1,10 @@
1
  *** Facebook for WordPress Changelog ***
 
 
 
 
 
 
2
  2021-01-06 version 3.0.0
3
  * Adding Facebook Business Extension based configuration
4
  * Renaming to Facebook for WordPress
1
  *** Facebook for WordPress Changelog ***
2
+ 2021-01-28 version 3.0.1
3
+ * Support for WordPress 5.6
4
+ * Adding banner for plugin review
5
+ * Adding action_source parameter to Conversions API events
6
+ * Update Business SDK to v9.0.3
7
+
8
  2021-01-06 version 3.0.0
9
  * Adding Facebook Business Extension based configuration
10
  * Renaming to Facebook for WordPress
composer.json CHANGED
@@ -9,7 +9,7 @@
9
  },
10
  "license": "GPL",
11
  "require": {
12
- "facebook/php-business-sdk": "9.0.1",
13
  "techcrunch/wp-async-task": "dev-master"
14
  },
15
  "autoload": {
9
  },
10
  "license": "GPL",
11
  "require": {
12
+ "facebook/php-business-sdk": "9.0.3",
13
  "techcrunch/wp-async-task": "dev-master"
14
  },
15
  "autoload": {
composer.lock CHANGED
@@ -4,20 +4,20 @@
4
  "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
  "This file is @generated automatically"
6
  ],
7
- "content-hash": "f3617bd0b592188283a11223e67f9e0a",
8
  "packages": [
9
  {
10
  "name": "facebook/php-business-sdk",
11
- "version": "9.0.1",
12
  "source": {
13
  "type": "git",
14
  "url": "https://github.com/facebook/facebook-php-business-sdk.git",
15
- "reference": "7edcdcfcd551196c90246875f875dbb48d35cd98"
16
  },
17
  "dist": {
18
  "type": "zip",
19
- "url": "https://api.github.com/repos/facebook/facebook-php-business-sdk/zipball/7edcdcfcd551196c90246875f875dbb48d35cd98",
20
- "reference": "7edcdcfcd551196c90246875f875dbb48d35cd98",
21
  "shasum": ""
22
  },
23
  "require": {
@@ -45,44 +45,47 @@
45
  "page",
46
  "sdk"
47
  ],
48
- "support": {
49
- "source": "https://github.com/facebook/facebook-php-business-sdk/tree/9.0.1"
50
- },
51
- "time": "2020-11-17T23:35:14+00:00"
52
  },
53
  {
54
  "name": "guzzlehttp/guzzle",
55
- "version": "6.5.5",
56
  "source": {
57
  "type": "git",
58
  "url": "https://github.com/guzzle/guzzle.git",
59
- "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e"
60
  },
61
  "dist": {
62
  "type": "zip",
63
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
64
- "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
65
  "shasum": ""
66
  },
67
  "require": {
68
  "ext-json": "*",
69
- "guzzlehttp/promises": "^1.0",
70
- "guzzlehttp/psr7": "^1.6.1",
71
- "php": ">=5.5",
72
- "symfony/polyfill-intl-idn": "^1.17.0"
 
 
 
73
  },
74
  "require-dev": {
75
  "ext-curl": "*",
76
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
 
77
  "psr/log": "^1.1"
78
  },
79
  "suggest": {
 
 
80
  "psr/log": "Required for using the Log middleware"
81
  },
82
  "type": "library",
83
  "extra": {
84
  "branch-alias": {
85
- "dev-master": "6.5-dev"
86
  }
87
  },
88
  "autoload": {
@@ -102,6 +105,11 @@
102
  "name": "Michael Dowling",
103
  "email": "mtdowling@gmail.com",
104
  "homepage": "https://github.com/mtdowling"
 
 
 
 
 
105
  }
106
  ],
107
  "description": "Guzzle is a PHP HTTP client library",
@@ -112,30 +120,50 @@
112
  "framework",
113
  "http",
114
  "http client",
 
 
115
  "rest",
116
  "web service"
117
  ],
118
- "time": "2020-06-16T21:01:06+00:00"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  },
120
  {
121
  "name": "guzzlehttp/promises",
122
- "version": "v1.3.1",
123
  "source": {
124
  "type": "git",
125
  "url": "https://github.com/guzzle/promises.git",
126
- "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
127
  },
128
  "dist": {
129
  "type": "zip",
130
- "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
131
- "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
132
  "shasum": ""
133
  },
134
  "require": {
135
- "php": ">=5.5.0"
136
  },
137
  "require-dev": {
138
- "phpunit/phpunit": "^4.0"
139
  },
140
  "type": "library",
141
  "extra": {
@@ -166,20 +194,20 @@
166
  "keywords": [
167
  "promise"
168
  ],
169
- "time": "2016-12-20T10:07:11+00:00"
170
  },
171
  {
172
  "name": "guzzlehttp/psr7",
173
- "version": "1.6.1",
174
  "source": {
175
  "type": "git",
176
  "url": "https://github.com/guzzle/psr7.git",
177
- "reference": "239400de7a173fe9901b9ac7c06497751f00727a"
178
  },
179
  "dist": {
180
  "type": "zip",
181
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
182
- "reference": "239400de7a173fe9901b9ac7c06497751f00727a",
183
  "shasum": ""
184
  },
185
  "require": {
@@ -192,15 +220,15 @@
192
  },
193
  "require-dev": {
194
  "ext-zlib": "*",
195
- "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
196
  },
197
  "suggest": {
198
- "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
199
  },
200
  "type": "library",
201
  "extra": {
202
  "branch-alias": {
203
- "dev-master": "1.6-dev"
204
  }
205
  },
206
  "autoload": {
@@ -237,52 +265,56 @@
237
  "uri",
238
  "url"
239
  ],
240
- "time": "2019-07-01T23:21:34+00:00"
241
  },
242
  {
243
- "name": "paragonie/random_compat",
244
- "version": "v9.99.99",
245
  "source": {
246
  "type": "git",
247
- "url": "https://github.com/paragonie/random_compat.git",
248
- "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95"
249
  },
250
  "dist": {
251
  "type": "zip",
252
- "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95",
253
- "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95",
254
  "shasum": ""
255
  },
256
  "require": {
257
- "php": "^7"
 
258
  },
259
- "require-dev": {
260
- "phpunit/phpunit": "4.*|5.*",
261
- "vimeo/psalm": "^1"
 
 
262
  },
263
- "suggest": {
264
- "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
 
 
265
  },
266
- "type": "library",
267
  "notification-url": "https://packagist.org/downloads/",
268
  "license": [
269
  "MIT"
270
  ],
271
  "authors": [
272
  {
273
- "name": "Paragon Initiative Enterprises",
274
- "email": "security@paragonie.com",
275
- "homepage": "https://paragonie.com"
276
  }
277
  ],
278
- "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
 
279
  "keywords": [
280
- "csprng",
281
- "polyfill",
282
- "pseudorandom",
283
- "random"
284
  ],
285
- "time": "2018-07-02T15:55:56+00:00"
286
  },
287
  {
288
  "name": "psr/http-message",
@@ -374,322 +406,6 @@
374
  "description": "A polyfill for getallheaders.",
375
  "time": "2019-03-08T08:55:37+00:00"
376
  },
377
- {
378
- "name": "symfony/polyfill-intl-idn",
379
- "version": "v1.18.1",
380
- "source": {
381
- "type": "git",
382
- "url": "https://github.com/symfony/polyfill-intl-idn.git",
383
- "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251"
384
- },
385
- "dist": {
386
- "type": "zip",
387
- "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/5dcab1bc7146cf8c1beaa4502a3d9be344334251",
388
- "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251",
389
- "shasum": ""
390
- },
391
- "require": {
392
- "php": ">=5.3.3",
393
- "symfony/polyfill-intl-normalizer": "^1.10",
394
- "symfony/polyfill-php70": "^1.10",
395
- "symfony/polyfill-php72": "^1.10"
396
- },
397
- "suggest": {
398
- "ext-intl": "For best performance"
399
- },
400
- "type": "library",
401
- "extra": {
402
- "branch-alias": {
403
- "dev-master": "1.18-dev"
404
- },
405
- "thanks": {
406
- "name": "symfony/polyfill",
407
- "url": "https://github.com/symfony/polyfill"
408
- }
409
- },
410
- "autoload": {
411
- "psr-4": {
412
- "Symfony\\Polyfill\\Intl\\Idn\\": ""
413
- },
414
- "files": [
415
- "bootstrap.php"
416
- ]
417
- },
418
- "notification-url": "https://packagist.org/downloads/",
419
- "license": [
420
- "MIT"
421
- ],
422
- "authors": [
423
- {
424
- "name": "Laurent Bassin",
425
- "email": "laurent@bassin.info"
426
- },
427
- {
428
- "name": "Trevor Rowbotham",
429
- "email": "trevor.rowbotham@pm.me"
430
- },
431
- {
432
- "name": "Symfony Community",
433
- "homepage": "https://symfony.com/contributors"
434
- }
435
- ],
436
- "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions",
437
- "homepage": "https://symfony.com",
438
- "keywords": [
439
- "compatibility",
440
- "idn",
441
- "intl",
442
- "polyfill",
443
- "portable",
444
- "shim"
445
- ],
446
- "funding": [
447
- {
448
- "url": "https://symfony.com/sponsor",
449
- "type": "custom"
450
- },
451
- {
452
- "url": "https://github.com/fabpot",
453
- "type": "github"
454
- },
455
- {
456
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
457
- "type": "tidelift"
458
- }
459
- ],
460
- "time": "2020-08-04T06:02:08+00:00"
461
- },
462
- {
463
- "name": "symfony/polyfill-intl-normalizer",
464
- "version": "v1.18.1",
465
- "source": {
466
- "type": "git",
467
- "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
468
- "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e"
469
- },
470
- "dist": {
471
- "type": "zip",
472
- "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e",
473
- "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e",
474
- "shasum": ""
475
- },
476
- "require": {
477
- "php": ">=5.3.3"
478
- },
479
- "suggest": {
480
- "ext-intl": "For best performance"
481
- },
482
- "type": "library",
483
- "extra": {
484
- "branch-alias": {
485
- "dev-master": "1.18-dev"
486
- },
487
- "thanks": {
488
- "name": "symfony/polyfill",
489
- "url": "https://github.com/symfony/polyfill"
490
- }
491
- },
492
- "autoload": {
493
- "psr-4": {
494
- "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
495
- },
496
- "files": [
497
- "bootstrap.php"
498
- ],
499
- "classmap": [
500
- "Resources/stubs"
501
- ]
502
- },
503
- "notification-url": "https://packagist.org/downloads/",
504
- "license": [
505
- "MIT"
506
- ],
507
- "authors": [
508
- {
509
- "name": "Nicolas Grekas",
510
- "email": "p@tchwork.com"
511
- },
512
- {
513
- "name": "Symfony Community",
514
- "homepage": "https://symfony.com/contributors"
515
- }
516
- ],
517
- "description": "Symfony polyfill for intl's Normalizer class and related functions",
518
- "homepage": "https://symfony.com",
519
- "keywords": [
520
- "compatibility",
521
- "intl",
522
- "normalizer",
523
- "polyfill",
524
- "portable",
525
- "shim"
526
- ],
527
- "funding": [
528
- {
529
- "url": "https://symfony.com/sponsor",
530
- "type": "custom"
531
- },
532
- {
533
- "url": "https://github.com/fabpot",
534
- "type": "github"
535
- },
536
- {
537
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
538
- "type": "tidelift"
539
- }
540
- ],
541
- "time": "2020-07-14T12:35:20+00:00"
542
- },
543
- {
544
- "name": "symfony/polyfill-php70",
545
- "version": "v1.18.1",
546
- "source": {
547
- "type": "git",
548
- "url": "https://github.com/symfony/polyfill-php70.git",
549
- "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3"
550
- },
551
- "dist": {
552
- "type": "zip",
553
- "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0dd93f2c578bdc9c72697eaa5f1dd25644e618d3",
554
- "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3",
555
- "shasum": ""
556
- },
557
- "require": {
558
- "paragonie/random_compat": "~1.0|~2.0|~9.99",
559
- "php": ">=5.3.3"
560
- },
561
- "type": "library",
562
- "extra": {
563
- "branch-alias": {
564
- "dev-master": "1.18-dev"
565
- },
566
- "thanks": {
567
- "name": "symfony/polyfill",
568
- "url": "https://github.com/symfony/polyfill"
569
- }
570
- },
571
- "autoload": {
572
- "psr-4": {
573
- "Symfony\\Polyfill\\Php70\\": ""
574
- },
575
- "files": [
576
- "bootstrap.php"
577
- ],
578
- "classmap": [
579
- "Resources/stubs"
580
- ]
581
- },
582
- "notification-url": "https://packagist.org/downloads/",
583
- "license": [
584
- "MIT"
585
- ],
586
- "authors": [
587
- {
588
- "name": "Nicolas Grekas",
589
- "email": "p@tchwork.com"
590
- },
591
- {
592
- "name": "Symfony Community",
593
- "homepage": "https://symfony.com/contributors"
594
- }
595
- ],
596
- "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions",
597
- "homepage": "https://symfony.com",
598
- "keywords": [
599
- "compatibility",
600
- "polyfill",
601
- "portable",
602
- "shim"
603
- ],
604
- "funding": [
605
- {
606
- "url": "https://symfony.com/sponsor",
607
- "type": "custom"
608
- },
609
- {
610
- "url": "https://github.com/fabpot",
611
- "type": "github"
612
- },
613
- {
614
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
615
- "type": "tidelift"
616
- }
617
- ],
618
- "time": "2020-07-14T12:35:20+00:00"
619
- },
620
- {
621
- "name": "symfony/polyfill-php72",
622
- "version": "v1.18.1",
623
- "source": {
624
- "type": "git",
625
- "url": "https://github.com/symfony/polyfill-php72.git",
626
- "reference": "639447d008615574653fb3bc60d1986d7172eaae"
627
- },
628
- "dist": {
629
- "type": "zip",
630
- "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae",
631
- "reference": "639447d008615574653fb3bc60d1986d7172eaae",
632
- "shasum": ""
633
- },
634
- "require": {
635
- "php": ">=5.3.3"
636
- },
637
- "type": "library",
638
- "extra": {
639
- "branch-alias": {
640
- "dev-master": "1.18-dev"
641
- },
642
- "thanks": {
643
- "name": "symfony/polyfill",
644
- "url": "https://github.com/symfony/polyfill"
645
- }
646
- },
647
- "autoload": {
648
- "psr-4": {
649
- "Symfony\\Polyfill\\Php72\\": ""
650
- },
651
- "files": [
652
- "bootstrap.php"
653
- ]
654
- },
655
- "notification-url": "https://packagist.org/downloads/",
656
- "license": [
657
- "MIT"
658
- ],
659
- "authors": [
660
- {
661
- "name": "Nicolas Grekas",
662
- "email": "p@tchwork.com"
663
- },
664
- {
665
- "name": "Symfony Community",
666
- "homepage": "https://symfony.com/contributors"
667
- }
668
- ],
669
- "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
670
- "homepage": "https://symfony.com",
671
- "keywords": [
672
- "compatibility",
673
- "polyfill",
674
- "portable",
675
- "shim"
676
- ],
677
- "funding": [
678
- {
679
- "url": "https://symfony.com/sponsor",
680
- "type": "custom"
681
- },
682
- {
683
- "url": "https://github.com/fabpot",
684
- "type": "github"
685
- },
686
- {
687
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
688
- "type": "tidelift"
689
- }
690
- ],
691
- "time": "2020-07-14T12:35:20+00:00"
692
- },
693
  {
694
  "name": "techcrunch/wp-async-task",
695
  "version": "dev-master",
@@ -830,36 +546,31 @@
830
  },
831
  {
832
  "name": "doctrine/instantiator",
833
- "version": "1.3.1",
834
  "source": {
835
  "type": "git",
836
  "url": "https://github.com/doctrine/instantiator.git",
837
- "reference": "f350df0268e904597e3bd9c4685c53e0e333feea"
838
  },
839
  "dist": {
840
  "type": "zip",
841
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f350df0268e904597e3bd9c4685c53e0e333feea",
842
- "reference": "f350df0268e904597e3bd9c4685c53e0e333feea",
843
  "shasum": ""
844
  },
845
  "require": {
846
  "php": "^7.1 || ^8.0"
847
  },
848
  "require-dev": {
849
- "doctrine/coding-standard": "^6.0",
850
  "ext-pdo": "*",
851
  "ext-phar": "*",
852
- "phpbench/phpbench": "^0.13",
853
- "phpstan/phpstan-phpunit": "^0.11",
854
- "phpstan/phpstan-shim": "^0.11",
855
- "phpunit/phpunit": "^7.0"
856
  },
857
  "type": "library",
858
- "extra": {
859
- "branch-alias": {
860
- "dev-master": "1.2.x-dev"
861
- }
862
- },
863
  "autoload": {
864
  "psr-4": {
865
  "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
@@ -873,7 +584,7 @@
873
  {
874
  "name": "Marco Pivetta",
875
  "email": "ocramius@gmail.com",
876
- "homepage": "http://ocramius.github.com/"
877
  }
878
  ],
879
  "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
@@ -882,7 +593,21 @@
882
  "constructor",
883
  "instantiate"
884
  ],
885
- "time": "2020-05-29T17:27:14+00:00"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
886
  },
887
  {
888
  "name": "hamcrest/hamcrest-php",
@@ -969,16 +694,16 @@
969
  },
970
  {
971
  "name": "mockery/mockery",
972
- "version": "1.3.2",
973
  "source": {
974
  "type": "git",
975
  "url": "https://github.com/mockery/mockery.git",
976
- "reference": "9b6f117dd7d36dc3858d8d8ddf9b3d584fcae283"
977
  },
978
  "dist": {
979
  "type": "zip",
980
- "url": "https://api.github.com/repos/mockery/mockery/zipball/9b6f117dd7d36dc3858d8d8ddf9b3d584fcae283",
981
- "reference": "9b6f117dd7d36dc3858d8d8ddf9b3d584fcae283",
982
  "shasum": ""
983
  },
984
  "require": {
@@ -987,7 +712,7 @@
987
  "php": ">=5.6.0"
988
  },
989
  "require-dev": {
990
- "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0|~9.0"
991
  },
992
  "type": "library",
993
  "extra": {
@@ -1030,20 +755,20 @@
1030
  "test double",
1031
  "testing"
1032
  ],
1033
- "time": "2020-07-09T08:23:05+00:00"
1034
  },
1035
  {
1036
  "name": "myclabs/deep-copy",
1037
- "version": "1.10.1",
1038
  "source": {
1039
  "type": "git",
1040
  "url": "https://github.com/myclabs/DeepCopy.git",
1041
- "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5"
1042
  },
1043
  "dist": {
1044
  "type": "zip",
1045
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5",
1046
- "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5",
1047
  "shasum": ""
1048
  },
1049
  "require": {
@@ -1078,7 +803,13 @@
1078
  "object",
1079
  "object graph"
1080
  ],
1081
- "time": "2020-06-29T13:22:24+00:00"
 
 
 
 
 
 
1082
  },
1083
  {
1084
  "name": "phar-io/manifest",
@@ -1330,16 +1061,16 @@
1330
  },
1331
  {
1332
  "name": "phpdocumentor/reflection-docblock",
1333
- "version": "5.2.0",
1334
  "source": {
1335
  "type": "git",
1336
  "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
1337
- "reference": "3170448f5769fe19f456173d833734e0ff1b84df"
1338
  },
1339
  "dist": {
1340
  "type": "zip",
1341
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/3170448f5769fe19f456173d833734e0ff1b84df",
1342
- "reference": "3170448f5769fe19f456173d833734e0ff1b84df",
1343
  "shasum": ""
1344
  },
1345
  "require": {
@@ -1378,20 +1109,20 @@
1378
  }
1379
  ],
1380
  "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
1381
- "time": "2020-07-20T20:05:34+00:00"
1382
  },
1383
  {
1384
  "name": "phpdocumentor/type-resolver",
1385
- "version": "1.3.0",
1386
  "source": {
1387
  "type": "git",
1388
  "url": "https://github.com/phpDocumentor/TypeResolver.git",
1389
- "reference": "e878a14a65245fbe78f8080eba03b47c3b705651"
1390
  },
1391
  "dist": {
1392
  "type": "zip",
1393
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e878a14a65245fbe78f8080eba03b47c3b705651",
1394
- "reference": "e878a14a65245fbe78f8080eba03b47c3b705651",
1395
  "shasum": ""
1396
  },
1397
  "require": {
@@ -1423,7 +1154,7 @@
1423
  }
1424
  ],
1425
  "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
1426
- "time": "2020-06-27T10:12:23+00:00"
1427
  },
1428
  {
1429
  "name": "phpspec/prophecy",
@@ -1933,23 +1664,23 @@
1933
  },
1934
  {
1935
  "name": "sebastian/code-unit-reverse-lookup",
1936
- "version": "1.0.1",
1937
  "source": {
1938
  "type": "git",
1939
  "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
1940
- "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18"
1941
  },
1942
  "dist": {
1943
  "type": "zip",
1944
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
1945
- "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
1946
  "shasum": ""
1947
  },
1948
  "require": {
1949
- "php": "^5.6 || ^7.0"
1950
  },
1951
  "require-dev": {
1952
- "phpunit/phpunit": "^5.7 || ^6.0"
1953
  },
1954
  "type": "library",
1955
  "extra": {
@@ -1974,7 +1705,13 @@
1974
  ],
1975
  "description": "Looks up which function or method a line of code belongs to",
1976
  "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
1977
- "time": "2017-03-04T06:30:41+00:00"
 
 
 
 
 
 
1978
  },
1979
  {
1980
  "name": "sebastian/comparator",
@@ -2144,20 +1881,20 @@
2144
  },
2145
  {
2146
  "name": "sebastian/exporter",
2147
- "version": "3.1.2",
2148
  "source": {
2149
  "type": "git",
2150
  "url": "https://github.com/sebastianbergmann/exporter.git",
2151
- "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e"
2152
  },
2153
  "dist": {
2154
  "type": "zip",
2155
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e",
2156
- "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e",
2157
  "shasum": ""
2158
  },
2159
  "require": {
2160
- "php": "^7.0",
2161
  "sebastian/recursion-context": "^3.0"
2162
  },
2163
  "require-dev": {
@@ -2207,7 +1944,13 @@
2207
  "export",
2208
  "exporter"
2209
  ],
2210
- "time": "2019-09-14T09:02:43+00:00"
 
 
 
 
 
 
2211
  },
2212
  {
2213
  "name": "sebastian/global-state",
@@ -2262,20 +2005,20 @@
2262
  },
2263
  {
2264
  "name": "sebastian/object-enumerator",
2265
- "version": "3.0.3",
2266
  "source": {
2267
  "type": "git",
2268
  "url": "https://github.com/sebastianbergmann/object-enumerator.git",
2269
- "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5"
2270
  },
2271
  "dist": {
2272
  "type": "zip",
2273
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5",
2274
- "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5",
2275
  "shasum": ""
2276
  },
2277
  "require": {
2278
- "php": "^7.0",
2279
  "sebastian/object-reflector": "^1.1.1",
2280
  "sebastian/recursion-context": "^3.0"
2281
  },
@@ -2305,24 +2048,30 @@
2305
  ],
2306
  "description": "Traverses array structures and object graphs to enumerate all referenced objects",
2307
  "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
2308
- "time": "2017-08-03T12:35:26+00:00"
 
 
 
 
 
 
2309
  },
2310
  {
2311
  "name": "sebastian/object-reflector",
2312
- "version": "1.1.1",
2313
  "source": {
2314
  "type": "git",
2315
  "url": "https://github.com/sebastianbergmann/object-reflector.git",
2316
- "reference": "773f97c67f28de00d397be301821b06708fca0be"
2317
  },
2318
  "dist": {
2319
  "type": "zip",
2320
- "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be",
2321
- "reference": "773f97c67f28de00d397be301821b06708fca0be",
2322
  "shasum": ""
2323
  },
2324
  "require": {
2325
- "php": "^7.0"
2326
  },
2327
  "require-dev": {
2328
  "phpunit/phpunit": "^6.0"
@@ -2350,24 +2099,30 @@
2350
  ],
2351
  "description": "Allows reflection of object attributes, including inherited and non-public ones",
2352
  "homepage": "https://github.com/sebastianbergmann/object-reflector/",
2353
- "time": "2017-03-29T09:07:27+00:00"
 
 
 
 
 
 
2354
  },
2355
  {
2356
  "name": "sebastian/recursion-context",
2357
- "version": "3.0.0",
2358
  "source": {
2359
  "type": "git",
2360
  "url": "https://github.com/sebastianbergmann/recursion-context.git",
2361
- "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8"
2362
  },
2363
  "dist": {
2364
  "type": "zip",
2365
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
2366
- "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
2367
  "shasum": ""
2368
  },
2369
  "require": {
2370
- "php": "^7.0"
2371
  },
2372
  "require-dev": {
2373
  "phpunit/phpunit": "^6.0"
@@ -2388,14 +2143,14 @@
2388
  "BSD-3-Clause"
2389
  ],
2390
  "authors": [
2391
- {
2392
- "name": "Jeff Welch",
2393
- "email": "whatthejeff@gmail.com"
2394
- },
2395
  {
2396
  "name": "Sebastian Bergmann",
2397
  "email": "sebastian@phpunit.de"
2398
  },
 
 
 
 
2399
  {
2400
  "name": "Adam Harvey",
2401
  "email": "aharvey@php.net"
@@ -2403,7 +2158,13 @@
2403
  ],
2404
  "description": "Provides functionality to recursively process PHP variables",
2405
  "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
2406
- "time": "2017-03-03T06:23:57+00:00"
 
 
 
 
 
 
2407
  },
2408
  {
2409
  "name": "sebastian/resource-operations",
@@ -2492,16 +2253,16 @@
2492
  },
2493
  {
2494
  "name": "symfony/console",
2495
- "version": "v4.4.11",
2496
  "source": {
2497
  "type": "git",
2498
  "url": "https://github.com/symfony/console.git",
2499
- "reference": "55d07021da933dd0d633ffdab6f45d5b230c7e02"
2500
  },
2501
  "dist": {
2502
  "type": "zip",
2503
- "url": "https://api.github.com/repos/symfony/console/zipball/55d07021da933dd0d633ffdab6f45d5b230c7e02",
2504
- "reference": "55d07021da933dd0d633ffdab6f45d5b230c7e02",
2505
  "shasum": ""
2506
  },
2507
  "require": {
@@ -2536,11 +2297,6 @@
2536
  "symfony/process": ""
2537
  },
2538
  "type": "library",
2539
- "extra": {
2540
- "branch-alias": {
2541
- "dev-master": "4.4-dev"
2542
- }
2543
- },
2544
  "autoload": {
2545
  "psr-4": {
2546
  "Symfony\\Component\\Console\\": ""
@@ -2563,7 +2319,7 @@
2563
  "homepage": "https://symfony.com/contributors"
2564
  }
2565
  ],
2566
- "description": "Symfony Console Component",
2567
  "homepage": "https://symfony.com",
2568
  "funding": [
2569
  {
@@ -2579,24 +2335,24 @@
2579
  "type": "tidelift"
2580
  }
2581
  ],
2582
- "time": "2020-07-06T13:18:39+00:00"
2583
  },
2584
  {
2585
  "name": "symfony/polyfill-ctype",
2586
- "version": "v1.18.0",
2587
  "source": {
2588
  "type": "git",
2589
  "url": "https://github.com/symfony/polyfill-ctype.git",
2590
- "reference": "1c302646f6efc070cd46856e600e5e0684d6b454"
2591
  },
2592
  "dist": {
2593
  "type": "zip",
2594
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454",
2595
- "reference": "1c302646f6efc070cd46856e600e5e0684d6b454",
2596
  "shasum": ""
2597
  },
2598
  "require": {
2599
- "php": ">=5.3.3"
2600
  },
2601
  "suggest": {
2602
  "ext-ctype": "For best performance"
@@ -2604,7 +2360,7 @@
2604
  "type": "library",
2605
  "extra": {
2606
  "branch-alias": {
2607
- "dev-master": "1.18-dev"
2608
  },
2609
  "thanks": {
2610
  "name": "symfony/polyfill",
@@ -2655,24 +2411,24 @@
2655
  "type": "tidelift"
2656
  }
2657
  ],
2658
- "time": "2020-07-14T12:35:20+00:00"
2659
  },
2660
  {
2661
  "name": "symfony/polyfill-mbstring",
2662
- "version": "v1.18.0",
2663
  "source": {
2664
  "type": "git",
2665
  "url": "https://github.com/symfony/polyfill-mbstring.git",
2666
- "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a"
2667
  },
2668
  "dist": {
2669
  "type": "zip",
2670
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a",
2671
- "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a",
2672
  "shasum": ""
2673
  },
2674
  "require": {
2675
- "php": ">=5.3.3"
2676
  },
2677
  "suggest": {
2678
  "ext-mbstring": "For best performance"
@@ -2680,7 +2436,7 @@
2680
  "type": "library",
2681
  "extra": {
2682
  "branch-alias": {
2683
- "dev-master": "1.18-dev"
2684
  },
2685
  "thanks": {
2686
  "name": "symfony/polyfill",
@@ -2732,29 +2488,29 @@
2732
  "type": "tidelift"
2733
  }
2734
  ],
2735
- "time": "2020-07-14T12:35:20+00:00"
2736
  },
2737
  {
2738
  "name": "symfony/polyfill-php73",
2739
- "version": "v1.18.0",
2740
  "source": {
2741
  "type": "git",
2742
  "url": "https://github.com/symfony/polyfill-php73.git",
2743
- "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca"
2744
  },
2745
  "dist": {
2746
  "type": "zip",
2747
- "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca",
2748
- "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca",
2749
  "shasum": ""
2750
  },
2751
  "require": {
2752
- "php": ">=5.3.3"
2753
  },
2754
  "type": "library",
2755
  "extra": {
2756
  "branch-alias": {
2757
- "dev-master": "1.18-dev"
2758
  },
2759
  "thanks": {
2760
  "name": "symfony/polyfill",
@@ -2808,29 +2564,29 @@
2808
  "type": "tidelift"
2809
  }
2810
  ],
2811
- "time": "2020-07-14T12:35:20+00:00"
2812
  },
2813
  {
2814
  "name": "symfony/polyfill-php80",
2815
- "version": "v1.18.0",
2816
  "source": {
2817
  "type": "git",
2818
  "url": "https://github.com/symfony/polyfill-php80.git",
2819
- "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981"
2820
  },
2821
  "dist": {
2822
  "type": "zip",
2823
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981",
2824
- "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981",
2825
  "shasum": ""
2826
  },
2827
  "require": {
2828
- "php": ">=7.0.8"
2829
  },
2830
  "type": "library",
2831
  "extra": {
2832
  "branch-alias": {
2833
- "dev-master": "1.18-dev"
2834
  },
2835
  "thanks": {
2836
  "name": "symfony/polyfill",
@@ -2888,20 +2644,20 @@
2888
  "type": "tidelift"
2889
  }
2890
  ],
2891
- "time": "2020-07-14T12:35:20+00:00"
2892
  },
2893
  {
2894
  "name": "symfony/service-contracts",
2895
- "version": "v2.1.3",
2896
  "source": {
2897
  "type": "git",
2898
  "url": "https://github.com/symfony/service-contracts.git",
2899
- "reference": "58c7475e5457c5492c26cc740cc0ad7464be9442"
2900
  },
2901
  "dist": {
2902
  "type": "zip",
2903
- "url": "https://api.github.com/repos/symfony/service-contracts/zipball/58c7475e5457c5492c26cc740cc0ad7464be9442",
2904
- "reference": "58c7475e5457c5492c26cc740cc0ad7464be9442",
2905
  "shasum": ""
2906
  },
2907
  "require": {
@@ -2914,7 +2670,7 @@
2914
  "type": "library",
2915
  "extra": {
2916
  "branch-alias": {
2917
- "dev-master": "2.1-dev"
2918
  },
2919
  "thanks": {
2920
  "name": "symfony/contracts",
@@ -2964,20 +2720,20 @@
2964
  "type": "tidelift"
2965
  }
2966
  ],
2967
- "time": "2020-07-06T13:23:11+00:00"
2968
  },
2969
  {
2970
  "name": "symfony/yaml",
2971
- "version": "v4.4.11",
2972
  "source": {
2973
  "type": "git",
2974
  "url": "https://github.com/symfony/yaml.git",
2975
- "reference": "c2d2cc66e892322cfcc03f8f12f8340dbd7a3f8a"
2976
  },
2977
  "dist": {
2978
  "type": "zip",
2979
- "url": "https://api.github.com/repos/symfony/yaml/zipball/c2d2cc66e892322cfcc03f8f12f8340dbd7a3f8a",
2980
- "reference": "c2d2cc66e892322cfcc03f8f12f8340dbd7a3f8a",
2981
  "shasum": ""
2982
  },
2983
  "require": {
@@ -2994,11 +2750,6 @@
2994
  "symfony/console": "For validating YAML files using the lint command"
2995
  },
2996
  "type": "library",
2997
- "extra": {
2998
- "branch-alias": {
2999
- "dev-master": "4.4-dev"
3000
- }
3001
- },
3002
  "autoload": {
3003
  "psr-4": {
3004
  "Symfony\\Component\\Yaml\\": ""
@@ -3021,7 +2772,7 @@
3021
  "homepage": "https://symfony.com/contributors"
3022
  }
3023
  ],
3024
- "description": "Symfony Yaml Component",
3025
  "homepage": "https://symfony.com",
3026
  "funding": [
3027
  {
@@ -3037,7 +2788,7 @@
3037
  "type": "tidelift"
3038
  }
3039
  ],
3040
- "time": "2020-05-20T08:37:50+00:00"
3041
  },
3042
  {
3043
  "name": "theseer/tokenizer",
@@ -3077,6 +2828,12 @@
3077
  }
3078
  ],
3079
  "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
 
 
 
 
 
 
3080
  "time": "2020-07-12T23:59:07+00:00"
3081
  },
3082
  {
@@ -3084,12 +2841,12 @@
3084
  "version": "1.9.1",
3085
  "source": {
3086
  "type": "git",
3087
- "url": "https://github.com/webmozart/assert.git",
3088
  "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389"
3089
  },
3090
  "dist": {
3091
  "type": "zip",
3092
- "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389",
3093
  "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389",
3094
  "shasum": ""
3095
  },
@@ -3139,5 +2896,5 @@
3139
  "prefer-lowest": false,
3140
  "platform": [],
3141
  "platform-dev": [],
3142
- "plugin-api-version": "2.0.0"
3143
  }
4
  "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
  "This file is @generated automatically"
6
  ],
7
+ "content-hash": "22bfe5ecce88b2ab7757f48aea5bc52c",
8
  "packages": [
9
  {
10
  "name": "facebook/php-business-sdk",
11
+ "version": "9.0.3",
12
  "source": {
13
  "type": "git",
14
  "url": "https://github.com/facebook/facebook-php-business-sdk.git",
15
+ "reference": "4d39da6c1e1cdc9916082d97a5191a549e127b0f"
16
  },
17
  "dist": {
18
  "type": "zip",
19
+ "url": "https://api.github.com/repos/facebook/facebook-php-business-sdk/zipball/4d39da6c1e1cdc9916082d97a5191a549e127b0f",
20
+ "reference": "4d39da6c1e1cdc9916082d97a5191a549e127b0f",
21
  "shasum": ""
22
  },
23
  "require": {
45
  "page",
46
  "sdk"
47
  ],
48
+ "time": "2021-01-14T00:20:35+00:00"
 
 
 
49
  },
50
  {
51
  "name": "guzzlehttp/guzzle",
52
+ "version": "7.2.0",
53
  "source": {
54
  "type": "git",
55
  "url": "https://github.com/guzzle/guzzle.git",
56
+ "reference": "0aa74dfb41ae110835923ef10a9d803a22d50e79"
57
  },
58
  "dist": {
59
  "type": "zip",
60
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0aa74dfb41ae110835923ef10a9d803a22d50e79",
61
+ "reference": "0aa74dfb41ae110835923ef10a9d803a22d50e79",
62
  "shasum": ""
63
  },
64
  "require": {
65
  "ext-json": "*",
66
+ "guzzlehttp/promises": "^1.4",
67
+ "guzzlehttp/psr7": "^1.7",
68
+ "php": "^7.2.5 || ^8.0",
69
+ "psr/http-client": "^1.0"
70
+ },
71
+ "provide": {
72
+ "psr/http-client-implementation": "1.0"
73
  },
74
  "require-dev": {
75
  "ext-curl": "*",
76
+ "php-http/client-integration-tests": "^3.0",
77
+ "phpunit/phpunit": "^8.5.5 || ^9.3.5",
78
  "psr/log": "^1.1"
79
  },
80
  "suggest": {
81
+ "ext-curl": "Required for CURL handler support",
82
+ "ext-intl": "Required for Internationalized Domain Name (IDN) support",
83
  "psr/log": "Required for using the Log middleware"
84
  },
85
  "type": "library",
86
  "extra": {
87
  "branch-alias": {
88
+ "dev-master": "7.1-dev"
89
  }
90
  },
91
  "autoload": {
105
  "name": "Michael Dowling",
106
  "email": "mtdowling@gmail.com",
107
  "homepage": "https://github.com/mtdowling"
108
+ },
109
+ {
110
+ "name": "Márk Sági-Kazár",
111
+ "email": "mark.sagikazar@gmail.com",
112
+ "homepage": "https://sagikazarmark.hu"
113
  }
114
  ],
115
  "description": "Guzzle is a PHP HTTP client library",
120
  "framework",
121
  "http",
122
  "http client",
123
+ "psr-18",
124
+ "psr-7",
125
  "rest",
126
  "web service"
127
  ],
128
+ "funding": [
129
+ {
130
+ "url": "https://github.com/GrahamCampbell",
131
+ "type": "github"
132
+ },
133
+ {
134
+ "url": "https://github.com/Nyholm",
135
+ "type": "github"
136
+ },
137
+ {
138
+ "url": "https://github.com/alexeyshockov",
139
+ "type": "github"
140
+ },
141
+ {
142
+ "url": "https://github.com/gmponos",
143
+ "type": "github"
144
+ }
145
+ ],
146
+ "time": "2020-10-10T11:47:56+00:00"
147
  },
148
  {
149
  "name": "guzzlehttp/promises",
150
+ "version": "1.4.0",
151
  "source": {
152
  "type": "git",
153
  "url": "https://github.com/guzzle/promises.git",
154
+ "reference": "60d379c243457e073cff02bc323a2a86cb355631"
155
  },
156
  "dist": {
157
  "type": "zip",
158
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631",
159
+ "reference": "60d379c243457e073cff02bc323a2a86cb355631",
160
  "shasum": ""
161
  },
162
  "require": {
163
+ "php": ">=5.5"
164
  },
165
  "require-dev": {
166
+ "symfony/phpunit-bridge": "^4.4 || ^5.1"
167
  },
168
  "type": "library",
169
  "extra": {
194
  "keywords": [
195
  "promise"
196
  ],
197
+ "time": "2020-09-30T07:37:28+00:00"
198
  },
199
  {
200
  "name": "guzzlehttp/psr7",
201
+ "version": "1.7.0",
202
  "source": {
203
  "type": "git",
204
  "url": "https://github.com/guzzle/psr7.git",
205
+ "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3"
206
  },
207
  "dist": {
208
  "type": "zip",
209
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3",
210
+ "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3",
211
  "shasum": ""
212
  },
213
  "require": {
220
  },
221
  "require-dev": {
222
  "ext-zlib": "*",
223
+ "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10"
224
  },
225
  "suggest": {
226
+ "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
227
  },
228
  "type": "library",
229
  "extra": {
230
  "branch-alias": {
231
+ "dev-master": "1.7-dev"
232
  }
233
  },
234
  "autoload": {
265
  "uri",
266
  "url"
267
  ],
268
+ "time": "2020-09-30T07:37:11+00:00"
269
  },
270
  {
271
+ "name": "psr/http-client",
272
+ "version": "1.0.1",
273
  "source": {
274
  "type": "git",
275
+ "url": "https://github.com/php-fig/http-client.git",
276
+ "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621"
277
  },
278
  "dist": {
279
  "type": "zip",
280
+ "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
281
+ "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
282
  "shasum": ""
283
  },
284
  "require": {
285
+ "php": "^7.0 || ^8.0",
286
+ "psr/http-message": "^1.0"
287
  },
288
+ "type": "library",
289
+ "extra": {
290
+ "branch-alias": {
291
+ "dev-master": "1.0.x-dev"
292
+ }
293
  },
294
+ "autoload": {
295
+ "psr-4": {
296
+ "Psr\\Http\\Client\\": "src/"
297
+ }
298
  },
 
299
  "notification-url": "https://packagist.org/downloads/",
300
  "license": [
301
  "MIT"
302
  ],
303
  "authors": [
304
  {
305
+ "name": "PHP-FIG",
306
+ "homepage": "http://www.php-fig.org/"
 
307
  }
308
  ],
309
+ "description": "Common interface for HTTP clients",
310
+ "homepage": "https://github.com/php-fig/http-client",
311
  "keywords": [
312
+ "http",
313
+ "http-client",
314
+ "psr",
315
+ "psr-18"
316
  ],
317
+ "time": "2020-06-29T06:28:15+00:00"
318
  },
319
  {
320
  "name": "psr/http-message",
406
  "description": "A polyfill for getallheaders.",
407
  "time": "2019-03-08T08:55:37+00:00"
408
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
409
  {
410
  "name": "techcrunch/wp-async-task",
411
  "version": "dev-master",
546
  },
547
  {
548
  "name": "doctrine/instantiator",
549
+ "version": "1.4.0",
550
  "source": {
551
  "type": "git",
552
  "url": "https://github.com/doctrine/instantiator.git",
553
+ "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b"
554
  },
555
  "dist": {
556
  "type": "zip",
557
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b",
558
+ "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b",
559
  "shasum": ""
560
  },
561
  "require": {
562
  "php": "^7.1 || ^8.0"
563
  },
564
  "require-dev": {
565
+ "doctrine/coding-standard": "^8.0",
566
  "ext-pdo": "*",
567
  "ext-phar": "*",
568
+ "phpbench/phpbench": "^0.13 || 1.0.0-alpha2",
569
+ "phpstan/phpstan": "^0.12",
570
+ "phpstan/phpstan-phpunit": "^0.12",
571
+ "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
572
  },
573
  "type": "library",
 
 
 
 
 
574
  "autoload": {
575
  "psr-4": {
576
  "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
584
  {
585
  "name": "Marco Pivetta",
586
  "email": "ocramius@gmail.com",
587
+ "homepage": "https://ocramius.github.io/"
588
  }
589
  ],
590
  "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
593
  "constructor",
594
  "instantiate"
595
  ],
596
+ "funding": [
597
+ {
598
+ "url": "https://www.doctrine-project.org/sponsorship.html",
599
+ "type": "custom"
600
+ },
601
+ {
602
+ "url": "https://www.patreon.com/phpdoctrine",
603
+ "type": "patreon"
604
+ },
605
+ {
606
+ "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
607
+ "type": "tidelift"
608
+ }
609
+ ],
610
+ "time": "2020-11-10T18:47:58+00:00"
611
  },
612
  {
613
  "name": "hamcrest/hamcrest-php",
694
  },
695
  {
696
  "name": "mockery/mockery",
697
+ "version": "1.3.3",
698
  "source": {
699
  "type": "git",
700
  "url": "https://github.com/mockery/mockery.git",
701
+ "reference": "60fa2f67f6e4d3634bb4a45ff3171fa52215800d"
702
  },
703
  "dist": {
704
  "type": "zip",
705
+ "url": "https://api.github.com/repos/mockery/mockery/zipball/60fa2f67f6e4d3634bb4a45ff3171fa52215800d",
706
+ "reference": "60fa2f67f6e4d3634bb4a45ff3171fa52215800d",
707
  "shasum": ""
708
  },
709
  "require": {
712
  "php": ">=5.6.0"
713
  },
714
  "require-dev": {
715
+ "phpunit/phpunit": "^5.7.10|^6.5|^7.5|^8.5|^9.3"
716
  },
717
  "type": "library",
718
  "extra": {
755
  "test double",
756
  "testing"
757
  ],
758
+ "time": "2020-08-11T18:10:21+00:00"
759
  },
760
  {
761
  "name": "myclabs/deep-copy",
762
+ "version": "1.10.2",
763
  "source": {
764
  "type": "git",
765
  "url": "https://github.com/myclabs/DeepCopy.git",
766
+ "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220"
767
  },
768
  "dist": {
769
  "type": "zip",
770
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220",
771
+ "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220",
772
  "shasum": ""
773
  },
774
  "require": {
803
  "object",
804
  "object graph"
805
  ],
806
+ "funding": [
807
+ {
808
+ "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
809
+ "type": "tidelift"
810
+ }
811
+ ],
812
+ "time": "2020-11-13T09:40:50+00:00"
813
  },
814
  {
815
  "name": "phar-io/manifest",
1061
  },
1062
  {
1063
  "name": "phpdocumentor/reflection-docblock",
1064
+ "version": "5.2.2",
1065
  "source": {
1066
  "type": "git",
1067
  "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
1068
+ "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556"
1069
  },
1070
  "dist": {
1071
  "type": "zip",
1072
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556",
1073
+ "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556",
1074
  "shasum": ""
1075
  },
1076
  "require": {
1109
  }
1110
  ],
1111
  "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
1112
+ "time": "2020-09-03T19:13:55+00:00"
1113
  },
1114
  {
1115
  "name": "phpdocumentor/type-resolver",
1116
+ "version": "1.4.0",
1117
  "source": {
1118
  "type": "git",
1119
  "url": "https://github.com/phpDocumentor/TypeResolver.git",
1120
+ "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0"
1121
  },
1122
  "dist": {
1123
  "type": "zip",
1124
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
1125
+ "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
1126
  "shasum": ""
1127
  },
1128
  "require": {
1154
  }
1155
  ],
1156
  "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
1157
+ "time": "2020-09-17T18:55:26+00:00"
1158
  },
1159
  {
1160
  "name": "phpspec/prophecy",
1664
  },
1665
  {
1666
  "name": "sebastian/code-unit-reverse-lookup",
1667
+ "version": "1.0.2",
1668
  "source": {
1669
  "type": "git",
1670
  "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
1671
+ "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619"
1672
  },
1673
  "dist": {
1674
  "type": "zip",
1675
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619",
1676
+ "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619",
1677
  "shasum": ""
1678
  },
1679
  "require": {
1680
+ "php": ">=5.6"
1681
  },
1682
  "require-dev": {
1683
+ "phpunit/phpunit": "^8.5"
1684
  },
1685
  "type": "library",
1686
  "extra": {
1705
  ],
1706
  "description": "Looks up which function or method a line of code belongs to",
1707
  "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
1708
+ "funding": [
1709
+ {
1710
+ "url": "https://github.com/sebastianbergmann",
1711
+ "type": "github"
1712
+ }
1713
+ ],
1714
+ "time": "2020-11-30T08:15:22+00:00"
1715
  },
1716
  {
1717
  "name": "sebastian/comparator",
1881
  },
1882
  {
1883
  "name": "sebastian/exporter",
1884
+ "version": "3.1.3",
1885
  "source": {
1886
  "type": "git",
1887
  "url": "https://github.com/sebastianbergmann/exporter.git",
1888
+ "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e"
1889
  },
1890
  "dist": {
1891
  "type": "zip",
1892
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e",
1893
+ "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e",
1894
  "shasum": ""
1895
  },
1896
  "require": {
1897
+ "php": ">=7.0",
1898
  "sebastian/recursion-context": "^3.0"
1899
  },
1900
  "require-dev": {
1944
  "export",
1945
  "exporter"
1946
  ],
1947
+ "funding": [
1948
+ {
1949
+ "url": "https://github.com/sebastianbergmann",
1950
+ "type": "github"
1951
+ }
1952
+ ],
1953
+ "time": "2020-11-30T07:47:53+00:00"
1954
  },
1955
  {
1956
  "name": "sebastian/global-state",
2005
  },
2006
  {
2007
  "name": "sebastian/object-enumerator",
2008
+ "version": "3.0.4",
2009
  "source": {
2010
  "type": "git",
2011
  "url": "https://github.com/sebastianbergmann/object-enumerator.git",
2012
+ "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2"
2013
  },
2014
  "dist": {
2015
  "type": "zip",
2016
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2",
2017
+ "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2",
2018
  "shasum": ""
2019
  },
2020
  "require": {
2021
+ "php": ">=7.0",
2022
  "sebastian/object-reflector": "^1.1.1",
2023
  "sebastian/recursion-context": "^3.0"
2024
  },
2048
  ],
2049
  "description": "Traverses array structures and object graphs to enumerate all referenced objects",
2050
  "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
2051
+ "funding": [
2052
+ {
2053
+ "url": "https://github.com/sebastianbergmann",
2054
+ "type": "github"
2055
+ }
2056
+ ],
2057
+ "time": "2020-11-30T07:40:27+00:00"
2058
  },
2059
  {
2060
  "name": "sebastian/object-reflector",
2061
+ "version": "1.1.2",
2062
  "source": {
2063
  "type": "git",
2064
  "url": "https://github.com/sebastianbergmann/object-reflector.git",
2065
+ "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d"
2066
  },
2067
  "dist": {
2068
  "type": "zip",
2069
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d",
2070
+ "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d",
2071
  "shasum": ""
2072
  },
2073
  "require": {
2074
+ "php": ">=7.0"
2075
  },
2076
  "require-dev": {
2077
  "phpunit/phpunit": "^6.0"
2099
  ],
2100
  "description": "Allows reflection of object attributes, including inherited and non-public ones",
2101
  "homepage": "https://github.com/sebastianbergmann/object-reflector/",
2102
+ "funding": [
2103
+ {
2104
+ "url": "https://github.com/sebastianbergmann",
2105
+ "type": "github"
2106
+ }
2107
+ ],
2108
+ "time": "2020-11-30T07:37:18+00:00"
2109
  },
2110
  {
2111
  "name": "sebastian/recursion-context",
2112
+ "version": "3.0.1",
2113
  "source": {
2114
  "type": "git",
2115
  "url": "https://github.com/sebastianbergmann/recursion-context.git",
2116
+ "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb"
2117
  },
2118
  "dist": {
2119
  "type": "zip",
2120
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb",
2121
+ "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb",
2122
  "shasum": ""
2123
  },
2124
  "require": {
2125
+ "php": ">=7.0"
2126
  },
2127
  "require-dev": {
2128
  "phpunit/phpunit": "^6.0"
2143
  "BSD-3-Clause"
2144
  ],
2145
  "authors": [
 
 
 
 
2146
  {
2147
  "name": "Sebastian Bergmann",
2148
  "email": "sebastian@phpunit.de"
2149
  },
2150
+ {
2151
+ "name": "Jeff Welch",
2152
+ "email": "whatthejeff@gmail.com"
2153
+ },
2154
  {
2155
  "name": "Adam Harvey",
2156
  "email": "aharvey@php.net"
2158
  ],
2159
  "description": "Provides functionality to recursively process PHP variables",
2160
  "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
2161
+ "funding": [
2162
+ {
2163
+ "url": "https://github.com/sebastianbergmann",
2164
+ "type": "github"
2165
+ }
2166
+ ],
2167
+ "time": "2020-11-30T07:34:24+00:00"
2168
  },
2169
  {
2170
  "name": "sebastian/resource-operations",
2253
  },
2254
  {
2255
  "name": "symfony/console",
2256
+ "version": "v4.4.19",
2257
  "source": {
2258
  "type": "git",
2259
  "url": "https://github.com/symfony/console.git",
2260
+ "reference": "24026c44fc37099fa145707fecd43672831b837a"
2261
  },
2262
  "dist": {
2263
  "type": "zip",
2264
+ "url": "https://api.github.com/repos/symfony/console/zipball/24026c44fc37099fa145707fecd43672831b837a",
2265
+ "reference": "24026c44fc37099fa145707fecd43672831b837a",
2266
  "shasum": ""
2267
  },
2268
  "require": {
2297
  "symfony/process": ""
2298
  },
2299
  "type": "library",
 
 
 
 
 
2300
  "autoload": {
2301
  "psr-4": {
2302
  "Symfony\\Component\\Console\\": ""
2319
  "homepage": "https://symfony.com/contributors"
2320
  }
2321
  ],
2322
+ "description": "Eases the creation of beautiful and testable command line interfaces",
2323
  "homepage": "https://symfony.com",
2324
  "funding": [
2325
  {
2335
  "type": "tidelift"
2336
  }
2337
  ],
2338
+ "time": "2021-01-27T09:09:26+00:00"
2339
  },
2340
  {
2341
  "name": "symfony/polyfill-ctype",
2342
+ "version": "v1.22.0",
2343
  "source": {
2344
  "type": "git",
2345
  "url": "https://github.com/symfony/polyfill-ctype.git",
2346
+ "reference": "c6c942b1ac76c82448322025e084cadc56048b4e"
2347
  },
2348
  "dist": {
2349
  "type": "zip",
2350
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e",
2351
+ "reference": "c6c942b1ac76c82448322025e084cadc56048b4e",
2352
  "shasum": ""
2353
  },
2354
  "require": {
2355
+ "php": ">=7.1"
2356
  },
2357
  "suggest": {
2358
  "ext-ctype": "For best performance"
2360
  "type": "library",
2361
  "extra": {
2362
  "branch-alias": {
2363
+ "dev-main": "1.22-dev"
2364
  },
2365
  "thanks": {
2366
  "name": "symfony/polyfill",
2411
  "type": "tidelift"
2412
  }
2413
  ],
2414
+ "time": "2021-01-07T16:49:33+00:00"
2415
  },
2416
  {
2417
  "name": "symfony/polyfill-mbstring",
2418
+ "version": "v1.22.0",
2419
  "source": {
2420
  "type": "git",
2421
  "url": "https://github.com/symfony/polyfill-mbstring.git",
2422
+ "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13"
2423
  },
2424
  "dist": {
2425
  "type": "zip",
2426
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f377a3dd1fde44d37b9831d68dc8dea3ffd28e13",
2427
+ "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13",
2428
  "shasum": ""
2429
  },
2430
  "require": {
2431
+ "php": ">=7.1"
2432
  },
2433
  "suggest": {
2434
  "ext-mbstring": "For best performance"
2436
  "type": "library",
2437
  "extra": {
2438
  "branch-alias": {
2439
+ "dev-main": "1.22-dev"
2440
  },
2441
  "thanks": {
2442
  "name": "symfony/polyfill",
2488
  "type": "tidelift"
2489
  }
2490
  ],
2491
+ "time": "2021-01-07T16:49:33+00:00"
2492
  },
2493
  {
2494
  "name": "symfony/polyfill-php73",
2495
+ "version": "v1.22.0",
2496
  "source": {
2497
  "type": "git",
2498
  "url": "https://github.com/symfony/polyfill-php73.git",
2499
+ "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2"
2500
  },
2501
  "dist": {
2502
  "type": "zip",
2503
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2",
2504
+ "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2",
2505
  "shasum": ""
2506
  },
2507
  "require": {
2508
+ "php": ">=7.1"
2509
  },
2510
  "type": "library",
2511
  "extra": {
2512
  "branch-alias": {
2513
+ "dev-main": "1.22-dev"
2514
  },
2515
  "thanks": {
2516
  "name": "symfony/polyfill",
2564
  "type": "tidelift"
2565
  }
2566
  ],
2567
+ "time": "2021-01-07T16:49:33+00:00"
2568
  },
2569
  {
2570
  "name": "symfony/polyfill-php80",
2571
+ "version": "v1.22.0",
2572
  "source": {
2573
  "type": "git",
2574
  "url": "https://github.com/symfony/polyfill-php80.git",
2575
+ "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91"
2576
  },
2577
  "dist": {
2578
  "type": "zip",
2579
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91",
2580
+ "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91",
2581
  "shasum": ""
2582
  },
2583
  "require": {
2584
+ "php": ">=7.1"
2585
  },
2586
  "type": "library",
2587
  "extra": {
2588
  "branch-alias": {
2589
+ "dev-main": "1.22-dev"
2590
  },
2591
  "thanks": {
2592
  "name": "symfony/polyfill",
2644
  "type": "tidelift"
2645
  }
2646
  ],
2647
+ "time": "2021-01-07T16:49:33+00:00"
2648
  },
2649
  {
2650
  "name": "symfony/service-contracts",
2651
+ "version": "v2.2.0",
2652
  "source": {
2653
  "type": "git",
2654
  "url": "https://github.com/symfony/service-contracts.git",
2655
+ "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1"
2656
  },
2657
  "dist": {
2658
  "type": "zip",
2659
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d15da7ba4957ffb8f1747218be9e1a121fd298a1",
2660
+ "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1",
2661
  "shasum": ""
2662
  },
2663
  "require": {
2670
  "type": "library",
2671
  "extra": {
2672
  "branch-alias": {
2673
+ "dev-master": "2.2-dev"
2674
  },
2675
  "thanks": {
2676
  "name": "symfony/contracts",
2720
  "type": "tidelift"
2721
  }
2722
  ],
2723
+ "time": "2020-09-07T11:33:47+00:00"
2724
  },
2725
  {
2726
  "name": "symfony/yaml",
2727
+ "version": "v4.4.19",
2728
  "source": {
2729
  "type": "git",
2730
  "url": "https://github.com/symfony/yaml.git",
2731
+ "reference": "17ed9f14c1aa05b1a5cf2e2c5ef2d0be28058ef9"
2732
  },
2733
  "dist": {
2734
  "type": "zip",
2735
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/17ed9f14c1aa05b1a5cf2e2c5ef2d0be28058ef9",
2736
+ "reference": "17ed9f14c1aa05b1a5cf2e2c5ef2d0be28058ef9",
2737
  "shasum": ""
2738
  },
2739
  "require": {
2750
  "symfony/console": "For validating YAML files using the lint command"
2751
  },
2752
  "type": "library",
 
 
 
 
 
2753
  "autoload": {
2754
  "psr-4": {
2755
  "Symfony\\Component\\Yaml\\": ""
2772
  "homepage": "https://symfony.com/contributors"
2773
  }
2774
  ],
2775
+ "description": "Loads and dumps YAML files",
2776
  "homepage": "https://symfony.com",
2777
  "funding": [
2778
  {
2788
  "type": "tidelift"
2789
  }
2790
  ],
2791
+ "time": "2021-01-27T09:09:26+00:00"
2792
  },
2793
  {
2794
  "name": "theseer/tokenizer",
2828
  }
2829
  ],
2830
  "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
2831
+ "funding": [
2832
+ {
2833
+ "url": "https://github.com/theseer",
2834
+ "type": "github"
2835
+ }
2836
+ ],
2837
  "time": "2020-07-12T23:59:07+00:00"
2838
  },
2839
  {
2841
  "version": "1.9.1",
2842
  "source": {
2843
  "type": "git",
2844
+ "url": "https://github.com/webmozarts/assert.git",
2845
  "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389"
2846
  },
2847
  "dist": {
2848
  "type": "zip",
2849
+ "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389",
2850
  "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389",
2851
  "shasum": ""
2852
  },
2896
  "prefer-lowest": false,
2897
  "platform": [],
2898
  "platform-dev": [],
2899
+ "plugin-api-version": "1.1.0"
2900
  }
core/FacebookPluginConfig.php CHANGED
@@ -20,10 +20,11 @@ namespace FacebookPixelPlugin\Core;
20
  defined('ABSPATH') or die('Direct access not allowed');
21
 
22
  class FacebookPluginConfig {
23
- const PLUGIN_VERSION = '3.0.0';
24
  const SOURCE = 'wordpress';
25
  const TEXT_DOMAIN = 'official-facebook-pixel';
26
  const PLUGIN_NAME = 'Facebook for WordPress';
 
27
 
28
  const ADMIN_CAPABILITY = 'manage_options';
29
  const ADMIN_DISMISS_PIXEL_ID_NOTICE = 'dismiss_pixel_id_notice';
@@ -34,6 +35,10 @@ class FacebookPluginConfig {
34
  'dismiss_fbe_not_installed_notice';
35
  const ADMIN_IGNORE_FBE_NOT_INSTALLED_NOTICE =
36
  'ignore_fbe_not_installed_notice';
 
 
 
 
37
  const ADMIN_MENU_SLUG = 'facebook_pixel_options';
38
  const ADMIN_MENU_TITLE = 'Facebook Pixel';
39
  const ADMIN_OPTION_GROUP = 'facebook_option_group';
20
  defined('ABSPATH') or die('Direct access not allowed');
21
 
22
  class FacebookPluginConfig {
23
+ const PLUGIN_VERSION = '3.0.1';
24
  const SOURCE = 'wordpress';
25
  const TEXT_DOMAIN = 'official-facebook-pixel';
26
  const PLUGIN_NAME = 'Facebook for WordPress';
27
+ const PLUGIN_REVIEW_PAGE = 'https://wordpress.org/plugins/official-facebook-pixel/#reviews';
28
 
29
  const ADMIN_CAPABILITY = 'manage_options';
30
  const ADMIN_DISMISS_PIXEL_ID_NOTICE = 'dismiss_pixel_id_notice';
35
  'dismiss_fbe_not_installed_notice';
36
  const ADMIN_IGNORE_FBE_NOT_INSTALLED_NOTICE =
37
  'ignore_fbe_not_installed_notice';
38
+ const ADMIN_DISMISS_PLUGIN_REVIEW_NOTICE =
39
+ 'dismiss_plugin_review_notice';
40
+ const ADMIN_IGNORE_PLUGIN_REVIEW_NOTICE =
41
+ 'ignore_plugin_review_notice';
42
  const ADMIN_MENU_SLUG = 'facebook_pixel_options';
43
  const ADMIN_MENU_TITLE = 'Facebook Pixel';
44
  const ADMIN_OPTION_GROUP = 'facebook_option_group';
core/FacebookWordpressSettingsPage.php CHANGED
@@ -147,6 +147,12 @@ class FacebookWordpressSettingsPage {
147
  true)){
148
  add_action('admin_notices', array($this, 'fbeNotInstalledNotice'));
149
  }
 
 
 
 
 
 
150
  }
151
  }
152
 
@@ -173,7 +179,7 @@ class FacebookWordpressSettingsPage {
173
  '<a href="%s">follow the setup steps.</a>';
174
  }
175
 
176
- public function setNotice($notice, $dismiss_config) {
177
  $url = admin_url('options-general.php?page=' .
178
  FacebookPluginConfig::ADMIN_MENU_SLUG);
179
 
@@ -182,7 +188,7 @@ class FacebookWordpressSettingsPage {
182
  esc_url($url));
183
  printf(
184
  '
185
- <div class="notice notice-warning is-dismissible hide-last-button">
186
  <p>%s</p>
187
  <button
188
  type="button"
@@ -192,6 +198,7 @@ class FacebookWordpressSettingsPage {
192
  </button>
193
  </div>
194
  ',
 
195
  $link,
196
  esc_url(add_query_arg($dismiss_config, '')),
197
  esc_html__(
@@ -199,13 +206,30 @@ class FacebookWordpressSettingsPage {
199
  FacebookPluginConfig::TEXT_DOMAIN));
200
  }
201
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  public function fbeNotInstalledNotice() {
203
  $message = $this->getCustomizedFbeNotInstalledNotice();
204
  $this->setNotice(
205
  __(
206
  $message,
207
  FacebookPluginConfig::TEXT_DOMAIN),
208
- FacebookPluginConfig::ADMIN_DISMISS_FBE_NOT_INSTALLED_NOTICE);
 
 
209
  }
210
 
211
  public function dismissNotices() {
@@ -217,6 +241,12 @@ class FacebookWordpressSettingsPage {
217
  FacebookPluginConfig::ADMIN_IGNORE_FBE_NOT_INSTALLED_NOTICE,
218
  true);
219
  }
220
-
 
 
 
 
 
 
221
  }
222
  }
147
  true)){
148
  add_action('admin_notices', array($this, 'fbeNotInstalledNotice'));
149
  }
150
+ if( $is_fbe_installed == '1' && !get_user_meta(
151
+ get_current_user_id(),
152
+ FacebookPluginConfig::ADMIN_IGNORE_PLUGIN_REVIEW_NOTICE,
153
+ true)){
154
+ add_action('admin_notices', array($this, 'pluginReviewNotice'));
155
+ }
156
  }
157
  }
158
 
179
  '<a href="%s">follow the setup steps.</a>';
180
  }
181
 
182
+ public function setNotice($notice, $dismiss_config, $notice_type) {
183
  $url = admin_url('options-general.php?page=' .
184
  FacebookPluginConfig::ADMIN_MENU_SLUG);
185
 
188
  esc_url($url));
189
  printf(
190
  '
191
+ <div class="notice notice-%s is-dismissible">
192
  <p>%s</p>
193
  <button
194
  type="button"
198
  </button>
199
  </div>
200
  ',
201
+ $notice_type,
202
  $link,
203
  esc_url(add_query_arg($dismiss_config, '')),
204
  esc_html__(
206
  FacebookPluginConfig::TEXT_DOMAIN));
207
  }
208
 
209
+ public function pluginReviewNotice(){
210
+ $message = sprintf('Let us know what you think about <strong>%s</strong>. '.
211
+ 'Leave a review on <a href="%s" target="_blank">this page</a>.',
212
+ FacebookPluginConfig::PLUGIN_NAME,
213
+ FacebookPluginConfig::PLUGIN_REVIEW_PAGE
214
+ );
215
+ $this->setNotice(
216
+ __(
217
+ $message,
218
+ FacebookPluginConfig::TEXT_DOMAIN),
219
+ FacebookPluginConfig::ADMIN_DISMISS_PLUGIN_REVIEW_NOTICE,
220
+ 'info'
221
+ );
222
+ }
223
+
224
  public function fbeNotInstalledNotice() {
225
  $message = $this->getCustomizedFbeNotInstalledNotice();
226
  $this->setNotice(
227
  __(
228
  $message,
229
  FacebookPluginConfig::TEXT_DOMAIN),
230
+ FacebookPluginConfig::ADMIN_DISMISS_FBE_NOT_INSTALLED_NOTICE,
231
+ 'warning'
232
+ );
233
  }
234
 
235
  public function dismissNotices() {
241
  FacebookPluginConfig::ADMIN_IGNORE_FBE_NOT_INSTALLED_NOTICE,
242
  true);
243
  }
244
+ if (isset(
245
+ $_GET[FacebookPluginConfig::ADMIN_DISMISS_PLUGIN_REVIEW_NOTICE]
246
+ )){
247
+ update_user_meta($user_id,
248
+ FacebookPluginConfig::ADMIN_IGNORE_PLUGIN_REVIEW_NOTICE,
249
+ true);
250
+ }
251
  }
252
  }
core/ServerEventFactory.php CHANGED
@@ -46,6 +46,7 @@ class ServerEventFactory {
46
  ->setEventId(EventIdGenerator::guidv4())
47
  ->setEventSourceUrl(
48
  self::getRequestUri($prefer_referrer_for_event_src))
 
49
  ->setUserData($user_data)
50
  ->setCustomData(new CustomData());
51
 
46
  ->setEventId(EventIdGenerator::guidv4())
47
  ->setEventSourceUrl(
48
  self::getRequestUri($prefer_referrer_for_event_src))
49
+ ->setActionSource('website')
50
  ->setUserData($user_data)
51
  ->setCustomData(new CustomData());
52
 
facebook-for-wordpress.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: <strong><em>***ATTENTION: After upgrade the plugin may be deactivated due to a known issue, to workaround please refresh this page and activate plugin.***</em></strong> The Facebook pixel is an analytics tool that helps you measure the effectiveness of your advertising. You can use the Facebook pixel to understand the actions people are taking on your website and reach audiences you care about.
6
  * Author: Facebook
7
  * Author URI: https://www.facebook.com/
8
- * Version: 3.0.0
9
  * Text Domain: official-facebook-pixel
10
  */
11
 
5
  * Description: <strong><em>***ATTENTION: After upgrade the plugin may be deactivated due to a known issue, to workaround please refresh this page and activate plugin.***</em></strong> The Facebook pixel is an analytics tool that helps you measure the effectiveness of your advertising. You can use the Facebook pixel to understand the actions people are taking on your website and reach audiences you care about.
6
  * Author: Facebook
7
  * Author URI: https://www.facebook.com/
8
+ * Version: 3.0.1
9
  * Text Domain: official-facebook-pixel
10
  */
11
 
languages/official-facebook-pixel-ar_AR.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-cs_CZ.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-da_DK.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-de_DE.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-en_GB.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-es_ES.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-es_LA.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-fi_FI.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-fr_CA.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-fr_FR.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-he_IL.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-it_IT.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-ja_JP.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-ko_KR.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-nb_NO.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-nl_NL.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-pl_PL.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-pt_BR.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-pt_PT.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-ru_RU.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-sv_SE.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-th_TH.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-pixel\n"
7
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
8
  "PO-Revision-Date: 2018-11-28 17:37-0800\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-pixel\n"
7
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
8
  "PO-Revision-Date: 2018-11-28 17:37-0800\n"
languages/official-facebook-pixel-tr_TR.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-vi_VN.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-zh_CN.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
languages/official-facebook-pixel-zh_TW.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WordPress 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
2
  # This file is distributed under the same license as the Facebook Pixel package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WordPress 3.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/official-facebook-"
7
  "pixel\n"
8
  "POT-Creation-Date: 2018-11-29 01:26:28+00:00\n"
readme.txt CHANGED
@@ -1,19 +1,19 @@
1
  === Facebook for WordPress ===
2
  Contributors: facebook
3
- Tags: Facebook, Facebook Conversion Pixel, Facebook Pixel, Facebook Pixel Events, facebook retargeting, facebook standard events
4
  Requires at least: 4.4
5
- Tested up to: 7.4
6
  Requires PHP: 5.6
7
- Stable tag: 2.2.2
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  Grow your business with Facebook for WordPress!
12
 
13
  == Description ==
14
- This plugin will install a Facebook Pixel for your page so you can capture the actions people take when they interact with your page, such as Lead, ViewContent, AddToCart, InitiateCheckout and Purchase events. Version 2.0.0 also includes support for the Conversions API, which lets you send events directly from your page's server so you can capture a more of these events when they happen. This can help you better understand your customer's journey from the moment they show interest in your business to the moment they complete a conversion. You can use this information to create ad campaigns that are relevant to your audience. [Learn More](https://www.facebook.com/business/learn/facebook-ads-pixel)
15
 
16
- This plugin also includes built-in support for these other WordPress plugins:
17
  * Caldera Forms
18
  * Contact Form 7
19
  * Easy Digital Downloads
@@ -44,6 +44,9 @@ After plugin installed: <br />
44
  = Where can I find more information on Facebook Pixel? =
45
  You can find more information on the [Facebook Pixel](https://www.facebook.com/business/learn/facebook-ads-pixel).
46
 
 
 
 
47
  = Where can I find more information on Facebook for WordPress plugin? =
48
  You can refer to [this page](https://www.facebook.com/business/help/881403525362441?helpref=faq_content)
49
 
@@ -54,6 +57,12 @@ If you get stuck, or have any questions, you can ask for help in the [Facebook f
54
  Of course! This plugin is open sourced on the Facebook Incubator GitHub. You can find the code and contribution instructions in the [plugin repository](https://github.com/facebookincubator/Facebook-Pixel-for-WordPress).
55
 
56
  == Changelog ==
 
 
 
 
 
 
57
  = 2021-01-06 version 3.0.0 =
58
  * Adding Facebook Business Extension based configuration
59
  * Renaming to Facebook for WordPress
1
  === Facebook for WordPress ===
2
  Contributors: facebook
3
+ Tags: Facebook, Facebook Conversion Pixel, Facebook Pixel, Facebook Pixel Events, Conversions API, facebook retargeting, facebook standard events
4
  Requires at least: 4.4
5
+ Tested up to: 5.6
6
  Requires PHP: 5.6
7
+ Stable tag: 3.0.0
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  Grow your business with Facebook for WordPress!
12
 
13
  == Description ==
14
+ This plugin will install a Facebook Pixel for your page so you can capture the actions people take when they interact with your page, such as Lead, ViewContent, AddToCart, InitiateCheckout and Purchase events. It also includes support for the Conversions API, which lets you send events directly from your page's server so you can capture a more of these events when they happen. This can help you better understand your customer's journey from the moment they show interest in your business to the moment they complete a conversion. You can use this information to create ad campaigns that are relevant to your audience. [Learn More](https://www.facebook.com/business/learn/facebook-ads-pixel)
15
 
16
+ This plugin includes built-in support for these other WordPress plugins:
17
  * Caldera Forms
18
  * Contact Form 7
19
  * Easy Digital Downloads
44
  = Where can I find more information on Facebook Pixel? =
45
  You can find more information on the [Facebook Pixel](https://www.facebook.com/business/learn/facebook-ads-pixel).
46
 
47
+ = Where can I find more information on Conversions API? =
48
+ You can find more information on the [Conversions API](https://www.facebook.com/business/help/2041148702652965).
49
+
50
  = Where can I find more information on Facebook for WordPress plugin? =
51
  You can refer to [this page](https://www.facebook.com/business/help/881403525362441?helpref=faq_content)
52
 
57
  Of course! This plugin is open sourced on the Facebook Incubator GitHub. You can find the code and contribution instructions in the [plugin repository](https://github.com/facebookincubator/Facebook-Pixel-for-WordPress).
58
 
59
  == Changelog ==
60
+ = 2021-01-28 version 3.0.1 =
61
+ * Support for WordPress 5.6
62
+ * Adding banner for plugin review
63
+ * Adding action_source parameter to Conversions API events
64
+ * Update Business SDK to v9.0.3
65
+
66
  = 2021-01-06 version 3.0.0 =
67
  * Adding Facebook Business Extension based configuration
68
  * Renaming to Facebook for WordPress
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitf8f919e692beb380a8018b435b9f844c::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit251289fac33e7f76f7bddc11271dd50f::getLoader();
vendor/composer/autoload_classmap.php CHANGED
@@ -6,13 +6,5 @@ $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
- 'ArithmeticError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
10
- 'AssertionError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',
11
- 'DivisionByZeroError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php',
12
- 'Error' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/Error.php',
13
- 'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
14
- 'ParseError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/ParseError.php',
15
- 'SessionUpdateTimestampHandlerInterface' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/SessionUpdateTimestampHandlerInterface.php',
16
- 'TypeError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/TypeError.php',
17
  'WP_Async_Task' => $vendorDir . '/techcrunch/wp-async-task/wp-async-task.php',
18
  );
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
 
 
 
 
 
 
 
 
9
  'WP_Async_Task' => $vendorDir . '/techcrunch/wp-async-task/wp-async-task.php',
10
  );
vendor/composer/autoload_files.php CHANGED
@@ -6,11 +6,7 @@ $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
- '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
10
- '023d27dca8066ef29e6739335ea73bad' => $vendorDir . '/symfony/polyfill-php70/bootstrap.php',
11
- 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
12
  '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
13
- 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
14
  'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
15
  'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
16
  '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
 
 
 
9
  '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
 
10
  'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
11
  'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
12
  '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
vendor/composer/autoload_psr4.php CHANGED
@@ -6,11 +6,8 @@ $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
- 'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'),
10
- 'Symfony\\Polyfill\\Php70\\' => array($vendorDir . '/symfony/polyfill-php70'),
11
- 'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'),
12
- 'Symfony\\Polyfill\\Intl\\Idn\\' => array($vendorDir . '/symfony/polyfill-intl-idn'),
13
  'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
 
14
  'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
15
  'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
16
  'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
 
 
 
 
9
  'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
10
+ 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'),
11
  'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
12
  'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
13
  'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitf8f919e692beb380a8018b435b9f844c
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInitf8f919e692beb380a8018b435b9f844c
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInitf8f919e692beb380a8018b435b9f844c', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInitf8f919e692beb380a8018b435b9f844c', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInitf8f919e692beb380a8018b435b9f844c::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
@@ -51,19 +51,19 @@ class ComposerAutoloaderInitf8f919e692beb380a8018b435b9f844c
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
- $includeFiles = Composer\Autoload\ComposerStaticInitf8f919e692beb380a8018b435b9f844c::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
- composerRequiref8f919e692beb380a8018b435b9f844c($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
- function composerRequiref8f919e692beb380a8018b435b9f844c($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit251289fac33e7f76f7bddc11271dd50f
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInit251289fac33e7f76f7bddc11271dd50f', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit251289fac33e7f76f7bddc11271dd50f', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInit251289fac33e7f76f7bddc11271dd50f::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
+ $includeFiles = Composer\Autoload\ComposerStaticInit251289fac33e7f76f7bddc11271dd50f::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
+ composerRequire251289fac33e7f76f7bddc11271dd50f($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
+ function composerRequire251289fac33e7f76f7bddc11271dd50f($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,30 +4,20 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitf8f919e692beb380a8018b435b9f844c
8
  {
9
  public static $files = array (
10
- '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
11
- '023d27dca8066ef29e6739335ea73bad' => __DIR__ . '/..' . '/symfony/polyfill-php70/bootstrap.php',
12
- 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
13
  '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
14
- 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
15
  'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
16
  'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
17
  '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
18
  );
19
 
20
  public static $prefixLengthsPsr4 = array (
21
- 'S' =>
22
- array (
23
- 'Symfony\\Polyfill\\Php72\\' => 23,
24
- 'Symfony\\Polyfill\\Php70\\' => 23,
25
- 'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33,
26
- 'Symfony\\Polyfill\\Intl\\Idn\\' => 26,
27
- ),
28
  'P' =>
29
  array (
30
  'Psr\\Http\\Message\\' => 17,
 
31
  ),
32
  'G' =>
33
  array (
@@ -45,26 +35,14 @@ class ComposerStaticInitf8f919e692beb380a8018b435b9f844c
45
  );
46
 
47
  public static $prefixDirsPsr4 = array (
48
- 'Symfony\\Polyfill\\Php72\\' =>
49
- array (
50
- 0 => __DIR__ . '/..' . '/symfony/polyfill-php72',
51
- ),
52
- 'Symfony\\Polyfill\\Php70\\' =>
53
- array (
54
- 0 => __DIR__ . '/..' . '/symfony/polyfill-php70',
55
- ),
56
- 'Symfony\\Polyfill\\Intl\\Normalizer\\' =>
57
- array (
58
- 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer',
59
- ),
60
- 'Symfony\\Polyfill\\Intl\\Idn\\' =>
61
- array (
62
- 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-idn',
63
- ),
64
  'Psr\\Http\\Message\\' =>
65
  array (
66
  0 => __DIR__ . '/..' . '/psr/http-message/src',
67
  ),
 
 
 
 
68
  'GuzzleHttp\\Psr7\\' =>
69
  array (
70
  0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
@@ -96,23 +74,15 @@ class ComposerStaticInitf8f919e692beb380a8018b435b9f844c
96
  );
97
 
98
  public static $classMap = array (
99
- 'ArithmeticError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
100
- 'AssertionError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',
101
- 'DivisionByZeroError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php',
102
- 'Error' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/Error.php',
103
- 'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
104
- 'ParseError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/ParseError.php',
105
- 'SessionUpdateTimestampHandlerInterface' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/SessionUpdateTimestampHandlerInterface.php',
106
- 'TypeError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/TypeError.php',
107
  'WP_Async_Task' => __DIR__ . '/..' . '/techcrunch/wp-async-task/wp-async-task.php',
108
  );
109
 
110
  public static function getInitializer(ClassLoader $loader)
111
  {
112
  return \Closure::bind(function () use ($loader) {
113
- $loader->prefixLengthsPsr4 = ComposerStaticInitf8f919e692beb380a8018b435b9f844c::$prefixLengthsPsr4;
114
- $loader->prefixDirsPsr4 = ComposerStaticInitf8f919e692beb380a8018b435b9f844c::$prefixDirsPsr4;
115
- $loader->classMap = ComposerStaticInitf8f919e692beb380a8018b435b9f844c::$classMap;
116
 
117
  }, null, ClassLoader::class);
118
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit251289fac33e7f76f7bddc11271dd50f
8
  {
9
  public static $files = array (
 
 
 
10
  '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
 
11
  'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
12
  'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
13
  '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
14
  );
15
 
16
  public static $prefixLengthsPsr4 = array (
 
 
 
 
 
 
 
17
  'P' =>
18
  array (
19
  'Psr\\Http\\Message\\' => 17,
20
+ 'Psr\\Http\\Client\\' => 16,
21
  ),
22
  'G' =>
23
  array (
35
  );
36
 
37
  public static $prefixDirsPsr4 = array (
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  'Psr\\Http\\Message\\' =>
39
  array (
40
  0 => __DIR__ . '/..' . '/psr/http-message/src',
41
  ),
42
+ 'Psr\\Http\\Client\\' =>
43
+ array (
44
+ 0 => __DIR__ . '/..' . '/psr/http-client/src',
45
+ ),
46
  'GuzzleHttp\\Psr7\\' =>
47
  array (
48
  0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
74
  );
75
 
76
  public static $classMap = array (
 
 
 
 
 
 
 
 
77
  'WP_Async_Task' => __DIR__ . '/..' . '/techcrunch/wp-async-task/wp-async-task.php',
78
  );
79
 
80
  public static function getInitializer(ClassLoader $loader)
81
  {
82
  return \Closure::bind(function () use ($loader) {
83
+ $loader->prefixLengthsPsr4 = ComposerStaticInit251289fac33e7f76f7bddc11271dd50f::$prefixLengthsPsr4;
84
+ $loader->prefixDirsPsr4 = ComposerStaticInit251289fac33e7f76f7bddc11271dd50f::$prefixDirsPsr4;
85
+ $loader->classMap = ComposerStaticInit251289fac33e7f76f7bddc11271dd50f::$classMap;
86
 
87
  }, null, ClassLoader::class);
88
  }
vendor/composer/installed.json CHANGED
@@ -1,17 +1,17 @@
1
  [
2
  {
3
  "name": "facebook/php-business-sdk",
4
- "version": "9.0.1",
5
- "version_normalized": "9.0.1.0",
6
  "source": {
7
  "type": "git",
8
  "url": "https://github.com/facebook/facebook-php-business-sdk.git",
9
- "reference": "7edcdcfcd551196c90246875f875dbb48d35cd98"
10
  },
11
  "dist": {
12
  "type": "zip",
13
- "url": "https://api.github.com/repos/facebook/facebook-php-business-sdk/zipball/7edcdcfcd551196c90246875f875dbb48d35cd98",
14
- "reference": "7edcdcfcd551196c90246875f875dbb48d35cd98",
15
  "shasum": ""
16
  },
17
  "require": {
@@ -22,7 +22,7 @@
22
  "phpunit/phpunit": "~8",
23
  "symfony/finder": "~2.6"
24
  },
25
- "time": "2020-11-17T23:35:14+00:00",
26
  "type": "library",
27
  "installation-source": "dist",
28
  "autoload": {
@@ -40,46 +40,49 @@
40
  "instagram",
41
  "page",
42
  "sdk"
43
- ],
44
- "support": {
45
- "source": "https://github.com/facebook/facebook-php-business-sdk/tree/9.0.1"
46
- }
47
  },
48
  {
49
  "name": "guzzlehttp/guzzle",
50
- "version": "6.5.5",
51
- "version_normalized": "6.5.5.0",
52
  "source": {
53
  "type": "git",
54
  "url": "https://github.com/guzzle/guzzle.git",
55
- "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e"
56
  },
57
  "dist": {
58
  "type": "zip",
59
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
60
- "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
61
  "shasum": ""
62
  },
63
  "require": {
64
  "ext-json": "*",
65
- "guzzlehttp/promises": "^1.0",
66
- "guzzlehttp/psr7": "^1.6.1",
67
- "php": ">=5.5",
68
- "symfony/polyfill-intl-idn": "^1.17.0"
 
 
 
69
  },
70
  "require-dev": {
71
  "ext-curl": "*",
72
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
 
73
  "psr/log": "^1.1"
74
  },
75
  "suggest": {
 
 
76
  "psr/log": "Required for using the Log middleware"
77
  },
78
- "time": "2020-06-16T21:01:06+00:00",
79
  "type": "library",
80
  "extra": {
81
  "branch-alias": {
82
- "dev-master": "6.5-dev"
83
  }
84
  },
85
  "installation-source": "dist",
@@ -100,6 +103,11 @@
100
  "name": "Michael Dowling",
101
  "email": "mtdowling@gmail.com",
102
  "homepage": "https://github.com/mtdowling"
 
 
 
 
 
103
  }
104
  ],
105
  "description": "Guzzle is a PHP HTTP client library",
@@ -110,32 +118,52 @@
110
  "framework",
111
  "http",
112
  "http client",
 
 
113
  "rest",
114
  "web service"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  ]
116
  },
117
  {
118
  "name": "guzzlehttp/promises",
119
- "version": "v1.3.1",
120
- "version_normalized": "1.3.1.0",
121
  "source": {
122
  "type": "git",
123
  "url": "https://github.com/guzzle/promises.git",
124
- "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
125
  },
126
  "dist": {
127
  "type": "zip",
128
- "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
129
- "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
130
  "shasum": ""
131
  },
132
  "require": {
133
- "php": ">=5.5.0"
134
  },
135
  "require-dev": {
136
- "phpunit/phpunit": "^4.0"
137
  },
138
- "time": "2016-12-20T10:07:11+00:00",
139
  "type": "library",
140
  "extra": {
141
  "branch-alias": {
@@ -169,17 +197,17 @@
169
  },
170
  {
171
  "name": "guzzlehttp/psr7",
172
- "version": "1.6.1",
173
- "version_normalized": "1.6.1.0",
174
  "source": {
175
  "type": "git",
176
  "url": "https://github.com/guzzle/psr7.git",
177
- "reference": "239400de7a173fe9901b9ac7c06497751f00727a"
178
  },
179
  "dist": {
180
  "type": "zip",
181
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
182
- "reference": "239400de7a173fe9901b9ac7c06497751f00727a",
183
  "shasum": ""
184
  },
185
  "require": {
@@ -192,16 +220,16 @@
192
  },
193
  "require-dev": {
194
  "ext-zlib": "*",
195
- "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
196
  },
197
  "suggest": {
198
- "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
199
  },
200
- "time": "2019-07-01T23:21:34+00:00",
201
  "type": "library",
202
  "extra": {
203
  "branch-alias": {
204
- "dev-master": "1.6-dev"
205
  }
206
  },
207
  "installation-source": "dist",
@@ -241,50 +269,54 @@
241
  ]
242
  },
243
  {
244
- "name": "paragonie/random_compat",
245
- "version": "v9.99.99",
246
- "version_normalized": "9.99.99.0",
247
  "source": {
248
  "type": "git",
249
- "url": "https://github.com/paragonie/random_compat.git",
250
- "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95"
251
  },
252
  "dist": {
253
  "type": "zip",
254
- "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95",
255
- "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95",
256
  "shasum": ""
257
  },
258
  "require": {
259
- "php": "^7"
260
- },
261
- "require-dev": {
262
- "phpunit/phpunit": "4.*|5.*",
263
- "vimeo/psalm": "^1"
264
  },
265
- "suggest": {
266
- "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
267
- },
268
- "time": "2018-07-02T15:55:56+00:00",
269
  "type": "library",
 
 
 
 
 
270
  "installation-source": "dist",
 
 
 
 
 
271
  "notification-url": "https://packagist.org/downloads/",
272
  "license": [
273
  "MIT"
274
  ],
275
  "authors": [
276
  {
277
- "name": "Paragon Initiative Enterprises",
278
- "email": "security@paragonie.com",
279
- "homepage": "https://paragonie.com"
280
  }
281
  ],
282
- "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
 
283
  "keywords": [
284
- "csprng",
285
- "polyfill",
286
- "pseudorandom",
287
- "random"
288
  ]
289
  },
290
  {
@@ -381,330 +413,6 @@
381
  ],
382
  "description": "A polyfill for getallheaders."
383
  },
384
- {
385
- "name": "symfony/polyfill-intl-idn",
386
- "version": "v1.18.1",
387
- "version_normalized": "1.18.1.0",
388
- "source": {
389
- "type": "git",
390
- "url": "https://github.com/symfony/polyfill-intl-idn.git",
391
- "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251"
392
- },
393
- "dist": {
394
- "type": "zip",
395
- "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/5dcab1bc7146cf8c1beaa4502a3d9be344334251",
396
- "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251",
397
- "shasum": ""
398
- },
399
- "require": {
400
- "php": ">=5.3.3",
401
- "symfony/polyfill-intl-normalizer": "^1.10",
402
- "symfony/polyfill-php70": "^1.10",
403
- "symfony/polyfill-php72": "^1.10"
404
- },
405
- "suggest": {
406
- "ext-intl": "For best performance"
407
- },
408
- "time": "2020-08-04T06:02:08+00:00",
409
- "type": "library",
410
- "extra": {
411
- "branch-alias": {
412
- "dev-master": "1.18-dev"
413
- },
414
- "thanks": {
415
- "name": "symfony/polyfill",
416
- "url": "https://github.com/symfony/polyfill"
417
- }
418
- },
419
- "installation-source": "dist",
420
- "autoload": {
421
- "psr-4": {
422
- "Symfony\\Polyfill\\Intl\\Idn\\": ""
423
- },
424
- "files": [
425
- "bootstrap.php"
426
- ]
427
- },
428
- "notification-url": "https://packagist.org/downloads/",
429
- "license": [
430
- "MIT"
431
- ],
432
- "authors": [
433
- {
434
- "name": "Laurent Bassin",
435
- "email": "laurent@bassin.info"
436
- },
437
- {
438
- "name": "Trevor Rowbotham",
439
- "email": "trevor.rowbotham@pm.me"
440
- },
441
- {
442
- "name": "Symfony Community",
443
- "homepage": "https://symfony.com/contributors"
444
- }
445
- ],
446
- "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions",
447
- "homepage": "https://symfony.com",
448
- "keywords": [
449
- "compatibility",
450
- "idn",
451
- "intl",
452
- "polyfill",
453
- "portable",
454
- "shim"
455
- ],
456
- "funding": [
457
- {
458
- "url": "https://symfony.com/sponsor",
459
- "type": "custom"
460
- },
461
- {
462
- "url": "https://github.com/fabpot",
463
- "type": "github"
464
- },
465
- {
466
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
467
- "type": "tidelift"
468
- }
469
- ]
470
- },
471
- {
472
- "name": "symfony/polyfill-intl-normalizer",
473
- "version": "v1.18.1",
474
- "version_normalized": "1.18.1.0",
475
- "source": {
476
- "type": "git",
477
- "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
478
- "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e"
479
- },
480
- "dist": {
481
- "type": "zip",
482
- "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e",
483
- "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e",
484
- "shasum": ""
485
- },
486
- "require": {
487
- "php": ">=5.3.3"
488
- },
489
- "suggest": {
490
- "ext-intl": "For best performance"
491
- },
492
- "time": "2020-07-14T12:35:20+00:00",
493
- "type": "library",
494
- "extra": {
495
- "branch-alias": {
496
- "dev-master": "1.18-dev"
497
- },
498
- "thanks": {
499
- "name": "symfony/polyfill",
500
- "url": "https://github.com/symfony/polyfill"
501
- }
502
- },
503
- "installation-source": "dist",
504
- "autoload": {
505
- "psr-4": {
506
- "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
507
- },
508
- "files": [
509
- "bootstrap.php"
510
- ],
511
- "classmap": [
512
- "Resources/stubs"
513
- ]
514
- },
515
- "notification-url": "https://packagist.org/downloads/",
516
- "license": [
517
- "MIT"
518
- ],
519
- "authors": [
520
- {
521
- "name": "Nicolas Grekas",
522
- "email": "p@tchwork.com"
523
- },
524
- {
525
- "name": "Symfony Community",
526
- "homepage": "https://symfony.com/contributors"
527
- }
528
- ],
529
- "description": "Symfony polyfill for intl's Normalizer class and related functions",
530
- "homepage": "https://symfony.com",
531
- "keywords": [
532
- "compatibility",
533
- "intl",
534
- "normalizer",
535
- "polyfill",
536
- "portable",
537
- "shim"
538
- ],
539
- "funding": [
540
- {
541
- "url": "https://symfony.com/sponsor",
542
- "type": "custom"
543
- },
544
- {
545
- "url": "https://github.com/fabpot",
546
- "type": "github"
547
- },
548
- {
549
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
550
- "type": "tidelift"
551
- }
552
- ]
553
- },
554
- {
555
- "name": "symfony/polyfill-php70",
556
- "version": "v1.18.1",
557
- "version_normalized": "1.18.1.0",
558
- "source": {
559
- "type": "git",
560
- "url": "https://github.com/symfony/polyfill-php70.git",
561
- "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3"
562
- },
563
- "dist": {
564
- "type": "zip",
565
- "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0dd93f2c578bdc9c72697eaa5f1dd25644e618d3",
566
- "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3",
567
- "shasum": ""
568
- },
569
- "require": {
570
- "paragonie/random_compat": "~1.0|~2.0|~9.99",
571
- "php": ">=5.3.3"
572
- },
573
- "time": "2020-07-14T12:35:20+00:00",
574
- "type": "library",
575
- "extra": {
576
- "branch-alias": {
577
- "dev-master": "1.18-dev"
578
- },
579
- "thanks": {
580
- "name": "symfony/polyfill",
581
- "url": "https://github.com/symfony/polyfill"
582
- }
583
- },
584
- "installation-source": "dist",
585
- "autoload": {
586
- "psr-4": {
587
- "Symfony\\Polyfill\\Php70\\": ""
588
- },
589
- "files": [
590
- "bootstrap.php"
591
- ],
592
- "classmap": [
593
- "Resources/stubs"
594
- ]
595
- },
596
- "notification-url": "https://packagist.org/downloads/",
597
- "license": [
598
- "MIT"
599
- ],
600
- "authors": [
601
- {
602
- "name": "Nicolas Grekas",
603
- "email": "p@tchwork.com"
604
- },
605
- {
606
- "name": "Symfony Community",
607
- "homepage": "https://symfony.com/contributors"
608
- }
609
- ],
610
- "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions",
611
- "homepage": "https://symfony.com",
612
- "keywords": [
613
- "compatibility",
614
- "polyfill",
615
- "portable",
616
- "shim"
617
- ],
618
- "funding": [
619
- {
620
- "url": "https://symfony.com/sponsor",
621
- "type": "custom"
622
- },
623
- {
624
- "url": "https://github.com/fabpot",
625
- "type": "github"
626
- },
627
- {
628
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
629
- "type": "tidelift"
630
- }
631
- ]
632
- },
633
- {
634
- "name": "symfony/polyfill-php72",
635
- "version": "v1.18.1",
636
- "version_normalized": "1.18.1.0",
637
- "source": {
638
- "type": "git",
639
- "url": "https://github.com/symfony/polyfill-php72.git",
640
- "reference": "639447d008615574653fb3bc60d1986d7172eaae"
641
- },
642
- "dist": {
643
- "type": "zip",
644
- "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae",
645
- "reference": "639447d008615574653fb3bc60d1986d7172eaae",
646
- "shasum": ""
647
- },
648
- "require": {
649
- "php": ">=5.3.3"
650
- },
651
- "time": "2020-07-14T12:35:20+00:00",
652
- "type": "library",
653
- "extra": {
654
- "branch-alias": {
655
- "dev-master": "1.18-dev"
656
- },
657
- "thanks": {
658
- "name": "symfony/polyfill",
659
- "url": "https://github.com/symfony/polyfill"
660
- }
661
- },
662
- "installation-source": "dist",
663
- "autoload": {
664
- "psr-4": {
665
- "Symfony\\Polyfill\\Php72\\": ""
666
- },
667
- "files": [
668
- "bootstrap.php"
669
- ]
670
- },
671
- "notification-url": "https://packagist.org/downloads/",
672
- "license": [
673
- "MIT"
674
- ],
675
- "authors": [
676
- {
677
- "name": "Nicolas Grekas",
678
- "email": "p@tchwork.com"
679
- },
680
- {
681
- "name": "Symfony Community",
682
- "homepage": "https://symfony.com/contributors"
683
- }
684
- ],
685
- "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
686
- "homepage": "https://symfony.com",
687
- "keywords": [
688
- "compatibility",
689
- "polyfill",
690
- "portable",
691
- "shim"
692
- ],
693
- "funding": [
694
- {
695
- "url": "https://symfony.com/sponsor",
696
- "type": "custom"
697
- },
698
- {
699
- "url": "https://github.com/fabpot",
700
- "type": "github"
701
- },
702
- {
703
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
704
- "type": "tidelift"
705
- }
706
- ]
707
- },
708
  {
709
  "name": "techcrunch/wp-async-task",
710
  "version": "dev-master",
1
  [
2
  {
3
  "name": "facebook/php-business-sdk",
4
+ "version": "9.0.3",
5
+ "version_normalized": "9.0.3.0",
6
  "source": {
7
  "type": "git",
8
  "url": "https://github.com/facebook/facebook-php-business-sdk.git",
9
+ "reference": "4d39da6c1e1cdc9916082d97a5191a549e127b0f"
10
  },
11
  "dist": {
12
  "type": "zip",
13
+ "url": "https://api.github.com/repos/facebook/facebook-php-business-sdk/zipball/4d39da6c1e1cdc9916082d97a5191a549e127b0f",
14
+ "reference": "4d39da6c1e1cdc9916082d97a5191a549e127b0f",
15
  "shasum": ""
16
  },
17
  "require": {
22
  "phpunit/phpunit": "~8",
23
  "symfony/finder": "~2.6"
24
  },
25
+ "time": "2021-01-14T00:20:35+00:00",
26
  "type": "library",
27
  "installation-source": "dist",
28
  "autoload": {
40
  "instagram",
41
  "page",
42
  "sdk"
43
+ ]
 
 
 
44
  },
45
  {
46
  "name": "guzzlehttp/guzzle",
47
+ "version": "7.2.0",
48
+ "version_normalized": "7.2.0.0",
49
  "source": {
50
  "type": "git",
51
  "url": "https://github.com/guzzle/guzzle.git",
52
+ "reference": "0aa74dfb41ae110835923ef10a9d803a22d50e79"
53
  },
54
  "dist": {
55
  "type": "zip",
56
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0aa74dfb41ae110835923ef10a9d803a22d50e79",
57
+ "reference": "0aa74dfb41ae110835923ef10a9d803a22d50e79",
58
  "shasum": ""
59
  },
60
  "require": {
61
  "ext-json": "*",
62
+ "guzzlehttp/promises": "^1.4",
63
+ "guzzlehttp/psr7": "^1.7",
64
+ "php": "^7.2.5 || ^8.0",
65
+ "psr/http-client": "^1.0"
66
+ },
67
+ "provide": {
68
+ "psr/http-client-implementation": "1.0"
69
  },
70
  "require-dev": {
71
  "ext-curl": "*",
72
+ "php-http/client-integration-tests": "^3.0",
73
+ "phpunit/phpunit": "^8.5.5 || ^9.3.5",
74
  "psr/log": "^1.1"
75
  },
76
  "suggest": {
77
+ "ext-curl": "Required for CURL handler support",
78
+ "ext-intl": "Required for Internationalized Domain Name (IDN) support",
79
  "psr/log": "Required for using the Log middleware"
80
  },
81
+ "time": "2020-10-10T11:47:56+00:00",
82
  "type": "library",
83
  "extra": {
84
  "branch-alias": {
85
+ "dev-master": "7.1-dev"
86
  }
87
  },
88
  "installation-source": "dist",
103
  "name": "Michael Dowling",
104
  "email": "mtdowling@gmail.com",
105
  "homepage": "https://github.com/mtdowling"
106
+ },
107
+ {
108
+ "name": "Márk Sági-Kazár",
109
+ "email": "mark.sagikazar@gmail.com",
110
+ "homepage": "https://sagikazarmark.hu"
111
  }
112
  ],
113
  "description": "Guzzle is a PHP HTTP client library",
118
  "framework",
119
  "http",
120
  "http client",
121
+ "psr-18",
122
+ "psr-7",
123
  "rest",
124
  "web service"
125
+ ],
126
+ "funding": [
127
+ {
128
+ "url": "https://github.com/GrahamCampbell",
129
+ "type": "github"
130
+ },
131
+ {
132
+ "url": "https://github.com/Nyholm",
133
+ "type": "github"
134
+ },
135
+ {
136
+ "url": "https://github.com/alexeyshockov",
137
+ "type": "github"
138
+ },
139
+ {
140
+ "url": "https://github.com/gmponos",
141
+ "type": "github"
142
+ }
143
  ]
144
  },
145
  {
146
  "name": "guzzlehttp/promises",
147
+ "version": "1.4.0",
148
+ "version_normalized": "1.4.0.0",
149
  "source": {
150
  "type": "git",
151
  "url": "https://github.com/guzzle/promises.git",
152
+ "reference": "60d379c243457e073cff02bc323a2a86cb355631"
153
  },
154
  "dist": {
155
  "type": "zip",
156
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631",
157
+ "reference": "60d379c243457e073cff02bc323a2a86cb355631",
158
  "shasum": ""
159
  },
160
  "require": {
161
+ "php": ">=5.5"
162
  },
163
  "require-dev": {
164
+ "symfony/phpunit-bridge": "^4.4 || ^5.1"
165
  },
166
+ "time": "2020-09-30T07:37:28+00:00",
167
  "type": "library",
168
  "extra": {
169
  "branch-alias": {
197
  },
198
  {
199
  "name": "guzzlehttp/psr7",
200
+ "version": "1.7.0",
201
+ "version_normalized": "1.7.0.0",
202
  "source": {
203
  "type": "git",
204
  "url": "https://github.com/guzzle/psr7.git",
205
+ "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3"
206
  },
207
  "dist": {
208
  "type": "zip",
209
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3",
210
+ "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3",
211
  "shasum": ""
212
  },
213
  "require": {
220
  },
221
  "require-dev": {
222
  "ext-zlib": "*",
223
+ "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10"
224
  },
225
  "suggest": {
226
+ "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
227
  },
228
+ "time": "2020-09-30T07:37:11+00:00",
229
  "type": "library",
230
  "extra": {
231
  "branch-alias": {
232
+ "dev-master": "1.7-dev"
233
  }
234
  },
235
  "installation-source": "dist",
269
  ]
270
  },
271
  {
272
+ "name": "psr/http-client",
273
+ "version": "1.0.1",
274
+ "version_normalized": "1.0.1.0",
275
  "source": {
276
  "type": "git",
277
+ "url": "https://github.com/php-fig/http-client.git",
278
+ "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621"
279
  },
280
  "dist": {
281
  "type": "zip",
282
+ "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
283
+ "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
284
  "shasum": ""
285
  },
286
  "require": {
287
+ "php": "^7.0 || ^8.0",
288
+ "psr/http-message": "^1.0"
 
 
 
289
  },
290
+ "time": "2020-06-29T06:28:15+00:00",
 
 
 
291
  "type": "library",
292
+ "extra": {
293
+ "branch-alias": {
294
+ "dev-master": "1.0.x-dev"
295
+ }
296
+ },
297
  "installation-source": "dist",
298
+ "autoload": {
299
+ "psr-4": {
300
+ "Psr\\Http\\Client\\": "src/"
301
+ }
302
+ },
303
  "notification-url": "https://packagist.org/downloads/",
304
  "license": [
305
  "MIT"
306
  ],
307
  "authors": [
308
  {
309
+ "name": "PHP-FIG",
310
+ "homepage": "http://www.php-fig.org/"
 
311
  }
312
  ],
313
+ "description": "Common interface for HTTP clients",
314
+ "homepage": "https://github.com/php-fig/http-client",
315
  "keywords": [
316
+ "http",
317
+ "http-client",
318
+ "psr",
319
+ "psr-18"
320
  ]
321
  },
322
  {
413
  ],
414
  "description": "A polyfill for getallheaders."
415
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
416
  {
417
  "name": "techcrunch/wp-async-task",
418
  "version": "dev-master",
vendor/facebook/php-business-sdk/.github/workflows/ci.yml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: CI build
2
+ on: [push, pull_request]
3
+
4
+ jobs:
5
+ run:
6
+ runs-on: ${{ matrix.operating-system }}
7
+ strategy:
8
+ matrix:
9
+ operating-system: [ubuntu-latest]
10
+ php-versions: ['7.2', '7.3', '7.4']
11
+ name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
12
+ steps:
13
+ - name: Checkout
14
+ uses: actions/checkout@v2
15
+
16
+ - name: Setup PHP
17
+ uses: shivammathur/setup-php@v2
18
+ with:
19
+ php-version: ${{matrix.php-versions}}
20
+
21
+ - name: Install dependencies
22
+ uses: php-actions/composer@v4
23
+ with:
24
+ dev: yes
25
+ args: --prefer-source
26
+
27
+ - name: PHPUnit Tests
28
+ run: vendor/bin/phpunit -v -c test/phpunit-travis.xml --coverage-clover=coverage.clover
vendor/facebook/php-business-sdk/.travis.yml DELETED
@@ -1,30 +0,0 @@
1
- language: php
2
-
3
- dist: trusty
4
-
5
- php:
6
- - 7.2
7
- - 7.3
8
- - 7.4
9
- - hhvm
10
-
11
- sudo: false
12
-
13
- install:
14
- - composer self-update && composer --version
15
- - composer install --dev --prefer-source
16
-
17
- script:
18
- - vendor/bin/phpunit -v -c $PWD/test/phpunit-travis.xml --coverage-clover=coverage.clover
19
-
20
- after_script:
21
- - wget https://scrutinizer-ci.com/ocular.phar
22
- - php ocular.phar code-coverage:upload --format=php-clover coverage.clover
23
-
24
- notifications:
25
- email: false
26
-
27
- matrix:
28
- fast_finish: true
29
- allow_failures:
30
- - php: hhvm
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/facebook/php-business-sdk/CHANGELOG.md CHANGED
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
5
 
6
  ## Unreleased
7
 
 
 
 
 
 
 
 
 
 
8
  ## v9.0.0
9
 
10
 
5
 
6
  ## Unreleased
7
 
8
+ ## v9.0.2
9
+
10
+
11
+ ### Added
12
+ - `action_source` field to Event for Conversions API.
13
+
14
+ ### Fixed
15
+ - `opt_out` field was being removed when set to false for Conversions API.
16
+
17
  ## v9.0.0
18
 
19
 
vendor/facebook/php-business-sdk/README.md CHANGED
@@ -2,7 +2,7 @@
2
 
3
  [![Packagist](https://img.shields.io/packagist/v/facebook/php-business-sdk.svg?style=flat-square)](https://packagist.org/packages/facebook/php-business-sdk)
4
  [![License](https://img.shields.io/badge/license-Facebook%20Platform-blue.svg?style=flat-square)](https://github.com/facebook/facebook-php-business-sdk/blob/master/LICENSE)
5
- [![Travis](https://img.shields.io/travis/facebook/facebook-php-business-sdk.svg?style=flat-square)](https://travis-ci.org/facebook/facebook-php-business-sdk)
6
  [![Scrutinizer](https://img.shields.io/scrutinizer/g/facebook/facebook-php-business-sdk.svg?style=flat-square)](https://scrutinizer-ci.com/g/facebook/facebook-php-business-sdk)
7
  [![Scrutinizer Coverage](https://img.shields.io/scrutinizer/coverage/g/facebook/facebook-php-business-sdk.svg?style=flat-square)](https://scrutinizer-ci.com/g/facebook/facebook-php-business-sdk)
8
 
2
 
3
  [![Packagist](https://img.shields.io/packagist/v/facebook/php-business-sdk.svg?style=flat-square)](https://packagist.org/packages/facebook/php-business-sdk)
4
  [![License](https://img.shields.io/badge/license-Facebook%20Platform-blue.svg?style=flat-square)](https://github.com/facebook/facebook-php-business-sdk/blob/master/LICENSE)
5
+ [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Ffacebook%2Ffacebook-php-business-sdk%2Fbadge%3Fref%3Dmaster&style=flat)](https://actions-badge.atrox.dev/facebook/facebook-php-business-sdk/goto?ref=master)
6
  [![Scrutinizer](https://img.shields.io/scrutinizer/g/facebook/facebook-php-business-sdk.svg?style=flat-square)](https://scrutinizer-ci.com/g/facebook/facebook-php-business-sdk)
7
  [![Scrutinizer Coverage](https://img.shields.io/scrutinizer/coverage/g/facebook/facebook-php-business-sdk.svg?style=flat-square)](https://scrutinizer-ci.com/g/facebook/facebook-php-business-sdk)
8
 
vendor/facebook/php-business-sdk/examples/{AdAccountAdCreativesPostCreateAdCreativePageLike.php → AdAccountAdCreativesPost3CreateAdCreativePageLike.php} RENAMED
File without changes
vendor/facebook/php-business-sdk/examples/{AdAccountAdCreativesPostCreateAssetFeedSpec.php → AdAccountAdCreativesPost3CreateAssetFeedSpec.php} RENAMED
File without changes
vendor/facebook/php-business-sdk/examples/{AdAccountAdCreativesPost2CreateCarouselCallToActionAppInstall.php → AdAccountAdCreativesPost3CreateCarouselCallToActionAppInstall.php} RENAMED
File without changes
vendor/facebook/php-business-sdk/examples/{AdAccountAdCreativesPostCreateDynamicAdCustomization.php → AdAccountAdCreativesPost3CreateDynamicAdCustomization.php} RENAMED
File without changes
vendor/facebook/php-business-sdk/examples/AdAccountAdCreativesPostCreateAdCreativeLinkAd.php DELETED
@@ -1,48 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
- *
5
- * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
- * use, copy, modify, and distribute this software in source code or binary
7
- * form for use in connection with the web services and APIs provided by
8
- * Facebook.
9
- *
10
- * As with any software that integrates with the Facebook platform, your use
11
- * of this software is subject to the Facebook Developer Principles and
12
- * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
- * shall be included in all copies or substantial portions of the software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
- * DEALINGS IN THE SOFTWARE.
22
- */
23
-
24
- require __DIR__ . '/vendor/autoload.php';
25
-
26
- use FacebookAds\Object\AdAccount;
27
- use FacebookAds\Object\AdCreative;
28
- use FacebookAds\Api;
29
- use FacebookAds\Logger\CurlLogger;
30
-
31
- $access_token = '<ACCESS_TOKEN>';
32
- $app_secret = '<APP_SECRET>';
33
- $app_id = '<APP_ID>';
34
- $id = '<AD_ACCOUNT_ID>';
35
-
36
- $api = Api::init($app_id, $app_secret, $access_token);
37
- $api->setLogger(new CurlLogger());
38
-
39
- $fields = array(
40
- );
41
- $params = array(
42
- 'name' => 'Sample Creative',
43
- 'object_story_spec' => array('page_id' => '<pageID>','link_data' => array('image_hash' => '<imageHash>','link' => 'https:\/\/facebook.com\/<pageID>','message' => 'try it out')),
44
- );
45
- echo json_encode((new AdAccount($id))->createAdCreative(
46
- $fields,
47
- $params
48
- )->exportAllData(), JSON_PRETTY_PRINT);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/facebook/php-business-sdk/examples/AdAccountAdCreativesPostCreateCarouselCallToActionAppInstall.php DELETED
@@ -1,48 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
- *
5
- * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
- * use, copy, modify, and distribute this software in source code or binary
7
- * form for use in connection with the web services and APIs provided by
8
- * Facebook.
9
- *
10
- * As with any software that integrates with the Facebook platform, your use
11
- * of this software is subject to the Facebook Developer Principles and
12
- * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
- * shall be included in all copies or substantial portions of the software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
- * DEALINGS IN THE SOFTWARE.
22
- */
23
-
24
- require __DIR__ . '/vendor/autoload.php';
25
-
26
- use FacebookAds\Object\AdAccount;
27
- use FacebookAds\Object\AdCreative;
28
- use FacebookAds\Api;
29
- use FacebookAds\Logger\CurlLogger;
30
-
31
- $access_token = '<ACCESS_TOKEN>';
32
- $app_secret = '<APP_SECRET>';
33
- $app_id = '<APP_ID>';
34
- $id = '<AD_ACCOUNT_ID>';
35
-
36
- $api = Api::init($app_id, $app_secret, $access_token);
37
- $api->setLogger(new CurlLogger());
38
-
39
- $fields = array(
40
- );
41
- $params = array(
42
- 'name' => 'Carousel app ad',
43
- 'object_story_spec' => array('page_id' => '<pageID>','link_data' => array('message' => 'My message','link' => 'http://www.example.com/appstoreurl','caption' => 'WWW.ITUNES.COM','name' => 'The link name','description' => 'The link description','child_attachments' => array(array('link' => 'http://www.example.com/appstoreurl','image_hash' => '<imageHash>','call_to_action' => array('type' => 'USE_MOBILE_APP','value' => array('app_link' => '<deepLink>'))),array('link' => 'http://www.example.com/appstoreurl','image_hash' => '<imageHash>','call_to_action' => array('type' => 'USE_MOBILE_APP','value' => array('app_link' => '<deepLink>'))),array('link' => 'http://www.example.com/appstoreurl','image_hash' => '<imageHash>','call_to_action' => array('type' => 'USE_MOBILE_APP','value' => array('app_link' => '<deepLink>'))),array('link' => 'http://www.example.com/appstoreurl','image_hash' => '<imageHash>','call_to_action' => array('type' => 'USE_MOBILE_APP','value' => array('app_link' => '<deepLink>')))),'multi_share_optimized' => true)),
44
- );
45
- echo json_encode((new AdAccount($id))->createAdCreative(
46
- $fields,
47
- $params
48
- )->exportAllData(), JSON_PRETTY_PRINT);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/facebook/php-business-sdk/examples/AdAccountAdCreativesPostCreateLinkAdCallToActionAppInstall.php DELETED
@@ -1,48 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
- *
5
- * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
- * use, copy, modify, and distribute this software in source code or binary
7
- * form for use in connection with the web services and APIs provided by
8
- * Facebook.
9
- *
10
- * As with any software that integrates with the Facebook platform, your use
11
- * of this software is subject to the Facebook Developer Principles and
12
- * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
- * shall be included in all copies or substantial portions of the software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
- * DEALINGS IN THE SOFTWARE.
22
- */
23
-
24
- require __DIR__ . '/vendor/autoload.php';
25
-
26
- use FacebookAds\Object\AdAccount;
27
- use FacebookAds\Object\AdCreative;
28
- use FacebookAds\Api;
29
- use FacebookAds\Logger\CurlLogger;
30
-
31
- $access_token = '<ACCESS_TOKEN>';
32
- $app_secret = '<APP_SECRET>';
33
- $app_id = '<APP_ID>';
34
- $id = '<AD_ACCOUNT_ID>';
35
-
36
- $api = Api::init($app_id, $app_secret, $access_token);
37
- $api->setLogger(new CurlLogger());
38
-
39
- $fields = array(
40
- );
41
- $params = array(
42
- 'name' => 'Sample Creative',
43
- 'object_story_spec' => array('page_id' => '<pageID>','link_data' => array('call_to_action' => array('type' => 'INSTALL_MOBILE_APP','value' => array('link' => '<appLink>')),'image_hash' => '<imageHash>','link' => '<appLink>','message' => 'Try it out')),
44
- );
45
- echo json_encode((new AdAccount($id))->createAdCreative(
46
- $fields,
47
- $params
48
- )->exportAllData(), JSON_PRETTY_PRINT);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/facebook/php-business-sdk/examples/AdAccountAdCreativesPostCreateLinkAdImageCrop.php DELETED
@@ -1,48 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
- *
5
- * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
- * use, copy, modify, and distribute this software in source code or binary
7
- * form for use in connection with the web services and APIs provided by
8
- * Facebook.
9
- *
10
- * As with any software that integrates with the Facebook platform, your use
11
- * of this software is subject to the Facebook Developer Principles and
12
- * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
- * shall be included in all copies or substantial portions of the software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
- * DEALINGS IN THE SOFTWARE.
22
- */
23
-
24
- require __DIR__ . '/vendor/autoload.php';
25
-
26
- use FacebookAds\Object\AdAccount;
27
- use FacebookAds\Object\AdCreative;
28
- use FacebookAds\Api;
29
- use FacebookAds\Logger\CurlLogger;
30
-
31
- $access_token = '<ACCESS_TOKEN>';
32
- $app_secret = '<APP_SECRET>';
33
- $app_id = '<APP_ID>';
34
- $id = '<AD_ACCOUNT_ID>';
35
-
36
- $api = Api::init($app_id, $app_secret, $access_token);
37
- $api->setLogger(new CurlLogger());
38
-
39
- $fields = array(
40
- );
41
- $params = array(
42
- 'name' => 'Image crop creative',
43
- 'object_story_spec' => array('page_id' => '<pageID>','link_data' => array('image_crops' => array('100x100' => array(array(0,0),array(100,100))),'image_hash' => '<imageHash>','link' => '<url>','message' => 'Ad message')),
44
- );
45
- echo json_encode((new AdAccount($id))->createAdCreative(
46
- $fields,
47
- $params
48
- )->exportAllData(), JSON_PRETTY_PRINT);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/facebook/php-business-sdk/examples/AdAccountAdCreativesPostCreateLinkAdNotToPage.php DELETED
@@ -1,52 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
- *
5
- * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
- * use, copy, modify, and distribute this software in source code or binary
7
- * form for use in connection with the web services and APIs provided by
8
- * Facebook.
9
- *
10
- * As with any software that integrates with the Facebook platform, your use
11
- * of this software is subject to the Facebook Developer Principles and
12
- * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
- * shall be included in all copies or substantial portions of the software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
- * DEALINGS IN THE SOFTWARE.
22
- */
23
-
24
- require __DIR__ . '/vendor/autoload.php';
25
-
26
- use FacebookAds\Object\AdAccount;
27
- use FacebookAds\Object\AdCreative;
28
- use FacebookAds\Api;
29
- use FacebookAds\Logger\CurlLogger;
30
-
31
- $access_token = '<ACCESS_TOKEN>';
32
- $app_secret = '<APP_SECRET>';
33
- $app_id = '<APP_ID>';
34
- $id = '<ID>';
35
-
36
- $api = Api::init($app_id, $app_secret, $access_token);
37
- $api->setLogger(new CurlLogger());
38
-
39
- $fields = array(
40
- );
41
- $params = array(
42
- 'name' => 'Sample Creative',
43
- 'title' => 'My title',
44
- 'body' => 'My body',
45
- 'object_url' => '<url>',
46
- 'link_url' => '<url>',
47
- 'image_hash' => '<imageHash>',
48
- );
49
- echo json_encode((new AdAccount($id))->createAdCreative(
50
- $fields,
51
- $params
52
- )->exportAllData(), JSON_PRETTY_PRINT);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/facebook/php-business-sdk/examples/AdAccountAdCreativesPostCreateMAIDPA.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
- *
5
- * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
- * use, copy, modify, and distribute this software in source code or binary
7
- * form for use in connection with the web services and APIs provided by
8
- * Facebook.
9
- *
10
- * As with any software that integrates with the Facebook platform, your use
11
- * of this software is subject to the Facebook Developer Principles and
12
- * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
- * shall be included in all copies or substantial portions of the software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
- * DEALINGS IN THE SOFTWARE.
22
- */
23
-
24
- require __DIR__ . '/vendor/autoload.php';
25
-
26
- use FacebookAds\Object\AdAccount;
27
- use FacebookAds\Object\AdCreative;
28
- use FacebookAds\Api;
29
- use FacebookAds\Logger\CurlLogger;
30
-
31
- $access_token = '<ACCESS_TOKEN>';
32
- $app_secret = '<APP_SECRET>';
33
- $app_id = '<APP_ID>';
34
- $id = '<AD_ACCOUNT_ID>';
35
-
36
- $api = Api::init($app_id, $app_secret, $access_token);
37
- $api->setLogger(new CurlLogger());
38
-
39
- $fields = array(
40
- );
41
- $params = array(
42
- 'name' => 'Dynamic Ad Template Creative Sample',
43
- 'object_story_spec' => array('page_id' => '<pageID>','template_data' => array('call_to_action' => array('type' => 'INSTALL_MOBILE_APP','value' => array('link' => 'http://www.example.com/appstoreurl')),'message' => 'Test array(array(product.name | titleize))','link' => 'http://www.example.com/appstoreurl','name' => 'Headline array(array(product.price))','description' => 'Description array(array(product.description))')),
44
- 'product_set_id' => '<productSetID>',
45
- );
46
- echo json_encode((new AdAccount($id))->createAdCreative(
47
- $fields,
48
- $params
49
- )->exportAllData(), JSON_PRETTY_PRINT);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/facebook/php-business-sdk/examples/AdAccountAdCreativesPostCreateVideoLeadAd.php DELETED
@@ -1,47 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
- *
5
- * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
- * use, copy, modify, and distribute this software in source code or binary
7
- * form for use in connection with the web services and APIs provided by
8
- * Facebook.
9
- *
10
- * As with any software that integrates with the Facebook platform, your use
11
- * of this software is subject to the Facebook Developer Principles and
12
- * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
- * shall be included in all copies or substantial portions of the software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
- * DEALINGS IN THE SOFTWARE.
22
- */
23
-
24
- require __DIR__ . '/vendor/autoload.php';
25
-
26
- use FacebookAds\Object\AdAccount;
27
- use FacebookAds\Object\AdCreative;
28
- use FacebookAds\Api;
29
- use FacebookAds\Logger\CurlLogger;
30
-
31
- $access_token = '<ACCESS_TOKEN>';
32
- $app_secret = '<APP_SECRET>';
33
- $app_id = '<APP_ID>';
34
- $id = '<AD_ACCOUNT_ID>';
35
-
36
- $api = Api::init($app_id, $app_secret, $access_token);
37
- $api->setLogger(new CurlLogger());
38
-
39
- $fields = array(
40
- );
41
- $params = array(
42
- 'object_story_spec' => array('page_id' => '<pageID>','video_data' => array('link_description' => 'try it out','image_url' => '<imageURL>','video_id' => '<videoID>','call_to_action' => array('type' => 'SIGN_UP','value' => array('link' => 'http:\/\/fb.me\/','lead_gen_form_id' => '<formID>')))),
43
- );
44
- echo json_encode((new AdAccount($id))->createAdCreative(
45
- $fields,
46
- $params
47
- )->exportAllData(), JSON_PRETTY_PRINT);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/facebook/php-business-sdk/examples/AdAccountAdCreativesPostCreateVideoPageLikeAd.php DELETED
@@ -1,48 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
- *
5
- * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
- * use, copy, modify, and distribute this software in source code or binary
7
- * form for use in connection with the web services and APIs provided by
8
- * Facebook.
9
- *
10
- * As with any software that integrates with the Facebook platform, your use
11
- * of this software is subject to the Facebook Developer Principles and
12
- * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
- * shall be included in all copies or substantial portions of the software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
- * DEALINGS IN THE SOFTWARE.
22
- */
23
-
24
- require __DIR__ . '/vendor/autoload.php';
25
-
26
- use FacebookAds\Object\AdAccount;
27
- use FacebookAds\Object\AdCreative;
28
- use FacebookAds\Api;
29
- use FacebookAds\Logger\CurlLogger;
30
-
31
- $access_token = '<ACCESS_TOKEN>';
32
- $app_secret = '<APP_SECRET>';
33
- $app_id = '<APP_ID>';
34
- $id = '<AD_ACCOUNT_ID>';
35
-
36
- $api = Api::init($app_id, $app_secret, $access_token);
37
- $api->setLogger(new CurlLogger());
38
-
39
- $fields = array(
40
- );
41
- $params = array(
42
- 'name' => 'Sample Creative',
43
- 'object_story_spec' => array('page_id' => '<pageID>','video_data' => array('image_url' => '<imageURL>','video_id' => '<videoID>','call_to_action' => array('type' => 'LIKE_PAGE','value' => array('page' => '<pageID>')))),
44
- );
45
- echo json_encode((new AdAccount($id))->createAdCreative(
46
- $fields,
47
- $params
48
- )->exportAllData(), JSON_PRETTY_PRINT);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/facebook/php-business-sdk/examples/AdAccountAdSetsPostAdSetCreateCpa.php CHANGED
@@ -42,8 +42,8 @@ $params = array(
42
  'name' => 'A CPA Ad Set',
43
  'campaign_id' => '<adCampaignLinkClicksID>',
44
  'daily_budget' => '5000',
45
- 'start_time' => '2020-10-29T22:16:32-0700',
46
- 'end_time' => '2020-11-05T22:16:32-0800',
47
  'billing_event' => 'IMPRESSIONS',
48
  'optimization_goal' => 'REACH',
49
  'bid_amount' => '1000',
42
  'name' => 'A CPA Ad Set',
43
  'campaign_id' => '<adCampaignLinkClicksID>',
44
  'daily_budget' => '5000',
45
+ 'start_time' => '2020-12-24T10:13:33-0800',
46
+ 'end_time' => '2020-12-31T10:13:33-0800',
47
  'billing_event' => 'IMPRESSIONS',
48
  'optimization_goal' => 'REACH',
49
  'bid_amount' => '1000',
vendor/facebook/php-business-sdk/examples/AdAccountAdSetsPostAdSetCreateCpaAppEvents.php CHANGED
@@ -42,8 +42,8 @@ $params = array(
42
  'name' => 'A CPA Ad Set optimized for App Events',
43
  'campaign_id' => '<adCampaignAppInstallsID>',
44
  'daily_budget' => '300',
45
- 'start_time' => '2020-10-29T22:17:28-0700',
46
- 'end_time' => '2020-11-05T22:17:28-0800',
47
  'billing_event' => 'IMPRESSIONS',
48
  'optimization_goal' => 'OFFSITE_CONVERSIONS',
49
  'bid_amount' => '100',
42
  'name' => 'A CPA Ad Set optimized for App Events',
43
  'campaign_id' => '<adCampaignAppInstallsID>',
44
  'daily_budget' => '300',
45
+ 'start_time' => '2020-12-24T10:14:29-0800',
46
+ 'end_time' => '2020-12-31T10:14:29-0800',
47
  'billing_event' => 'IMPRESSIONS',
48
  'optimization_goal' => 'OFFSITE_CONVERSIONS',
49
  'bid_amount' => '100',
vendor/facebook/php-business-sdk/examples/AdAccountAdSetsPostCreateAdSet.php CHANGED
@@ -41,8 +41,8 @@ $fields = array(
41
  $params = array(
42
  'name' => 'My First AdSet',
43
  'lifetime_budget' => '20000',
44
- 'start_time' => '2020-10-29T22:15:36-0700',
45
- 'end_time' => '2020-11-05T22:15:36-0800',
46
  'campaign_id' => '<adCampaignLinkClicksID>',
47
  'bid_amount' => '500',
48
  'billing_event' => 'IMPRESSIONS',
41
  $params = array(
42
  'name' => 'My First AdSet',
43
  'lifetime_budget' => '20000',
44
+ 'start_time' => '2020-12-24T10:12:46-0800',
45
+ 'end_time' => '2020-12-31T10:12:46-0800',
46
  'campaign_id' => '<adCampaignLinkClicksID>',
47
  'bid_amount' => '500',
48
  'billing_event' => 'IMPRESSIONS',
vendor/facebook/php-business-sdk/examples/AdAccountAdSetsPostCreateCampaign.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
- *
5
- * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
- * use, copy, modify, and distribute this software in source code or binary
7
- * form for use in connection with the web services and APIs provided by
8
- * Facebook.
9
- *
10
- * As with any software that integrates with the Facebook platform, your use
11
- * of this software is subject to the Facebook Developer Principles and
12
- * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
- * shall be included in all copies or substantial portions of the software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
- * DEALINGS IN THE SOFTWARE.
22
- */
23
-
24
- require __DIR__ . '/vendor/autoload.php';
25
-
26
- use FacebookAds\Object\AdAccount;
27
- use FacebookAds\Object\Campaign;
28
- use FacebookAds\Api;
29
- use FacebookAds\Logger\CurlLogger;
30
-
31
- $access_token = '<ACCESS_TOKEN>';
32
- $app_secret = '<APP_SECRET>';
33
- $app_id = '<APP_ID>';
34
- $id = '<AD_ACCOUNT_ID>';
35
-
36
- $api = Api::init($app_id, $app_secret, $access_token);
37
- $api->setLogger(new CurlLogger());
38
-
39
- $fields = array(
40
- );
41
- $params = array(
42
- 'name' => 'My campaign',
43
- 'objective' => 'LINK_CLICKS',
44
- 'status' => 'PAUSED',
45
- );
46
- echo json_encode((new AdAccount($id))->createCampaign(
47
- $fields,
48
- $params
49
- )->exportAllData(), JSON_PRETTY_PRINT);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/facebook/php-business-sdk/examples/AdAccountAdSetsPostDailyBudget20.php CHANGED
@@ -41,8 +41,8 @@ $fields = array(
41
  $params = array(
42
  'name' => 'My First Adset',
43
  'daily_budget' => '2000',
44
- 'start_time' => '2020-10-22T22:17:00-0700',
45
- 'end_time' => '2020-10-29T22:17:00-0700',
46
  'campaign_id' => '<adCampaignLinkClicksID>',
47
  'bid_amount' => '100',
48
  'billing_event' => 'LINK_CLICKS',
41
  $params = array(
42
  'name' => 'My First Adset',
43
  'daily_budget' => '2000',
44
+ 'start_time' => '2020-12-17T10:14:01-0800',
45
+ 'end_time' => '2020-12-24T10:14:01-0800',
46
  'campaign_id' => '<adCampaignLinkClicksID>',
47
  'bid_amount' => '100',
48
  'billing_event' => 'LINK_CLICKS',
vendor/facebook/php-business-sdk/examples/AdAccountAdSetsPostLifetimeBudget200Duration10Days.php CHANGED
@@ -41,8 +41,8 @@ $fields = array(
41
  $params = array(
42
  'name' => 'My First Adset',
43
  'lifetime_budget' => '20000',
44
- 'start_time' => '2020-10-22T22:17:10-0700',
45
- 'end_time' => '2020-11-01T22:17:10-0800',
46
  'campaign_id' => '<adCampaignLinkClicksID>',
47
  'bid_amount' => '100',
48
  'billing_event' => 'LINK_CLICKS',
41
  $params = array(
42
  'name' => 'My First Adset',
43
  'lifetime_budget' => '20000',
44
+ 'start_time' => '2020-12-17T10:14:10-0800',
45
+ 'end_time' => '2020-12-27T10:14:10-0800',
46
  'campaign_id' => '<adCampaignLinkClicksID>',
47
  'bid_amount' => '100',
48
  'billing_event' => 'LINK_CLICKS',
vendor/facebook/php-business-sdk/examples/AdAccountAdSetsPostOfferClaim.php CHANGED
@@ -41,8 +41,8 @@ $fields = array(
41
  $params = array(
42
  'name' => 'My Offer Claim AdSet',
43
  'lifetime_budget' => '56000',
44
- 'start_time' => '2020-10-22T22:16:51-0700',
45
- 'end_time' => '2020-10-29T22:16:51-0700',
46
  'campaign_id' => '<adCampaignLinkClicksID>',
47
  'billing_event' => 'LINK_CLICKS',
48
  'optimization_goal' => 'LINK_CLICKS',
41
  $params = array(
42
  'name' => 'My Offer Claim AdSet',
43
  'lifetime_budget' => '56000',
44
+ 'start_time' => '2020-12-17T10:13:52-0800',
45
+ 'end_time' => '2020-12-24T10:13:52-0800',
46
  'campaign_id' => '<adCampaignLinkClicksID>',
47
  'billing_event' => 'LINK_CLICKS',
48
  'optimization_goal' => 'LINK_CLICKS',
vendor/facebook/php-business-sdk/examples/AdAccountAdSetsPostOptimizePostEngagement.php CHANGED
@@ -41,8 +41,8 @@ $fields = array(
41
  $params = array(
42
  'name' => 'My First Adset',
43
  'lifetime_budget' => '20000',
44
- 'start_time' => '2020-10-22T22:17:19-0700',
45
- 'end_time' => '2020-11-01T22:17:19-0800',
46
  'campaign_id' => '<adCampaignLinkClicksID>',
47
  'bid_amount' => '500',
48
  'billing_event' => 'IMPRESSIONS',
41
  $params = array(
42
  'name' => 'My First Adset',
43
  'lifetime_budget' => '20000',
44
+ 'start_time' => '2020-12-17T10:14:20-0800',
45
+ 'end_time' => '2020-12-27T10:14:20-0800',
46
  'campaign_id' => '<adCampaignLinkClicksID>',
47
  'bid_amount' => '500',
48
  'billing_event' => 'IMPRESSIONS',
vendor/facebook/php-business-sdk/examples/AdgroupLeadsEdgeAdgroupLeadsFiltered.php CHANGED
@@ -39,7 +39,7 @@ $api->setLogger(new CurlLogger());
39
  $fields = array(
40
  );
41
  $params = array(
42
- 'filtering' => array(array('field' => 'time_created','operator' => 'GREATER_THAN','value' => 1602826030)),
43
  );
44
  echo json_encode((new Ad($id))->getLeads(
45
  $fields,
39
  $fields = array(
40
  );
41
  $params = array(
42
+ 'filtering' => array(array('field' => 'time_created','operator' => 'GREATER_THAN','value' => 1607393319)),
43
  );
44
  echo json_encode((new Ad($id))->getLeads(
45
  $fields,
vendor/facebook/php-business-sdk/examples/AdsPixelEventsPost.php CHANGED
@@ -38,7 +38,7 @@ $api->setLogger(new CurlLogger());
38
  $fields = array(
39
  );
40
  $params = array(
41
- 'data' => array(array('event_name' => 'PageView','event_time' => 1604520076,'user_data' => array('fbc' => 'fb.1.1554763741205.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890','fbp' => 'fb.1.1558571054389.1098115397','em' => '309a0a5c3e211326ae75ca18196d301a9bdbd1a882a4d2569511033da23f0abd'))),
42
  );
43
  echo json_encode((new AdsPixel($id))->createEvent(
44
  $fields,
38
  $fields = array(
39
  );
40
  $params = array(
41
+ 'data' => array(array('event_name' => 'PageView','event_time' => 1607998596,'user_data' => array('fbc' => 'fb.1.1554763741205.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890','fbp' => 'fb.1.1558571054389.1098115397','em' => '309a0a5c3e211326ae75ca18196d301a9bdbd1a882a4d2569511033da23f0abd'))),
42
  );
43
  echo json_encode((new AdsPixel($id))->createEvent(
44
  $fields,
vendor/facebook/php-business-sdk/examples/MultiPageFeedCreateThenDelete.php CHANGED
@@ -74,4 +74,4 @@ $params = array(
74
  echo json_encode((new PagePost($pagepost_id))->deleteSelf(
75
  $fields,
76
  $params
77
- )->getResponse()->getContent(), JSON_PRETTY_PRINT);
74
  echo json_encode((new PagePost($pagepost_id))->deleteSelf(
75
  $fields,
76
  $params
77
+ )->exportAllData(), JSON_PRETTY_PRINT);
vendor/facebook/php-business-sdk/examples/MultiPromoteYourPage.php CHANGED
@@ -103,6 +103,7 @@ $params = array(
103
  'name' => 'My campaign',
104
  'objective' => 'LINK_CLICKS',
105
  'status' => 'PAUSED',
 
106
  );
107
  $adcampaign = (new AdAccount($adaccount_id))->createCampaign(
108
  $fields,
@@ -121,7 +122,7 @@ $params = array(
121
  'bid_amount' => '2',
122
  'daily_budget' => '1000',
123
  'campaign_id' => $adcampaign_id,
124
- 'targeting' => array('geo_locations' => array('countries' => array('US'))),
125
  'status' => 'PAUSED',
126
  'promoted_object' => array('page_id' => $page_id),
127
  );
@@ -158,4 +159,4 @@ $params = array(
158
  echo json_encode((new AdAccount($adaccount_id))->createAd(
159
  $fields,
160
  $params
161
- )->getResponse()->getContent(), JSON_PRETTY_PRINT);
103
  'name' => 'My campaign',
104
  'objective' => 'LINK_CLICKS',
105
  'status' => 'PAUSED',
106
+ 'special_ad_categories' => array(),
107
  );
108
  $adcampaign = (new AdAccount($adaccount_id))->createCampaign(
109
  $fields,
122
  'bid_amount' => '2',
123
  'daily_budget' => '1000',
124
  'campaign_id' => $adcampaign_id,
125
+ 'targeting' => array('geo_locations' => array('countries' => array('US')),'facebook_positions' => array('feed')),
126
  'status' => 'PAUSED',
127
  'promoted_object' => array('page_id' => $page_id),
128
  );
159
  echo json_encode((new AdAccount($adaccount_id))->createAd(
160
  $fields,
161
  $params
162
+ )->exportAllData(), JSON_PRETTY_PRINT);
vendor/facebook/php-business-sdk/src/FacebookAds/ApiConfig.php CHANGED
@@ -24,6 +24,6 @@
24
  namespace FacebookAds;
25
  class ApiConfig {
26
  const APIVersion = '9.0';
27
- const SDKVersion = '9.0.1';
28
  const TYPE_CHECKER_STRICT_MODE = false;
29
  }
24
  namespace FacebookAds;
25
  class ApiConfig {
26
  const APIVersion = '9.0';
27
+ const SDKVersion = '9.0.3';
28
  const TYPE_CHECKER_STRICT_MODE = false;
29
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/AbstractCrudObject.php CHANGED
@@ -388,7 +388,7 @@ class AbstractCrudObject extends AbstractObject {
388
  protected function fetchConnection(
389
  array $fields = array(),
390
  array $params = array(),
391
- $prototype_class,
392
  $endpoint = null) {
393
  $fields = implode(',', $fields ?: static::getDefaultReadFields());
394
  if ($fields) {
388
  protected function fetchConnection(
389
  array $fields = array(),
390
  array $params = array(),
391
+ $prototype_class = '',
392
  $endpoint = null) {
393
  $fields = implode(',', $fields ?: static::getDefaultReadFields());
394
  if ($fields) {
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Ad.php CHANGED
@@ -242,6 +242,7 @@ class Ad extends AbstractArchivableCrudObject
242
  'time_range' => 'Object',
243
  'time_ranges' => 'list<Object>',
244
  'use_account_attribution_setting' => 'bool',
 
245
  );
246
  $enums = array(
247
  'action_attribution_windows_enum' => AdsInsightsActionAttributionWindowsValues::getInstance()->getValues(),
@@ -292,6 +293,7 @@ class Ad extends AbstractArchivableCrudObject
292
  'time_range' => 'Object',
293
  'time_ranges' => 'list<Object>',
294
  'use_account_attribution_setting' => 'bool',
 
295
  );
296
  $enums = array(
297
  'action_attribution_windows_enum' => AdsInsightsActionAttributionWindowsValues::getInstance()->getValues(),
@@ -482,6 +484,7 @@ class Ad extends AbstractArchivableCrudObject
482
  'adset_spec' => 'AdSet',
483
  'audience_id' => 'string',
484
  'bid_amount' => 'int',
 
485
  'creative' => 'AdCreative',
486
  'display_sequence' => 'unsigned int',
487
  'draft_adgroup_id' => 'string',
242
  'time_range' => 'Object',
243
  'time_ranges' => 'list<Object>',
244
  'use_account_attribution_setting' => 'bool',
245
+ 'use_unified_attribution_setting' => 'bool',
246
  );
247
  $enums = array(
248
  'action_attribution_windows_enum' => AdsInsightsActionAttributionWindowsValues::getInstance()->getValues(),
293
  'time_range' => 'Object',
294
  'time_ranges' => 'list<Object>',
295
  'use_account_attribution_setting' => 'bool',
296
+ 'use_unified_attribution_setting' => 'bool',
297
  );
298
  $enums = array(
299
  'action_attribution_windows_enum' => AdsInsightsActionAttributionWindowsValues::getInstance()->getValues(),
484
  'adset_spec' => 'AdSet',
485
  'audience_id' => 'string',
486
  'bid_amount' => 'int',
487
+ 'conversion_domain' => 'string',
488
  'creative' => 'AdCreative',
489
  'display_sequence' => 'unsigned int',
490
  'draft_adgroup_id' => 'string',
vendor/facebook/php-business-sdk/src/FacebookAds/Object/AdAccount.php CHANGED
@@ -720,6 +720,7 @@ class AdAccount extends AbstractCrudObject {
720
  'adset_spec' => 'AdSet',
721
  'audience_id' => 'string',
722
  'bid_amount' => 'int',
 
723
  'creative' => 'AdCreative',
724
  'date_format' => 'string',
725
  'display_sequence' => 'unsigned int',
@@ -1617,6 +1618,7 @@ class AdAccount extends AbstractCrudObject {
1617
  'buying_type' => 'string',
1618
  'daily_budget' => 'unsigned int',
1619
  'execution_options' => 'list<execution_options_enum>',
 
1620
  'iterative_split_test_configs' => 'list<Object>',
1621
  'lifetime_budget' => 'unsigned int',
1622
  'name' => 'string',
@@ -2103,6 +2105,7 @@ class AdAccount extends AbstractCrudObject {
2103
  'time_range' => 'Object',
2104
  'time_ranges' => 'list<Object>',
2105
  'use_account_attribution_setting' => 'bool',
 
2106
  );
2107
  $enums = array(
2108
  'action_attribution_windows_enum' => AdsInsightsActionAttributionWindowsValues::getInstance()->getValues(),
@@ -2153,6 +2156,7 @@ class AdAccount extends AbstractCrudObject {
2153
  'time_range' => 'Object',
2154
  'time_ranges' => 'list<Object>',
2155
  'use_account_attribution_setting' => 'bool',
 
2156
  );
2157
  $enums = array(
2158
  'action_attribution_windows_enum' => AdsInsightsActionAttributionWindowsValues::getInstance()->getValues(),
@@ -2210,6 +2214,8 @@ class AdAccount extends AbstractCrudObject {
2210
  'app_store' => 'app_store_enum',
2211
  'app_store_country' => 'string',
2212
  'business_id' => 'string',
 
 
2213
  'query_term' => 'string',
2214
  );
2215
  $enums = array(
@@ -2615,33 +2621,6 @@ class AdAccount extends AbstractCrudObject {
2615
  return $pending ? $request : $request->execute();
2616
  }
2617
 
2618
- public function createSponsoredMessageAd(array $fields = array(), array $params = array(), $pending = false) {
2619
- $this->assureId();
2620
-
2621
- $param_types = array(
2622
- 'bid_amount' => 'int',
2623
- 'daily_budget' => 'unsigned int',
2624
- 'message_creative_id' => 'string',
2625
- 'targeting' => 'Targeting',
2626
- );
2627
- $enums = array(
2628
- );
2629
-
2630
- $request = new ApiRequest(
2631
- $this->api,
2632
- $this->data['id'],
2633
- RequestInterface::METHOD_POST,
2634
- '/sponsored_message_ads',
2635
- new AbstractCrudObject(),
2636
- 'EDGE',
2637
- array(),
2638
- new TypeChecker($param_types, $enums)
2639
- );
2640
- $request->addParams($params);
2641
- $request->addFields($fields);
2642
- return $pending ? $request : $request->execute();
2643
- }
2644
-
2645
  public function deleteSubscribedApps(array $fields = array(), array $params = array(), $pending = false) {
2646
  $this->assureId();
2647
 
720
  'adset_spec' => 'AdSet',
721
  'audience_id' => 'string',
722
  'bid_amount' => 'int',
723
+ 'conversion_domain' => 'string',
724
  'creative' => 'AdCreative',
725
  'date_format' => 'string',
726
  'display_sequence' => 'unsigned int',
1618
  'buying_type' => 'string',
1619
  'daily_budget' => 'unsigned int',
1620
  'execution_options' => 'list<execution_options_enum>',
1621
+ 'is_skadnetwork_attribution' => 'bool',
1622
  'iterative_split_test_configs' => 'list<Object>',
1623
  'lifetime_budget' => 'unsigned int',
1624
  'name' => 'string',
2105
  'time_range' => 'Object',
2106
  'time_ranges' => 'list<Object>',
2107
  'use_account_attribution_setting' => 'bool',
2108
+ 'use_unified_attribution_setting' => 'bool',
2109
  );
2110
  $enums = array(
2111
  'action_attribution_windows_enum' => AdsInsightsActionAttributionWindowsValues::getInstance()->getValues(),
2156
  'time_range' => 'Object',
2157
  'time_ranges' => 'list<Object>',
2158
  'use_account_attribution_setting' => 'bool',
2159
+ 'use_unified_attribution_setting' => 'bool',
2160
  );
2161
  $enums = array(
2162
  'action_attribution_windows_enum' => AdsInsightsActionAttributionWindowsValues::getInstance()->getValues(),
2214
  'app_store' => 'app_store_enum',
2215
  'app_store_country' => 'string',
2216
  'business_id' => 'string',
2217
+ 'is_skadnetwork_search' => 'bool',
2218
+ 'only_apps_with_permission' => 'bool',
2219
  'query_term' => 'string',
2220
  );
2221
  $enums = array(
2621
  return $pending ? $request : $request->execute();
2622
  }
2623
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2624
  public function deleteSubscribedApps(array $fields = array(), array $params = array(), $pending = false) {
2625
  $this->assureId();
2626
 
vendor/facebook/php-business-sdk/src/FacebookAds/Object/{UserPaymentModulesOptions.php → AdCreativeOmnichannelLinkSpec.php} RENAMED
@@ -28,7 +28,7 @@ use FacebookAds\ApiRequest;
28
  use FacebookAds\Cursor;
29
  use FacebookAds\Http\RequestInterface;
30
  use FacebookAds\TypeChecker;
31
- use FacebookAds\Object\Fields\UserPaymentModulesOptionsFields;
32
 
33
  /**
34
  * This class is auto-generated.
@@ -39,13 +39,13 @@ use FacebookAds\Object\Fields\UserPaymentModulesOptionsFields;
39
  *
40
  */
41
 
42
- class UserPaymentModulesOptions extends AbstractObject {
43
 
44
  /**
45
- * @return UserPaymentModulesOptionsFields
46
  */
47
  public static function getFieldsEnum() {
48
- return UserPaymentModulesOptionsFields::getInstance();
49
  }
50
 
51
  protected static function getReferencedEnums() {
28
  use FacebookAds\Cursor;
29
  use FacebookAds\Http\RequestInterface;
30
  use FacebookAds\TypeChecker;
31
+ use FacebookAds\Object\Fields\AdCreativeOmnichannelLinkSpecFields;
32
 
33
  /**
34
  * This class is auto-generated.
39
  *
40
  */
41
 
42
+ class AdCreativeOmnichannelLinkSpec extends AbstractObject {
43
 
44
  /**
45
+ * @return AdCreativeOmnichannelLinkSpecFields
46
  */
47
  public static function getFieldsEnum() {
48
+ return AdCreativeOmnichannelLinkSpecFields::getInstance();
49
  }
50
 
51
  protected static function getReferencedEnums() {
vendor/facebook/php-business-sdk/src/FacebookAds/Object/AdSet.php CHANGED
@@ -457,6 +457,7 @@ class AdSet extends AbstractArchivableCrudObject
457
  'time_range' => 'Object',
458
  'time_ranges' => 'list<Object>',
459
  'use_account_attribution_setting' => 'bool',
 
460
  );
461
  $enums = array(
462
  'action_attribution_windows_enum' => AdsInsightsActionAttributionWindowsValues::getInstance()->getValues(),
@@ -507,6 +508,7 @@ class AdSet extends AbstractArchivableCrudObject
507
  'time_range' => 'Object',
508
  'time_ranges' => 'list<Object>',
509
  'use_account_attribution_setting' => 'bool',
 
510
  );
511
  $enums = array(
512
  'action_attribution_windows_enum' => AdsInsightsActionAttributionWindowsValues::getInstance()->getValues(),
457
  'time_range' => 'Object',
458
  'time_ranges' => 'list<Object>',
459
  'use_account_attribution_setting' => 'bool',
460
+ 'use_unified_attribution_setting' => 'bool',
461
  );
462
  $enums = array(
463
  'action_attribution_windows_enum' => AdsInsightsActionAttributionWindowsValues::getInstance()->getValues(),
508
  'time_range' => 'Object',
509
  'time_ranges' => 'list<Object>',
510
  'use_account_attribution_setting' => 'bool',
511
+ 'use_unified_attribution_setting' => 'bool',
512
  );
513
  $enums = array(
514
  'action_attribution_windows_enum' => AdsInsightsActionAttributionWindowsValues::getInstance()->getValues(),
vendor/facebook/php-business-sdk/src/FacebookAds/Object/AdVideo.php CHANGED
@@ -43,7 +43,6 @@ use FacebookAds\Object\Values\CommentFilterValues;
43
  use FacebookAds\Object\Values\CommentLiveFilterValues;
44
  use FacebookAds\Object\Values\CommentOrderValues;
45
  use FacebookAds\Object\Values\InsightsResultPeriodValues;
46
- use FacebookAds\Object\Values\ProfileTypeValues;
47
  use FacebookAds\Object\Traits\CannotDelete;
48
  use FacebookAds\Object\Traits\CannotUpdate;
49
  use FacebookAds\Object\Traits\FieldValidation;
@@ -353,54 +352,6 @@ class AdVideo extends AbstractCrudObject {
353
  return $pending ? $request : $request->execute();
354
  }
355
 
356
- public function getReactions(array $fields = array(), array $params = array(), $pending = false) {
357
- $this->assureId();
358
-
359
- $param_types = array(
360
- 'type' => 'type_enum',
361
- );
362
- $enums = array(
363
- 'type_enum' => ProfileTypeValues::getInstance()->getValues(),
364
- );
365
-
366
- $request = new ApiRequest(
367
- $this->api,
368
- $this->data['id'],
369
- RequestInterface::METHOD_GET,
370
- '/reactions',
371
- new Profile(),
372
- 'EDGE',
373
- Profile::getFieldsEnum()->getValues(),
374
- new TypeChecker($param_types, $enums)
375
- );
376
- $request->addParams($params);
377
- $request->addFields($fields);
378
- return $pending ? $request : $request->execute();
379
- }
380
-
381
- public function getSharedPosts(array $fields = array(), array $params = array(), $pending = false) {
382
- $this->assureId();
383
-
384
- $param_types = array(
385
- );
386
- $enums = array(
387
- );
388
-
389
- $request = new ApiRequest(
390
- $this->api,
391
- $this->data['id'],
392
- RequestInterface::METHOD_GET,
393
- '/sharedposts',
394
- new Post(),
395
- 'EDGE',
396
- Post::getFieldsEnum()->getValues(),
397
- new TypeChecker($param_types, $enums)
398
- );
399
- $request->addParams($params);
400
- $request->addFields($fields);
401
- return $pending ? $request : $request->execute();
402
- }
403
-
404
  public function getSponsorTags(array $fields = array(), array $params = array(), $pending = false) {
405
  $this->assureId();
406
 
43
  use FacebookAds\Object\Values\CommentLiveFilterValues;
44
  use FacebookAds\Object\Values\CommentOrderValues;
45
  use FacebookAds\Object\Values\InsightsResultPeriodValues;
 
46
  use FacebookAds\Object\Traits\CannotDelete;
47
  use FacebookAds\Object\Traits\CannotUpdate;
48
  use FacebookAds\Object\Traits\FieldValidation;
352
  return $pending ? $request : $request->execute();
353
  }
354
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
355
  public function getSponsorTags(array $fields = array(), array $params = array(), $pending = false) {
356
  $this->assureId();
357
 
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Album.php CHANGED
@@ -36,7 +36,6 @@ use FacebookAds\Object\Values\CommentOrderValues;
36
  use FacebookAds\Object\Values\PhotoBackdatedTimeGranularityValues;
37
  use FacebookAds\Object\Values\PhotoUnpublishedContentTypeValues;
38
  use FacebookAds\Object\Values\ProfilePictureSourceTypeValues;
39
- use FacebookAds\Object\Values\ProfileTypeValues;
40
 
41
  /**
42
  * This class is auto-generated.
@@ -305,54 +304,6 @@ class Album extends AbstractCrudObject {
305
  return $pending ? $request : $request->execute();
306
  }
307
 
308
- public function getReactions(array $fields = array(), array $params = array(), $pending = false) {
309
- $this->assureId();
310
-
311
- $param_types = array(
312
- 'type' => 'type_enum',
313
- );
314
- $enums = array(
315
- 'type_enum' => ProfileTypeValues::getInstance()->getValues(),
316
- );
317
-
318
- $request = new ApiRequest(
319
- $this->api,
320
- $this->data['id'],
321
- RequestInterface::METHOD_GET,
322
- '/reactions',
323
- new Profile(),
324
- 'EDGE',
325
- Profile::getFieldsEnum()->getValues(),
326
- new TypeChecker($param_types, $enums)
327
- );
328
- $request->addParams($params);
329
- $request->addFields($fields);
330
- return $pending ? $request : $request->execute();
331
- }
332
-
333
- public function getSharedPosts(array $fields = array(), array $params = array(), $pending = false) {
334
- $this->assureId();
335
-
336
- $param_types = array(
337
- );
338
- $enums = array(
339
- );
340
-
341
- $request = new ApiRequest(
342
- $this->api,
343
- $this->data['id'],
344
- RequestInterface::METHOD_GET,
345
- '/sharedposts',
346
- new Post(),
347
- 'EDGE',
348
- Post::getFieldsEnum()->getValues(),
349
- new TypeChecker($param_types, $enums)
350
- );
351
- $request->addParams($params);
352
- $request->addFields($fields);
353
- return $pending ? $request : $request->execute();
354
- }
355
-
356
  public function getSelf(array $fields = array(), array $params = array(), $pending = false) {
357
  $this->assureId();
358
 
36
  use FacebookAds\Object\Values\PhotoBackdatedTimeGranularityValues;
37
  use FacebookAds\Object\Values\PhotoUnpublishedContentTypeValues;
38
  use FacebookAds\Object\Values\ProfilePictureSourceTypeValues;
 
39
 
40
  /**
41
  * This class is auto-generated.
304
  return $pending ? $request : $request->execute();
305
  }
306
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
307
  public function getSelf(array $fields = array(), array $params = array(), $pending = false) {
308
  $this->assureId();
309
 
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Application.php CHANGED
@@ -46,7 +46,6 @@ use FacebookAds\Object\Values\ApplicationSortOrderValues;
46
  use FacebookAds\Object\Values\ApplicationSupportedPlatformsValues;
47
  use FacebookAds\Object\Values\DACheckConnectionMethodValues;
48
  use FacebookAds\Object\Values\EventTypeValues;
49
- use FacebookAds\Object\Values\LiveVideoBroadcastStatusValues;
50
 
51
  /**
52
  * This class is auto-generated.
@@ -1058,31 +1057,6 @@ class Application extends AbstractCrudObject {
1058
  return $pending ? $request : $request->execute();
1059
  }
1060
 
1061
- public function getLiveVideos(array $fields = array(), array $params = array(), $pending = false) {
1062
- $this->assureId();
1063
-
1064
- $param_types = array(
1065
- 'broadcast_status' => 'broadcast_status_enum',
1066
- );
1067
- $enums = array(
1068
- 'broadcast_status_enum' => LiveVideoBroadcastStatusValues::getInstance()->getValues(),
1069
- );
1070
-
1071
- $request = new ApiRequest(
1072
- $this->api,
1073
- $this->data['id'],
1074
- RequestInterface::METHOD_GET,
1075
- '/live_videos',
1076
- new LiveVideo(),
1077
- 'EDGE',
1078
- LiveVideo::getFieldsEnum()->getValues(),
1079
- new TypeChecker($param_types, $enums)
1080
- );
1081
- $request->addParams($params);
1082
- $request->addFields($fields);
1083
- return $pending ? $request : $request->execute();
1084
- }
1085
-
1086
  public function createMmpAuditing(array $fields = array(), array $params = array(), $pending = false) {
1087
  $this->assureId();
1088
 
@@ -1177,29 +1151,6 @@ class Application extends AbstractCrudObject {
1177
  return $pending ? $request : $request->execute();
1178
  }
1179
 
1180
- public function getOzoneRelease(array $fields = array(), array $params = array(), $pending = false) {
1181
- $this->assureId();
1182
-
1183
- $param_types = array(
1184
- );
1185
- $enums = array(
1186
- );
1187
-
1188
- $request = new ApiRequest(
1189
- $this->api,
1190
- $this->data['id'],
1191
- RequestInterface::METHOD_GET,
1192
- '/ozone_release',
1193
- new AbstractCrudObject(),
1194
- 'EDGE',
1195
- array(),
1196
- new TypeChecker($param_types, $enums)
1197
- );
1198
- $request->addParams($params);
1199
- $request->addFields($fields);
1200
- return $pending ? $request : $request->execute();
1201
- }
1202
-
1203
  public function createPageActivity(array $fields = array(), array $params = array(), $pending = false) {
1204
  $this->assureId();
1205
 
46
  use FacebookAds\Object\Values\ApplicationSupportedPlatformsValues;
47
  use FacebookAds\Object\Values\DACheckConnectionMethodValues;
48
  use FacebookAds\Object\Values\EventTypeValues;
 
49
 
50
  /**
51
  * This class is auto-generated.
1057
  return $pending ? $request : $request->execute();
1058
  }
1059
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1060
  public function createMmpAuditing(array $fields = array(), array $params = array(), $pending = false) {
1061
  $this->assureId();
1062
 
1151
  return $pending ? $request : $request->execute();
1152
  }
1153
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1154
  public function createPageActivity(array $fields = array(), array $params = array(), $pending = false) {
1155
  $this->assureId();
1156
 
vendor/facebook/php-business-sdk/src/FacebookAds/Object/BusinessDataAPI/Content.php ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
+ *
5
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
+ * use, copy, modify, and distribute this software in source code or binary
7
+ * form for use in connection with the web services and APIs provided by
8
+ * Facebook.
9
+ *
10
+ * As with any software that integrates with the Facebook platform, your use
11
+ * of this software is subject to the Facebook Developer Principles and
12
+ * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
+ * shall be included in all copies or substantial portions of the software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
+ * DEALINGS IN THE SOFTWARE.
22
+ *
23
+ */
24
+
25
+ namespace FacebookAds\Object\BusinessDataAPI;
26
+
27
+ class Content {
28
+ /**
29
+ * Associative array for storing property values
30
+ * @var mixed[]
31
+ */
32
+ protected $container = array();
33
+
34
+ /**
35
+ * Constructor
36
+ * @param mixed[] $data Associated array of property value initializing the model
37
+ */
38
+ public function __construct(array $data = null) {
39
+ $this->container['product_id'] = isset($data['product_id']) ? $data['product_id'] : null;;
40
+ $this->container['quantity'] = isset($data['quantity']) ? $data['quantity'] : null;
41
+ $this->container['price'] = isset($data['price']) ? $data['price'] : null;
42
+ $this->container['title'] = isset($data['title']) ? $data['title'] : null;
43
+ $this->container['tax'] = isset($data['tax']) ? $data['tax'] : null;;
44
+ $this->container['external_content_id'] = isset($data['external_content_id']) ? $data['external_content_id'] : null;
45
+ }
46
+
47
+ /**
48
+ * Get Product Id.
49
+ * @return string Product Id
50
+ */
51
+ public function getProductId() {
52
+ return $this->container['product_id'];
53
+ }
54
+
55
+ /**
56
+ * Sets product id.
57
+ * @param string $product_id product id
58
+ * @return $this
59
+ */
60
+ public function setProductId($product_id) {
61
+ $this->container['product_id'] = $product_id;
62
+ return $this;
63
+ }
64
+
65
+ /**
66
+ * Get number of product.
67
+ * @return integer quantity
68
+ */
69
+ public function getQuantity() {
70
+ return $this->container['quantity'];
71
+ }
72
+
73
+ /**
74
+ * Set number of product.
75
+ * @param integer $quantity number of items
76
+ * @return $this
77
+ */
78
+ public function setQuantity($quantity) {
79
+ $this->container['quantity'] = $quantity;
80
+ return $this;
81
+ }
82
+
83
+ /**
84
+ * Get total price.
85
+ * @return float Price
86
+ */
87
+ public function getPrice() {
88
+ return $this->container['price'];
89
+ }
90
+
91
+ /**
92
+ * Set total price.
93
+ * @param float Price
94
+ * @return $this
95
+ */
96
+ public function setPrice($price) {
97
+ $this->container['price'] = $price;
98
+ return $this;
99
+ }
100
+
101
+ /**
102
+ * Get title.
103
+ * @return string title
104
+ */
105
+ public function getTitle() {
106
+ return $this->container['title'];
107
+ }
108
+
109
+ /**
110
+ * Sets title.
111
+ * @param string $title title
112
+ * @return $this
113
+ */
114
+ public function setTitle($title) {
115
+ $this->container['title'] = $title;
116
+ return $this;
117
+ }
118
+
119
+ /**
120
+ * Gets the string presentation of the object
121
+ * @return string
122
+ */
123
+ public function __toString() {
124
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
125
+ return json_encode($this, JSON_PRETTY_PRINT);
126
+ }
127
+
128
+ return json_encode($this);
129
+ }
130
+
131
+ /**
132
+ * convert to Json
133
+ * @return array
134
+ */
135
+ public function toJson() {
136
+ $request = array(
137
+ 'id' => $this->container['product_id'],
138
+ 'quantity' => $this->container['quantity'],
139
+ 'price' => $this->container['price'],
140
+ 'title' => $this->container['title'],
141
+ 'tax' => $this->container['tax'],
142
+ 'external_content_id' => $this->container['external_content_id'],
143
+ );
144
+
145
+ $request = array_filter($request);
146
+ return $request;
147
+ }
148
+ }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/BusinessDataAPI/CustomData.php ADDED
@@ -0,0 +1,301 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
+ *
5
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
+ * use, copy, modify, and distribute this software in source code or binary
7
+ * form for use in connection with the web services and APIs provided by
8
+ * Facebook.
9
+ *
10
+ * As with any software that integrates with the Facebook platform, your use
11
+ * of this software is subject to the Facebook Developer Principles and
12
+ * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
+ * shall be included in all copies or substantial portions of the software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
+ * DEALINGS IN THE SOFTWARE.
22
+ *
23
+ */
24
+
25
+ namespace FacebookAds\Object\BusinessDataAPI;
26
+
27
+ class CustomData {
28
+
29
+ /**
30
+ * Associative array for storing property values
31
+ * @var mixed[]
32
+ */
33
+ protected $container = array();
34
+
35
+ /**
36
+ * Constructor
37
+ * @param mixed[] $data Associated array of property value initializing the model
38
+ */
39
+ public function __construct(array $data = null) {
40
+ $this->container['value'] = isset($data['value']) ? $data['value'] : null;
41
+ $this->container['currency'] = isset($data['currency']) ? $data['currency'] : null;
42
+ $this->container['contents'] = isset($data['contents']) ? $data['contents'] : null;
43
+ $this->container['order_id'] = isset($data['order_id']) ? $data['order_id'] : null;
44
+ $this->container['status'] = isset($data['status']) ? $data['status'] : null;
45
+ $this->container['billing_contact'] = isset($data['billing_contact']) ? $data['billing_contact'] : null;
46
+ $this->container['shipping_contact'] = isset($data['shipping_contact']) ? $data['shipping_contact'] : null;
47
+ $this->container['external_order_id'] = isset($data['external_order_id']) ? $data['external_order_id'] : null;
48
+ $this->container['original_order_id'] = isset($data['original_order_id']) ? $data['original_order_id'] : null;
49
+ $this->container['message'] = isset($data['message']) ? $data['message'] : null;
50
+ }
51
+
52
+ /**
53
+ * Sets value
54
+ * @param float $value A numeric value associated with this event.
55
+ * This could be a monetary value or a value in some other metric.
56
+ * @return $this
57
+ */
58
+ public function setValue($value) {
59
+ $this->container['value'] = $value;
60
+
61
+ return $this;
62
+ }
63
+
64
+ /**
65
+ * Sets currency
66
+ * @param string $currency The currency for the value specified, if applicable.
67
+ * Currency must be a valid ISO 4217 three digit currency code.
68
+ * @return $this
69
+ */
70
+ public function setCurrency($currency) {
71
+ $this->container['currency'] = $currency;
72
+
73
+ return $this;
74
+ }
75
+
76
+ /**
77
+ * Sets contents
78
+ * @param Content[] $contents A list of Content objects that contain the product IDs associated with
79
+ * the event plus information about the products.
80
+ * @return $this
81
+ */
82
+ public function setContents($contents) {
83
+ $this->container['contents'] = $contents;
84
+
85
+ return $this;
86
+ }
87
+
88
+ /**
89
+ * Sets order_id
90
+ * @param string $order_id The order ID for this transaction as a String.
91
+ * @return $this
92
+ */
93
+ public function setOrderId($order_id) {
94
+ $this->container['order_id'] = $order_id;
95
+
96
+ return $this;
97
+ }
98
+
99
+ /**
100
+ * Sets status
101
+ * @param status of the order
102
+ *
103
+ * @return $this
104
+ */
105
+ public function setStatus($status) {
106
+ $this->container['status'] = $status;
107
+
108
+ return $this;
109
+ }
110
+
111
+ /**
112
+ * Sets billing contact
113
+ * @param billing contact of the order
114
+ *
115
+ * @return $this
116
+ */
117
+ public function setBillingContact($billing_contact) {
118
+ $this->container['billing_contact'] = $billing_contact;
119
+
120
+ return $this;
121
+ }
122
+
123
+ /**
124
+ * Sets shipping contact
125
+ * @param shipping contact of the order
126
+ *
127
+ * @return $this
128
+ */
129
+ public function setShippingContact($shipping_contact) {
130
+ $this->container['shipping_contact'] = $shipping_contact;
131
+
132
+ return $this;
133
+ }
134
+
135
+ /**
136
+ * Sets external order id
137
+ * @param unique order id
138
+ *
139
+ * @return $this
140
+ */
141
+ public function setExternalOrderId($external_order_id) {
142
+ $this->container['external_order_id'] = $external_order_id;
143
+
144
+ return $this;
145
+ }
146
+
147
+ /**
148
+ * Sets original order id
149
+ * @param original order id for Refund event.
150
+ *
151
+ * @return $this
152
+ */
153
+ public function setOriginalOrderId($original_order_id) {
154
+ $this->container['original_order_id'] = $original_order_id;
155
+
156
+ return $this;
157
+ }
158
+
159
+ /**
160
+ * Sets message for Refund event
161
+ * @param message for Refund event
162
+ *
163
+ * @return $this
164
+ */
165
+ public function setMessage($message) {
166
+ $this->container['message'] = $message;
167
+
168
+ return $this;
169
+ }
170
+
171
+ public function toJson() {
172
+ $request = array();
173
+
174
+ $request['value'] = $this->getValue();
175
+ $request['currency'] = $this->getCurrency();
176
+ $request['order_id'] = $this->getOrderId();
177
+ $request['status'] = $this->getStatus();
178
+ $request['billing_contact'] = $this->getBillingContact()->toJson();
179
+ $request['shipping_contact'] = $this->getShippingContact()->toJson();
180
+ $request['original_order_id'] = $this->getOriginalOrderId();
181
+ $request['external_order_id'] = $this->getExternalOrderId();
182
+ $request['message'] = $this->getMessage();
183
+
184
+ if (isset($this->container['contents'])) {
185
+ $contents = [];
186
+ foreach ($this->getContents() as $content) {
187
+ array_push($contents, $content->toJson());
188
+ }
189
+ $request['contents'] = $contents;
190
+ }
191
+
192
+ $request = array_filter($request, function($val) {
193
+ if (is_array($val)) {
194
+ return true;
195
+ } else {
196
+ return strlen($val);
197
+ }
198
+ });
199
+
200
+ return $request;
201
+ }
202
+
203
+ /**
204
+ * Gets a numeric value associated with this event.
205
+ * This could be a monetary value or a value in some other metric.
206
+ * @return float
207
+ */
208
+ public function getValue() {
209
+ return $this->container['value'];
210
+ }
211
+
212
+ /**
213
+ * Gets currency for the value specified, if applicable.
214
+ * @return string
215
+ */
216
+ public function getCurrency() {
217
+ return $this->container['currency'];
218
+ }
219
+
220
+ /**
221
+ * Gets a list of Content objects that contain the product IDs associated with
222
+ * the event plus information about the products.
223
+ * @return Content[]
224
+ */
225
+ public function getContents() {
226
+ return $this->container['contents'];
227
+ }
228
+
229
+ /**
230
+ * Gets the order ID for this transaction as a String.
231
+ * @return string
232
+ */
233
+ public function getOrderId() {
234
+ return $this->container['order_id'];
235
+ }
236
+
237
+ /**
238
+ * Gets the status of the registration event
239
+ * @return string
240
+ */
241
+ public function getStatus() {
242
+ return $this->container['status'];
243
+ }
244
+
245
+ /**
246
+ * Gets billing contact
247
+ *
248
+ * @return UserData
249
+ */
250
+ public function getBillingContact() {
251
+ return $this->container['billing_contact'];
252
+ }
253
+
254
+ /**
255
+ * Gets shipping contact
256
+ *
257
+ * @return UserData
258
+ */
259
+ public function getShippingContact() {
260
+ return $this->container['shipping_contact'];
261
+ }
262
+
263
+ /**
264
+ * Gets external order id
265
+ *
266
+ * @return string
267
+ */
268
+ public function getExternalOrderId() {
269
+ return $this->container['external_order_id'];
270
+ }
271
+
272
+ /**
273
+ * Gets original order id
274
+ *
275
+ * @return string
276
+ */
277
+ public function getOriginalOrderId() {
278
+ return $this->container['original_order_id'];
279
+ }
280
+
281
+ /**
282
+ * Gets message
283
+ *
284
+ * @return string
285
+ */
286
+ public function getMessage() {
287
+ return $this->container['message'];
288
+ }
289
+
290
+ /**
291
+ * Gets the string presentation of the object
292
+ * @return string
293
+ */
294
+ public function __toString() {
295
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
296
+ return json_encode($this, JSON_PRETTY_PRINT);
297
+ }
298
+
299
+ return json_encode($this);
300
+ }
301
+ }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/BusinessDataAPI/Event.php ADDED
@@ -0,0 +1,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
+ *
5
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
+ * use, copy, modify, and distribute this software in source code or binary
7
+ * form for use in connection with the web services and APIs provided by
8
+ * Facebook.
9
+ *
10
+ * As with any software that integrates with the Facebook platform, your use
11
+ * of this software is subject to the Facebook Developer Principles and
12
+ * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
+ * shall be included in all copies or substantial portions of the software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
+ * DEALINGS IN THE SOFTWARE.
22
+ *
23
+ */
24
+
25
+ namespace FacebookAds\Object\BusinessDataAPI;
26
+
27
+ class Event {
28
+
29
+ /**
30
+ * Associative array for storing property values
31
+ * @var mixed[]
32
+ */
33
+ protected $container = array();
34
+
35
+ /**
36
+ * Constructor
37
+ * @param mixed[] $data Associated array of property value initalizing the model
38
+ */
39
+ public function __construct(array $data = null) {
40
+ $this->container['event_name'] = isset($data['event_name']) ? $data['event_name'] : null;
41
+ $this->container['event_time'] = isset($data['event_time']) ? $data['event_time'] : null;
42
+ $this->container['event_id'] = isset($data['event_id']) ? $data['event_id'] : null;
43
+ $this->container['user_data'] = isset($data['user_data']) ? $data['user_data'] : null;
44
+ $this->container['custom_data'] = isset($data['custom_data']) ? $data['custom_data'] : null;
45
+ $this->container['data_processing_options'] = isset($data['data_processing_options']) ? $data['data_processing_options'] : null;
46
+ $this->container['data_processing_options_country'] = isset($data['data_processing_options_country']) ? $data['data_processing_options_country'] : null;
47
+ $this->container['data_processing_options_state'] = isset($data['data_processing_options_state']) ? $data['data_processing_options_state'] : null;
48
+ }
49
+
50
+ /**
51
+ * Sets a Facebook pixel Standard Event or Custom Event name
52
+ * @param string $event_name A Facebook pixel Standard Event or Custom Event name.
53
+ * @return $this
54
+ */
55
+ public function setEventName($event_name) {
56
+ $this->container['event_name'] = $event_name;
57
+
58
+ return $this;
59
+ }
60
+
61
+ /**
62
+ * Sets a Unix timestamp in seconds indicating when the actual event occurred
63
+ * @param int $event_time A Unix timestamp in seconds indicating when the actual event occurred.
64
+ * @return $this
65
+ */
66
+ public function setEventTime($event_time) {
67
+ $this->container['event_time'] = $event_time;
68
+
69
+ return $this;
70
+ }
71
+
72
+ /**
73
+ * @param string $event_id This ID can be any unique string chosen by the advertiser.
74
+ * @return $this
75
+ */
76
+ public function setEventId($event_id) {
77
+ $this->container['event_id'] = $event_id;
78
+
79
+ return $this;
80
+ }
81
+
82
+ /**
83
+ * Sets UserData object that contains user data.
84
+ * @param FacebookAds\Object\BusinessDataAPI\UserData $user_data
85
+ * @return $this
86
+ */
87
+ public function setUserData($user_data) {
88
+ $this->container['user_data'] = $user_data;
89
+
90
+ return $this;
91
+ }
92
+
93
+ /**
94
+ * Sets CustomData object that includes additional business data about the event.
95
+ * @param FacebookAds\Object\BusinessDataAPI\CustomData $custom_data
96
+ * @return $this
97
+ */
98
+ public function setCustomData($custom_data) {
99
+ $this->container['custom_data'] = $custom_data;
100
+
101
+ return $this;
102
+ }
103
+
104
+ /**
105
+ * Sets the processing options you would like to enable for a specific event.
106
+ * For more details see: https://developers.facebook.com/docs/marketing-apis/data-processing-options
107
+ * @param string[], e.g. [] or ['LDU']
108
+ * @return $this
109
+ */
110
+ public function setDataProcessingOptions($data_processing_options) {
111
+ $this->container['data_processing_options'] = $data_processing_options;
112
+
113
+ return $this;
114
+ }
115
+
116
+ /**
117
+ * Sets a country that you want to associate to this data processing option. If you set a country, you must also set a state.
118
+ * For more details see: https://developers.facebook.com/docs/marketing-apis/data-processing-options
119
+ * @param int
120
+ * @return $this
121
+ */
122
+ public function setDataProcessingOptionsCountry($data_processing_options_country) {
123
+ $this->container['data_processing_options_country'] = $data_processing_options_country;
124
+
125
+ return $this;
126
+ }
127
+
128
+ /**
129
+ * Sets a state that you want to associate with this data processing option.
130
+ * For more details see: https://developers.facebook.com/docs/marketing-apis/data-processing-options
131
+ * @param int
132
+ * @return $this
133
+ *
134
+ */
135
+ public function setDataProcessingOptionsState($data_processing_options_state) {
136
+ $this->container['data_processing_options_state'] = $data_processing_options_state;
137
+
138
+ return $this;
139
+ }
140
+
141
+ /**
142
+ * convert to Json
143
+ * @return array
144
+ */
145
+ public function toJson() {
146
+ $request = array();
147
+
148
+ $request['event_name'] = $this->getEventName();
149
+ $request['event_time'] = $this->getEventTime();
150
+ $request['event_id'] = $this->getEventId();
151
+ $request['user_data'] = isset($this->container['user_data']) ? $this->getUserData()->toJson() : null;
152
+ $request['custom_data'] = isset($this->container['custom_data']) ? $this->getCustomData()->toJson() : null;
153
+
154
+ $request['data_processing_options'] = $this->getDataProcessingOptions();
155
+ $request['data_processing_options_country'] = $this->getDataProcessingOptionsCountry();
156
+ $request['data_processing_options_state'] = $this->getDataProcessingOptionsState();
157
+ $request = array_filter(
158
+ $request, function($val) {
159
+ if(is_array($val)) {
160
+ return true;
161
+ } else {
162
+ return strlen($val);
163
+ }
164
+ });
165
+
166
+ return $request;
167
+ }
168
+
169
+ /**
170
+ * Gets Facebook pixel Standard Event or Custom Event name.
171
+ * @return string
172
+ */
173
+ public function getEventName() {
174
+ return $this->container['event_name'];
175
+ }
176
+
177
+ /**
178
+ * Gets Unix timestamp in seconds indicating when the actual event occurred.
179
+ * @return int
180
+ */
181
+ public function getEventTime() {
182
+ return $this->container['event_time'];
183
+ }
184
+
185
+ /**
186
+ * Gets Event ID can be any string chosen by the advertiser.
187
+ * @return string
188
+ */
189
+ public function getEventId() {
190
+ return $this->container['event_id'];
191
+ }
192
+
193
+ /**
194
+ * Gets UserData object that contains user data
195
+ * @return FacebookAds\Object\BusinessDataAPI\UserData
196
+ */
197
+ public function getUserData() {
198
+ return $this->container['user_data'];
199
+ }
200
+
201
+ /**
202
+ * Gets customData object that includes additional business data about the event.
203
+ * @return FacebookAds\Object\BusinessDataAPI\CustomData
204
+ */
205
+ public function getCustomData() {
206
+ return $this->container['custom_data'];
207
+ }
208
+
209
+ /**
210
+ * Gets DataProcessionOptions value of Processing options you would like to enable for a specific event.
211
+ * @return string[]
212
+ */
213
+ public function getDataProcessingOptions() {
214
+ return $this->container['data_processing_options'];
215
+ }
216
+
217
+ /**
218
+ * Gets DataProcessionOptionsState value that represents the state that you want to associate with this data processing option.
219
+ * @return int
220
+ */
221
+ public function getDataProcessingOptionsState() {
222
+ return $this->container['data_processing_options_state'];
223
+ }
224
+
225
+ /**
226
+ * Gets DataProcessionOptionsCountry value that represents the country that you want to associate to this data processing option.
227
+ * @return int
228
+ */
229
+ public function getDataProcessingOptionsCountry() {
230
+ return $this->container['data_processing_options_country'];
231
+ }
232
+
233
+ /**
234
+ * Gets the string representation of the object
235
+ * @return string
236
+ */
237
+ public function __toString() {
238
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
239
+ return json_encode($this, JSON_PRETTY_PRINT);
240
+ }
241
+
242
+ return json_encode($this);
243
+ }
244
+ }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/BusinessDataAPI/EventRequest.php ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
+ *
5
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
+ * use, copy, modify, and distribute this software in source code or binary
7
+ * form for use in connection with the web services and APIs provided by
8
+ * Facebook.
9
+ *
10
+ * As with any software that integrates with the Facebook platform, your use
11
+ * of this software is subject to the Facebook Developer Principles and
12
+ * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
+ * shall be included in all copies or substantial portions of the software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
+ * DEALINGS IN THE SOFTWARE.
22
+ *
23
+ */
24
+
25
+ namespace FacebookAds\Object\BusinessDataAPI;
26
+
27
+ use FacebookAds\Api;
28
+ use FacebookAds\ApiConfig;
29
+ use FacebookAds\Object\Page;
30
+
31
+ /**
32
+ * Business Data API Event Request
33
+ *
34
+ * @category Class
35
+ */
36
+ class EventRequest {
37
+
38
+ /**
39
+ * Associative array for storing property values
40
+ * @var mixed[]
41
+ */
42
+ protected $container = array();
43
+
44
+ /**
45
+ * Constructor
46
+ * @param string $page_id page id
47
+ * @param mixed[] $data Associated array of property value initializing the model
48
+ */
49
+ public function __construct(string $page_id, array $data = null) {
50
+ $this->container['page_id'] = $page_id;
51
+ $this->container['events'] = isset($data['events']) ? $data['events'] : null;
52
+ }
53
+
54
+ /**
55
+ * Sets an array of Business Data Event objects
56
+ * @param FacebookAds\Object\BusinessDataAPI\Event[] $events An array of Business Data Event objects
57
+ * @return $this
58
+ */
59
+ public function setEvents($events) {
60
+ $this->container['events'] = $events;
61
+ return $this;
62
+ }
63
+
64
+ /**
65
+ * Sets Partner Agent, which specifies who is sending the event.
66
+ * @param string $partner_agent The partner agent who is sending the event
67
+ * @return $this
68
+ */
69
+ public function setPartnerAgent($partner_agent) {
70
+ $this->container['partner_agent'] = $partner_agent;
71
+
72
+ return $this;
73
+ }
74
+
75
+ /**
76
+ * Execute the request
77
+ * @return EventResponse
78
+ */
79
+ public function execute() {
80
+ $fields = array();
81
+ $params = $this->toJson();
82
+ $page = new Page($this->container['page_id']);
83
+ $response = $page->createBusinessDatum(
84
+ $fields,
85
+ $params,
86
+ );
87
+ $event_response = new EventResponse($response->exportAllData());
88
+ return $event_response;
89
+ }
90
+
91
+ /**
92
+ * convert to JSON
93
+ * @return array
94
+ */
95
+ public function toJson() {
96
+ $data = array();
97
+ $events = $this->getEvents();
98
+ if (!is_null($events)) {
99
+ foreach ($events as $event) {
100
+ $event_data = $event->toJson();
101
+ array_push($data, $event_data);
102
+ }
103
+ }
104
+
105
+ $payload = array(
106
+ 'data' => $data,
107
+ 'partner_agent' => $this->container['partner_agent'],
108
+ );
109
+ $payload = array_filter($payload);
110
+
111
+ return $payload;
112
+ }
113
+
114
+ /**
115
+ * Gets an array of Event objects
116
+ * @return FacebookAds\Object\BusinessDataAPI\Event[]
117
+ */
118
+ public function getEvents() {
119
+ return $this->container['events'];
120
+ }
121
+
122
+ /**
123
+ * Gets Partner Agent, which specifies who is sending the event.
124
+ * @return string
125
+ */
126
+ public function getPartnerAgent() {
127
+ return $this->container['partner_agent'];
128
+ }
129
+
130
+ /**
131
+ * Gets the string presentation of the object
132
+ * @return string
133
+ */
134
+ public function __toString() {
135
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
136
+ return json_encode($this, JSON_PRETTY_PRINT);
137
+ }
138
+
139
+ return json_encode($this);
140
+ }
141
+ }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/BusinessDataAPI/EventResponse.php ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
+ *
5
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
+ * use, copy, modify, and distribute this software in source code or binary
7
+ * form for use in connection with the web services and APIs provided by
8
+ * Facebook.
9
+ *
10
+ * As with any software that integrates with the Facebook platform, your use
11
+ * of this software is subject to the Facebook Developer Principles and
12
+ * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
+ * shall be included in all copies or substantial portions of the software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
+ * DEALINGS IN THE SOFTWARE.
22
+ *
23
+ */
24
+
25
+ namespace FacebookAds\Object\BusinessDataAPI;
26
+
27
+ /**
28
+ * event response.
29
+ *
30
+ * @category Class
31
+ */
32
+ class EventResponse {
33
+
34
+ /**
35
+ * Associative array for storing property values
36
+ * @var mixed[]
37
+ */
38
+ protected $container = array();
39
+
40
+ /**
41
+ * Constructor
42
+ * @param mixed[] $data Associated array of property value initalizing the model
43
+ */
44
+ public function __construct(array $data = null) {
45
+ $this->container['events_received'] = isset($data['events_received']) ? $data['events_received'] : null;
46
+ $this->container['events_dropped'] = isset($data['events_dropped']) ? $data['events_dropped'] : null;
47
+ $this->container['message'] = isset($data['message']) ? $data['message'] : null;
48
+ }
49
+
50
+
51
+ /**
52
+ * Gets number of events received.
53
+ * @return int
54
+ */
55
+ public function getEventsReceived() {
56
+ return $this->container['events_received'];
57
+ }
58
+
59
+ /**
60
+ * Sets number of events received.
61
+ * @param int $events_received number of events received.
62
+ * @return $this
63
+ */
64
+ public function setEventsReceived($events_received) {
65
+ $this->container['events_received'] = $events_received;
66
+
67
+ return $this;
68
+ }
69
+
70
+ /**
71
+ * Gets number of events dropped.
72
+ * @return int
73
+ */
74
+ public function getEventsDropped() {
75
+ return $this->container['events_dropped'];
76
+ }
77
+
78
+ /**
79
+ * Sets number of events dropped.
80
+ * @param int $events_dropped number of events dropped.
81
+ * @return $this
82
+ */
83
+ public function setEventsDropped($events_dropped) {
84
+ $this->container['events_dropped'] = $events_dropped;
85
+
86
+ return $this;
87
+ }
88
+
89
+ /**
90
+ * Gets response message.
91
+ * @return array
92
+ */
93
+ public function getMessage() {
94
+ return $this->container['message'];
95
+ }
96
+
97
+ /**
98
+ * Sets response message.
99
+ * @param array $message response message.
100
+ * @return $this
101
+ */
102
+ public function setMessage($message) {
103
+ $this->container['message'] = $message;
104
+
105
+ return $this;
106
+ }
107
+
108
+ /**
109
+ * Gets the string presentation of the object
110
+ * @return string
111
+ */
112
+ public function __toString() {
113
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
114
+ return json_encode($this, JSON_PRETTY_PRINT);
115
+ }
116
+ return json_encode($this);
117
+ }
118
+
119
+ }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/BusinessDataAPI/UserData.php ADDED
@@ -0,0 +1,320 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
+ *
5
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
+ * use, copy, modify, and distribute this software in source code or binary
7
+ * form for use in connection with the web services and APIs provided by
8
+ * Facebook.
9
+ *
10
+ * As with any software that integrates with the Facebook platform, your use
11
+ * of this software is subject to the Facebook Developer Principles and
12
+ * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
+ * shall be included in all copies or substantial portions of the software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
+ * DEALINGS IN THE SOFTWARE.
22
+ *
23
+ */
24
+
25
+ namespace FacebookAds\Object\BusinessDataAPI;
26
+
27
+ /**
28
+ * UserData is a set of identifiers Facebook can use for targeted attribution.
29
+ *
30
+ * @category Class
31
+ */
32
+ class UserData {
33
+
34
+ /**
35
+ * Associative array for storing property values
36
+ * @var mixed[]
37
+ */
38
+ protected $container = array();
39
+
40
+ /**
41
+ * Constructor
42
+ * @param mixed[] $data Associated array of property value initalizing the model
43
+ */
44
+ public function __construct(array $data = null) {
45
+ $this->container['email'] = isset($data['email']) ? $data['email'] : null;
46
+ $this->container['phone'] = isset($data['phone']) ? $data['phone'] : null;
47
+ $this->container['date_of_birth'] = isset($data['date_of_birth']) ? $data['date_of_birth'] : null;
48
+ $this->container['last_name'] = isset($data['last_name']) ? $data['last_name'] : null;
49
+ $this->container['first_name'] = isset($data['first_name']) ? $data['first_name'] : null;
50
+ $this->container['city'] = isset($data['city']) ? $data['city'] : null;
51
+ $this->container['state'] = isset($data['state']) ? $data['state'] : null;
52
+ $this->container['country_code'] = isset($data['country_code']) ? $data['country_code'] : null;
53
+ $this->container['zip_code'] = isset($data['zip_code']) ? $data['zip_code'] : null;
54
+ $this->container['external_id'] = isset($data['external_id']) ? $data['external_id'] : null;
55
+ $this->container['address'] = isset($data['address']) ? $data['address'] : null;
56
+ }
57
+
58
+
59
+ /**
60
+ * Sets an email address, in lowercase.
61
+ *
62
+ * Example: joe@eg.com
63
+ * @param string $email An email address, in lowercase.
64
+ * @return $this
65
+ */
66
+ public function setEmail($email) {
67
+ $this->container['email'] = $email;
68
+
69
+ return $this;
70
+ }
71
+
72
+ /**
73
+ * Sets a phone number. Include only digits with countryCode code, area code, and number.
74
+ *
75
+ * Example: 16505551212
76
+ * @param string $phone A phone number. Include only digits with country code, area code, and number.
77
+ * @return $this
78
+ */
79
+ public function setPhone($phone) {
80
+ $this->container['phone'] = $phone;
81
+
82
+ return $this;
83
+ }
84
+
85
+ /**
86
+ * Sets a date of birth given as year, month, and day.
87
+ *
88
+ * Example: 19971226 for December 26, 1997.
89
+ * @param string $date_of_birth A date of birth given as year, month, and day.
90
+ * @return $this
91
+ */
92
+ public function setDateOfBirth($date_of_birth) {
93
+ $this->container['date_of_birth'] = $date_of_birth;
94
+
95
+ return $this;
96
+ }
97
+
98
+ /**
99
+ * Sets a last name in lowercase.
100
+ *
101
+ * Example: smith
102
+ * @param string $last_name A last name in lowercase.
103
+ * @return $this
104
+ */
105
+ public function setLastName($last_name) {
106
+ $this->container['last_name'] = $last_name;
107
+
108
+ return $this;
109
+ }
110
+
111
+ /**
112
+ * Sets a first name in lowercase.
113
+ *
114
+ * Example: joe
115
+ * @param string $first_name A first name in lowercase.
116
+ * @return $this
117
+ */
118
+ public function setFirstName($first_name) {
119
+ $this->container['first_name'] = $first_name;
120
+
121
+ return $this;
122
+ }
123
+
124
+ /**
125
+ * Sets a city in lowercase without spaces or punctuation.
126
+ *
127
+ * Example: menlopark
128
+ * @param string $city A city in lowercase without spaces or punctuation.
129
+ * @return $this
130
+ */
131
+ public function setCity($city) {
132
+ $this->container['city'] = $city;
133
+
134
+ return $this;
135
+ }
136
+
137
+ /**
138
+ * Sets a two-letter state code in lowercase.
139
+ *
140
+ * Example: ca
141
+ * @param string $state A two-letter state code in lowercase.
142
+ * @return $this
143
+ */
144
+ public function setState($state) {
145
+ $this->container['state'] = $state;
146
+
147
+ return $this;
148
+ }
149
+
150
+ /**
151
+ * Sets a two-letter country code in lowercase.
152
+ *
153
+ * Example: us
154
+ * @param string $country_code two-letter country code in lowercase.
155
+ * @return $this
156
+ */
157
+ public function setCountryCode($country_code) {
158
+ $this->container['country_code'] = $country_code;
159
+
160
+ return $this;
161
+ }
162
+
163
+ /**
164
+ * Sets a five-digit zip code.
165
+ *
166
+ * Example: 94035
167
+ * @param string $zip_code A five-digit zip code.
168
+ * @return $this
169
+ */
170
+ public function setZipCode($zip_code) {
171
+ $this->container['zip_code'] = $zip_code;
172
+
173
+ return $this;
174
+ }
175
+
176
+ /**
177
+ * Sets any unique ID from the advertiser, such as loyalty membership IDs, user IDs, and external
178
+ * cookie IDs. In the Offline Conversions API, this is known as extern_id. For more information,
179
+ * see Offline Conversions, Providing External IDs. If External ID is being sent via other
180
+ * channels, then it should be sent in the same format via the server-side API.
181
+ * @param string $external_id Any unique ID from the advertiser, such as loyalty membership IDs,
182
+ * user IDs, and external cookie IDs.
183
+ * @return $this
184
+ */
185
+ public function setExternalId($external_id) {
186
+ $this->container['external_id'] = $external_id;
187
+
188
+ return $this;
189
+ }
190
+
191
+ /**
192
+ * Sets physical address
193
+ * Example: 1001 Westlake Ave
194
+ * @param string $address Physical address
195
+ * @return $this
196
+ */
197
+ public function setAddress($address) {
198
+ $this->container['address'] = $address;
199
+
200
+ return $this;
201
+ }
202
+
203
+ public function toJson() {
204
+ $request = array();
205
+
206
+ $request['em'] = $this->getEmail();
207
+ $request['ph'] = $this->getPhone();
208
+ $request['db'] = $this->getDateOfBirth();
209
+ $request['ln'] = $this->getLastName();
210
+ $request['fn'] = $this->getFirstName();
211
+ $request['ct'] = $this->getCity();
212
+ $request['st'] = $this->getState();
213
+ $request['zp'] = $this->getZipCode();
214
+ $request['country'] = $this->getCountryCode();
215
+ $request['external_id'] = $this->getExternalId();
216
+ $request['addr'] = $this->getAddress();
217
+ $request = array_filter($request);
218
+ return $request;
219
+ }
220
+
221
+ /**
222
+ * Gets an email address, in lowercase.
223
+ * @return string
224
+ */
225
+ public function getEmail() {
226
+ return $this->container['email'];
227
+ }
228
+
229
+ /**
230
+ * Gets a phone number
231
+ * @return string
232
+ */
233
+ public function getPhone() {
234
+ return $this->container['phone'];
235
+ }
236
+
237
+ /**
238
+ * Gets Date Of Birth.
239
+ * @return string
240
+ */
241
+ public function getDateOfBirth() {
242
+ return $this->container['date_of_birth'];
243
+ }
244
+
245
+ /**
246
+ * Gets Last Name.
247
+ * @return string
248
+ */
249
+ public function getLastName() {
250
+ return $this->container['last_name'];
251
+ }
252
+
253
+ /**
254
+ * Gets First Name.
255
+ * @return string
256
+ */
257
+ public function getFirstName() {
258
+ return $this->container['first_name'];
259
+ }
260
+
261
+ /**
262
+ * Gets city.
263
+ * @return string
264
+ */
265
+ public function getCity() {
266
+ return $this->container['city'];
267
+ }
268
+
269
+ /**
270
+ * Gets state.
271
+ * @return string
272
+ */
273
+ public function getState() {
274
+ return $this->container['state'];
275
+ }
276
+
277
+ /**
278
+ * Gets zip code
279
+ * @return string
280
+ */
281
+ public function getZipCode() {
282
+ return $this->container['zip_code'];
283
+ }
284
+
285
+ /**
286
+ * Gets country code.
287
+ * @return string
288
+ */
289
+ public function getCountryCode() {
290
+ return $this->container['country_code'];
291
+ }
292
+
293
+ /**
294
+ * Gets Any unique ID from the advertiser, such as loyalty membership IDs, user IDs, and external cookie IDs.
295
+ * @return string
296
+ */
297
+ public function getExternalId() {
298
+ return $this->container['external_id'];
299
+ }
300
+
301
+ /**
302
+ * Gets physical address
303
+ * @return string
304
+ */
305
+ public function getAddress() {
306
+ return $this->container['address'];
307
+ }
308
+
309
+ /**
310
+ * Gets the string presentation of the object
311
+ * @return string
312
+ */
313
+ public function __toString() {
314
+ if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
315
+ return json_encode($this, JSON_PRETTY_PRINT);
316
+ }
317
+
318
+ return json_encode($this);
319
+ }
320
+ }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Campaign.php CHANGED
@@ -347,6 +347,7 @@ class Campaign extends AbstractArchivableCrudObject {
347
  'time_range' => 'Object',
348
  'time_ranges' => 'list<Object>',
349
  'use_account_attribution_setting' => 'bool',
 
350
  );
351
  $enums = array(
352
  'action_attribution_windows_enum' => AdsInsightsActionAttributionWindowsValues::getInstance()->getValues(),
@@ -397,6 +398,7 @@ class Campaign extends AbstractArchivableCrudObject {
397
  'time_range' => 'Object',
398
  'time_ranges' => 'list<Object>',
399
  'use_account_attribution_setting' => 'bool',
 
400
  );
401
  $enums = array(
402
  'action_attribution_windows_enum' => AdsInsightsActionAttributionWindowsValues::getInstance()->getValues(),
@@ -505,6 +507,7 @@ class Campaign extends AbstractArchivableCrudObject {
505
  'budget_rebalance_flag' => 'bool',
506
  'daily_budget' => 'unsigned int',
507
  'execution_options' => 'list<execution_options_enum>',
 
508
  'iterative_split_test_configs' => 'list<Object>',
509
  'lifetime_budget' => 'unsigned int',
510
  'name' => 'string',
347
  'time_range' => 'Object',
348
  'time_ranges' => 'list<Object>',
349
  'use_account_attribution_setting' => 'bool',
350
+ 'use_unified_attribution_setting' => 'bool',
351
  );
352
  $enums = array(
353
  'action_attribution_windows_enum' => AdsInsightsActionAttributionWindowsValues::getInstance()->getValues(),
398
  'time_range' => 'Object',
399
  'time_ranges' => 'list<Object>',
400
  'use_account_attribution_setting' => 'bool',
401
+ 'use_unified_attribution_setting' => 'bool',
402
  );
403
  $enums = array(
404
  'action_attribution_windows_enum' => AdsInsightsActionAttributionWindowsValues::getInstance()->getValues(),
507
  'budget_rebalance_flag' => 'bool',
508
  'daily_budget' => 'unsigned int',
509
  'execution_options' => 'list<execution_options_enum>',
510
+ 'is_skadnetwork_attribution' => 'bool',
511
  'iterative_split_test_configs' => 'list<Object>',
512
  'lifetime_budget' => 'unsigned int',
513
  'name' => 'string',
vendor/facebook/php-business-sdk/src/FacebookAds/Object/{UserPaymentMethodsInfo.php → CatalogItemChannelsToIntegrityStatus.php} RENAMED
@@ -28,7 +28,7 @@ use FacebookAds\ApiRequest;
28
  use FacebookAds\Cursor;
29
  use FacebookAds\Http\RequestInterface;
30
  use FacebookAds\TypeChecker;
31
- use FacebookAds\Object\Fields\UserPaymentMethodsInfoFields;
32
 
33
  /**
34
  * This class is auto-generated.
@@ -39,13 +39,13 @@ use FacebookAds\Object\Fields\UserPaymentMethodsInfoFields;
39
  *
40
  */
41
 
42
- class UserPaymentMethodsInfo extends AbstractObject {
43
 
44
  /**
45
- * @return UserPaymentMethodsInfoFields
46
  */
47
  public static function getFieldsEnum() {
48
- return UserPaymentMethodsInfoFields::getInstance();
49
  }
50
 
51
  protected static function getReferencedEnums() {
28
  use FacebookAds\Cursor;
29
  use FacebookAds\Http\RequestInterface;
30
  use FacebookAds\TypeChecker;
31
+ use FacebookAds\Object\Fields\CatalogItemChannelsToIntegrityStatusFields;
32
 
33
  /**
34
  * This class is auto-generated.
39
  *
40
  */
41
 
42
+ class CatalogItemChannelsToIntegrityStatus extends AbstractObject {
43
 
44
  /**
45
+ * @return CatalogItemChannelsToIntegrityStatusFields
46
  */
47
  public static function getFieldsEnum() {
48
+ return CatalogItemChannelsToIntegrityStatusFields::getInstance();
49
  }
50
 
51
  protected static function getReferencedEnums() {
vendor/facebook/php-business-sdk/src/FacebookAds/Object/CustomAudience.php CHANGED
@@ -284,6 +284,32 @@ class CustomAudience extends AbstractCrudObject {
284
  return $pending ? $request : $request->execute();
285
  }
286
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
287
  public function deleteSelf(array $fields = array(), array $params = array(), $pending = false) {
288
  $this->assureId();
289
 
284
  return $pending ? $request : $request->execute();
285
  }
286
 
287
+ public function createUsersReplace(array $fields = array(), array $params = array(), $pending = false) {
288
+ $this->assureId();
289
+
290
+ $param_types = array(
291
+ 'namespace' => 'string',
292
+ 'payload' => 'Object',
293
+ 'session' => 'Object',
294
+ );
295
+ $enums = array(
296
+ );
297
+
298
+ $request = new ApiRequest(
299
+ $this->api,
300
+ $this->data['id'],
301
+ RequestInterface::METHOD_POST,
302
+ '/usersreplace',
303
+ new CustomAudience(),
304
+ 'EDGE',
305
+ CustomAudience::getFieldsEnum()->getValues(),
306
+ new TypeChecker($param_types, $enums)
307
+ );
308
+ $request->addParams($params);
309
+ $request->addFields($fields);
310
+ return $pending ? $request : $request->execute();
311
+ }
312
+
313
  public function deleteSelf(array $fields = array(), array $params = array(), $pending = false) {
314
  $this->assureId();
315
 
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/AdAccountCreationRequestFields.php DELETED
@@ -1,111 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
- *
5
- * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
- * use, copy, modify, and distribute this software in source code or binary
7
- * form for use in connection with the web services and APIs provided by
8
- * Facebook.
9
- *
10
- * As with any software that integrates with the Facebook platform, your use
11
- * of this software is subject to the Facebook Developer Principles and
12
- * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
- * shall be included in all copies or substantial portions of the software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
- * DEALINGS IN THE SOFTWARE.
22
- *
23
- */
24
-
25
- namespace FacebookAds\Object\Fields;
26
-
27
- use FacebookAds\Enum\AbstractEnum;
28
-
29
- /**
30
- * This class is auto-generated.
31
- *
32
- * For any issues or feature requests related to this class, please let us know
33
- * on github and we'll fix in our codegen framework. We'll not be able to accept
34
- * pull request for this class.
35
- *
36
- */
37
-
38
- class AdAccountCreationRequestFields extends AbstractEnum {
39
-
40
- const AD_ACCOUNTS_CURRENCY = 'ad_accounts_currency';
41
- const AD_ACCOUNTS_INFO = 'ad_accounts_info';
42
- const ADDITIONAL_COMMENT = 'additional_comment';
43
- const ADDRESS_IN_CHINESE = 'address_in_chinese';
44
- const ADDRESS_IN_ENGLISH = 'address_in_english';
45
- const ADDRESS_IN_LOCAL_LANGUAGE = 'address_in_local_language';
46
- const ADVERTISER_BUSINESS = 'advertiser_business';
47
- const APPEAL_REASON = 'appeal_reason';
48
- const BUSINESS = 'business';
49
- const BUSINESS_REGISTRATION_ID = 'business_registration_id';
50
- const CHINESE_LEGAL_ENTITY_NAME = 'chinese_legal_entity_name';
51
- const CONTACT = 'contact';
52
- const CREATOR = 'creator';
53
- const CREDIT_CARD_ID = 'credit_card_id';
54
- const DISAPPROVAL_REASONS = 'disapproval_reasons';
55
- const ENGLISH_LEGAL_ENTITY_NAME = 'english_legal_entity_name';
56
- const EXTENDED_CREDIT_ID = 'extended_credit_id';
57
- const ID = 'id';
58
- const IS_SMB = 'is_smb';
59
- const IS_TEST = 'is_test';
60
- const LEGAL_ENTITY_NAME_IN_LOCAL_LANGUAGE = 'legal_entity_name_in_local_language';
61
- const OE_REQUEST_ID = 'oe_request_id';
62
- const OFFICIAL_WEBSITE_URL = 'official_website_url';
63
- const PLANNING_AGENCY_BUSINESS = 'planning_agency_business';
64
- const PLANNING_AGENCY_BUSINESS_ID = 'planning_agency_business_id';
65
- const PROMOTABLE_APP_IDS = 'promotable_app_ids';
66
- const PROMOTABLE_PAGE_IDS = 'promotable_page_ids';
67
- const PROMOTABLE_URLS = 'promotable_urls';
68
- const REQUEST_CHANGE_REASONS = 'request_change_reasons';
69
- const STATUS = 'status';
70
- const SUBVERTICAL = 'subvertical';
71
- const TIME_CREATED = 'time_created';
72
- const VERTICAL = 'vertical';
73
-
74
- public function getFieldTypes() {
75
- return array(
76
- 'ad_accounts_currency' => 'string',
77
- 'ad_accounts_info' => 'list<Object>',
78
- 'additional_comment' => 'string',
79
- 'address_in_chinese' => 'string',
80
- 'address_in_english' => 'Object',
81
- 'address_in_local_language' => 'string',
82
- 'advertiser_business' => 'Business',
83
- 'appeal_reason' => 'Object',
84
- 'business' => 'Business',
85
- 'business_registration_id' => 'string',
86
- 'chinese_legal_entity_name' => 'string',
87
- 'contact' => 'Object',
88
- 'creator' => 'User',
89
- 'credit_card_id' => 'string',
90
- 'disapproval_reasons' => 'list<Object>',
91
- 'english_legal_entity_name' => 'string',
92
- 'extended_credit_id' => 'string',
93
- 'id' => 'string',
94
- 'is_smb' => 'bool',
95
- 'is_test' => 'bool',
96
- 'legal_entity_name_in_local_language' => 'string',
97
- 'oe_request_id' => 'string',
98
- 'official_website_url' => 'string',
99
- 'planning_agency_business' => 'Business',
100
- 'planning_agency_business_id' => 'string',
101
- 'promotable_app_ids' => 'list<string>',
102
- 'promotable_page_ids' => 'list<string>',
103
- 'promotable_urls' => 'list<string>',
104
- 'request_change_reasons' => 'list<Object>',
105
- 'status' => 'string',
106
- 'subvertical' => 'string',
107
- 'time_created' => 'datetime',
108
- 'vertical' => 'string',
109
- );
110
- }
111
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/AdAccountFields.php CHANGED
@@ -39,7 +39,6 @@ class AdAccountFields extends AbstractEnum {
39
 
40
  const ACCOUNT_ID = 'account_id';
41
  const ACCOUNT_STATUS = 'account_status';
42
- const AD_ACCOUNT_CREATION_REQUEST = 'ad_account_creation_request';
43
  const AD_ACCOUNT_PROMOTABLE_OBJECTS = 'ad_account_promotable_objects';
44
  const AGE = 'age';
45
  const AGENCY_CLIENT_DECLARATION = 'agency_client_declaration';
@@ -102,7 +101,6 @@ class AdAccountFields extends AbstractEnum {
102
  return array(
103
  'account_id' => 'string',
104
  'account_status' => 'unsigned int',
105
- 'ad_account_creation_request' => 'AdAccountCreationRequest',
106
  'ad_account_promotable_objects' => 'AdAccountPromotableObjects',
107
  'age' => 'float',
108
  'agency_client_declaration' => 'AgencyClientDeclaration',
39
 
40
  const ACCOUNT_ID = 'account_id';
41
  const ACCOUNT_STATUS = 'account_status';
 
42
  const AD_ACCOUNT_PROMOTABLE_OBJECTS = 'ad_account_promotable_objects';
43
  const AGE = 'age';
44
  const AGENCY_CLIENT_DECLARATION = 'agency_client_declaration';
101
  return array(
102
  'account_id' => 'string',
103
  'account_status' => 'unsigned int',
 
104
  'ad_account_promotable_objects' => 'AdAccountPromotableObjects',
105
  'age' => 'float',
106
  'agency_client_declaration' => 'AgencyClientDeclaration',
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/{FriendListFields.php → AdCreativeOmnichannelLinkSpecFields.php} RENAMED
@@ -35,19 +35,15 @@ use FacebookAds\Enum\AbstractEnum;
35
  *
36
  */
37
 
38
- class FriendListFields extends AbstractEnum {
39
 
40
- const ID = 'id';
41
- const LIST_TYPE = 'list_type';
42
- const NAME = 'name';
43
- const OWNER = 'owner';
44
 
45
  public function getFieldTypes() {
46
  return array(
47
- 'id' => 'string',
48
- 'list_type' => 'string',
49
- 'name' => 'string',
50
- 'owner' => 'string',
51
  );
52
  }
53
  }
35
  *
36
  */
37
 
38
+ class AdCreativeOmnichannelLinkSpecFields extends AbstractEnum {
39
 
40
+ const APP = 'app';
41
+ const WEB = 'web';
 
 
42
 
43
  public function getFieldTypes() {
44
  return array(
45
+ 'app' => 'Object',
46
+ 'web' => 'Object',
 
 
47
  );
48
  }
49
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/AdFields.php CHANGED
@@ -48,6 +48,7 @@ class AdFields extends AbstractEnum {
48
  const CAMPAIGN = 'campaign';
49
  const CAMPAIGN_ID = 'campaign_id';
50
  const CONFIGURED_STATUS = 'configured_status';
 
51
  const CONVERSION_SPECS = 'conversion_specs';
52
  const CREATED_TIME = 'created_time';
53
  const CREATIVE = 'creative';
@@ -91,6 +92,7 @@ class AdFields extends AbstractEnum {
91
  'campaign' => 'Campaign',
92
  'campaign_id' => 'string',
93
  'configured_status' => 'ConfiguredStatus',
 
94
  'conversion_specs' => 'list<ConversionActionQuery>',
95
  'created_time' => 'datetime',
96
  'creative' => 'AdCreative',
48
  const CAMPAIGN = 'campaign';
49
  const CAMPAIGN_ID = 'campaign_id';
50
  const CONFIGURED_STATUS = 'configured_status';
51
+ const CONVERSION_DOMAIN = 'conversion_domain';
52
  const CONVERSION_SPECS = 'conversion_specs';
53
  const CREATED_TIME = 'created_time';
54
  const CREATIVE = 'creative';
92
  'campaign' => 'Campaign',
93
  'campaign_id' => 'string',
94
  'configured_status' => 'ConfiguredStatus',
95
+ 'conversion_domain' => 'string',
96
  'conversion_specs' => 'list<ConversionActionQuery>',
97
  'created_time' => 'datetime',
98
  'creative' => 'AdCreative',
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/AdReportRunFields.php CHANGED
@@ -70,6 +70,7 @@ class AdReportRunFields extends AbstractEnum {
70
  const TIME_RANGE = 'time_range';
71
  const TIME_RANGES = 'time_ranges';
72
  const USE_ACCOUNT_ATTRIBUTION_SETTING = 'use_account_attribution_setting';
 
73
 
74
  public function getFieldTypes() {
75
  return array(
@@ -106,6 +107,7 @@ class AdReportRunFields extends AbstractEnum {
106
  'time_range' => 'Object',
107
  'time_ranges' => 'list<Object>',
108
  'use_account_attribution_setting' => 'bool',
 
109
  );
110
  }
111
  }
70
  const TIME_RANGE = 'time_range';
71
  const TIME_RANGES = 'time_ranges';
72
  const USE_ACCOUNT_ATTRIBUTION_SETTING = 'use_account_attribution_setting';
73
+ const USE_UNIFIED_ATTRIBUTION_SETTING = 'use_unified_attribution_setting';
74
 
75
  public function getFieldTypes() {
76
  return array(
107
  'time_range' => 'Object',
108
  'time_ranges' => 'list<Object>',
109
  'use_account_attribution_setting' => 'bool',
110
+ 'use_unified_attribution_setting' => 'bool',
111
  );
112
  }
113
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/CampaignFields.php CHANGED
@@ -53,6 +53,7 @@ class CampaignFields extends AbstractEnum {
53
  const DAILY_BUDGET = 'daily_budget';
54
  const EFFECTIVE_STATUS = 'effective_status';
55
  const ID = 'id';
 
56
  const ISSUES_INFO = 'issues_info';
57
  const LAST_BUDGET_TOGGLING_TIME = 'last_budget_toggling_time';
58
  const LIFETIME_BUDGET = 'lifetime_budget';
@@ -61,6 +62,7 @@ class CampaignFields extends AbstractEnum {
61
  const PACING_TYPE = 'pacing_type';
62
  const PROMOTED_OBJECT = 'promoted_object';
63
  const RECOMMENDATIONS = 'recommendations';
 
64
  const SOURCE_CAMPAIGN = 'source_campaign';
65
  const SOURCE_CAMPAIGN_ID = 'source_campaign_id';
66
  const SPECIAL_AD_CATEGORIES = 'special_ad_categories';
@@ -75,7 +77,6 @@ class CampaignFields extends AbstractEnum {
75
  const ADBATCH = 'adbatch';
76
  const EXECUTION_OPTIONS = 'execution_options';
77
  const ITERATIVE_SPLIT_TEST_CONFIGS = 'iterative_split_test_configs';
78
- const SMART_PROMOTION_TYPE = 'smart_promotion_type';
79
  const UPSTREAM_EVENTS = 'upstream_events';
80
 
81
  public function getFieldTypes() {
@@ -96,6 +97,7 @@ class CampaignFields extends AbstractEnum {
96
  'daily_budget' => 'string',
97
  'effective_status' => 'EffectiveStatus',
98
  'id' => 'string',
 
99
  'issues_info' => 'list<AdCampaignIssuesInfo>',
100
  'last_budget_toggling_time' => 'datetime',
101
  'lifetime_budget' => 'string',
@@ -104,6 +106,7 @@ class CampaignFields extends AbstractEnum {
104
  'pacing_type' => 'list<string>',
105
  'promoted_object' => 'AdPromotedObject',
106
  'recommendations' => 'list<AdRecommendation>',
 
107
  'source_campaign' => 'Campaign',
108
  'source_campaign_id' => 'string',
109
  'special_ad_categories' => 'list<string>',
@@ -118,7 +121,6 @@ class CampaignFields extends AbstractEnum {
118
  'adbatch' => 'list<Object>',
119
  'execution_options' => 'list<ExecutionOptions>',
120
  'iterative_split_test_configs' => 'list<Object>',
121
- 'smart_promotion_type' => 'SmartPromotionType',
122
  'upstream_events' => 'map',
123
  );
124
  }
53
  const DAILY_BUDGET = 'daily_budget';
54
  const EFFECTIVE_STATUS = 'effective_status';
55
  const ID = 'id';
56
+ const IS_SKADNETWORK_ATTRIBUTION = 'is_skadnetwork_attribution';
57
  const ISSUES_INFO = 'issues_info';
58
  const LAST_BUDGET_TOGGLING_TIME = 'last_budget_toggling_time';
59
  const LIFETIME_BUDGET = 'lifetime_budget';
62
  const PACING_TYPE = 'pacing_type';
63
  const PROMOTED_OBJECT = 'promoted_object';
64
  const RECOMMENDATIONS = 'recommendations';
65
+ const SMART_PROMOTION_TYPE = 'smart_promotion_type';
66
  const SOURCE_CAMPAIGN = 'source_campaign';
67
  const SOURCE_CAMPAIGN_ID = 'source_campaign_id';
68
  const SPECIAL_AD_CATEGORIES = 'special_ad_categories';
77
  const ADBATCH = 'adbatch';
78
  const EXECUTION_OPTIONS = 'execution_options';
79
  const ITERATIVE_SPLIT_TEST_CONFIGS = 'iterative_split_test_configs';
 
80
  const UPSTREAM_EVENTS = 'upstream_events';
81
 
82
  public function getFieldTypes() {
97
  'daily_budget' => 'string',
98
  'effective_status' => 'EffectiveStatus',
99
  'id' => 'string',
100
+ 'is_skadnetwork_attribution' => 'bool',
101
  'issues_info' => 'list<AdCampaignIssuesInfo>',
102
  'last_budget_toggling_time' => 'datetime',
103
  'lifetime_budget' => 'string',
106
  'pacing_type' => 'list<string>',
107
  'promoted_object' => 'AdPromotedObject',
108
  'recommendations' => 'list<AdRecommendation>',
109
+ 'smart_promotion_type' => 'string',
110
  'source_campaign' => 'Campaign',
111
  'source_campaign_id' => 'string',
112
  'special_ad_categories' => 'list<string>',
121
  'adbatch' => 'list<Object>',
122
  'execution_options' => 'list<ExecutionOptions>',
123
  'iterative_split_test_configs' => 'list<Object>',
 
124
  'upstream_events' => 'map',
125
  );
126
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/{UserPaymentModulesOptionsFields.php → CatalogItemChannelsToIntegrityStatusFields.php} RENAMED
@@ -35,19 +35,15 @@ use FacebookAds\Enum\AbstractEnum;
35
  *
36
  */
37
 
38
- class UserPaymentModulesOptionsFields extends AbstractEnum {
39
 
40
- const ACCOUNT_ID = 'account_id';
41
- const AVAILABLE_PAYMENT_OPTIONS = 'available_payment_options';
42
- const COUNTRY = 'country';
43
- const CURRENCY = 'currency';
44
 
45
  public function getFieldTypes() {
46
  return array(
47
- 'account_id' => 'string',
48
- 'available_payment_options' => 'list<Object>',
49
- 'country' => 'string',
50
- 'currency' => 'string',
51
  );
52
  }
53
  }
35
  *
36
  */
37
 
38
+ class CatalogItemChannelsToIntegrityStatusFields extends AbstractEnum {
39
 
40
+ const CHANNELS = 'channels';
41
+ const REJECTION_INFORMATION = 'rejection_information';
 
 
42
 
43
  public function getFieldTypes() {
44
  return array(
45
+ 'channels' => 'list<string>',
46
+ 'rejection_information' => 'Object',
 
 
47
  );
48
  }
49
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/EventTourFields.php DELETED
@@ -1,73 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
- *
5
- * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
- * use, copy, modify, and distribute this software in source code or binary
7
- * form for use in connection with the web services and APIs provided by
8
- * Facebook.
9
- *
10
- * As with any software that integrates with the Facebook platform, your use
11
- * of this software is subject to the Facebook Developer Principles and
12
- * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
- * shall be included in all copies or substantial portions of the software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
- * DEALINGS IN THE SOFTWARE.
22
- *
23
- */
24
-
25
- namespace FacebookAds\Object\Fields;
26
-
27
- use FacebookAds\Enum\AbstractEnum;
28
-
29
- /**
30
- * This class is auto-generated.
31
- *
32
- * For any issues or feature requests related to this class, please let us know
33
- * on github and we'll fix in our codegen framework. We'll not be able to accept
34
- * pull request for this class.
35
- *
36
- */
37
-
38
- class EventTourFields extends AbstractEnum {
39
-
40
- const DESCRIPTION = 'description';
41
- const DOMINANT_COLOR = 'dominant_color';
42
- const END_TIME = 'end_time';
43
- const ID = 'id';
44
- const IS_PAST = 'is_past';
45
- const LAST_EVENT_TIMESTAMP = 'last_event_timestamp';
46
- const NAME = 'name';
47
- const NUM_EVENTS = 'num_events';
48
- const PHOTO = 'photo';
49
- const PUBLISHING_STATE = 'publishing_state';
50
- const SCHEDULED_PUBLISH_TIMESTAMP = 'scheduled_publish_timestamp';
51
- const START_TIME = 'start_time';
52
- const TICKETING_URI = 'ticketing_uri';
53
- const VIDEO = 'video';
54
-
55
- public function getFieldTypes() {
56
- return array(
57
- 'description' => 'string',
58
- 'dominant_color' => 'string',
59
- 'end_time' => 'string',
60
- 'id' => 'string',
61
- 'is_past' => 'bool',
62
- 'last_event_timestamp' => 'int',
63
- 'name' => 'string',
64
- 'num_events' => 'int',
65
- 'photo' => 'Photo',
66
- 'publishing_state' => 'string',
67
- 'scheduled_publish_timestamp' => 'int',
68
- 'start_time' => 'string',
69
- 'ticketing_uri' => 'string',
70
- 'video' => 'AdVideo',
71
- );
72
- }
73
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/GroupFields.php CHANGED
@@ -48,7 +48,6 @@ class GroupFields extends AbstractEnum {
48
  const MEMBER_COUNT = 'member_count';
49
  const MEMBER_REQUEST_COUNT = 'member_request_count';
50
  const NAME = 'name';
51
- const OWNER = 'owner';
52
  const PARENT = 'parent';
53
  const PERMISSIONS = 'permissions';
54
  const PRIVACY = 'privacy';
@@ -70,7 +69,6 @@ class GroupFields extends AbstractEnum {
70
  'member_count' => 'unsigned int',
71
  'member_request_count' => 'unsigned int',
72
  'name' => 'string',
73
- 'owner' => 'Object',
74
  'parent' => 'Object',
75
  'permissions' => 'list<string>',
76
  'privacy' => 'string',
48
  const MEMBER_COUNT = 'member_count';
49
  const MEMBER_REQUEST_COUNT = 'member_request_count';
50
  const NAME = 'name';
 
51
  const PARENT = 'parent';
52
  const PERMISSIONS = 'permissions';
53
  const PRIVACY = 'privacy';
69
  'member_count' => 'unsigned int',
70
  'member_request_count' => 'unsigned int',
71
  'name' => 'string',
 
72
  'parent' => 'Object',
73
  'permissions' => 'list<string>',
74
  'privacy' => 'string',
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/IGMediaFields.php CHANGED
@@ -37,7 +37,6 @@ use FacebookAds\Enum\AbstractEnum;
37
 
38
  class IGMediaFields extends AbstractEnum {
39
 
40
- const ALT_TEXT = 'alt_text';
41
  const CAPTION = 'caption';
42
  const COMMENTS_COUNT = 'comments_count';
43
  const ID = 'id';
@@ -55,7 +54,6 @@ class IGMediaFields extends AbstractEnum {
55
 
56
  public function getFieldTypes() {
57
  return array(
58
- 'alt_text' => 'string',
59
  'caption' => 'string',
60
  'comments_count' => 'int',
61
  'id' => 'string',
37
 
38
  class IGMediaFields extends AbstractEnum {
39
 
 
40
  const CAPTION = 'caption';
41
  const COMMENTS_COUNT = 'comments_count';
42
  const ID = 'id';
54
 
55
  public function getFieldTypes() {
56
  return array(
 
57
  'caption' => 'string',
58
  'comments_count' => 'int',
59
  'id' => 'string',
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/IGUserFields.php CHANGED
@@ -43,7 +43,6 @@ class IGUserFields extends AbstractEnum {
43
  const FOLLOWS_COUNT = 'follows_count';
44
  const ID = 'id';
45
  const IG_ID = 'ig_id';
46
- const IS_IG_SHOPPING_SELLER_POLICY_ENABLED = 'is_ig_shopping_seller_policy_enabled';
47
  const MEDIA_COUNT = 'media_count';
48
  const MENTIONED_COMMENT = 'mentioned_comment';
49
  const MENTIONED_MEDIA = 'mentioned_media';
@@ -61,7 +60,6 @@ class IGUserFields extends AbstractEnum {
61
  'follows_count' => 'int',
62
  'id' => 'string',
63
  'ig_id' => 'int',
64
- 'is_ig_shopping_seller_policy_enabled' => 'bool',
65
  'media_count' => 'int',
66
  'mentioned_comment' => 'IGComment',
67
  'mentioned_media' => 'IGMedia',
43
  const FOLLOWS_COUNT = 'follows_count';
44
  const ID = 'id';
45
  const IG_ID = 'ig_id';
 
46
  const MEDIA_COUNT = 'media_count';
47
  const MENTIONED_COMMENT = 'mentioned_comment';
48
  const MENTIONED_MEDIA = 'mentioned_media';
60
  'follows_count' => 'int',
61
  'id' => 'string',
62
  'ig_id' => 'int',
 
63
  'media_count' => 'int',
64
  'mentioned_comment' => 'IGComment',
65
  'mentioned_media' => 'IGMedia',
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/MessengerProfileFields.php CHANGED
@@ -43,6 +43,7 @@ class MessengerProfileFields extends AbstractEnum {
43
  const ICE_BREAKERS = 'ice_breakers';
44
  const PAYMENT_SETTINGS = 'payment_settings';
45
  const PERSISTENT_MENU = 'persistent_menu';
 
46
  const TARGET_AUDIENCE = 'target_audience';
47
  const WHITELISTED_DOMAINS = 'whitelisted_domains';
48
 
@@ -54,6 +55,7 @@ class MessengerProfileFields extends AbstractEnum {
54
  'ice_breakers' => 'list<Object>',
55
  'payment_settings' => 'Object',
56
  'persistent_menu' => 'list<Object>',
 
57
  'target_audience' => 'Object',
58
  'whitelisted_domains' => 'list<string>',
59
  );
43
  const ICE_BREAKERS = 'ice_breakers';
44
  const PAYMENT_SETTINGS = 'payment_settings';
45
  const PERSISTENT_MENU = 'persistent_menu';
46
+ const SUBJECT_TO_NEW_EU_PRIVACY_RULES = 'subject_to_new_eu_privacy_rules';
47
  const TARGET_AUDIENCE = 'target_audience';
48
  const WHITELISTED_DOMAINS = 'whitelisted_domains';
49
 
55
  'ice_breakers' => 'list<Object>',
56
  'payment_settings' => 'Object',
57
  'persistent_menu' => 'list<Object>',
58
+ 'subject_to_new_eu_privacy_rules' => 'bool',
59
  'target_audience' => 'Object',
60
  'whitelisted_domains' => 'list<string>',
61
  );
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/PagePostFields.php CHANGED
@@ -48,21 +48,16 @@ class PagePostFields extends AbstractEnum {
48
  const COMMENTS_MIRRORING_DOMAIN = 'comments_mirroring_domain';
49
  const COORDINATES = 'coordinates';
50
  const CREATED_TIME = 'created_time';
51
- const DELIVERY_GROWTH_OPTIMIZATIONS = 'delivery_growth_optimizations';
52
- const ENTITIES = 'entities';
53
  const EVENT = 'event';
54
  const EXPANDED_HEIGHT = 'expanded_height';
55
  const EXPANDED_WIDTH = 'expanded_width';
56
  const FEED_TARGETING = 'feed_targeting';
57
- const FORMATTING = 'formatting';
58
  const FROM = 'from';
59
  const FULL_PICTURE = 'full_picture';
60
  const HEIGHT = 'height';
61
  const ICON = 'icon';
62
  const ID = 'id';
63
- const IMPLICIT_PLACE = 'implicit_place';
64
  const INSTAGRAM_ELIGIBILITY = 'instagram_eligibility';
65
- const INSTREAM_ELIGIBILITY = 'instream_eligibility';
66
  const IS_APP_SHARE = 'is_app_share';
67
  const IS_ELIGIBLE_FOR_PROMOTION = 'is_eligible_for_promotion';
68
  const IS_EXPIRED = 'is_expired';
@@ -72,7 +67,6 @@ class PagePostFields extends AbstractEnum {
72
  const IS_POPULAR = 'is_popular';
73
  const IS_PUBLISHED = 'is_published';
74
  const IS_SPHERICAL = 'is_spherical';
75
- const LIVE_VIDEO_ELIGIBILITY = 'live_video_eligibility';
76
  const MESSAGE = 'message';
77
  const MESSAGE_TAGS = 'message_tags';
78
  const MULTI_SHARE_END_CARD = 'multi_share_end_card';
@@ -81,12 +75,10 @@ class PagePostFields extends AbstractEnum {
81
  const PERMALINK_URL = 'permalink_url';
82
  const PICTURE = 'picture';
83
  const PLACE = 'place';
84
- const POLL = 'poll';
85
  const PRIVACY = 'privacy';
86
  const PROMOTABLE_ID = 'promotable_id';
87
  const PROMOTION_STATUS = 'promotion_status';
88
  const PROPERTIES = 'properties';
89
- const PUBLISHING_STATS = 'publishing_stats';
90
  const SCHEDULED_PUBLISH_TIME = 'scheduled_publish_time';
91
  const SHARES = 'shares';
92
  const STATUS_TYPE = 'status_type';
@@ -96,12 +88,10 @@ class PagePostFields extends AbstractEnum {
96
  const TARGET = 'target';
97
  const TARGETING = 'targeting';
98
  const TIMELINE_VISIBILITY = 'timeline_visibility';
99
- const TRANSLATIONS = 'translations';
100
  const UPDATED_TIME = 'updated_time';
101
  const VIA = 'via';
102
  const VIDEO_BUYING_ELIGIBILITY = 'video_buying_eligibility';
103
  const WIDTH = 'width';
104
- const WILL_BE_AUTOCROPPED_WHEN_DELIVER_TO_INSTAGRAM = 'will_be_autocropped_when_deliver_to_instagram';
105
 
106
  public function getFieldTypes() {
107
  return array(
@@ -116,21 +106,16 @@ class PagePostFields extends AbstractEnum {
116
  'comments_mirroring_domain' => 'string',
117
  'coordinates' => 'Object',
118
  'created_time' => 'datetime',
119
- 'delivery_growth_optimizations' => 'list<string>',
120
- 'entities' => 'Object',
121
  'event' => 'Event',
122
  'expanded_height' => 'unsigned int',
123
  'expanded_width' => 'unsigned int',
124
  'feed_targeting' => 'Object',
125
- 'formatting' => 'string',
126
  'from' => 'Object',
127
  'full_picture' => 'string',
128
  'height' => 'unsigned int',
129
  'icon' => 'string',
130
  'id' => 'string',
131
- 'implicit_place' => 'Place',
132
  'instagram_eligibility' => 'string',
133
- 'instream_eligibility' => 'string',
134
  'is_app_share' => 'bool',
135
  'is_eligible_for_promotion' => 'bool',
136
  'is_expired' => 'bool',
@@ -140,7 +125,6 @@ class PagePostFields extends AbstractEnum {
140
  'is_popular' => 'bool',
141
  'is_published' => 'bool',
142
  'is_spherical' => 'bool',
143
- 'live_video_eligibility' => 'list<string>',
144
  'message' => 'string',
145
  'message_tags' => 'list',
146
  'multi_share_end_card' => 'bool',
@@ -149,12 +133,10 @@ class PagePostFields extends AbstractEnum {
149
  'permalink_url' => 'Object',
150
  'picture' => 'string',
151
  'place' => 'Place',
152
- 'poll' => 'Object',
153
  'privacy' => 'Privacy',
154
  'promotable_id' => 'string',
155
  'promotion_status' => 'string',
156
  'properties' => 'list',
157
- 'publishing_stats' => 'unsigned int',
158
  'scheduled_publish_time' => 'float',
159
  'shares' => 'Object',
160
  'status_type' => 'string',
@@ -164,12 +146,10 @@ class PagePostFields extends AbstractEnum {
164
  'target' => 'Profile',
165
  'targeting' => 'Object',
166
  'timeline_visibility' => 'string',
167
- 'translations' => 'map<string, string>',
168
  'updated_time' => 'datetime',
169
  'via' => 'Object',
170
  'video_buying_eligibility' => 'list<string>',
171
  'width' => 'unsigned int',
172
- 'will_be_autocropped_when_deliver_to_instagram' => 'bool',
173
  );
174
  }
175
  }
48
  const COMMENTS_MIRRORING_DOMAIN = 'comments_mirroring_domain';
49
  const COORDINATES = 'coordinates';
50
  const CREATED_TIME = 'created_time';
 
 
51
  const EVENT = 'event';
52
  const EXPANDED_HEIGHT = 'expanded_height';
53
  const EXPANDED_WIDTH = 'expanded_width';
54
  const FEED_TARGETING = 'feed_targeting';
 
55
  const FROM = 'from';
56
  const FULL_PICTURE = 'full_picture';
57
  const HEIGHT = 'height';
58
  const ICON = 'icon';
59
  const ID = 'id';
 
60
  const INSTAGRAM_ELIGIBILITY = 'instagram_eligibility';
 
61
  const IS_APP_SHARE = 'is_app_share';
62
  const IS_ELIGIBLE_FOR_PROMOTION = 'is_eligible_for_promotion';
63
  const IS_EXPIRED = 'is_expired';
67
  const IS_POPULAR = 'is_popular';
68
  const IS_PUBLISHED = 'is_published';
69
  const IS_SPHERICAL = 'is_spherical';
 
70
  const MESSAGE = 'message';
71
  const MESSAGE_TAGS = 'message_tags';
72
  const MULTI_SHARE_END_CARD = 'multi_share_end_card';
75
  const PERMALINK_URL = 'permalink_url';
76
  const PICTURE = 'picture';
77
  const PLACE = 'place';
 
78
  const PRIVACY = 'privacy';
79
  const PROMOTABLE_ID = 'promotable_id';
80
  const PROMOTION_STATUS = 'promotion_status';
81
  const PROPERTIES = 'properties';
 
82
  const SCHEDULED_PUBLISH_TIME = 'scheduled_publish_time';
83
  const SHARES = 'shares';
84
  const STATUS_TYPE = 'status_type';
88
  const TARGET = 'target';
89
  const TARGETING = 'targeting';
90
  const TIMELINE_VISIBILITY = 'timeline_visibility';
 
91
  const UPDATED_TIME = 'updated_time';
92
  const VIA = 'via';
93
  const VIDEO_BUYING_ELIGIBILITY = 'video_buying_eligibility';
94
  const WIDTH = 'width';
 
95
 
96
  public function getFieldTypes() {
97
  return array(
106
  'comments_mirroring_domain' => 'string',
107
  'coordinates' => 'Object',
108
  'created_time' => 'datetime',
 
 
109
  'event' => 'Event',
110
  'expanded_height' => 'unsigned int',
111
  'expanded_width' => 'unsigned int',
112
  'feed_targeting' => 'Object',
 
113
  'from' => 'Object',
114
  'full_picture' => 'string',
115
  'height' => 'unsigned int',
116
  'icon' => 'string',
117
  'id' => 'string',
 
118
  'instagram_eligibility' => 'string',
 
119
  'is_app_share' => 'bool',
120
  'is_eligible_for_promotion' => 'bool',
121
  'is_expired' => 'bool',
125
  'is_popular' => 'bool',
126
  'is_published' => 'bool',
127
  'is_spherical' => 'bool',
 
128
  'message' => 'string',
129
  'message_tags' => 'list',
130
  'multi_share_end_card' => 'bool',
133
  'permalink_url' => 'Object',
134
  'picture' => 'string',
135
  'place' => 'Place',
 
136
  'privacy' => 'Privacy',
137
  'promotable_id' => 'string',
138
  'promotion_status' => 'string',
139
  'properties' => 'list',
 
140
  'scheduled_publish_time' => 'float',
141
  'shares' => 'Object',
142
  'status_type' => 'string',
146
  'target' => 'Profile',
147
  'targeting' => 'Object',
148
  'timeline_visibility' => 'string',
 
149
  'updated_time' => 'datetime',
150
  'via' => 'Object',
151
  'video_buying_eligibility' => 'list<string>',
152
  'width' => 'unsigned int',
 
153
  );
154
  }
155
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/{UserPaymentMethodsInfoFields.php → PaymentEnginePaymentFields.php} RENAMED
@@ -35,25 +35,49 @@ use FacebookAds\Enum\AbstractEnum;
35
  *
36
  */
37
 
38
- class UserPaymentMethodsInfoFields extends AbstractEnum {
39
 
40
- const ACCOUNT_ID = 'account_id';
41
- const AVAILABLE_CARD_TYPES = 'available_card_types';
42
- const AVAILABLE_PAYMENT_METHODS = 'available_payment_methods';
43
- const AVAILABLE_PAYMENT_METHODS_DETAILS = 'available_payment_methods_details';
44
  const COUNTRY = 'country';
45
- const CURRENCY = 'currency';
46
- const EXISTING_PAYMENT_METHODS = 'existing_payment_methods';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
 
48
  public function getFieldTypes() {
49
  return array(
50
- 'account_id' => 'string',
51
- 'available_card_types' => 'list<string>',
52
- 'available_payment_methods' => 'list<string>',
53
- 'available_payment_methods_details' => 'list<Object>',
54
  'country' => 'string',
55
- 'currency' => 'string',
56
- 'existing_payment_methods' => 'list<Object>',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  );
58
  }
59
  }
35
  *
36
  */
37
 
38
+ class PaymentEnginePaymentFields extends AbstractEnum {
39
 
40
+ const ACTIONS = 'actions';
41
+ const APPLICATION = 'application';
 
 
42
  const COUNTRY = 'country';
43
+ const CREATED_TIME = 'created_time';
44
+ const DISPUTES = 'disputes';
45
+ const FRAUD_STATUS = 'fraud_status';
46
+ const FULFILLMENT_STATUS = 'fulfillment_status';
47
+ const ID = 'id';
48
+ const IS_FROM_AD = 'is_from_ad';
49
+ const IS_FROM_PAGE_POST = 'is_from_page_post';
50
+ const ITEMS = 'items';
51
+ const PAYOUT_FOREIGN_EXCHANGE_RATE = 'payout_foreign_exchange_rate';
52
+ const PHONE_SUPPORT_ELIGIBLE = 'phone_support_eligible';
53
+ const REFUNDABLE_AMOUNT = 'refundable_amount';
54
+ const REQUEST_ID = 'request_id';
55
+ const TAX = 'tax';
56
+ const TAX_COUNTRY = 'tax_country';
57
+ const TEST = 'test';
58
+ const USER = 'user';
59
 
60
  public function getFieldTypes() {
61
  return array(
62
+ 'actions' => 'list<Object>',
63
+ 'application' => 'Application',
 
 
64
  'country' => 'string',
65
+ 'created_time' => 'datetime',
66
+ 'disputes' => 'list<Object>',
67
+ 'fraud_status' => 'string',
68
+ 'fulfillment_status' => 'string',
69
+ 'id' => 'string',
70
+ 'is_from_ad' => 'bool',
71
+ 'is_from_page_post' => 'bool',
72
+ 'items' => 'list<Object>',
73
+ 'payout_foreign_exchange_rate' => 'float',
74
+ 'phone_support_eligible' => 'bool',
75
+ 'refundable_amount' => 'CurrencyAmount',
76
+ 'request_id' => 'string',
77
+ 'tax' => 'string',
78
+ 'tax_country' => 'string',
79
+ 'test' => 'unsigned int',
80
+ 'user' => 'User',
81
  );
82
  }
83
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/PaymentSubscriptionFields.php CHANGED
@@ -66,13 +66,13 @@ class PaymentSubscriptionFields extends AbstractEnum {
66
  return array(
67
  'amount' => 'string',
68
  'app_param_data' => 'string',
69
- 'application' => 'Profile',
70
  'billing_period' => 'string',
71
  'canceled_reason' => 'string',
72
  'created_time' => 'datetime',
73
  'currency' => 'string',
74
  'id' => 'string',
75
- 'last_payment' => 'string',
76
  'next_bill_time' => 'datetime',
77
  'next_period_amount' => 'string',
78
  'next_period_currency' => 'string',
@@ -87,7 +87,7 @@ class PaymentSubscriptionFields extends AbstractEnum {
87
  'trial_currency' => 'string',
88
  'trial_expiry_time' => 'datetime',
89
  'updated_time' => 'datetime',
90
- 'user' => 'Profile',
91
  );
92
  }
93
  }
66
  return array(
67
  'amount' => 'string',
68
  'app_param_data' => 'string',
69
+ 'application' => 'Application',
70
  'billing_period' => 'string',
71
  'canceled_reason' => 'string',
72
  'created_time' => 'datetime',
73
  'currency' => 'string',
74
  'id' => 'string',
75
+ 'last_payment' => 'PaymentEnginePayment',
76
  'next_bill_time' => 'datetime',
77
  'next_period_amount' => 'string',
78
  'next_period_currency' => 'string',
87
  'trial_currency' => 'string',
88
  'trial_expiry_time' => 'datetime',
89
  'updated_time' => 'datetime',
90
+ 'user' => 'User',
91
  );
92
  }
93
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/PostFields.php CHANGED
@@ -49,22 +49,17 @@ class PostFields extends AbstractEnum {
49
  const COMMENTS_MIRRORING_DOMAIN = 'comments_mirroring_domain';
50
  const COORDINATES = 'coordinates';
51
  const CREATED_TIME = 'created_time';
52
- const DELIVERY_GROWTH_OPTIMIZATIONS = 'delivery_growth_optimizations';
53
  const DESCRIPTION = 'description';
54
- const ENTITIES = 'entities';
55
  const EVENT = 'event';
56
  const EXPANDED_HEIGHT = 'expanded_height';
57
  const EXPANDED_WIDTH = 'expanded_width';
58
  const FEED_TARGETING = 'feed_targeting';
59
- const FORMATTING = 'formatting';
60
  const FROM = 'from';
61
  const FULL_PICTURE = 'full_picture';
62
  const HEIGHT = 'height';
63
  const ICON = 'icon';
64
  const ID = 'id';
65
- const IMPLICIT_PLACE = 'implicit_place';
66
  const INSTAGRAM_ELIGIBILITY = 'instagram_eligibility';
67
- const INSTREAM_ELIGIBILITY = 'instream_eligibility';
68
  const IS_APP_SHARE = 'is_app_share';
69
  const IS_ELIGIBLE_FOR_PROMOTION = 'is_eligible_for_promotion';
70
  const IS_EXPIRED = 'is_expired';
@@ -75,7 +70,6 @@ class PostFields extends AbstractEnum {
75
  const IS_PUBLISHED = 'is_published';
76
  const IS_SPHERICAL = 'is_spherical';
77
  const LINK = 'link';
78
- const LIVE_VIDEO_ELIGIBILITY = 'live_video_eligibility';
79
  const MESSAGE = 'message';
80
  const MESSAGE_TAGS = 'message_tags';
81
  const MULTI_SHARE_END_CARD = 'multi_share_end_card';
@@ -86,12 +80,10 @@ class PostFields extends AbstractEnum {
86
  const PERMALINK_URL = 'permalink_url';
87
  const PICTURE = 'picture';
88
  const PLACE = 'place';
89
- const POLL = 'poll';
90
  const PRIVACY = 'privacy';
91
  const PROMOTABLE_ID = 'promotable_id';
92
  const PROMOTION_STATUS = 'promotion_status';
93
  const PROPERTIES = 'properties';
94
- const PUBLISHING_STATS = 'publishing_stats';
95
  const SCHEDULED_PUBLISH_TIME = 'scheduled_publish_time';
96
  const SHARES = 'shares';
97
  const SOURCE = 'source';
@@ -102,13 +94,11 @@ class PostFields extends AbstractEnum {
102
  const TARGET = 'target';
103
  const TARGETING = 'targeting';
104
  const TIMELINE_VISIBILITY = 'timeline_visibility';
105
- const TRANSLATIONS = 'translations';
106
  const TYPE = 'type';
107
  const UPDATED_TIME = 'updated_time';
108
  const VIA = 'via';
109
  const VIDEO_BUYING_ELIGIBILITY = 'video_buying_eligibility';
110
  const WIDTH = 'width';
111
- const WILL_BE_AUTOCROPPED_WHEN_DELIVER_TO_INSTAGRAM = 'will_be_autocropped_when_deliver_to_instagram';
112
 
113
  public function getFieldTypes() {
114
  return array(
@@ -124,22 +114,17 @@ class PostFields extends AbstractEnum {
124
  'comments_mirroring_domain' => 'string',
125
  'coordinates' => 'Object',
126
  'created_time' => 'datetime',
127
- 'delivery_growth_optimizations' => 'list<string>',
128
  'description' => 'string',
129
- 'entities' => 'Object',
130
  'event' => 'Event',
131
  'expanded_height' => 'unsigned int',
132
  'expanded_width' => 'unsigned int',
133
  'feed_targeting' => 'Object',
134
- 'formatting' => 'string',
135
  'from' => 'Object',
136
  'full_picture' => 'string',
137
  'height' => 'unsigned int',
138
  'icon' => 'string',
139
  'id' => 'string',
140
- 'implicit_place' => 'Place',
141
  'instagram_eligibility' => 'string',
142
- 'instream_eligibility' => 'string',
143
  'is_app_share' => 'bool',
144
  'is_eligible_for_promotion' => 'bool',
145
  'is_expired' => 'bool',
@@ -149,8 +134,7 @@ class PostFields extends AbstractEnum {
149
  'is_popular' => 'bool',
150
  'is_published' => 'bool',
151
  'is_spherical' => 'bool',
152
- 'link' => 'string',
153
- 'live_video_eligibility' => 'list<string>',
154
  'message' => 'string',
155
  'message_tags' => 'list',
156
  'multi_share_end_card' => 'bool',
@@ -161,12 +145,10 @@ class PostFields extends AbstractEnum {
161
  'permalink_url' => 'Object',
162
  'picture' => 'string',
163
  'place' => 'Place',
164
- 'poll' => 'Object',
165
  'privacy' => 'Privacy',
166
  'promotable_id' => 'string',
167
  'promotion_status' => 'string',
168
  'properties' => 'list',
169
- 'publishing_stats' => 'unsigned int',
170
  'scheduled_publish_time' => 'float',
171
  'shares' => 'Object',
172
  'source' => 'string',
@@ -177,13 +159,11 @@ class PostFields extends AbstractEnum {
177
  'target' => 'Profile',
178
  'targeting' => 'Object',
179
  'timeline_visibility' => 'string',
180
- 'translations' => 'map<string, string>',
181
  'type' => 'string',
182
  'updated_time' => 'datetime',
183
  'via' => 'Object',
184
  'video_buying_eligibility' => 'list<string>',
185
  'width' => 'unsigned int',
186
- 'will_be_autocropped_when_deliver_to_instagram' => 'bool',
187
  );
188
  }
189
  }
49
  const COMMENTS_MIRRORING_DOMAIN = 'comments_mirroring_domain';
50
  const COORDINATES = 'coordinates';
51
  const CREATED_TIME = 'created_time';
 
52
  const DESCRIPTION = 'description';
 
53
  const EVENT = 'event';
54
  const EXPANDED_HEIGHT = 'expanded_height';
55
  const EXPANDED_WIDTH = 'expanded_width';
56
  const FEED_TARGETING = 'feed_targeting';
 
57
  const FROM = 'from';
58
  const FULL_PICTURE = 'full_picture';
59
  const HEIGHT = 'height';
60
  const ICON = 'icon';
61
  const ID = 'id';
 
62
  const INSTAGRAM_ELIGIBILITY = 'instagram_eligibility';
 
63
  const IS_APP_SHARE = 'is_app_share';
64
  const IS_ELIGIBLE_FOR_PROMOTION = 'is_eligible_for_promotion';
65
  const IS_EXPIRED = 'is_expired';
70
  const IS_PUBLISHED = 'is_published';
71
  const IS_SPHERICAL = 'is_spherical';
72
  const LINK = 'link';
 
73
  const MESSAGE = 'message';
74
  const MESSAGE_TAGS = 'message_tags';
75
  const MULTI_SHARE_END_CARD = 'multi_share_end_card';
80
  const PERMALINK_URL = 'permalink_url';
81
  const PICTURE = 'picture';
82
  const PLACE = 'place';
 
83
  const PRIVACY = 'privacy';
84
  const PROMOTABLE_ID = 'promotable_id';
85
  const PROMOTION_STATUS = 'promotion_status';
86
  const PROPERTIES = 'properties';
 
87
  const SCHEDULED_PUBLISH_TIME = 'scheduled_publish_time';
88
  const SHARES = 'shares';
89
  const SOURCE = 'source';
94
  const TARGET = 'target';
95
  const TARGETING = 'targeting';
96
  const TIMELINE_VISIBILITY = 'timeline_visibility';
 
97
  const TYPE = 'type';
98
  const UPDATED_TIME = 'updated_time';
99
  const VIA = 'via';
100
  const VIDEO_BUYING_ELIGIBILITY = 'video_buying_eligibility';
101
  const WIDTH = 'width';
 
102
 
103
  public function getFieldTypes() {
104
  return array(
114
  'comments_mirroring_domain' => 'string',
115
  'coordinates' => 'Object',
116
  'created_time' => 'datetime',
 
117
  'description' => 'string',
 
118
  'event' => 'Event',
119
  'expanded_height' => 'unsigned int',
120
  'expanded_width' => 'unsigned int',
121
  'feed_targeting' => 'Object',
 
122
  'from' => 'Object',
123
  'full_picture' => 'string',
124
  'height' => 'unsigned int',
125
  'icon' => 'string',
126
  'id' => 'string',
 
127
  'instagram_eligibility' => 'string',
 
128
  'is_app_share' => 'bool',
129
  'is_eligible_for_promotion' => 'bool',
130
  'is_expired' => 'bool',
134
  'is_popular' => 'bool',
135
  'is_published' => 'bool',
136
  'is_spherical' => 'bool',
137
+ 'link' => 'Object',
 
138
  'message' => 'string',
139
  'message_tags' => 'list',
140
  'multi_share_end_card' => 'bool',
145
  'permalink_url' => 'Object',
146
  'picture' => 'string',
147
  'place' => 'Place',
 
148
  'privacy' => 'Privacy',
149
  'promotable_id' => 'string',
150
  'promotion_status' => 'string',
151
  'properties' => 'list',
 
152
  'scheduled_publish_time' => 'float',
153
  'shares' => 'Object',
154
  'source' => 'string',
159
  'target' => 'Profile',
160
  'targeting' => 'Object',
161
  'timeline_visibility' => 'string',
 
162
  'type' => 'string',
163
  'updated_time' => 'datetime',
164
  'via' => 'Object',
165
  'video_buying_eligibility' => 'list<string>',
166
  'width' => 'unsigned int',
 
167
  );
168
  }
169
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/ProductItemFields.php CHANGED
@@ -72,6 +72,7 @@ class ProductItemFields extends AbstractEnum {
72
  const MOBILE_LINK = 'mobile_link';
73
  const NAME = 'name';
74
  const ORDERING_INDEX = 'ordering_index';
 
75
  const PATTERN = 'pattern';
76
  const PRICE = 'price';
77
  const PRODUCT_CATALOG = 'product_catalog';
@@ -155,6 +156,7 @@ class ProductItemFields extends AbstractEnum {
155
  'mobile_link' => 'string',
156
  'name' => 'string',
157
  'ordering_index' => 'int',
 
158
  'pattern' => 'string',
159
  'price' => 'string',
160
  'product_catalog' => 'ProductCatalog',
72
  const MOBILE_LINK = 'mobile_link';
73
  const NAME = 'name';
74
  const ORDERING_INDEX = 'ordering_index';
75
+ const PARENT_PRODUCT_ID = 'parent_product_id';
76
  const PATTERN = 'pattern';
77
  const PRICE = 'price';
78
  const PRODUCT_CATALOG = 'product_catalog';
156
  'mobile_link' => 'string',
157
  'name' => 'string',
158
  'ordering_index' => 'int',
159
+ 'parent_product_id' => 'string',
160
  'pattern' => 'string',
161
  'price' => 'string',
162
  'product_catalog' => 'ProductCatalog',
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/UnifiedThreadFields.php CHANGED
@@ -42,7 +42,6 @@ class UnifiedThreadFields extends AbstractEnum {
42
  const ID = 'id';
43
  const IS_SUBSCRIBED = 'is_subscribed';
44
  const LINK = 'link';
45
- const LINKED_GROUP = 'linked_group';
46
  const MESSAGE_COUNT = 'message_count';
47
  const NAME = 'name';
48
  const PARTICIPANTS = 'participants';
@@ -61,7 +60,6 @@ class UnifiedThreadFields extends AbstractEnum {
61
  'id' => 'string',
62
  'is_subscribed' => 'bool',
63
  'link' => 'string',
64
- 'linked_group' => 'Group',
65
  'message_count' => 'int',
66
  'name' => 'string',
67
  'participants' => 'Object',
42
  const ID = 'id';
43
  const IS_SUBSCRIBED = 'is_subscribed';
44
  const LINK = 'link';
 
45
  const MESSAGE_COUNT = 'message_count';
46
  const NAME = 'name';
47
  const PARTICIPANTS = 'participants';
60
  'id' => 'string',
61
  'is_subscribed' => 'bool',
62
  'link' => 'string',
 
63
  'message_count' => 'int',
64
  'name' => 'string',
65
  'participants' => 'Object',
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/UserFields.php CHANGED
@@ -38,14 +38,10 @@ use FacebookAds\Enum\AbstractEnum;
38
  class UserFields extends AbstractEnum {
39
 
40
  const ABOUT = 'about';
41
- const ADDRESS = 'address';
42
- const ADMIN_NOTES = 'admin_notes';
43
  const AGE_RANGE = 'age_range';
44
- const AUTH_METHOD = 'auth_method';
45
  const BIRTHDAY = 'birthday';
46
  const COVER = 'cover';
47
  const CURRENCY = 'currency';
48
- const DEVICES = 'devices';
49
  const EDUCATION = 'education';
50
  const EMAIL = 'email';
51
  const FAVORITE_ATHLETES = 'favorite_athletes';
@@ -68,15 +64,12 @@ class UserFields extends AbstractEnum {
68
  const LOCALE = 'locale';
69
  const LOCATION = 'location';
70
  const MEETING_FOR = 'meeting_for';
71
- const MESSENGER_JOIN_NOTIFICATIONS_ENABLED = 'messenger_join_notifications_enabled';
72
  const MIDDLE_NAME = 'middle_name';
73
  const NAME = 'name';
74
  const NAME_FORMAT = 'name_format';
75
  const PAYMENT_PRICEPOINTS = 'payment_pricepoints';
76
  const POLITICAL = 'political';
77
  const PROFILE_PIC = 'profile_pic';
78
- const PUBLIC_KEY = 'public_key';
79
- const PUBLISHED_TIMELINE = 'published_timeline';
80
  const QUOTES = 'quotes';
81
  const RELATIONSHIP_STATUS = 'relationship_status';
82
  const RELIGION = 'religion';
@@ -89,24 +82,17 @@ class UserFields extends AbstractEnum {
89
  const TIMEZONE = 'timezone';
90
  const TOKEN_FOR_BUSINESS = 'token_for_business';
91
  const UPDATED_TIME = 'updated_time';
92
- const USER_STORAGE_KEY = 'user_storage_key';
93
- const USERNAME = 'username';
94
  const VERIFIED = 'verified';
95
  const VIDEO_UPLOAD_LIMITS = 'video_upload_limits';
96
  const WEBSITE = 'website';
97
- const WORK = 'work';
98
 
99
  public function getFieldTypes() {
100
  return array(
101
  'about' => 'string',
102
- 'address' => 'Location',
103
- 'admin_notes' => 'list<PageAdminNote>',
104
  'age_range' => 'AgeRange',
105
- 'auth_method' => 'string',
106
  'birthday' => 'string',
107
  'cover' => 'UserCoverPhoto',
108
  'currency' => 'Currency',
109
- 'devices' => 'list<UserDevice>',
110
  'education' => 'list<Object>',
111
  'email' => 'string',
112
  'favorite_athletes' => 'list<Experience>',
@@ -129,15 +115,12 @@ class UserFields extends AbstractEnum {
129
  'locale' => 'string',
130
  'location' => 'Page',
131
  'meeting_for' => 'list<string>',
132
- 'messenger_join_notifications_enabled' => 'bool',
133
  'middle_name' => 'string',
134
  'name' => 'string',
135
  'name_format' => 'string',
136
  'payment_pricepoints' => 'PaymentPricepoints',
137
  'political' => 'string',
138
  'profile_pic' => 'string',
139
- 'public_key' => 'string',
140
- 'published_timeline' => 'bool',
141
  'quotes' => 'string',
142
  'relationship_status' => 'string',
143
  'religion' => 'string',
@@ -150,12 +133,9 @@ class UserFields extends AbstractEnum {
150
  'timezone' => 'float',
151
  'token_for_business' => 'string',
152
  'updated_time' => 'datetime',
153
- 'user_storage_key' => 'string',
154
- 'username' => 'string',
155
  'verified' => 'bool',
156
  'video_upload_limits' => 'VideoUploadLimits',
157
  'website' => 'string',
158
- 'work' => 'list<Object>',
159
  );
160
  }
161
  }
38
  class UserFields extends AbstractEnum {
39
 
40
  const ABOUT = 'about';
 
 
41
  const AGE_RANGE = 'age_range';
 
42
  const BIRTHDAY = 'birthday';
43
  const COVER = 'cover';
44
  const CURRENCY = 'currency';
 
45
  const EDUCATION = 'education';
46
  const EMAIL = 'email';
47
  const FAVORITE_ATHLETES = 'favorite_athletes';
64
  const LOCALE = 'locale';
65
  const LOCATION = 'location';
66
  const MEETING_FOR = 'meeting_for';
 
67
  const MIDDLE_NAME = 'middle_name';
68
  const NAME = 'name';
69
  const NAME_FORMAT = 'name_format';
70
  const PAYMENT_PRICEPOINTS = 'payment_pricepoints';
71
  const POLITICAL = 'political';
72
  const PROFILE_PIC = 'profile_pic';
 
 
73
  const QUOTES = 'quotes';
74
  const RELATIONSHIP_STATUS = 'relationship_status';
75
  const RELIGION = 'religion';
82
  const TIMEZONE = 'timezone';
83
  const TOKEN_FOR_BUSINESS = 'token_for_business';
84
  const UPDATED_TIME = 'updated_time';
 
 
85
  const VERIFIED = 'verified';
86
  const VIDEO_UPLOAD_LIMITS = 'video_upload_limits';
87
  const WEBSITE = 'website';
 
88
 
89
  public function getFieldTypes() {
90
  return array(
91
  'about' => 'string',
 
 
92
  'age_range' => 'AgeRange',
 
93
  'birthday' => 'string',
94
  'cover' => 'UserCoverPhoto',
95
  'currency' => 'Currency',
 
96
  'education' => 'list<Object>',
97
  'email' => 'string',
98
  'favorite_athletes' => 'list<Experience>',
115
  'locale' => 'string',
116
  'location' => 'Page',
117
  'meeting_for' => 'list<string>',
 
118
  'middle_name' => 'string',
119
  'name' => 'string',
120
  'name_format' => 'string',
121
  'payment_pricepoints' => 'PaymentPricepoints',
122
  'political' => 'string',
123
  'profile_pic' => 'string',
 
 
124
  'quotes' => 'string',
125
  'relationship_status' => 'string',
126
  'religion' => 'string',
133
  'timezone' => 'float',
134
  'token_for_business' => 'string',
135
  'updated_time' => 'datetime',
 
 
136
  'verified' => 'bool',
137
  'video_upload_limits' => 'VideoUploadLimits',
138
  'website' => 'string',
 
139
  );
140
  }
141
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Fields/{OfflineTermsOfServiceFields.php → WhatsAppBusinessProfileFields.php} RENAMED
@@ -35,17 +35,15 @@ use FacebookAds\Enum\AbstractEnum;
35
  *
36
  */
37
 
38
- class OfflineTermsOfServiceFields extends AbstractEnum {
39
 
40
- const ACCEPT_TIME = 'accept_time';
41
  const ID = 'id';
42
- const SIGNED_BY_USER = 'signed_by_user';
43
 
44
  public function getFieldTypes() {
45
  return array(
46
- 'accept_time' => 'int',
47
  'id' => 'string',
48
- 'signed_by_user' => 'User',
49
  );
50
  }
51
  }
35
  *
36
  */
37
 
38
+ class WhatsAppBusinessProfileFields extends AbstractEnum {
39
 
 
40
  const ID = 'id';
41
+ const NAME_VERIFICATION = 'name_verification';
42
 
43
  public function getFieldTypes() {
44
  return array(
 
45
  'id' => 'string',
46
+ 'name_verification' => 'Object',
47
  );
48
  }
49
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/FriendList.php DELETED
@@ -1,80 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
- *
5
- * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
- * use, copy, modify, and distribute this software in source code or binary
7
- * form for use in connection with the web services and APIs provided by
8
- * Facebook.
9
- *
10
- * As with any software that integrates with the Facebook platform, your use
11
- * of this software is subject to the Facebook Developer Principles and
12
- * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
- * shall be included in all copies or substantial portions of the software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
- * DEALINGS IN THE SOFTWARE.
22
- *
23
- */
24
-
25
- namespace FacebookAds\Object;
26
-
27
- use FacebookAds\ApiRequest;
28
- use FacebookAds\Cursor;
29
- use FacebookAds\Http\RequestInterface;
30
- use FacebookAds\TypeChecker;
31
- use FacebookAds\Object\Fields\FriendListFields;
32
-
33
- /**
34
- * This class is auto-generated.
35
- *
36
- * For any issues or feature requests related to this class, please let us know
37
- * on github and we'll fix in our codegen framework. We'll not be able to accept
38
- * pull request for this class.
39
- *
40
- */
41
-
42
- class FriendList extends AbstractCrudObject {
43
-
44
- /**
45
- * @return FriendListFields
46
- */
47
- public static function getFieldsEnum() {
48
- return FriendListFields::getInstance();
49
- }
50
-
51
- protected static function getReferencedEnums() {
52
- $ref_enums = array();
53
- return $ref_enums;
54
- }
55
-
56
-
57
- public function getSelf(array $fields = array(), array $params = array(), $pending = false) {
58
- $this->assureId();
59
-
60
- $param_types = array(
61
- );
62
- $enums = array(
63
- );
64
-
65
- $request = new ApiRequest(
66
- $this->api,
67
- $this->data['id'],
68
- RequestInterface::METHOD_GET,
69
- '/',
70
- new FriendList(),
71
- 'NODE',
72
- FriendList::getFieldsEnum()->getValues(),
73
- new TypeChecker($param_types, $enums)
74
- );
75
- $request->addParams($params);
76
- $request->addFields($fields);
77
- return $pending ? $request : $request->execute();
78
- }
79
-
80
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Group.php CHANGED
@@ -51,6 +51,14 @@ use FacebookAds\Object\Values\LiveVideoStereoscopicModeValues;
51
  use FacebookAds\Object\Values\LiveVideoStreamTypeValues;
52
  use FacebookAds\Object\Values\PhotoBackdatedTimeGranularityValues;
53
  use FacebookAds\Object\Values\PhotoUnpublishedContentTypeValues;
 
 
 
 
 
 
 
 
54
  use FacebookAds\Object\Values\ProfilePictureSourceBreakingChangeValues;
55
  use FacebookAds\Object\Values\ProfilePictureSourceTypeValues;
56
 
@@ -234,6 +242,35 @@ class Group extends AbstractCrudObject {
234
  return $pending ? $request : $request->execute();
235
  }
236
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
237
  public function createFeed(array $fields = array(), array $params = array(), $pending = false) {
238
  $this->assureId();
239
 
@@ -352,52 +389,14 @@ class Group extends AbstractCrudObject {
352
  'width' => 'unsigned int',
353
  );
354
  $enums = array(
355
- 'backdated_time_granularity_enum' => array(
356
- 'day',
357
- 'hour',
358
- 'min',
359
- 'month',
360
- 'none',
361
- 'year',
362
- ),
363
- 'checkin_entry_point_enum' => array(
364
- 'BRANDING_CHECKIN',
365
- 'BRANDING_OTHER',
366
- 'BRANDING_PHOTO',
367
- 'BRANDING_STATUS',
368
- ),
369
- 'formatting_enum' => array(
370
- 'MARKDOWN',
371
- 'PLAINTEXT',
372
- ),
373
- 'place_attachment_setting_enum' => array(
374
- '1',
375
- '2',
376
- ),
377
- 'post_surfaces_blacklist_enum' => array(
378
- '1',
379
- '2',
380
- '3',
381
- '4',
382
- '5',
383
- ),
384
- 'posting_to_redspace_enum' => array(
385
- 'disabled',
386
- 'enabled',
387
- ),
388
- 'target_surface_enum' => array(
389
- 'STORY',
390
- 'TIMELINE',
391
- ),
392
- 'unpublished_content_type_enum' => array(
393
- 'ADS_POST',
394
- 'DRAFT',
395
- 'INLINE_CREATED',
396
- 'PUBLISHED',
397
- 'REVIEWABLE_BRANDED_CONTENT',
398
- 'SCHEDULED',
399
- 'SCHEDULED_RECURRING',
400
- ),
401
  );
402
 
403
  $request = new ApiRequest(
@@ -405,6 +404,29 @@ class Group extends AbstractCrudObject {
405
  $this->data['id'],
406
  RequestInterface::METHOD_POST,
407
  '/feed',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
408
  new AbstractCrudObject(),
409
  'EDGE',
410
  array(),
51
  use FacebookAds\Object\Values\LiveVideoStreamTypeValues;
52
  use FacebookAds\Object\Values\PhotoBackdatedTimeGranularityValues;
53
  use FacebookAds\Object\Values\PhotoUnpublishedContentTypeValues;
54
+ use FacebookAds\Object\Values\PostBackdatedTimeGranularityValues;
55
+ use FacebookAds\Object\Values\PostCheckinEntryPointValues;
56
+ use FacebookAds\Object\Values\PostFormattingValues;
57
+ use FacebookAds\Object\Values\PostPlaceAttachmentSettingValues;
58
+ use FacebookAds\Object\Values\PostPostSurfacesBlacklistValues;
59
+ use FacebookAds\Object\Values\PostPostingToRedspaceValues;
60
+ use FacebookAds\Object\Values\PostTargetSurfaceValues;
61
+ use FacebookAds\Object\Values\PostUnpublishedContentTypeValues;
62
  use FacebookAds\Object\Values\ProfilePictureSourceBreakingChangeValues;
63
  use FacebookAds\Object\Values\ProfilePictureSourceTypeValues;
64
 
242
  return $pending ? $request : $request->execute();
243
  }
244
 
245
+ public function getFeed(array $fields = array(), array $params = array(), $pending = false) {
246
+ $this->assureId();
247
+
248
+ $param_types = array(
249
+ 'include_hidden' => 'bool',
250
+ 'q' => 'string',
251
+ 'show_expired' => 'bool',
252
+ 'since' => 'datetime',
253
+ 'until' => 'datetime',
254
+ 'with' => 'string',
255
+ );
256
+ $enums = array(
257
+ );
258
+
259
+ $request = new ApiRequest(
260
+ $this->api,
261
+ $this->data['id'],
262
+ RequestInterface::METHOD_GET,
263
+ '/feed',
264
+ new Post(),
265
+ 'EDGE',
266
+ Post::getFieldsEnum()->getValues(),
267
+ new TypeChecker($param_types, $enums)
268
+ );
269
+ $request->addParams($params);
270
+ $request->addFields($fields);
271
+ return $pending ? $request : $request->execute();
272
+ }
273
+
274
  public function createFeed(array $fields = array(), array $params = array(), $pending = false) {
275
  $this->assureId();
276
 
389
  'width' => 'unsigned int',
390
  );
391
  $enums = array(
392
+ 'backdated_time_granularity_enum' => PostBackdatedTimeGranularityValues::getInstance()->getValues(),
393
+ 'checkin_entry_point_enum' => PostCheckinEntryPointValues::getInstance()->getValues(),
394
+ 'formatting_enum' => PostFormattingValues::getInstance()->getValues(),
395
+ 'place_attachment_setting_enum' => PostPlaceAttachmentSettingValues::getInstance()->getValues(),
396
+ 'post_surfaces_blacklist_enum' => PostPostSurfacesBlacklistValues::getInstance()->getValues(),
397
+ 'posting_to_redspace_enum' => PostPostingToRedspaceValues::getInstance()->getValues(),
398
+ 'target_surface_enum' => PostTargetSurfaceValues::getInstance()->getValues(),
399
+ 'unpublished_content_type_enum' => PostUnpublishedContentTypeValues::getInstance()->getValues(),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
400
  );
401
 
402
  $request = new ApiRequest(
404
  $this->data['id'],
405
  RequestInterface::METHOD_POST,
406
  '/feed',
407
+ new Post(),
408
+ 'EDGE',
409
+ Post::getFieldsEnum()->getValues(),
410
+ new TypeChecker($param_types, $enums)
411
+ );
412
+ $request->addParams($params);
413
+ $request->addFields($fields);
414
+ return $pending ? $request : $request->execute();
415
+ }
416
+
417
+ public function getFiles(array $fields = array(), array $params = array(), $pending = false) {
418
+ $this->assureId();
419
+
420
+ $param_types = array(
421
+ );
422
+ $enums = array(
423
+ );
424
+
425
+ $request = new ApiRequest(
426
+ $this->api,
427
+ $this->data['id'],
428
+ RequestInterface::METHOD_GET,
429
+ '/files',
430
  new AbstractCrudObject(),
431
  'EDGE',
432
  array(),
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Link.php CHANGED
@@ -30,9 +30,6 @@ use FacebookAds\Http\RequestInterface;
30
  use FacebookAds\TypeChecker;
31
  use FacebookAds\Object\Fields\LinkFields;
32
  use FacebookAds\Object\Values\CommentCommentPrivacyValueValues;
33
- use FacebookAds\Object\Values\CommentFilterValues;
34
- use FacebookAds\Object\Values\CommentLiveFilterValues;
35
- use FacebookAds\Object\Values\CommentOrderValues;
36
 
37
  /**
38
  * This class is auto-generated.
@@ -58,36 +55,6 @@ class Link extends AbstractCrudObject {
58
  }
59
 
60
 
61
- public function getComments(array $fields = array(), array $params = array(), $pending = false) {
62
- $this->assureId();
63
-
64
- $param_types = array(
65
- 'filter' => 'filter_enum',
66
- 'live_filter' => 'live_filter_enum',
67
- 'order' => 'order_enum',
68
- 'since' => 'datetime',
69
- );
70
- $enums = array(
71
- 'filter_enum' => CommentFilterValues::getInstance()->getValues(),
72
- 'live_filter_enum' => CommentLiveFilterValues::getInstance()->getValues(),
73
- 'order_enum' => CommentOrderValues::getInstance()->getValues(),
74
- );
75
-
76
- $request = new ApiRequest(
77
- $this->api,
78
- $this->data['id'],
79
- RequestInterface::METHOD_GET,
80
- '/comments',
81
- new Comment(),
82
- 'EDGE',
83
- Comment::getFieldsEnum()->getValues(),
84
- new TypeChecker($param_types, $enums)
85
- );
86
- $request->addParams($params);
87
- $request->addFields($fields);
88
- return $pending ? $request : $request->execute();
89
- }
90
-
91
  public function createComment(array $fields = array(), array $params = array(), $pending = false) {
92
  $this->assureId();
93
 
@@ -148,29 +115,6 @@ class Link extends AbstractCrudObject {
148
  return $pending ? $request : $request->execute();
149
  }
150
 
151
- public function getSharedPosts(array $fields = array(), array $params = array(), $pending = false) {
152
- $this->assureId();
153
-
154
- $param_types = array(
155
- );
156
- $enums = array(
157
- );
158
-
159
- $request = new ApiRequest(
160
- $this->api,
161
- $this->data['id'],
162
- RequestInterface::METHOD_GET,
163
- '/sharedposts',
164
- new Post(),
165
- 'EDGE',
166
- Post::getFieldsEnum()->getValues(),
167
- new TypeChecker($param_types, $enums)
168
- );
169
- $request->addParams($params);
170
- $request->addFields($fields);
171
- return $pending ? $request : $request->execute();
172
- }
173
-
174
  public function getSelf(array $fields = array(), array $params = array(), $pending = false) {
175
  $this->assureId();
176
 
30
  use FacebookAds\TypeChecker;
31
  use FacebookAds\Object\Fields\LinkFields;
32
  use FacebookAds\Object\Values\CommentCommentPrivacyValueValues;
 
 
 
33
 
34
  /**
35
  * This class is auto-generated.
55
  }
56
 
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  public function createComment(array $fields = array(), array $params = array(), $pending = false) {
59
  $this->assureId();
60
 
115
  return $pending ? $request : $request->execute();
116
  }
117
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  public function getSelf(array $fields = array(), array $params = array(), $pending = false) {
119
  $this->assureId();
120
 
vendor/facebook/php-business-sdk/src/FacebookAds/Object/LiveVideo.php CHANGED
@@ -62,12 +62,12 @@ class LiveVideo extends AbstractCrudObject {
62
 
63
  protected static function getReferencedEnums() {
64
  $ref_enums = array();
65
- $ref_enums['BroadcastStatus'] = LiveVideoBroadcastStatusValues::getInstance()->getValues();
66
  $ref_enums['Projection'] = LiveVideoProjectionValues::getInstance()->getValues();
67
  $ref_enums['SpatialAudioFormat'] = LiveVideoSpatialAudioFormatValues::getInstance()->getValues();
68
  $ref_enums['Status'] = LiveVideoStatusValues::getInstance()->getValues();
69
  $ref_enums['StereoscopicMode'] = LiveVideoStereoscopicModeValues::getInstance()->getValues();
70
  $ref_enums['StreamType'] = LiveVideoStreamTypeValues::getInstance()->getValues();
 
71
  $ref_enums['Source'] = LiveVideoSourceValues::getInstance()->getValues();
72
  $ref_enums['LiveCommentModerationSetting'] = LiveVideoLiveCommentModerationSettingValues::getInstance()->getValues();
73
  return $ref_enums;
62
 
63
  protected static function getReferencedEnums() {
64
  $ref_enums = array();
 
65
  $ref_enums['Projection'] = LiveVideoProjectionValues::getInstance()->getValues();
66
  $ref_enums['SpatialAudioFormat'] = LiveVideoSpatialAudioFormatValues::getInstance()->getValues();
67
  $ref_enums['Status'] = LiveVideoStatusValues::getInstance()->getValues();
68
  $ref_enums['StereoscopicMode'] = LiveVideoStereoscopicModeValues::getInstance()->getValues();
69
  $ref_enums['StreamType'] = LiveVideoStreamTypeValues::getInstance()->getValues();
70
+ $ref_enums['BroadcastStatus'] = LiveVideoBroadcastStatusValues::getInstance()->getValues();
71
  $ref_enums['Source'] = LiveVideoSourceValues::getInstance()->getValues();
72
  $ref_enums['LiveCommentModerationSetting'] = LiveVideoLiveCommentModerationSettingValues::getInstance()->getValues();
73
  return $ref_enums;
vendor/facebook/php-business-sdk/src/FacebookAds/Object/OfflineTermsOfService.php DELETED
@@ -1,80 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
- *
5
- * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
- * use, copy, modify, and distribute this software in source code or binary
7
- * form for use in connection with the web services and APIs provided by
8
- * Facebook.
9
- *
10
- * As with any software that integrates with the Facebook platform, your use
11
- * of this software is subject to the Facebook Developer Principles and
12
- * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
- * shall be included in all copies or substantial portions of the software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
- * DEALINGS IN THE SOFTWARE.
22
- *
23
- */
24
-
25
- namespace FacebookAds\Object;
26
-
27
- use FacebookAds\ApiRequest;
28
- use FacebookAds\Cursor;
29
- use FacebookAds\Http\RequestInterface;
30
- use FacebookAds\TypeChecker;
31
- use FacebookAds\Object\Fields\OfflineTermsOfServiceFields;
32
-
33
- /**
34
- * This class is auto-generated.
35
- *
36
- * For any issues or feature requests related to this class, please let us know
37
- * on github and we'll fix in our codegen framework. We'll not be able to accept
38
- * pull request for this class.
39
- *
40
- */
41
-
42
- class OfflineTermsOfService extends AbstractCrudObject {
43
-
44
- /**
45
- * @return OfflineTermsOfServiceFields
46
- */
47
- public static function getFieldsEnum() {
48
- return OfflineTermsOfServiceFields::getInstance();
49
- }
50
-
51
- protected static function getReferencedEnums() {
52
- $ref_enums = array();
53
- return $ref_enums;
54
- }
55
-
56
-
57
- public function getSelf(array $fields = array(), array $params = array(), $pending = false) {
58
- $this->assureId();
59
-
60
- $param_types = array(
61
- );
62
- $enums = array(
63
- );
64
-
65
- $request = new ApiRequest(
66
- $this->api,
67
- $this->data['id'],
68
- RequestInterface::METHOD_GET,
69
- '/',
70
- new OfflineTermsOfService(),
71
- 'NODE',
72
- OfflineTermsOfService::getFieldsEnum()->getValues(),
73
- new TypeChecker($param_types, $enums)
74
- );
75
- $request->addParams($params);
76
- $request->addFields($fields);
77
- return $pending ? $request : $request->execute();
78
- }
79
-
80
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Page.php CHANGED
@@ -598,30 +598,6 @@ class Page extends AbstractCrudObject {
598
  return $pending ? $request : $request->execute();
599
  }
600
 
601
- public function deleteClaimedUrls(array $fields = array(), array $params = array(), $pending = false) {
602
- $this->assureId();
603
-
604
- $param_types = array(
605
- 'url' => 'string',
606
- );
607
- $enums = array(
608
- );
609
-
610
- $request = new ApiRequest(
611
- $this->api,
612
- $this->data['id'],
613
- RequestInterface::METHOD_DELETE,
614
- '/claimed_urls',
615
- new AbstractCrudObject(),
616
- 'EDGE',
617
- array(),
618
- new TypeChecker($param_types, $enums)
619
- );
620
- $request->addParams($params);
621
- $request->addFields($fields);
622
- return $pending ? $request : $request->execute();
623
- }
624
-
625
  public function getClaimedUrls(array $fields = array(), array $params = array(), $pending = false) {
626
  $this->assureId();
627
 
@@ -1705,7 +1681,6 @@ class Page extends AbstractCrudObject {
1705
  'location' => 'Object',
1706
  'location_page_id' => 'string',
1707
  'old_store_number' => 'unsigned int',
1708
- 'page_username' => 'string',
1709
  'permanently_closed' => 'bool',
1710
  'phone' => 'string',
1711
  'pickup_options' => 'list<pickup_options_enum>',
@@ -1887,6 +1862,7 @@ class Page extends AbstractCrudObject {
1887
  'PAYMENT_SETTINGS',
1888
  'PERSISTENT_MENU',
1889
  'PLATFORM',
 
1890
  'TARGET_AUDIENCE',
1891
  'WHITELISTED_DOMAINS',
1892
  ),
@@ -2966,9 +2942,9 @@ class Page extends AbstractCrudObject {
2966
  $this->data['id'],
2967
  RequestInterface::METHOD_GET,
2968
  '/tours',
2969
- new EventTour(),
2970
  'EDGE',
2971
- EventTour::getFieldsEnum()->getValues(),
2972
  new TypeChecker($param_types, $enums)
2973
  );
2974
  $request->addParams($params);
598
  return $pending ? $request : $request->execute();
599
  }
600
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
601
  public function getClaimedUrls(array $fields = array(), array $params = array(), $pending = false) {
602
  $this->assureId();
603
 
1681
  'location' => 'Object',
1682
  'location_page_id' => 'string',
1683
  'old_store_number' => 'unsigned int',
 
1684
  'permanently_closed' => 'bool',
1685
  'phone' => 'string',
1686
  'pickup_options' => 'list<pickup_options_enum>',
1862
  'PAYMENT_SETTINGS',
1863
  'PERSISTENT_MENU',
1864
  'PLATFORM',
1865
+ 'SUBJECT_TO_NEW_EU_PRIVACY_RULES',
1866
  'TARGET_AUDIENCE',
1867
  'WHITELISTED_DOMAINS',
1868
  ),
2942
  $this->data['id'],
2943
  RequestInterface::METHOD_GET,
2944
  '/tours',
2945
+ new AbstractCrudObject(),
2946
  'EDGE',
2947
+ array(),
2948
  new TypeChecker($param_types, $enums)
2949
  );
2950
  $request->addParams($params);
vendor/facebook/php-business-sdk/src/FacebookAds/Object/{EventTour.php → PaymentEnginePayment.php} RENAMED
@@ -28,7 +28,8 @@ use FacebookAds\ApiRequest;
28
  use FacebookAds\Cursor;
29
  use FacebookAds\Http\RequestInterface;
30
  use FacebookAds\TypeChecker;
31
- use FacebookAds\Object\Fields\EventTourFields;
 
32
 
33
  /**
34
  * This class is auto-generated.
@@ -39,37 +40,40 @@ use FacebookAds\Object\Fields\EventTourFields;
39
  *
40
  */
41
 
42
- class EventTour extends AbstractCrudObject {
43
 
44
  /**
45
- * @return EventTourFields
46
  */
47
  public static function getFieldsEnum() {
48
- return EventTourFields::getInstance();
49
  }
50
 
51
  protected static function getReferencedEnums() {
52
  $ref_enums = array();
 
53
  return $ref_enums;
54
  }
55
 
56
 
57
- public function getEvents(array $fields = array(), array $params = array(), $pending = false) {
58
  $this->assureId();
59
 
60
  $param_types = array(
 
61
  );
62
  $enums = array(
 
63
  );
64
 
65
  $request = new ApiRequest(
66
  $this->api,
67
  $this->data['id'],
68
- RequestInterface::METHOD_GET,
69
- '/events',
70
- new Event(),
71
  'EDGE',
72
- Event::getFieldsEnum()->getValues(),
73
  new TypeChecker($param_types, $enums)
74
  );
75
  $request->addParams($params);
@@ -77,22 +81,26 @@ class EventTour extends AbstractCrudObject {
77
  return $pending ? $request : $request->execute();
78
  }
79
 
80
- public function getPages(array $fields = array(), array $params = array(), $pending = false) {
81
  $this->assureId();
82
 
83
  $param_types = array(
 
 
 
84
  );
85
  $enums = array(
 
86
  );
87
 
88
  $request = new ApiRequest(
89
  $this->api,
90
  $this->data['id'],
91
- RequestInterface::METHOD_GET,
92
- '/pages',
93
- new Page(),
94
  'EDGE',
95
- Page::getFieldsEnum()->getValues(),
96
  new TypeChecker($param_types, $enums)
97
  );
98
  $request->addParams($params);
@@ -113,9 +121,9 @@ class EventTour extends AbstractCrudObject {
113
  $this->data['id'],
114
  RequestInterface::METHOD_GET,
115
  '/',
116
- new EventTour(),
117
  'NODE',
118
- EventTour::getFieldsEnum()->getValues(),
119
  new TypeChecker($param_types, $enums)
120
  );
121
  $request->addParams($params);
28
  use FacebookAds\Cursor;
29
  use FacebookAds\Http\RequestInterface;
30
  use FacebookAds\TypeChecker;
31
+ use FacebookAds\Object\Fields\PaymentEnginePaymentFields;
32
+ use FacebookAds\Object\Values\PaymentEnginePaymentReasonValues;
33
 
34
  /**
35
  * This class is auto-generated.
40
  *
41
  */
42
 
43
+ class PaymentEnginePayment extends AbstractCrudObject {
44
 
45
  /**
46
+ * @return PaymentEnginePaymentFields
47
  */
48
  public static function getFieldsEnum() {
49
+ return PaymentEnginePaymentFields::getInstance();
50
  }
51
 
52
  protected static function getReferencedEnums() {
53
  $ref_enums = array();
54
+ $ref_enums['Reason'] = PaymentEnginePaymentReasonValues::getInstance()->getValues();
55
  return $ref_enums;
56
  }
57
 
58
 
59
+ public function createDispute(array $fields = array(), array $params = array(), $pending = false) {
60
  $this->assureId();
61
 
62
  $param_types = array(
63
+ 'reason' => 'reason_enum',
64
  );
65
  $enums = array(
66
+ 'reason_enum' => PaymentEnginePaymentReasonValues::getInstance()->getValues(),
67
  );
68
 
69
  $request = new ApiRequest(
70
  $this->api,
71
  $this->data['id'],
72
+ RequestInterface::METHOD_POST,
73
+ '/dispute',
74
+ new PaymentEnginePayment(),
75
  'EDGE',
76
+ PaymentEnginePayment::getFieldsEnum()->getValues(),
77
  new TypeChecker($param_types, $enums)
78
  );
79
  $request->addParams($params);
81
  return $pending ? $request : $request->execute();
82
  }
83
 
84
+ public function createRefund(array $fields = array(), array $params = array(), $pending = false) {
85
  $this->assureId();
86
 
87
  $param_types = array(
88
+ 'amount' => 'float',
89
+ 'currency' => 'string',
90
+ 'reason' => 'reason_enum',
91
  );
92
  $enums = array(
93
+ 'reason_enum' => PaymentEnginePaymentReasonValues::getInstance()->getValues(),
94
  );
95
 
96
  $request = new ApiRequest(
97
  $this->api,
98
  $this->data['id'],
99
+ RequestInterface::METHOD_POST,
100
+ '/refunds',
101
+ new PaymentEnginePayment(),
102
  'EDGE',
103
+ PaymentEnginePayment::getFieldsEnum()->getValues(),
104
  new TypeChecker($param_types, $enums)
105
  );
106
  $request->addParams($params);
121
  $this->data['id'],
122
  RequestInterface::METHOD_GET,
123
  '/',
124
+ new PaymentEnginePayment(),
125
  'NODE',
126
+ PaymentEnginePayment::getFieldsEnum()->getValues(),
127
  new TypeChecker($param_types, $enums)
128
  );
129
  $request->addParams($params);
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Photo.php CHANGED
@@ -38,7 +38,6 @@ use FacebookAds\Object\Values\InsightsResultPeriodValues;
38
  use FacebookAds\Object\Values\PhotoBackdatedTimeGranularityValues;
39
  use FacebookAds\Object\Values\PhotoTypeValues;
40
  use FacebookAds\Object\Values\PhotoUnpublishedContentTypeValues;
41
- use FacebookAds\Object\Values\ProfileTypeValues;
42
 
43
  /**
44
  * This class is auto-generated.
@@ -214,54 +213,6 @@ class Photo extends AbstractCrudObject {
214
  return $pending ? $request : $request->execute();
215
  }
216
 
217
- public function getReactions(array $fields = array(), array $params = array(), $pending = false) {
218
- $this->assureId();
219
-
220
- $param_types = array(
221
- 'type' => 'type_enum',
222
- );
223
- $enums = array(
224
- 'type_enum' => ProfileTypeValues::getInstance()->getValues(),
225
- );
226
-
227
- $request = new ApiRequest(
228
- $this->api,
229
- $this->data['id'],
230
- RequestInterface::METHOD_GET,
231
- '/reactions',
232
- new Profile(),
233
- 'EDGE',
234
- Profile::getFieldsEnum()->getValues(),
235
- new TypeChecker($param_types, $enums)
236
- );
237
- $request->addParams($params);
238
- $request->addFields($fields);
239
- return $pending ? $request : $request->execute();
240
- }
241
-
242
- public function getSharedPosts(array $fields = array(), array $params = array(), $pending = false) {
243
- $this->assureId();
244
-
245
- $param_types = array(
246
- );
247
- $enums = array(
248
- );
249
-
250
- $request = new ApiRequest(
251
- $this->api,
252
- $this->data['id'],
253
- RequestInterface::METHOD_GET,
254
- '/sharedposts',
255
- new Post(),
256
- 'EDGE',
257
- Post::getFieldsEnum()->getValues(),
258
- new TypeChecker($param_types, $enums)
259
- );
260
- $request->addParams($params);
261
- $request->addFields($fields);
262
- return $pending ? $request : $request->execute();
263
- }
264
-
265
  public function getSponsorTags(array $fields = array(), array $params = array(), $pending = false) {
266
  $this->assureId();
267
 
38
  use FacebookAds\Object\Values\PhotoBackdatedTimeGranularityValues;
39
  use FacebookAds\Object\Values\PhotoTypeValues;
40
  use FacebookAds\Object\Values\PhotoUnpublishedContentTypeValues;
 
41
 
42
  /**
43
  * This class is auto-generated.
213
  return $pending ? $request : $request->execute();
214
  }
215
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  public function getSponsorTags(array $fields = array(), array $params = array(), $pending = false) {
217
  $this->assureId();
218
 
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Post.php CHANGED
@@ -68,8 +68,6 @@ class Post extends AbstractCrudObject {
68
  protected static function getReferencedEnums() {
69
  $ref_enums = array();
70
  $ref_enums['BackdatedTimeGranularity'] = PostBackdatedTimeGranularityValues::getInstance()->getValues();
71
- $ref_enums['FeedStoryVisibility'] = PostFeedStoryVisibilityValues::getInstance()->getValues();
72
- $ref_enums['TimelineVisibility'] = PostTimelineVisibilityValues::getInstance()->getValues();
73
  $ref_enums['CheckinEntryPoint'] = PostCheckinEntryPointValues::getInstance()->getValues();
74
  $ref_enums['Formatting'] = PostFormattingValues::getInstance()->getValues();
75
  $ref_enums['PlaceAttachmentSetting'] = PostPlaceAttachmentSettingValues::getInstance()->getValues();
@@ -77,6 +75,8 @@ class Post extends AbstractCrudObject {
77
  $ref_enums['PostingToRedspace'] = PostPostingToRedspaceValues::getInstance()->getValues();
78
  $ref_enums['TargetSurface'] = PostTargetSurfaceValues::getInstance()->getValues();
79
  $ref_enums['UnpublishedContentType'] = PostUnpublishedContentTypeValues::getInstance()->getValues();
 
 
80
  return $ref_enums;
81
  }
82
 
@@ -273,131 +273,6 @@ class Post extends AbstractCrudObject {
273
  return $pending ? $request : $request->execute();
274
  }
275
 
276
- public function createPromotion(array $fields = array(), array $params = array(), $pending = false) {
277
- $this->assureId();
278
-
279
- $param_types = array(
280
- 'ad_account_id' => 'string',
281
- 'ad_conversion_pixel_id' => 'unsigned int',
282
- 'audience' => 'audience_enum',
283
- 'audience_id' => 'string',
284
- 'bid_amount' => 'unsigned int',
285
- 'budget' => 'unsigned int',
286
- 'cta_type' => 'cta_type_enum',
287
- 'currency' => 'string',
288
- 'flow_id' => 'string',
289
- 'placement' => 'string',
290
- 'start_time' => 'unsigned int',
291
- 'stop_time' => 'unsigned int',
292
- 'targeting' => 'Targeting',
293
- );
294
- $enums = array(
295
- 'audience_enum' => array(
296
- 'AUTO_LOOKALIKE',
297
- 'AUTO_PAGE_LOOKALIKE',
298
- 'AUTO_TARGETING',
299
- 'COUNTRY_AND_INTEREST',
300
- 'CREATE_NEW',
301
- 'CUSTOM_AUDIENCE',
302
- 'DISTRICT',
303
- 'EVENT_CUSTOM_AUDIENCES',
304
- 'EVENT_ENGAGEMENT',
305
- 'FANS',
306
- 'GROUPER',
307
- 'HEC_AUDIENCE',
308
- 'IG_PROMOTED_POST_AUTO',
309
- 'LOCAL',
310
- 'LOOKALIKE',
311
- 'MARKETPLACE_DEFAULT',
312
- 'MARKETPLACE_NATIONWIDE_AUDIENCE',
313
- 'MARKETPLACE_SAVED_AUDIENCE',
314
- 'MULT_CUSTOM_AUDIENCES',
315
- 'NCPP',
316
- 'SAVED_AUDIENCE',
317
- 'SMART_AUDIENCE',
318
- ),
319
- 'cta_type_enum' => array(
320
- 'ADD_TO_CART',
321
- 'APPLY_NOW',
322
- 'BOOK_TRAVEL',
323
- 'BUY',
324
- 'BUY_NOW',
325
- 'BUY_TICKETS',
326
- 'CALL',
327
- 'CALL_ME',
328
- 'CONTACT',
329
- 'CONTACT_US',
330
- 'DONATE',
331
- 'DONATE_NOW',
332
- 'DOWNLOAD',
333
- 'EVENT_RSVP',
334
- 'FIND_A_GROUP',
335
- 'FIND_YOUR_GROUPS',
336
- 'FOLLOW_NEWS_STORYLINE',
337
- 'FOLLOW_PAGE',
338
- 'FOLLOW_USER',
339
- 'GET_DIRECTIONS',
340
- 'GET_OFFER',
341
- 'GET_OFFER_VIEW',
342
- 'GET_QUOTE',
343
- 'GET_SHOWTIMES',
344
- 'INSTALL_APP',
345
- 'INSTALL_MOBILE_APP',
346
- 'LEARN_MORE',
347
- 'LIKE_PAGE',
348
- 'LISTEN_MUSIC',
349
- 'LISTEN_NOW',
350
- 'MESSAGE_PAGE',
351
- 'MOBILE_DOWNLOAD',
352
- 'MOMENTS',
353
- 'NO_BUTTON',
354
- 'OPEN_LINK',
355
- 'ORDER_NOW',
356
- 'PAY_TO_ACCESS',
357
- 'PLAY_GAME',
358
- 'PURCHASE_GIFT_CARDS',
359
- 'RECORD_NOW',
360
- 'REFER_FRIENDS',
361
- 'REQUEST_TIME',
362
- 'SAY_THANKS',
363
- 'SEE_MORE',
364
- 'SELL_NOW',
365
- 'SEND_A_GIFT',
366
- 'SHARE',
367
- 'SHOP_NOW',
368
- 'SIGN_UP',
369
- 'SOTTO_SUBSCRIBE',
370
- 'START_ORDER',
371
- 'SUBSCRIBE',
372
- 'SWIPE_UP_PRODUCT',
373
- 'SWIPE_UP_SHOP',
374
- 'UPDATE_APP',
375
- 'USE_APP',
376
- 'USE_MOBILE_APP',
377
- 'VIDEO_ANNOTATION',
378
- 'VISIT_PAGES_FEED',
379
- 'WATCH_MORE',
380
- 'WATCH_VIDEO',
381
- 'WHATSAPP_MESSAGE',
382
- 'WOODHENGE_SUPPORT',
383
- ),
384
- );
385
-
386
- $request = new ApiRequest(
387
- $this->api,
388
- $this->data['id'],
389
- RequestInterface::METHOD_POST,
390
- '/promotions',
391
- new AbstractCrudObject(),
392
- 'EDGE',
393
- array(),
394
- new TypeChecker($param_types, $enums)
395
- );
396
- $request->addParams($params);
397
- $request->addFields($fields);
398
- return $pending ? $request : $request->execute();
399
- }
400
-
401
  public function getReactions(array $fields = array(), array $params = array(), $pending = false) {
402
  $this->assureId();
403
 
68
  protected static function getReferencedEnums() {
69
  $ref_enums = array();
70
  $ref_enums['BackdatedTimeGranularity'] = PostBackdatedTimeGranularityValues::getInstance()->getValues();
 
 
71
  $ref_enums['CheckinEntryPoint'] = PostCheckinEntryPointValues::getInstance()->getValues();
72
  $ref_enums['Formatting'] = PostFormattingValues::getInstance()->getValues();
73
  $ref_enums['PlaceAttachmentSetting'] = PostPlaceAttachmentSettingValues::getInstance()->getValues();
75
  $ref_enums['PostingToRedspace'] = PostPostingToRedspaceValues::getInstance()->getValues();
76
  $ref_enums['TargetSurface'] = PostTargetSurfaceValues::getInstance()->getValues();
77
  $ref_enums['UnpublishedContentType'] = PostUnpublishedContentTypeValues::getInstance()->getValues();
78
+ $ref_enums['FeedStoryVisibility'] = PostFeedStoryVisibilityValues::getInstance()->getValues();
79
+ $ref_enums['TimelineVisibility'] = PostTimelineVisibilityValues::getInstance()->getValues();
80
  return $ref_enums;
81
  }
82
 
273
  return $pending ? $request : $request->execute();
274
  }
275
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
276
  public function getReactions(array $fields = array(), array $params = array(), $pending = false) {
277
  $this->assureId();
278
 
vendor/facebook/php-business-sdk/src/FacebookAds/Object/ProductFeedSchedule.php CHANGED
@@ -58,29 +58,6 @@ class ProductFeedSchedule extends AbstractCrudObject {
58
  }
59
 
60
 
61
- public function deleteSelf(array $fields = array(), array $params = array(), $pending = false) {
62
- $this->assureId();
63
-
64
- $param_types = array(
65
- );
66
- $enums = array(
67
- );
68
-
69
- $request = new ApiRequest(
70
- $this->api,
71
- $this->data['id'],
72
- RequestInterface::METHOD_DELETE,
73
- '/',
74
- new AbstractCrudObject(),
75
- 'NODE',
76
- array(),
77
- new TypeChecker($param_types, $enums)
78
- );
79
- $request->addParams($params);
80
- $request->addFields($fields);
81
- return $pending ? $request : $request->execute();
82
- }
83
-
84
  public function getSelf(array $fields = array(), array $params = array(), $pending = false) {
85
  $this->assureId();
86
 
@@ -104,28 +81,4 @@ class ProductFeedSchedule extends AbstractCrudObject {
104
  return $pending ? $request : $request->execute();
105
  }
106
 
107
- public function updateSelf(array $fields = array(), array $params = array(), $pending = false) {
108
- $this->assureId();
109
-
110
- $param_types = array(
111
- 'upload_schedule' => 'string',
112
- );
113
- $enums = array(
114
- );
115
-
116
- $request = new ApiRequest(
117
- $this->api,
118
- $this->data['id'],
119
- RequestInterface::METHOD_POST,
120
- '/',
121
- new ProductFeedSchedule(),
122
- 'NODE',
123
- ProductFeedSchedule::getFieldsEnum()->getValues(),
124
- new TypeChecker($param_types, $enums)
125
- );
126
- $request->addParams($params);
127
- $request->addFields($fields);
128
- return $pending ? $request : $request->execute();
129
- }
130
-
131
  }
58
  }
59
 
60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  public function getSelf(array $fields = array(), array $params = array(), $pending = false) {
62
  $this->assureId();
63
 
81
  return $pending ? $request : $request->execute();
82
  }
83
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/ProductGroup.php CHANGED
@@ -66,6 +66,43 @@ class ProductGroup extends AbstractCrudObject {
66
  }
67
 
68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  public function getProducts(array $fields = array(), array $params = array(), $pending = false) {
70
  $this->assureId();
71
 
66
  }
67
 
68
 
69
+ public function createArDatum(array $fields = array(), array $params = array(), $pending = false) {
70
+ $this->assureId();
71
+
72
+ $param_types = array(
73
+ 'effect_icon' => 'file',
74
+ 'state' => 'state_enum',
75
+ 'surfaces' => 'list<surfaces_enum>',
76
+ );
77
+ $enums = array(
78
+ 'state_enum' => array(
79
+ 'DISABLED',
80
+ 'ENABLED',
81
+ 'TEST',
82
+ ),
83
+ 'surfaces_enum' => array(
84
+ 'SHOPS',
85
+ 'TEST_CAPABILITY',
86
+ 'UNIVERSAL_CHECKOUT',
87
+ 'US_MARKETPLACE',
88
+ ),
89
+ );
90
+
91
+ $request = new ApiRequest(
92
+ $this->api,
93
+ $this->data['id'],
94
+ RequestInterface::METHOD_POST,
95
+ '/ar_data',
96
+ new AbstractCrudObject(),
97
+ 'EDGE',
98
+ array(),
99
+ new TypeChecker($param_types, $enums)
100
+ );
101
+ $request->addParams($params);
102
+ $request->addFields($fields);
103
+ return $pending ? $request : $request->execute();
104
+ }
105
+
106
  public function getProducts(array $fields = array(), array $params = array(), $pending = false) {
107
  $this->assureId();
108
 
vendor/facebook/php-business-sdk/src/FacebookAds/Object/ProductItem.php CHANGED
@@ -77,6 +77,58 @@ class ProductItem extends AbstractCrudObject {
77
  }
78
 
79
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  public function getProductSets(array $fields = array(), array $params = array(), $pending = false) {
81
  $this->assureId();
82
 
77
  }
78
 
79
 
80
+ public function createArDatum(array $fields = array(), array $params = array(), $pending = false) {
81
+ $this->assureId();
82
+
83
+ $param_types = array(
84
+ 'container_effect' => 'container_effect_enum',
85
+ 'effect_parameters' => 'map',
86
+ 'picker_icon' => 'file',
87
+ );
88
+ $enums = array(
89
+ 'container_effect_enum' => array(
90
+ 'MAKEUP',
91
+ ),
92
+ );
93
+
94
+ $request = new ApiRequest(
95
+ $this->api,
96
+ $this->data['id'],
97
+ RequestInterface::METHOD_POST,
98
+ '/ar_data',
99
+ new AbstractCrudObject(),
100
+ 'EDGE',
101
+ array(),
102
+ new TypeChecker($param_types, $enums)
103
+ );
104
+ $request->addParams($params);
105
+ $request->addFields($fields);
106
+ return $pending ? $request : $request->execute();
107
+ }
108
+
109
+ public function getChannelsToIntegrityStatus(array $fields = array(), array $params = array(), $pending = false) {
110
+ $this->assureId();
111
+
112
+ $param_types = array(
113
+ );
114
+ $enums = array(
115
+ );
116
+
117
+ $request = new ApiRequest(
118
+ $this->api,
119
+ $this->data['id'],
120
+ RequestInterface::METHOD_GET,
121
+ '/channels_to_integrity_status',
122
+ new CatalogItemChannelsToIntegrityStatus(),
123
+ 'EDGE',
124
+ CatalogItemChannelsToIntegrityStatus::getFieldsEnum()->getValues(),
125
+ new TypeChecker($param_types, $enums)
126
+ );
127
+ $request->addParams($params);
128
+ $request->addFields($fields);
129
+ return $pending ? $request : $request->execute();
130
+ }
131
+
132
  public function getProductSets(array $fields = array(), array $params = array(), $pending = false) {
133
  $this->assureId();
134
 
vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/ActionSource.php ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
+ *
5
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
+ * use, copy, modify, and distribute this software in source code or binary
7
+ * form for use in connection with the web services and APIs provided by
8
+ * Facebook.
9
+ *
10
+ * As with any software that integrates with the Facebook platform, your use
11
+ * of this software is subject to the Facebook Developer Principles and
12
+ * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
+ * shall be included in all copies or substantial portions of the software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
+ * DEALINGS IN THE SOFTWARE.
22
+ *
23
+ */
24
+
25
+ namespace FacebookAds\Object\ServerSide;
26
+
27
+ use FacebookAds\Enum\AbstractEnum;
28
+
29
+ /**
30
+ * Class ActionSource
31
+ *
32
+ * Where the conversion event occurred.
33
+ *
34
+ * @package FacebookAds\Object\ServerSide
35
+ */
36
+ class ActionSource extends AbstractEnum {
37
+
38
+ /**
39
+ * Conversion happened over email.
40
+ */
41
+ const EMAIL = 'email';
42
+
43
+ /**
44
+ * Conversion was made on your website.
45
+ */
46
+ const WEBSITE = 'website';
47
+
48
+ /**
49
+ * Conversion was made using your app.
50
+ */
51
+ const APP = 'app';
52
+
53
+ /**
54
+ * Conversion was made over the phone.
55
+ */
56
+ const PHONE_CALL = 'phone_call';
57
+
58
+ /**
59
+ * Conversion was made via a messaging app, SMS, or online messaging feature.
60
+ */
61
+ const CHAT = 'chat';
62
+
63
+ /**
64
+ * Conversion was made in person at your physical store.
65
+ */
66
+ const PHYSICAL_STORE = 'physical_store';
67
+
68
+ /**
69
+ * Conversion happened automatically, for example, a subscription renewal that’s set on auto-pay each month.
70
+ */
71
+ const SYSTEM_GENERATED = 'system_generated';
72
+
73
+ /**
74
+ * Conversion happened in a way that is not listed.
75
+ */
76
+ const OTHER = 'other';
77
+ }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/Event.php CHANGED
@@ -48,6 +48,7 @@ class Event implements ArrayAccess {
48
  'data_processing_options' => 'string[]',
49
  'data_processing_options_country' => 'int',
50
  'data_processing_options_state' => 'int',
 
51
  );
52
  /**
53
  * Array of attributes where the key is the local name, and the value is the original name
@@ -63,7 +64,8 @@ class Event implements ArrayAccess {
63
  'custom_data' => 'custom_data',
64
  'data_processing_options' => 'data_processing_options',
65
  'data_processing_options_country' => 'data_processing_options_country',
66
- 'data_processing_options_state' => 'data_processing_options_state'
 
67
  );
68
 
69
  /**
@@ -81,6 +83,7 @@ class Event implements ArrayAccess {
81
  'data_processing_options' => 'setDataProcessingOptions',
82
  'data_processing_options_country' => 'setDataProcessingOptionsCountry',
83
  'data_processing_options_state' => 'setDataProcessingOptionsState',
 
84
  );
85
  /**
86
  * Array of attributes to getter functions (for serialization of requests)
@@ -97,6 +100,7 @@ class Event implements ArrayAccess {
97
  'data_processing_options' => 'getDataProcessingOptions',
98
  'data_processing_options_country' => 'getDataProcessingOptionsCountry',
99
  'data_processing_options_state' => 'getDataProcessingOptionsState',
 
100
  );
101
  /**
102
  * Associative array for storing property values
@@ -119,6 +123,7 @@ class Event implements ArrayAccess {
119
  $this->container['data_processing_options'] = isset($data['data_processing_options']) ? $data['data_processing_options'] : null;
120
  $this->container['data_processing_options_country'] = isset($data['data_processing_options_country']) ? $data['data_processing_options_country'] : null;
121
  $this->container['data_processing_options_state'] = isset($data['data_processing_options_state']) ? $data['data_processing_options_state'] : null;
 
122
  }
123
 
124
  public static function paramTypes() {
@@ -295,6 +300,23 @@ class Event implements ArrayAccess {
295
  return $this;
296
  }
297
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
298
  /**
299
  * Returns true if offset exists. False otherwise.
300
  * @param integer $offset Offset
@@ -355,7 +377,15 @@ class Event implements ArrayAccess {
355
  $normalized_payload['data_processing_options'] = $this->getDataProcessingOptions();
356
  $normalized_payload['data_processing_options_country'] = $this->getDataProcessingOptionsCountry();
357
  $normalized_payload['data_processing_options_state'] = $this->getDataProcessingOptionsState();
 
 
 
 
358
  $normalized_payload = array_filter($normalized_payload, function($val) { if(is_array($val)) { return true; } else { return strlen($val); }});
 
 
 
 
359
 
360
  return $normalized_payload;
361
  }
48
  'data_processing_options' => 'string[]',
49
  'data_processing_options_country' => 'int',
50
  'data_processing_options_state' => 'int',
51
+ 'action_source' => 'string',
52
  );
53
  /**
54
  * Array of attributes where the key is the local name, and the value is the original name
64
  'custom_data' => 'custom_data',
65
  'data_processing_options' => 'data_processing_options',
66
  'data_processing_options_country' => 'data_processing_options_country',
67
+ 'data_processing_options_state' => 'data_processing_options_state',
68
+ 'action_source' => 'action_source',
69
  );
70
 
71
  /**
83
  'data_processing_options' => 'setDataProcessingOptions',
84
  'data_processing_options_country' => 'setDataProcessingOptionsCountry',
85
  'data_processing_options_state' => 'setDataProcessingOptionsState',
86
+ 'action_source' => 'setActionSource',
87
  );
88
  /**
89
  * Array of attributes to getter functions (for serialization of requests)
100
  'data_processing_options' => 'getDataProcessingOptions',
101
  'data_processing_options_country' => 'getDataProcessingOptionsCountry',
102
  'data_processing_options_state' => 'getDataProcessingOptionsState',
103
+ 'action_source' => 'getActionSource',
104
  );
105
  /**
106
  * Associative array for storing property values
123
  $this->container['data_processing_options'] = isset($data['data_processing_options']) ? $data['data_processing_options'] : null;
124
  $this->container['data_processing_options_country'] = isset($data['data_processing_options_country']) ? $data['data_processing_options_country'] : null;
125
  $this->container['data_processing_options_state'] = isset($data['data_processing_options_state']) ? $data['data_processing_options_state'] : null;
126
+ $this->container['action_source'] = isset($data['action_source']) ? $data['action_source'] : null;
127
  }
128
 
129
  public static function paramTypes() {
300
  return $this;
301
  }
302
 
303
+ /**
304
+ * Gets action_source, this is where the Conversion occurred.
305
+ * @return string
306
+ */
307
+ public function getActionSource() {
308
+ return $this->container['action_source'];
309
+ }
310
+
311
+ /**
312
+ * Sets action_source, this is where the Conversion occurred.
313
+ * @return $this
314
+ */
315
+ public function setActionSource($action_source) {
316
+ $this->container['action_source'] = $action_source;
317
+ return $this;
318
+ }
319
+
320
  /**
321
  * Returns true if offset exists. False otherwise.
322
  * @param integer $offset Offset
377
  $normalized_payload['data_processing_options'] = $this->getDataProcessingOptions();
378
  $normalized_payload['data_processing_options_country'] = $this->getDataProcessingOptionsCountry();
379
  $normalized_payload['data_processing_options_state'] = $this->getDataProcessingOptionsState();
380
+ $normalized_payload['action_source'] = Normalizer::normalize(
381
+ 'action_source',
382
+ $this->container['action_source']
383
+ );
384
  $normalized_payload = array_filter($normalized_payload, function($val) { if(is_array($val)) { return true; } else { return strlen($val); }});
385
+ // Add the opt_out value back in if it was filtered out
386
+ if ($this->getOptOut() === false) {
387
+ $normalized_payload['opt_out'] = $this->getOptOut();
388
+ }
389
 
390
  return $normalized_payload;
391
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/Normalizer.php CHANGED
@@ -107,6 +107,11 @@ class Normalizer {
107
  case 'delivery_category':
108
  $normalized_data = Normalizer::normalizeDeliveryCategory($data);
109
  break;
 
 
 
 
 
110
  default:
111
  }
112
 
@@ -306,4 +311,22 @@ class Normalizer {
306
 
307
  return preg_match($international_number_regex, $phone_number);
308
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
309
  }
107
  case 'delivery_category':
108
  $normalized_data = Normalizer::normalizeDeliveryCategory($data);
109
  break;
110
+
111
+ case 'action_source':
112
+ $normalized_data = Normalizer::normalizeActionSource($data);
113
+ break;
114
+
115
  default:
116
  }
117
 
311
 
312
  return preg_match($international_number_regex, $phone_number);
313
  }
314
+
315
+ /**
316
+ * Normalizes the action_source and throws an error if invalid.
317
+ * @param string $action_source type of DeliveryCategory.
318
+ * @return string
319
+ */
320
+ private static function normalizeActionSource($action_source) {
321
+ $action_sources = ActionSource::getInstance()->getValues();
322
+ if (!ActionSource::getInstance()->isValidValue($action_source)) {
323
+ throw new InvalidArgumentException(sprintf(
324
+ 'Invalid action_source passed: %s. Allowed values are one of %s',
325
+ $action_source,
326
+ implode(",", $action_sources)
327
+ ));
328
+ }
329
+
330
+ return $action_source;
331
+ }
332
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Signal/Content.php ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
+ *
5
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
+ * use, copy, modify, and distribute this software in source code or binary
7
+ * form for use in connection with the web services and APIs provided by
8
+ * Facebook.
9
+ *
10
+ * As with any software that integrates with the Facebook platform, your use
11
+ * of this software is subject to the Facebook Developer Principles and
12
+ * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
+ * shall be included in all copies or substantial portions of the software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
+ * DEALINGS IN THE SOFTWARE.
22
+ *
23
+ */
24
+
25
+ namespace FacebookAds\Object\Signal;
26
+
27
+ use FacebookAds\Object\BusinessDataAPI\Content as BusinessDataContent;
28
+ use FacebookAds\Object\ServerSide\Content as ServerSideContent;
29
+
30
+ class Content {
31
+ /**
32
+ * Associative array for storing property values for Business Data API
33
+ * @var BusinessDataContent
34
+ */
35
+ protected $businessDataContent= null;
36
+
37
+ /**
38
+ * Associative array for storing property values for Conversion API
39
+ * @var ServerSideContent
40
+ */
41
+ protected $serverSideContent = null;
42
+
43
+ /**
44
+ * Constructor
45
+ * @param mixed[] $data Associated array of property value initializing the model
46
+ */
47
+ public function __construct(array $data = null) {
48
+ $this->businessDataContent = new BusinessDataContent($data);
49
+ $this->serverSideContent = new ServerSideContent($data);
50
+ }
51
+
52
+ /**
53
+ * Get Product Id.
54
+ * @return array Product Id
55
+ */
56
+ public function getProductId() {
57
+ return Util::constructResponse($this->serverSideContent->getProductId(), $this->businessDataContent->getProductId());
58
+ }
59
+
60
+ /**
61
+ * Sets product id.
62
+ * @param string $product_id product id
63
+ * @return $this
64
+ */
65
+ public function setProductId($product_id) {
66
+ $this->businessDataContent->setProductId($product_id);
67
+ $this->serverSideContent->setProductId($product_id);
68
+ return $this;
69
+ }
70
+
71
+ /**
72
+ * Get number of product.
73
+ * @return integer quantity
74
+ */
75
+ public function getQuantity() {
76
+ return Util::constructResponse($this->serverSideContent->getQuantity(), $this->businessDataContent->getQuantity());
77
+ }
78
+
79
+ /**
80
+ * Set number of product.
81
+ * @param integer $quantity number of items
82
+ * @return $this
83
+ */
84
+ public function setQuantity($quantity) {
85
+ $this->businessDataContent->setQuantity($quantity);
86
+ $this->serverSideContent->setQuantity($quantity);
87
+ return $this;
88
+ }
89
+
90
+ /**
91
+ * Get total price.
92
+ * @return array Price
93
+ */
94
+ public function getPrice() {
95
+ return Util::constructResponse(null, $this->businessDataContent->getPrice());
96
+ }
97
+
98
+ /**
99
+ * Set total price.
100
+ * @param float Price
101
+ * @return $this
102
+ */
103
+ public function setPrice($price) {
104
+ $this->businessDataContent->setPrice($price);
105
+ return $this;
106
+ }
107
+
108
+
109
+ /**
110
+ * Get title.
111
+ * @return array title
112
+ */
113
+ public function getTitle() {
114
+ return Util::constructResponse($this->serverSideContent->getTitle(), $this->businessDataContent->getTitle());
115
+ }
116
+
117
+ /**
118
+ * Sets title.
119
+ * @param string $title title
120
+ * @return $this
121
+ */
122
+ public function setTitle($title) {
123
+ $this->businessDataContent->setTitle($title);
124
+ $this->serverSideContent->setTitle($title);
125
+ return $this;
126
+ }
127
+
128
+ /**
129
+ * Get Item Price.
130
+ * @return array Item Price
131
+ */
132
+ public function getItemPrice() {
133
+ return Util::constructResponse($this->serverSideContent->getItemPrice(), null);
134
+ }
135
+
136
+ /**
137
+ * Set Item Price.
138
+ * @param float $item_price single item price
139
+ * @return Content
140
+ */
141
+ public function setItemPrice($item_price) {
142
+ $this->serverSideContent->setItemPrice($item_price);
143
+ return $this;
144
+ }
145
+
146
+ /**
147
+ * Get description.
148
+ * @return array description
149
+ */
150
+ public function getDescription() {
151
+ return Util::constructResponse($this->serverSideContent->getDescription(), null);
152
+ }
153
+
154
+ /**
155
+ * Sets description.
156
+ * @param string $description description
157
+ * @return $this
158
+ */
159
+ public function setDescription($description) {
160
+ $this->serverSideContent->setDescription($description);
161
+ return $this;
162
+ }
163
+
164
+ /**
165
+ * Get brand.
166
+ * @return array brand
167
+ */
168
+ public function getBrand() {
169
+ return Util::constructResponse($this->serverSideContent->getBrand(), null);
170
+ }
171
+
172
+ /**
173
+ * Sets brand.
174
+ * @param string $brand brand
175
+ * @return $this
176
+ */
177
+ public function setBrand($brand) {
178
+ $this->serverSideContent->setBrand($brand);
179
+ return $this;
180
+ }
181
+
182
+ /**
183
+ * Get category.
184
+ * @return array category
185
+ */
186
+ public function getCategory() {
187
+ return Util::constructResponse($this->serverSideContent->getCategory(), null);
188
+ }
189
+
190
+ /**
191
+ * Sets category.
192
+ * @param string $category category
193
+ * @return $this
194
+ */
195
+ public function setCategory($category) {
196
+ $this->serverSideContent->setCategory($category);
197
+ return $this;
198
+ }
199
+
200
+ /**
201
+ * Gets Type of delivery for a purchase event.
202
+ * @return array delivery_category
203
+ */
204
+ public function getDeliveryCategory() {
205
+ return Util::constructResponse($this->serverSideContent->getDeliveryCategory(), null);
206
+ }
207
+
208
+ /**
209
+ * Sets Type of delivery for a purchase event.
210
+ * @param string $delivery_category
211
+ * @return $this
212
+ */
213
+ public function setDeliveryCategory($delivery_category) {
214
+ $this->serverSideContent->setDeliveryCategory($delivery_category);
215
+ return $this;
216
+ }
217
+
218
+ /**
219
+ * Gets content for Business Data API
220
+ * @return BusinessDataContent
221
+ */
222
+ public function getBusinessDataContent() {
223
+ return $this->businessDataContent;
224
+ }
225
+
226
+ /**
227
+ * Gets content for Conversion API
228
+ * @return ServerSideContent
229
+ */
230
+ public function getServerSideContent() {
231
+ return $this->serverSideContent;
232
+ }
233
+ }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Signal/CustomData.php ADDED
@@ -0,0 +1,517 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
+ *
5
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
+ * use, copy, modify, and distribute this software in source code or binary
7
+ * form for use in connection with the web services and APIs provided by
8
+ * Facebook.
9
+ *
10
+ * As with any software that integrates with the Facebook platform, your use
11
+ * of this software is subject to the Facebook Developer Principles and
12
+ * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
+ * shall be included in all copies or substantial portions of the software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
+ * DEALINGS IN THE SOFTWARE.
22
+ *
23
+ */
24
+
25
+ namespace FacebookAds\Object\Signal;
26
+
27
+ use FacebookAds\Object\BusinessDataAPI\CustomData as BusinessDataCustomData;
28
+ use FacebookAds\Object\ServerSide\CustomData as ServerSideCustomData;
29
+
30
+ class CustomData {
31
+
32
+ /**
33
+ * Associative array for storing property values for Business Data API
34
+ * @var BusinessDataCustomData
35
+ */
36
+ protected $businessDataCustomData= null;
37
+
38
+ /**
39
+ * Associative array for storing property values for Conversion API
40
+ * @var ServerSideCustomData
41
+ */
42
+ protected $serverSideCustomData = null;
43
+
44
+ /**
45
+ * Constructor
46
+ * @param mixed[] $data Associated array of property value initializing the model
47
+ */
48
+ public function __construct(array $data = null) {
49
+ $business_contents = array();
50
+ $server_contents = array();
51
+ if(isset($data['contents'])){
52
+ foreach ($data['contents'] as $content) {
53
+ array_push($business_contents, $content->getBusinessDataContent());
54
+ array_push($server_contents, $content->getServerSideContent());
55
+ }
56
+ }
57
+
58
+ $business_data = $data;
59
+ $server_data = $data;
60
+ $business_data['contents'] = $business_contents;
61
+ $server_data['contents'] = $server_contents;
62
+ $business_data['billing_contact'] = isset($data['billing_contact']) ? $data['billing_contact']->getBusinessDataUserData() : null;
63
+ $business_data['shipping_contact'] = isset($data['shipping_contact']) ? $data['shipping_contact']->getBusinessDataUserData() : null;
64
+ $this->businessDataCustomData = new BusinessDataCustomData($business_data);
65
+ $this->serverSideCustomData = new ServerSideCustomData($server_data);
66
+ }
67
+
68
+ /**
69
+ * Sets value
70
+ * @param float $value A numeric value associated with this event.
71
+ * This could be a monetary value or a value in some other metric.
72
+ * @return $this
73
+ */
74
+ public function setValue($value) {
75
+ $this->businessDataCustomData->setValue($value);
76
+ $this->serverSideCustomData->setValue($value);
77
+
78
+ return $this;
79
+ }
80
+
81
+ /**
82
+ * Sets currency
83
+ * @param string $currency The currency for the value specified, if applicable.
84
+ * Currency must be a valid ISO 4217 three digit currency code.
85
+ * @return $this
86
+ */
87
+ public function setCurrency($currency) {
88
+ $this->businessDataCustomData->setCurrency($currency);
89
+ $this->serverSideCustomData->setCurrency($currency);
90
+
91
+ return $this;
92
+ }
93
+
94
+ /**
95
+ * Sets contents
96
+ * @param Content[] $contents A list of CustomData objects that contain the product IDs associated with
97
+ * the event plus information about the products.
98
+ * @return $this
99
+ */
100
+ public function setContents($contents) {
101
+ $business_contents = array();
102
+ $server_contents = array();
103
+ foreach ($contents as $content) {
104
+ array_push($business_contents, $content->getBusinessDataContent());
105
+ array_push($server_contents, $content->getServerSideContent());
106
+ }
107
+ $this->businessDataCustomData->setContents($business_contents);
108
+ $this->serverSideCustomData->setContents($server_contents);
109
+ return $this;
110
+ }
111
+
112
+ /**
113
+ * Sets order_id
114
+ * @param string $order_id The order ID for this transaction as a String.
115
+ * @return $this
116
+ */
117
+ public function setOrderId($order_id) {
118
+ $this->businessDataCustomData->setOrderId($order_id);
119
+ $this->serverSideCustomData->setOrderId($order_id);
120
+
121
+ return $this;
122
+ }
123
+
124
+ /**
125
+ * Sets status
126
+ * @param string status of the order
127
+ *
128
+ * @return $this
129
+ */
130
+ public function setStatus($status) {
131
+ $this->businessDataCustomData->setStatus($status);
132
+ $this->serverSideCustomData->setStatus($status);
133
+
134
+ return $this;
135
+ }
136
+
137
+ /**
138
+ * Sets billing contact
139
+ * @param UserData billing_contact of the order
140
+ *
141
+ * @return $this
142
+ */
143
+ public function setBillingContact($billing_contact) {
144
+ $this->businessDataCustomData->setBillingContact($billing_contact->getBusinessDataUserData());
145
+
146
+ return $this;
147
+ }
148
+
149
+ /**
150
+ * Sets shipping contact
151
+ * @param UserData shipping_contact of the order
152
+ *
153
+ * @return $this
154
+ */
155
+ public function setShippingContact($shipping_contact) {
156
+ $this->businessDataCustomData->setShippingContact($shipping_contact->getBusinessDataUserData());
157
+
158
+ return $this;
159
+ }
160
+
161
+ /**
162
+ * Sets external order id
163
+ * @param string external_order_id unique order id
164
+ *
165
+ * @return $this
166
+ */
167
+ public function setExternalOrderId($external_order_id) {
168
+ $this->businessDataCustomData->setExternalOrderId($external_order_id);
169
+
170
+ return $this;
171
+ }
172
+
173
+ /**
174
+ * Sets original order id
175
+ * @param string original_order_id for Refund event.
176
+ *
177
+ * @return $this
178
+ */
179
+ public function setOriginalOrderId($original_order_id) {
180
+ $this->businessDataCustomData->setOriginalOrderId($original_order_id);
181
+
182
+ return $this;
183
+ }
184
+
185
+ /**
186
+ * Sets message for Refund event
187
+ * @param string message for Refund event
188
+ *
189
+ * @return $this
190
+ */
191
+ public function setMessage($message) {
192
+ $this->businessDataCustomData->setMessage($message);
193
+
194
+ return $this;
195
+ }
196
+
197
+ /**
198
+ * Sets content_name
199
+ * @param string $content_name The name of the page or product associated with the event. Example: 'lettuce'.
200
+ *
201
+ * @return $this
202
+ */
203
+ public function setContentName($content_name) {
204
+ $this->serverSideCustomData->setContentName($content_name);
205
+
206
+ return $this;
207
+ }
208
+
209
+ /**
210
+ * Sets content_category
211
+ * @param string $content_category The category of the content associated with the event. Example: 'grocery'
212
+ *
213
+ * @return $this
214
+ */
215
+ public function setContentCategory($content_category) {
216
+ $this->serverSideCustomData->setContentCategory($content_category);
217
+
218
+ return $this;
219
+ }
220
+
221
+ /**
222
+ * Sets content_ids
223
+ * @param string[] $content_ids The content IDs associated with the event,
224
+ * such as product SKUs for items in an AddToCart event: ['ABC123', 'XYZ789'].
225
+ * If content_type is a product, then your content IDs must be an array with a single string value.
226
+ * Otherwise, this array can contain any number of string values.
227
+ *
228
+ * @return $this
229
+ */
230
+ public function setContentIds($content_ids) {
231
+ $this->serverSideCustomData->setContentIds($content_ids);
232
+
233
+ return $this;
234
+ }
235
+
236
+ /**
237
+ * Sets content_type
238
+ * @param string $content_type A String equal to either 'product' or 'product_group'.
239
+ * Set to product if the keys you send content_ids or contents represent products.
240
+ * Set to product_group if the keys you send in content_ids represent product groups.
241
+ *
242
+ * @return $this
243
+ */
244
+ public function setContentType($content_type) {
245
+ $this->serverSideCustomData->setContentType($content_type);
246
+
247
+ return $this;
248
+ }
249
+
250
+ /**
251
+ * Sets predicted_ltv
252
+ * @param float $predicted_ltv The predicted lifetime value of a conversion event.
253
+ *
254
+ * @return $this
255
+ */
256
+ public function setPredictedLtv($predicted_ltv) {
257
+ $this->serverSideCustomData->setPredictedLtv($predicted_ltv);
258
+
259
+ return $this;
260
+ }
261
+
262
+ /**
263
+ * Sets num_items
264
+ * @param string $num_items Use only with InitiateCheckout events.
265
+ * The number of items that a user tries to buy during checkout.
266
+ *
267
+ * @return $this
268
+ */
269
+ public function setNumItems($num_items) {
270
+ $this->serverSideCustomData->setNumItems($num_items);
271
+
272
+ return $this;
273
+ }
274
+
275
+ /**
276
+ * Sets a search query made by a user. Use only with Search events.
277
+ * @param string $search_string Use only with Search events.
278
+ * A search query made by a user.
279
+ *
280
+ * @return $this
281
+ */
282
+ public function setSearchString($search_string) {
283
+ $this->serverSideCustomData->setSearchString($search_string);
284
+
285
+ return $this;
286
+ }
287
+
288
+ /**
289
+ * Sets Type of delivery for a purchase event.
290
+ * @param string $delivery_category Type of delivery for a purchase event.
291
+ *
292
+ * @return $this
293
+ */
294
+ public function setDeliveryCategory($delivery_category) {
295
+ $this->serverSideCustomData->setDeliveryCategory($delivery_category);
296
+
297
+ return $this;
298
+ }
299
+
300
+ /**
301
+ * Sets the item_number.
302
+ * @param string $item_number The item number.
303
+ *
304
+ * @return $this
305
+ */
306
+ public function setItemNumber($item_number) {
307
+ $this->serverSideCustomData->setItemNumber($item_number);
308
+
309
+ return $this;
310
+ }
311
+
312
+ /**
313
+ * Sets custom_properties that are not defined as the standard properties list in custom data.
314
+ * @param array custom_properties dictionary to include custom properties that are not defined in custom data.
315
+ *
316
+ * @return $this
317
+ */
318
+ public function setCustomProperties($custom_properties) {
319
+ $this->serverSideCustomData->setCustomProperties($custom_properties);
320
+ return $this;
321
+ }
322
+
323
+
324
+ /**
325
+ * Gets a numeric value associated with this event.
326
+ * This could be a monetary value or a value in some other metric.
327
+ *
328
+ * @return array
329
+ */
330
+ public function getValue() {
331
+ return Util::constructResponse($this->serverSideCustomData->getValue(), $this->businessDataCustomData->getValue());
332
+ }
333
+
334
+ /**
335
+ * Gets currency for the value specified, if applicable.
336
+ * @return array
337
+ */
338
+ public function getCurrency() {
339
+ return Util::constructResponse($this->serverSideCustomData->getCurrency(), $this->businessDataCustomData->getCurrency());
340
+ }
341
+
342
+ /**
343
+ * Gets a list of CustomData objects that contain the product IDs associated with
344
+ * the event plus information about the products.
345
+ * @return array
346
+ */
347
+ public function getCustomDatas() {
348
+ return Util::constructResponse($this->serverSideCustomData->getCustomDatas(), $this->businessDataCustomData->getCustomDatas());
349
+ }
350
+
351
+ /**
352
+ * Gets the order ID for this transaction as a String.
353
+ * @return array
354
+ */
355
+ public function getOrderId() {
356
+ return Util::constructResponse($this->serverSideCustomData->getOrderId(), $this->businessDataCustomData->getOrderId());
357
+ }
358
+
359
+ /**
360
+ * Gets the status of the registration event
361
+ * @return array
362
+ */
363
+ public function getStatus() {
364
+ return Util::constructResponse($this->serverSideCustomData->getStatus(), $this->businessDataCustomData->getStatus());
365
+ }
366
+
367
+ /**
368
+ * Gets billing contact
369
+ *
370
+ * @return array
371
+ */
372
+ public function getBillingContact() {
373
+ return Util::constructResponse(null, $this->businessDataCustomData->getBillingContact());
374
+ }
375
+
376
+ /**
377
+ * Gets shipping contact
378
+ *
379
+ * @return array
380
+ */
381
+ public function getShippingContact() {
382
+ return Util::constructResponse(null, $this->businessDataCustomData->getShippingContact());
383
+ }
384
+
385
+ /**
386
+ * Gets external order id
387
+ *
388
+ * @return array
389
+ */
390
+ public function getExternalOrderId() {
391
+ return Util::constructResponse(null, $this->businessDataCustomData->getExternalOrderId());
392
+ }
393
+
394
+ /**
395
+ * Gets original order id
396
+ *
397
+ * @return array
398
+ */
399
+ public function getOriginalOrderId() {
400
+ return Util::constructResponse(null, $this->businessDataCustomData->getOriginalOrderId());
401
+ }
402
+
403
+ /**
404
+ * Gets message
405
+ *
406
+ * @return array
407
+ */
408
+ public function getMessage() {
409
+ return Util::constructResponse(null, $this->businessDataCustomData->getMessage());
410
+ }
411
+
412
+ /**
413
+ * Gets the value of a custom property from the custom_properties bag
414
+ * @param $key Custom property name
415
+ * @return array
416
+ */
417
+ public function getCustomProperty($key) {
418
+ return Util::constructResponse($this->serverSideCustomData->getCustomProperty($key), null);
419
+ }
420
+
421
+ /**
422
+ * Gets content name of the page or product associated with the event. Example: 'lettuce'.
423
+ * @return array
424
+ */
425
+ public function getContentName() {
426
+ return Util::constructResponse($this->serverSideCustomData->getContentName(), null);
427
+ }
428
+
429
+ /**
430
+ * Gets the category of the content associated with the event. Example: 'grocery'
431
+ * @return array
432
+ */
433
+ public function getContentCategory() {
434
+ return Util::constructResponse($this->serverSideCustomData->getContentCategory(), null);
435
+ }
436
+
437
+ /**
438
+ * Gets the content IDs associated with the event,
439
+ * such as product SKUs for items in an AddToCart event: ['ABC123', 'XYZ789'].
440
+ * @return array
441
+ */
442
+ public function getContentIds() {
443
+ return Util::constructResponse($this->serverSideCustomData->getContentIds(), null);
444
+ }
445
+
446
+ /**
447
+ * Gets content type 'product' or 'product_group'
448
+ * @return array
449
+ */
450
+ public function getContentType() {
451
+ return Util::constructResponse($this->serverSideCustomData->getContentType(), null);
452
+ }
453
+
454
+ /**
455
+ * Gets the predicted lifetime value of a conversion event.
456
+ * @return array
457
+ */
458
+ public function getPredictedLtv() {
459
+ return Util::constructResponse($this->serverSideCustomData->getPredictedLtv(), null);
460
+ }
461
+
462
+ /**
463
+ * Gets the number of items that a user tries to buy during checkout
464
+ * @return array
465
+ */
466
+ public function getNumItems() {
467
+ return Util::constructResponse($this->serverSideCustomData->getNumItems(), null);
468
+ }
469
+
470
+ /**
471
+ * Gets a search query made by a user.
472
+ * @return array
473
+ */
474
+ public function getSearchString() {
475
+ return Util::constructResponse($this->serverSideCustomData->getSearchString(), null);
476
+ }
477
+
478
+ /**
479
+ * Gets a delivery_category for a purchase order.
480
+ * @return array
481
+ */
482
+ public function getDeliveryCategory() {
483
+ return Util::constructResponse($this->serverSideCustomData->getDeliveryCategory(), null);
484
+ }
485
+
486
+ /**
487
+ * Gets the item number.
488
+ * @return array
489
+ */
490
+ public function getItemNumber() {
491
+ return Util::constructResponse($this->serverSideCustomData->getItemNumber(), null);
492
+ }
493
+
494
+ /**
495
+ * Gets Custom Properties dictionary to add properties that are not defined as part of the custom data.
496
+ * @return array
497
+ */
498
+ public function getCustomProperties() {
499
+ return Util::constructResponse($this->serverSideCustomData->getCustomProperties(), null);
500
+ }
501
+
502
+ /**
503
+ * Gets custom data for Business Data API
504
+ * @return BusinessDataCustomData
505
+ */
506
+ public function getBusinessDataCustomData() {
507
+ return $this->businessDataCustomData;
508
+ }
509
+
510
+ /**
511
+ * Gets custom data for Conversion API
512
+ * @return ServerSideCustomData
513
+ */
514
+ public function getServerSideCustomData() {
515
+ return $this->serverSideCustomData;
516
+ }
517
+ }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Signal/Event.php ADDED
@@ -0,0 +1,269 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
+ *
5
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
+ * use, copy, modify, and distribute this software in source code or binary
7
+ * form for use in connection with the web services and APIs provided by
8
+ * Facebook.
9
+ *
10
+ * As with any software that integrates with the Facebook platform, your use
11
+ * of this software is subject to the Facebook Developer Principles and
12
+ * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
+ * shall be included in all copies or substantial portions of the software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
+ * DEALINGS IN THE SOFTWARE.
22
+ *
23
+ */
24
+
25
+ namespace FacebookAds\Object\Signal;
26
+
27
+ use FacebookAds\Object\BusinessDataAPI\Event as BusinessDataEvent;
28
+ use FacebookAds\Object\ServerSide\Event as ServerSideEvent;
29
+
30
+
31
+ class Event {
32
+ /**
33
+ * Associative array for storing property values for Business Data API
34
+ * @var BusinessDataEvent
35
+ */
36
+ protected $businessDataEvent= null;
37
+
38
+ /**
39
+ * Associative array for storing property values for Conversion API
40
+ * @var ServerSideEvent
41
+ */
42
+ protected $serverSideEvent = null;
43
+
44
+ /**
45
+ * Constructor
46
+ * @param mixed[] $data Associated array of property value initalizing the model
47
+ */
48
+ public function __construct(array $data = null) {
49
+ $business_data = $data;
50
+ $server_data = $data;
51
+ $business_data['user_data'] = isset($data['user_data']) ? $data['user_data']->getBusinessDataUserData() : null;
52
+ $server_data['user_data'] = isset($data['user_data']) ? $data['user_data']->getServerSideUserData() : null;
53
+ $business_data['custom_data'] = isset($data['custom_data']) ? $data['custom_data']->getBusinessDataCustomData() : null;
54
+ $server_data['custom_data'] = isset($data['custom_data']) ? $data['custom_data']->getServerSideCustomData() : null;
55
+
56
+ $this->businessDataEvent = new BusinessDataEvent($business_data);
57
+ $this->serverSideEvent = new ServerSideEvent($server_data);
58
+ }
59
+
60
+ /**
61
+ * Sets a Facebook pixel Standard Event or Custom Event name
62
+ * @param string $event_name A Facebook pixel Standard Event or Custom Event name.
63
+ * @return $this
64
+ */
65
+ public function setEventName($event_name) {
66
+ $this->businessDataEvent->setEventName($event_name);
67
+ $this->serverSideEvent->setEventName($event_name);
68
+
69
+ return $this;
70
+ }
71
+
72
+ /**
73
+ * Sets a Unix timestamp in seconds indicating when the actual event occurred
74
+ * @param int $event_time A Unix timestamp in seconds indicating when the actual event occurred.
75
+ * @return $this
76
+ */
77
+ public function setEventTime($event_time) {
78
+ $this->businessDataEvent->setEventTime($event_time);
79
+ $this->serverSideEvent->setEventTime($event_time);
80
+
81
+ return $this;
82
+ }
83
+
84
+ /**
85
+ * Sets an ID used by Facebook to deduplicate the same event sent from both server and browser.
86
+ * @param string $event_id This ID can be any unique string chosen by the advertiser.
87
+ * event_id is used to deduplicate events sent by both Facebook Pixel and Server-Side API.
88
+ * event_name is also used in the deduplication process.
89
+ * For deduplication, the eventID from Facebook pixel must match the
90
+ * event_id in the corresponding Server-Side API event.
91
+ * @return $this
92
+ */
93
+ public function setEventId($event_id) {
94
+ $this->businessDataEvent->setEventId($event_id);
95
+ $this->serverSideEvent->setEventId($event_id);
96
+
97
+ return $this;
98
+ }
99
+
100
+ /**
101
+ * Sets UserData object that contains user data.
102
+ * @param FacebookAds\Object\Signal\UserData $user_data
103
+ * @return $this
104
+ */
105
+ public function setUserData($user_data) {
106
+ $this->businessDataEvent->setUserData($user_data->getBusinessDataUserData());
107
+ $this->serverSideEvent->setUserData($user_data->getServerSideUserData());
108
+
109
+ return $this;
110
+ }
111
+
112
+ /**
113
+ * Sets CustomData object that includes additional business data about the event.
114
+ * @param FacebookAds\Object\Signal\CustomData $custom_data
115
+ * @return $this
116
+ */
117
+ public function setCustomData($custom_data) {
118
+ $this->businessDataEvent->setCustomData($custom_data->getBusinessDataCustomData());
119
+ $this->serverSideEvent->setCustomData($custom_data->getServerSideCustomData());
120
+
121
+ return $this;
122
+ }
123
+
124
+ /**
125
+ * Sets the browser URL where the event happened
126
+ * @param string $event_source_url The browser URL where the event happened.
127
+ * @return $this
128
+ */
129
+ public function setEventSourceUrl($event_source_url) {
130
+ $this->serverSideEvent->setEventSourceUrl($event_source_url);
131
+
132
+ return $this;
133
+ }
134
+
135
+ /**
136
+ * Sets a flag that indicates Facebook should or should not use this event for ads delivery optimization
137
+ * @param bool $opt_out A flag that indicates Facebook should or should not
138
+ * use this event for ads delivery optimization.
139
+ * If set to true, Facebook only use the event for attribution.
140
+ * @return $this
141
+ */
142
+ public function setOptOut($opt_out) {
143
+ $this->serverSideEvent->setOptOut($opt_out);
144
+
145
+ return $this;
146
+ }
147
+
148
+ /**
149
+ * Sets the processing options you would like to enable for a specific event.
150
+ * For more details see: https://developers.facebook.com/docs/marketing-apis/data-processing-options
151
+ * @param string[], e.g. [] or ['LDU']
152
+ * @return $this
153
+ */
154
+ public function setDataProcessingOptions($data_processing_options) {
155
+ $this->businessDataEvent->setDataProcessingOptions($data_processing_options);
156
+ $this->serverSideEvent->setDataProcessingOptions($data_processing_options);
157
+
158
+ return $this;
159
+ }
160
+
161
+ /**
162
+ * Sets a country that you want to associate to this data processing option. If you set a country, you must also set a state.
163
+ * For more details see: https://developers.facebook.com/docs/marketing-apis/data-processing-options
164
+ * @param int
165
+ * @return $this
166
+ */
167
+ public function setDataProcessingOptionsCountry($data_processing_options_country) {
168
+ $this->businessDataEvent->setDataProcessingOptionsCountry($data_processing_options_country);
169
+ $this->serverSideEvent->setDataProcessingOptionsCountry($data_processing_options_country);
170
+
171
+ return $this;
172
+ }
173
+
174
+ /**
175
+ * Sets a state that you want to associate with this data processing option.
176
+ * For more details see: https://developers.facebook.com/docs/marketing-apis/data-processing-options
177
+ * @param int
178
+ * @return $this
179
+ *
180
+ */
181
+ public function setDataProcessingOptionsState($data_processing_options_state) {
182
+ $this->businessDataEvent->setDataProcessingOptionsState($data_processing_options_state);
183
+ $this->serverSideEvent->setDataProcessingOptionsState($data_processing_options_state);
184
+
185
+ return $this;
186
+ }
187
+
188
+ /**
189
+ * Gets Facebook pixel Standard Event or Custom Event name.
190
+ * @return array
191
+ */
192
+ public function getEventName() {
193
+ return Util::constructResponse($this->serverSideEvent->getEventName(), $this->businessDataEvent->getEventName());
194
+ }
195
+
196
+ /**
197
+ * Gets Unix timestamp in seconds indicating when the actual event occurred.
198
+ * @return array
199
+ */
200
+ public function getEventTime() {
201
+ return Util::constructResponse($this->serverSideEvent->getEventTime(), $this->businessDataEvent->getEventTime());
202
+ }
203
+
204
+ /**
205
+ * Gets Event ID can be any string chosen by the advertiser. It is used by Facebook to deduplicate
206
+ * the same event sent from both server and browser.
207
+ *@return array
208
+ */
209
+ public function getEventId() {
210
+ return Util::constructResponse($this->serverSideEvent->getEventId(), $this->businessDataEvent->getEventId());
211
+ }
212
+
213
+ /**
214
+ * Gets UserData object that contains user data
215
+ * @return array
216
+ */
217
+ public function getUserData() {
218
+ return Util::constructResponse($this->serverSideEvent->getUserData(), $this->businessDataEvent->getUserData());
219
+ }
220
+
221
+ /**
222
+ * Gets customData object that includes additional business data about the event.
223
+ * @return array
224
+ */
225
+ public function getCustomData() {
226
+ return Util::constructResponse($this->serverSideEvent->getCustomData(), $this->businessDataEvent->getCustomData());
227
+ }
228
+
229
+ /**
230
+ * Gets DataProcessionOptions value of Processing options you would like to enable for a specific event.
231
+ *@return array
232
+ */
233
+ public function getDataProcessingOptions() {
234
+ return Util::constructResponse($this->serverSideEvent->getDataProcessingOptions(), $this->businessDataEvent->getDataProcessingOptions());
235
+ }
236
+
237
+ /**
238
+ * Gets DataProcessionOptionsState value that represents the state that you want to associate with this data processing option.
239
+ *@return array
240
+ */
241
+ public function getDataProcessingOptionsState() {
242
+ return Util::constructResponse($this->serverSideEvent->getDataProcessingOptionsState(), $this->businessDataEvent->getDataProcessingOptionsState());
243
+ }
244
+
245
+ /**
246
+ * Gets DataProcessionOptionsCountry value that represents the country that you want to associate to this data processing option.
247
+ *@return array
248
+ */
249
+ public function getDataProcessingOptionsCountry() {
250
+ return Util::constructResponse($this->serverSideEvent->getDataProcessingOptionsCountry(), $this->businessDataEvent->getDataProcessingOptionsCountry());
251
+ }
252
+
253
+ /**
254
+ * Gets event for Business Data API
255
+ * @return BusinessDataEvent
256
+ */
257
+ public function getBusinessDataEvent() {
258
+ return $this->businessDataEvent;
259
+ }
260
+
261
+ /**
262
+ * Gets event for Conversion API
263
+ * @return ServerSideEvent
264
+ */
265
+ public function getServerSideEvent() {
266
+ return $this->serverSideEvent;
267
+ }
268
+
269
+ }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Signal/EventRequest.php ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
+ *
5
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
+ * use, copy, modify, and distribute this software in source code or binary
7
+ * form for use in connection with the web services and APIs provided by
8
+ * Facebook.
9
+ *
10
+ * As with any software that integrates with the Facebook platform, your use
11
+ * of this software is subject to the Facebook Developer Principles and
12
+ * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
+ * shall be included in all copies or substantial portions of the software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
+ * DEALINGS IN THE SOFTWARE.
22
+ *
23
+ */
24
+
25
+ namespace FacebookAds\Object\Signal;
26
+
27
+ use FacebookAds\Api;
28
+ use FacebookAds\Object\AdsPixel;
29
+ use FacebookAds\Object\Page;
30
+ use FacebookAds\Object\BusinessDataAPI\EventRequest as BusinessDataEventRequest;
31
+ use FacebookAds\Object\ServerSide\EventRequest as ServerSideEventRequest;
32
+
33
+ /**
34
+ * Event Request
35
+ *
36
+ * @category Class
37
+ */
38
+ class EventRequest {
39
+ /**
40
+ * Associative array for storing property values for Business Data API
41
+ * @var BusinessDataEventRequest
42
+ */
43
+ protected $businessDataEventRequest = null;
44
+
45
+ /**
46
+ * Associative array for storing property values for Conversion API
47
+ * @var ServerSideEventRequest
48
+ */
49
+ protected $serverSideEventRequest = null;
50
+
51
+ /**
52
+ * Constructor
53
+ * @param string $pixel_id pixel id
54
+ * @param string $page_id page id
55
+ * @param mixed[] $data Associated array of property value initializing the model
56
+ */
57
+ public function __construct(string $pixel_id, string $page_id, array $data = null) {
58
+ $business_data = $data;
59
+ $server_data = $data;
60
+
61
+ $business_events = array();
62
+ $server_events = array();
63
+ if(isset($data['events'])){
64
+ foreach ($events as $event) {
65
+ array_push($business_events, $event->getBusinessDataEvent());
66
+ array_push($server_events, $event->getServerSideEvent());
67
+ }
68
+ }
69
+ $business_data['events'] = $business_events;
70
+ $server_data['events'] = $server_data;
71
+
72
+ $this->serverSideEventRequest = new ServerSideEventRequest($pixel_id, $server_data);
73
+ $this->businessDataEventRequest = new BusinessDataEventRequest($page_id, $business_data);
74
+ }
75
+
76
+ /**
77
+ * Sets an array of Signal Event objects
78
+ * @param FacebookAds\Object\Signal\Event[] $events An array of Signal Event objects
79
+ * @return $this
80
+ */
81
+ public function setEvents($events) {
82
+ $business_events = array();
83
+ $server_events = array();
84
+ foreach ($events as $event) {
85
+ array_push($business_events, $event->getBusinessDataEvent());
86
+ array_push($server_events, $event->getServerSideEvent());
87
+ }
88
+ $this->businessDataEventRequest->setEvents($business_events);
89
+ $this->serverSideEventRequest->setEvents($server_events);
90
+
91
+ return $this;
92
+ }
93
+
94
+ /**
95
+ * Sets code used to verify that your server events are received correctly by Facebook. Use this
96
+ * code to test your server events in the Test Events feature in Events Manager.
97
+ * See Test Events Tool
98
+ * (https://developers.facebook.com/docs/marketing-api/facebook-pixel/server-side-api/using-the-api#testEvents)
99
+ * for an example.
100
+ * @param string $test_event_code Code used to verify that your server events are received correctly by Facebook.
101
+ * Use this code to test your server events in the Test Events feature in Events Manager. See Test Events Tool
102
+ * (https://developers.facebook.com/docs/marketing-api/facebook-pixel/server-side-api/using-the-api#testEvents)
103
+ * for an example.
104
+ * @return $this
105
+ */
106
+ public function setTestEventCode($test_event_code) {
107
+ $this->serverSideEventRequest->setTestEventCode($test_event_code);
108
+ return $this;
109
+ }
110
+
111
+ /**
112
+ * Sets Partner Agent, which specifies who is sending the event.
113
+ * @param string $partner_agent The partner agent who is sending the event
114
+ * @return $this
115
+ */
116
+ public function setPartnerAgent($partner_agent) {
117
+ $this->businessDataEventRequest->setPartnerAgent($partner_agent);
118
+ $this->serverSideEventRequest->setPartnerAgent($partner_agent);
119
+
120
+ return $this;
121
+ }
122
+
123
+ /**
124
+ * Sets namespace_id, a scope used to resolve extern_id or Third-party ID.
125
+ * Can be another data set or data partner ID.
126
+ * @return $this
127
+ */
128
+ public function setNamespaceId($namespace_id) {
129
+ $this->serverSideEventRequest->setNamespaceId($namespace_id);
130
+ return $this;
131
+ }
132
+
133
+ /**
134
+ * Sets upload_tag, a tag string added to track your Offline event uploads.
135
+ * @return $this
136
+ */
137
+ public function setUploadTag($upload_tag) {
138
+ $this->serverSideEventRequest->setUploadTag($upload_tag);
139
+ return $this;
140
+ }
141
+
142
+ /**
143
+ * Sets upload_id, a unique id used to denote the current set being uploaded.
144
+ * @return $this
145
+ */
146
+ public function setUploadId($upload_id) {
147
+ $this->serverSideEventRequest->setUploadId($upload_id);
148
+ return $this;
149
+ }
150
+
151
+ /**
152
+ * Sets upload_source, the origin/source of data for the dataset to be uploaded.
153
+ * @return $this
154
+ */
155
+ public function setUploadSource($upload_source) {
156
+ $this->serverSideEventRequest->setUploadSource($upload_source);
157
+ return $this;
158
+ }
159
+
160
+ /**
161
+ * Execute the request
162
+ * @return array
163
+ */
164
+ public function execute() {
165
+ return Util::constructResponse(
166
+ $this->serverSideEventRequest->execute(),
167
+ $this->businessDataEventRequest->execute()
168
+ );
169
+ }
170
+
171
+ /**
172
+ * Gets an array of Server Event objects
173
+ * @return array
174
+ */
175
+ public function getEvents() {
176
+ return Util::constructResponse($this->serverSideEvent->getEvents(), $this->businessDataEventRequest->getEvents());
177
+ }
178
+
179
+ /**
180
+ * Gets Partner Agent, which specifies who is sending the event.
181
+ * @return array
182
+ */
183
+ public function getPartnerAgent() {
184
+ return Util::constructResponse($this->serverSideEvent->getPartnerAgent(), $this->businessDataEventRequest->getPartnerAgent());
185
+ }
186
+
187
+ /**
188
+ * Gets namespace_id, a scope used to resolve extern_id or Third-party ID.
189
+ * Can be another data set or data partner ID.
190
+ * @return array
191
+ */
192
+ public function getNamespaceId() {
193
+ return Util::constructResponse($this->serverSideEvent->getNamespaceId(), null);
194
+ }
195
+
196
+ /**
197
+ * Gets upload_id, a unique id used to denote the current set being uploaded.
198
+ * @return array
199
+ */
200
+ public function getUploadId() {
201
+ return Util::constructResponse($this->serverSideEvent->getUploadId(), null);
202
+ }
203
+
204
+ /**
205
+ * Gets code used to verify that your server events are received correctly by Facebook. Use this
206
+ * code to test your server events in the Test Events feature in Events Manager.
207
+ * See Test Events Tool
208
+ * (https://developers.facebook.com/docs/marketing-api/facebook-pixel/server-side-api/using-the-api#testEvents)
209
+ * for an example.
210
+ * @return array
211
+ */
212
+ public function getTestEventCode() {
213
+ return Util::constructResponse($this->serverSideEvent->getTestEventCode(), null);
214
+ }
215
+
216
+
217
+ /**
218
+ * Gets upload_tag, a tag string added to track your Offline event uploads.
219
+ * @return array
220
+ */
221
+ public function getUploadTag() {
222
+ return Util::constructResponse($this->serverSideEvent->getUploadTag(), null);
223
+ }
224
+
225
+ /**
226
+ * Gets upload_source, the origin/source of data for the dataset to be uploaded.
227
+ * @return array
228
+ */
229
+ public function getUploadSource() {
230
+ return Util::constructResponse($this->serverSideEvent->getUploadSource(), null);
231
+ }
232
+
233
+ }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Signal/UserData.php ADDED
@@ -0,0 +1,592 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
+ *
5
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
+ * use, copy, modify, and distribute this software in source code or binary
7
+ * form for use in connection with the web services and APIs provided by
8
+ * Facebook.
9
+ *
10
+ * As with any software that integrates with the Facebook platform, your use
11
+ * of this software is subject to the Facebook Developer Principles and
12
+ * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
+ * shall be included in all copies or substantial portions of the software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
+ * DEALINGS IN THE SOFTWARE.
22
+ *
23
+ */
24
+
25
+ namespace FacebookAds\Object\Signal;
26
+
27
+ use Util;
28
+
29
+ use FacebookAds\Object\BusinessDataAPI\UserData as BusinessDataUserData;
30
+ use FacebookAds\Object\ServerSide\UserData as ServerSideUserData;
31
+
32
+ /**
33
+ * UserData is a set of identifiers Facebook can use for targeted attribution.
34
+ *
35
+ * @category Class
36
+ */
37
+ class UserData {
38
+
39
+ /**
40
+ * Associative array for storing property values for Business Data API
41
+ * @var BusinessDataUserData
42
+ */
43
+ protected $businessDataUserData = null;
44
+
45
+ /**
46
+ * Associative array for storing property values for Conversion API
47
+ * @var ServerSideUserData
48
+ */
49
+ protected $serverSideUserData = null;
50
+
51
+ /**
52
+ * Constructor
53
+ * @param mixed[] $data Associated array of property value initalizing the model
54
+ */
55
+ public function __construct(array $data = null) {
56
+ $this->businessDataUserData = new BusinessDataUserData($data);
57
+ $this->serverSideUserData = new ServerSideUserData($data);
58
+ }
59
+
60
+ /**
61
+ * Sets an email address, in lowercase.
62
+ *
63
+ * Example: joe@eg.com
64
+ * @param string $email An email address, in lowercase.
65
+ * @return $this
66
+ */
67
+ public function setEmail($email) {
68
+ $this->businessDataUserData->setEmail($email);
69
+ $this->serverSideUserData->setEmail($email);
70
+ return $this;
71
+ }
72
+
73
+ /**
74
+ * Sets a phone number. Include only digits with countryCode code, area code, and number.
75
+ *
76
+ * Example: 16505551212
77
+ * @param string $phone A phone number. Include only digits with country code, area code, and number.
78
+ * @return $this
79
+ */
80
+ public function setPhone($phone) {
81
+ $this->businessDataUserData->setPhone($phone);
82
+ $this->serverSideUserData->setPhone($phone);
83
+
84
+ return $this;
85
+ }
86
+
87
+ /**
88
+ * Sets Gender, in lowercase. Either f or m.
89
+ * @param FacebookAds\Object\ServerSide\Gender $gender Gender, in lowercase. Either f or m.
90
+ * @return $this
91
+ */
92
+ public function setGender($gender) {
93
+ $this->serverSideUserData->setGender($gender);
94
+
95
+ return $this;
96
+ }
97
+
98
+ /**
99
+ * Sets a date of birth given as year, month, and day.
100
+ *
101
+ * Example: 19971226 for December 26, 1997.
102
+ * @param string $date_of_birth A date of birth given as year, month, and day.
103
+ * @return $this
104
+ */
105
+ public function setDateOfBirth($date_of_birth) {
106
+ $this->businessDataUserData->setDateOfBirth($date_of_birth);
107
+ $this->serverSideUserData->setDateOfBirth($date_of_birth);
108
+
109
+ return $this;
110
+ }
111
+
112
+ /**
113
+ * Sets a last name in lowercase.
114
+ *
115
+ * Example: smith
116
+ * @param string $last_name A last name in lowercase.
117
+ * @return $this
118
+ */
119
+ public function setLastName($last_name) {
120
+ $this->businessDataUserData->setLastName($last_name);
121
+ $this->serverSideUserData->setLastName($last_name);
122
+
123
+ return $this;
124
+ }
125
+
126
+ /**
127
+ * Sets a first name in lowercase.
128
+ *
129
+ * Example: joe
130
+ * @param string $first_name A first name in lowercase.
131
+ * @return $this
132
+ */
133
+ public function setFirstName($first_name) {
134
+ $this->businessDataUserData->setFirstName($first_name);
135
+ $this->serverSideUserData->setFirstName($first_name);
136
+
137
+ return $this;
138
+ }
139
+
140
+ /**
141
+ * Sets a city in lowercase without spaces or punctuation.
142
+ *
143
+ * Example: menlopark
144
+ * @param string $city A city in lowercase without spaces or punctuation.
145
+ * @return $this
146
+ */
147
+ public function setCity($city) {
148
+ $this->businessDataUserData->setCity($city);
149
+ $this->serverSideUserData->setCity($city);
150
+
151
+ return $this;
152
+ }
153
+
154
+ /**
155
+ * Sets a two-letter state code in lowercase.
156
+ *
157
+ * Example: ca
158
+ * @param string $state A two-letter state code in lowercase.
159
+ * @return $this
160
+ */
161
+ public function setState($state) {
162
+ $this->businessDataUserData->setState($state);
163
+ $this->serverSideUserData->setState($state);
164
+
165
+ return $this;
166
+ }
167
+
168
+ /**
169
+ * Sets a two-letter country code in lowercase.
170
+ *
171
+ * Example: us
172
+ * @param string $country_code two-letter country code in lowercase.
173
+ * @return $this
174
+ */
175
+ public function setCountryCode($country_code) {
176
+ $this->businessDataUserData->setCountryCode($country_code);
177
+ $this->serverSideUserData->setCountryCode($country_code);
178
+
179
+ return $this;
180
+ }
181
+
182
+ /**
183
+ * Sets a five-digit zip code.
184
+ *
185
+ * Example: 94035
186
+ * @param string $zip_code A five-digit zip code.
187
+ * @return $this
188
+ */
189
+ public function setZipCode($zip_code) {
190
+ $this->businessDataUserData->setZipCode($zip_code);
191
+ $this->serverSideUserData->setZipCode($zip_code);
192
+
193
+ return $this;
194
+ }
195
+
196
+ /**
197
+ * Sets any unique ID from the advertiser, such as loyalty membership IDs, user IDs, and external
198
+ * cookie IDs. In the Offline Conversions API, this is known as extern_id. For more information,
199
+ * see Offline Conversions, Providing External IDs. If External ID is being sent via other
200
+ * channels, then it should be sent in the same format via the server-side API.
201
+ * @param string $external_id Any unique ID from the advertiser, such as loyalty membership IDs,
202
+ * user IDs, and external cookie IDs.
203
+ * @return $this
204
+ */
205
+ public function setExternalId($external_id) {
206
+ $this->businessDataUserData->setExternalId($external_id);
207
+ $this->serverSideUserData->setExternalId($external_id);
208
+
209
+ return $this;
210
+ }
211
+
212
+ /**
213
+ * Sets IP address of the browser corresponding to the event.
214
+ * @param string $client_ip_address The IP address of the browser corresponding to the event.
215
+ * @return $this
216
+ */
217
+ public function setClientIpAddress($client_ip_address) {
218
+ $this->serverSideUserData->setClientIpAddress($client_ip_address);
219
+
220
+ return $this;
221
+ }
222
+
223
+ /**
224
+ * Sets user agent for the browser corresponding to the event.
225
+ * @param string $client_user_agent The user agent for the browser corresponding to the event.
226
+ * @return $this
227
+ */
228
+ public function setClientUserAgent($client_user_agent) {
229
+ $this->serverSideUserData->setClientUserAgent($client_user_agent);
230
+
231
+ return $this;
232
+ }
233
+
234
+ /**
235
+ * Sets Facebook click ID value stored in the _fbc browser cookie under your domain. See Managing
236
+ * fbc and fbp Parameters for how to get this value
237
+ * (https://developers.facebook.com/docs/marketing-api/facebook-pixel/server-side-api/parameters#fbc),
238
+ * or generate this value from a fbclid query parameter.
239
+ * @param string $fbc The Facebook click ID value stored in the _fbc browser cookie under your domain.
240
+ * @return $this
241
+ */
242
+ public function setFbc($fbc) {
243
+ $this->serverSideUserData->setFbc($fbc);
244
+
245
+ return $this;
246
+ }
247
+
248
+ /**
249
+ * Sets Set Facebook browser ID value stored in the _fbp browser cookie under your domain. See Managing
250
+ * fbc and fbp Parameters for how to get this value
251
+ * (https://developers.facebook.com/docs/marketing-api/facebook-pixel/server-side-api/parameters#fbc),
252
+ * or generate this value from a fbclid query parameter.
253
+ * @param string $fbp The Facebook browser ID value stored in the _fbp browser cookie under your domain.
254
+ * @return $this
255
+ */
256
+ public function setFbp($fbp) {
257
+ $this->serverSideUserData->setFbp($fbp);
258
+
259
+ return $this;
260
+ }
261
+
262
+ /**
263
+ * Sets subscription ID for the user in this transaction. This is similar to the order ID for an
264
+ * individual product.
265
+ * @param string $subscription_id The subscription ID for the user in this transaction.
266
+ * @return $this
267
+ */
268
+ public function setSubscriptionId($subscription_id) {
269
+ $this->serverSideUserData->setSubscriptionId($subscription_id);
270
+
271
+ return $this;
272
+ }
273
+
274
+ /**
275
+ * Sets FbLogin ID for the user in this transaction.
276
+ * ID issued by Facebook when a person first logs into an instance of an app.
277
+ * This is also known as App-Scoped ID.
278
+ * @param string $fb_login_id The Fb_Login_Id for the user in this transaction.
279
+ * @return $this
280
+ */
281
+ public function setFbLoginId($fb_login_id) {
282
+ $this->serverSideUserData->setFbLoginId($fb_login_id);
283
+
284
+ return $this;
285
+ }
286
+
287
+ /**
288
+ * Sets lead_id for the user in this transaction.
289
+ * A lead_id is associated with a lead generated by Facebook's Lead Ads.
290
+ * @param string $lead_id The lead_id for the user in this transaction.
291
+ * @return $this
292
+ */
293
+ public function setLeadId($lead_id) {
294
+ $this->serverSideUserData->setLeadId($lead_id);
295
+
296
+ return $this;
297
+ }
298
+
299
+ /**
300
+ * Sets the first 5 letters of the first name.
301
+ * @param string $f5first The first 5 letters of the first name.
302
+ * @return $this
303
+ */
304
+ public function setF5first($f5first) {
305
+ $this->serverSideUserData->setF5first($f5first);
306
+
307
+ return $this;
308
+ }
309
+
310
+ /**
311
+ * Sets the first 5 letters of the last name.
312
+ * @param string $f5last The first 5 letters of the last name.
313
+ * @return $this
314
+ */
315
+ public function setF5last($f5last) {
316
+ $this->serverSideUserData->setF5last($f5last);
317
+
318
+ return $this;
319
+ }
320
+
321
+ /**
322
+ * Sets the first initial.
323
+ * @param string $fi The first initial.
324
+ * @return $this
325
+ */
326
+ public function setFi($fi) {
327
+ $this->serverSideUserData->setFi($fi);
328
+
329
+ return $this;
330
+ }
331
+
332
+ /**
333
+ * Sets the date of birth day.
334
+ * @param string $dobd The date of birth day.
335
+ * @return $this
336
+ */
337
+ public function setDobd($dobd) {
338
+ $this->serverSideUserData->setDobd($dobd);
339
+
340
+ return $this;
341
+ }
342
+
343
+ /**
344
+ * Sets the date of birth month.
345
+ * @param string $dobm The date of birth month.
346
+ * @return $this
347
+ */
348
+ public function setDobm($dobm) {
349
+ $this->serverSideUserData->setDobm($dobm);
350
+
351
+ return $this;
352
+ }
353
+
354
+ /**
355
+ * Sets the date of birth year.
356
+ * @param string $doby The date of birth year.
357
+ * @return $this
358
+ */
359
+ public function setDoby($doby) {
360
+ $this->serverSideUserData->setDoby($doby);
361
+
362
+ return $this;
363
+ }
364
+
365
+ /**
366
+ * Sets physical address.
367
+ * @param string $address The physical address.
368
+ * @return $this
369
+ */
370
+ public function setAddress($address) {
371
+ $this->businessDataUserData->setAddress($address);
372
+
373
+ return $this;
374
+ }
375
+
376
+ /**
377
+ * Gets an email address, in lowercase.
378
+ * @return array
379
+ */
380
+ public function getEmail() {
381
+ return Util::constructResponse($this->serverSideUserData->getEmail(), $this->businessDataUserData->getEmail());
382
+ }
383
+
384
+ /**
385
+ * Gets a phone number
386
+ * @return array
387
+ */
388
+ public function getPhone() {
389
+ return Util::constructResponse($this->serverSideUserData->getPhone(), $this->businessDataUserData->getPhone());
390
+ }
391
+
392
+ /**
393
+ * Gets gender.
394
+ * @return array
395
+ */
396
+ public function getGender() {
397
+ return Util::constructResponse($this->serverSideUserData->getGender(), null);
398
+ }
399
+
400
+ /**
401
+ * Gets Date Of Birth.
402
+ * @return array
403
+ */
404
+ public function getDateOfBirth() {
405
+ return Util::constructResponse($this->serverSideUserData->getDateOfBirth(), $this->businessDataUserData->getDateOfBirth());
406
+ }
407
+
408
+ /**
409
+ * Gets Last Name.
410
+ * @return array
411
+ */
412
+ public function getLastName() {
413
+ return Util::constructResponse($this->serverSideUserData->getLastName(), $this->businessDataUserData->getLastName());
414
+ }
415
+
416
+ /**
417
+ * Gets First Name.
418
+ * @return array
419
+ */
420
+ public function getFirstName() {
421
+ return Util::constructResponse($this->serverSideUserData->getFirstName(), $this->businessDataUserData->getFirstName());
422
+ }
423
+
424
+ /**
425
+ * Gets city.
426
+ * @return array
427
+ */
428
+ public function getCity() {
429
+ return Util::constructResponse($this->serverSideUserData->getCity(), $this->businessDataUserData->getCity());
430
+ }
431
+
432
+ /**
433
+ * Gets state.
434
+ * @return array
435
+ */
436
+ public function getState() {
437
+ return Util::constructResponse($this->serverSideUserData->getState(), $this->businessDataUserData->getState());
438
+ }
439
+
440
+ /**
441
+ * Gets zip code
442
+ * @return array
443
+ */
444
+ public function getZipCode() {
445
+ return Util::constructResponse($this->serverSideUserData->getZipCode(), $this->businessDataUserData->getZipCode());
446
+ }
447
+
448
+ /**
449
+ * Gets country code.
450
+ * @return array
451
+ */
452
+ public function getCountryCode() {
453
+ return Util::constructResponse($this->serverSideUserData->getCountryCode(), $this->businessDataUserData->getCountryCode());
454
+ }
455
+
456
+ /**
457
+ * Gets Any unique ID from the advertiser, such as loyalty membership IDs, user IDs, and external cookie IDs.
458
+ * @return array
459
+ */
460
+ public function getExternalId() {
461
+ return Util::constructResponse($this->serverSideUserData->getExternalId(), $this->businessDataUserData->getExternalId());
462
+ }
463
+
464
+ /**
465
+ * Gets IP address of the browser corresponding to the event.
466
+ * @return array
467
+ */
468
+ public function getClientIpAddress() {
469
+ return Util::constructResponse($this->serverSideUserData->getClientIpAddress(), null);
470
+ }
471
+
472
+ /**
473
+ * Gets user agent for the browser corresponding to the event.
474
+ * @return array
475
+ */
476
+ public function getClientUserAgent() {
477
+ return Util::constructResponse($this->serverSideUserData->getClientUserAgent(), null);
478
+ }
479
+
480
+ /**
481
+ * Gets the Facebook click ID value stored in the _fbc browser cookie under your domain.
482
+ * @return array
483
+ */
484
+ public function getFbc() {
485
+ return Util::constructResponse($this->serverSideUserData->getFbc(), null);
486
+ }
487
+
488
+ /**
489
+ * Gets the Facebook browser ID value stored in the _fbp browser cookie under your domain.
490
+ * @return array
491
+ */
492
+ public function getFbp() {
493
+ return Util::constructResponse($this->serverSideUserData->getFbp(), null);
494
+ }
495
+
496
+ /**
497
+ * Gets the subscription ID for the user in this transaction.
498
+ * @return array
499
+ */
500
+ public function getSubscriptionId() {
501
+ return Util::constructResponse($this->serverSideUserData->getSubscriptionId(), null);
502
+ }
503
+
504
+ /**
505
+ * Gets the FbLogin ID for the user in this transaction.
506
+ * @return array
507
+ */
508
+ public function getFbLoginId() {
509
+ return Util::constructResponse($this->serverSideUserData->getFbLoginId(), null);
510
+ }
511
+
512
+ /**
513
+ * Gets the lead_id for the user in this transaction.
514
+ * @return array
515
+ */
516
+ public function getLeadId() {
517
+ return Util::constructResponse($this->serverSideUserData->getLeadId(), null);
518
+ }
519
+
520
+ /**
521
+ * Gets the first 5 letters of the first name.
522
+ * @return array
523
+ */
524
+ public function getF5first() {
525
+ return Util::constructResponse($this->serverSideUserData->getF5first(), null);
526
+ }
527
+
528
+ /**
529
+ * Gets the first 5 letters of the last name.
530
+ * @return array
531
+ */
532
+ public function getF5last() {
533
+ return Util::constructResponse($this->serverSideUserData->getF5last(), null);
534
+ }
535
+
536
+ /**
537
+ * Gets the first initial.
538
+ * @return array
539
+ */
540
+ public function getFi() {
541
+ return Util::constructResponse($this->serverSideUserData->getFi(), null);
542
+ }
543
+
544
+ /**
545
+ * Gets the date of birth day.
546
+ * @return array
547
+ */
548
+ public function getDobd() {
549
+ return Util::constructResponse($this->serverSideUserData->getDobd(), null);
550
+ }
551
+
552
+ /**
553
+ * Gets the date of birth month.
554
+ * @return array
555
+ */
556
+ public function getDobm() {
557
+ return Util::constructResponse($this->serverSideUserData->getDobm(), null);
558
+ }
559
+
560
+ /**
561
+ * Gets the date of birth year.
562
+ * @return array
563
+ */
564
+ public function getDoby() {
565
+ return Util::constructResponse($this->serverSideUserData->getDoby(), null);
566
+ }
567
+
568
+ /**
569
+ * Gets physical address
570
+ * @return array
571
+ */
572
+ public function getAddress() {
573
+ return Util::constructResponse(null, $this->businessDataUserData->getAddress());
574
+ }
575
+
576
+ /**
577
+ * Gets user data for Business Data API
578
+ * @return BusinessDataUserData
579
+ */
580
+ public function getBusinessDataUserData() {
581
+ return $this->businessDataUserData;
582
+ }
583
+
584
+ /**
585
+ * Gets user data for Conversion API
586
+ * @return ServerSideUserData
587
+ */
588
+ public function getServerSideUserData() {
589
+ return $this->serverSideUserData;
590
+ }
591
+
592
+ }
vendor/facebook/php-business-sdk/{examples/AdsPixelNodeGetPixelCode.php → src/FacebookAds/Object/Signal/Util.php} RENAMED
@@ -19,28 +19,22 @@
19
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
  * DEALINGS IN THE SOFTWARE.
 
22
  */
23
 
24
- require __DIR__ . '/vendor/autoload.php';
25
-
26
- use FacebookAds\Object\AdsPixel;
27
- use FacebookAds\Api;
28
- use FacebookAds\Logger\CurlLogger;
29
-
30
- $access_token = '<ACCESS_TOKEN>';
31
- $app_secret = '<APP_SECRET>';
32
- $app_id = '<APP_ID>';
33
- $id = '<ADS_PIXEL_ID>';
34
 
35
- $api = Api::init($app_id, $app_secret, $access_token);
36
- $api->setLogger(new CurlLogger());
 
 
 
 
 
 
 
 
 
 
37
 
38
- $fields = array(
39
- 'code',
40
- );
41
- $params = array(
42
- );
43
- echo json_encode((new AdsPixel($id))->getSelf(
44
- $fields,
45
- $params
46
- )->exportAllData(), JSON_PRETTY_PRINT);
19
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
  * DEALINGS IN THE SOFTWARE.
22
+ *
23
  */
24
 
25
+ namespace FacebookAds\Object\Signal;
 
 
 
 
 
 
 
 
 
26
 
27
+ class Util {
28
+ /**
29
+ * @param capi_data conversion api data
30
+ * @param bdapi_data business data api data
31
+ * @return array
32
+ */
33
+ public static function constructResponse($capi_data,$bdapi_data) {
34
+ $response = array();
35
+ $response['business_data_api'] = $bdapi_data;
36
+ $response['conversion_api'] = $capi_data;
37
+ return $response;
38
+ }
39
 
40
+ }
 
 
 
 
 
 
 
 
vendor/facebook/php-business-sdk/src/FacebookAds/Object/User.php CHANGED
@@ -581,29 +581,6 @@ class User extends AbstractCrudObject {
581
  return $pending ? $request : $request->execute();
582
  }
583
 
584
- public function getCustomLabels(array $fields = array(), array $params = array(), $pending = false) {
585
- $this->assureId();
586
-
587
- $param_types = array(
588
- );
589
- $enums = array(
590
- );
591
-
592
- $request = new ApiRequest(
593
- $this->api,
594
- $this->data['id'],
595
- RequestInterface::METHOD_GET,
596
- '/custom_labels',
597
- new PageUserMessageThreadLabel(),
598
- 'EDGE',
599
- PageUserMessageThreadLabel::getFieldsEnum()->getValues(),
600
- new TypeChecker($param_types, $enums)
601
- );
602
- $request->addParams($params);
603
- $request->addFields($fields);
604
- return $pending ? $request : $request->execute();
605
- }
606
-
607
  public function getEvents(array $fields = array(), array $params = array(), $pending = false) {
608
  $this->assureId();
609
 
@@ -1248,7 +1225,7 @@ class User extends AbstractCrudObject {
1248
  return $pending ? $request : $request->execute();
1249
  }
1250
 
1251
- public function getOwnedProductCatalogs(array $fields = array(), array $params = array(), $pending = false) {
1252
  $this->assureId();
1253
 
1254
  $param_types = array(
@@ -1260,10 +1237,10 @@ class User extends AbstractCrudObject {
1260
  $this->api,
1261
  $this->data['id'],
1262
  RequestInterface::METHOD_GET,
1263
- '/owned_product_catalogs',
1264
- new ProductCatalog(),
1265
  'EDGE',
1266
- ProductCatalog::getFieldsEnum()->getValues(),
1267
  new TypeChecker($param_types, $enums)
1268
  );
1269
  $request->addParams($params);
@@ -1476,6 +1453,35 @@ class User extends AbstractCrudObject {
1476
  return $pending ? $request : $request->execute();
1477
  }
1478
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1479
  public function getRichMediaDocuments(array $fields = array(), array $params = array(), $pending = false) {
1480
  $this->assureId();
1481
 
581
  return $pending ? $request : $request->execute();
582
  }
583
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
584
  public function getEvents(array $fields = array(), array $params = array(), $pending = false) {
585
  $this->assureId();
586
 
1225
  return $pending ? $request : $request->execute();
1226
  }
1227
 
1228
+ public function getPaymentTransactions(array $fields = array(), array $params = array(), $pending = false) {
1229
  $this->assureId();
1230
 
1231
  $param_types = array(
1237
  $this->api,
1238
  $this->data['id'],
1239
  RequestInterface::METHOD_GET,
1240
+ '/payment_transactions',
1241
+ new PaymentEnginePayment(),
1242
  'EDGE',
1243
+ PaymentEnginePayment::getFieldsEnum()->getValues(),
1244
  new TypeChecker($param_types, $enums)
1245
  );
1246
  $request->addParams($params);
1453
  return $pending ? $request : $request->execute();
1454
  }
1455
 
1456
+ public function getPosts(array $fields = array(), array $params = array(), $pending = false) {
1457
+ $this->assureId();
1458
+
1459
+ $param_types = array(
1460
+ 'include_hidden' => 'bool',
1461
+ 'q' => 'string',
1462
+ 'show_expired' => 'bool',
1463
+ 'since' => 'datetime',
1464
+ 'until' => 'datetime',
1465
+ 'with' => 'string',
1466
+ );
1467
+ $enums = array(
1468
+ );
1469
+
1470
+ $request = new ApiRequest(
1471
+ $this->api,
1472
+ $this->data['id'],
1473
+ RequestInterface::METHOD_GET,
1474
+ '/posts',
1475
+ new Post(),
1476
+ 'EDGE',
1477
+ Post::getFieldsEnum()->getValues(),
1478
+ new TypeChecker($param_types, $enums)
1479
+ );
1480
+ $request->addParams($params);
1481
+ $request->addFields($fields);
1482
+ return $pending ? $request : $request->execute();
1483
+ }
1484
+
1485
  public function getRichMediaDocuments(array $fields = array(), array $params = array(), $pending = false) {
1486
  $this->assureId();
1487
 
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdAccountDeliveryEstimateOptimizationGoalValues.php CHANGED
@@ -55,6 +55,7 @@ class AdAccountDeliveryEstimateOptimizationGoalValues extends AbstractEnum {
55
  const PAGE_ENGAGEMENT = 'PAGE_ENGAGEMENT';
56
  const PAGE_LIKES = 'PAGE_LIKES';
57
  const POST_ENGAGEMENT = 'POST_ENGAGEMENT';
 
58
  const QUALITY_LEAD = 'QUALITY_LEAD';
59
  const REACH = 'REACH';
60
  const REPLIES = 'REPLIES';
55
  const PAGE_ENGAGEMENT = 'PAGE_ENGAGEMENT';
56
  const PAGE_LIKES = 'PAGE_LIKES';
57
  const POST_ENGAGEMENT = 'POST_ENGAGEMENT';
58
+ const QUALITY_CALL = 'QUALITY_CALL';
59
  const QUALITY_LEAD = 'QUALITY_LEAD';
60
  const REACH = 'REACH';
61
  const REPLIES = 'REPLIES';
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdAccountMatchedSearchApplicationsEdgeDataAppStoreValues.php CHANGED
@@ -42,6 +42,7 @@ class AdAccountMatchedSearchApplicationsEdgeDataAppStoreValues extends AbstractE
42
  const FB_ANDROID_STORE = 'FB_ANDROID_STORE';
43
  const FB_CANVAS = 'FB_CANVAS';
44
  const FB_GAMEROOM = 'FB_GAMEROOM';
 
45
  const GOOGLE_PLAY = 'GOOGLE_PLAY';
46
  const INSTANT_GAME = 'INSTANT_GAME';
47
  const ITUNES = 'ITUNES';
42
  const FB_ANDROID_STORE = 'FB_ANDROID_STORE';
43
  const FB_CANVAS = 'FB_CANVAS';
44
  const FB_GAMEROOM = 'FB_GAMEROOM';
45
+ const GALAXY_STORE = 'GALAXY_STORE';
46
  const GOOGLE_PLAY = 'GOOGLE_PLAY';
47
  const INSTANT_GAME = 'INSTANT_GAME';
48
  const ITUNES = 'ITUNES';
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdAccountPermittedTasksValues.php CHANGED
@@ -39,5 +39,6 @@ class AdAccountPermittedTasksValues extends AbstractEnum {
39
 
40
  const ADVERTISE = 'ADVERTISE';
41
  const ANALYZE = 'ANALYZE';
 
42
  const MANAGE = 'MANAGE';
43
  }
39
 
40
  const ADVERTISE = 'ADVERTISE';
41
  const ANALYZE = 'ANALYZE';
42
+ const DRAFT = 'DRAFT';
43
  const MANAGE = 'MANAGE';
44
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdAccountTargetingUnifiedAppStoreValues.php CHANGED
@@ -42,6 +42,7 @@ class AdAccountTargetingUnifiedAppStoreValues extends AbstractEnum {
42
  const FB_ANDROID_STORE = 'fb_android_store';
43
  const FB_CANVAS = 'fb_canvas';
44
  const FB_GAMEROOM = 'fb_gameroom';
 
45
  const GOOGLE_PLAY = 'google_play';
46
  const INSTANT_GAME = 'instant_game';
47
  const ITUNES = 'itunes';
42
  const FB_ANDROID_STORE = 'fb_android_store';
43
  const FB_CANVAS = 'fb_canvas';
44
  const FB_GAMEROOM = 'fb_gameroom';
45
+ const GALAXY_STORE = 'galaxy_store';
46
  const GOOGLE_PLAY = 'google_play';
47
  const INSTANT_GAME = 'instant_game';
48
  const ITUNES = 'itunes';
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdAccountTasksValues.php CHANGED
@@ -39,5 +39,6 @@ class AdAccountTasksValues extends AbstractEnum {
39
 
40
  const ADVERTISE = 'ADVERTISE';
41
  const ANALYZE = 'ANALYZE';
 
42
  const MANAGE = 'MANAGE';
43
  }
39
 
40
  const ADVERTISE = 'ADVERTISE';
41
  const ANALYZE = 'ANALYZE';
42
+ const DRAFT = 'DRAFT';
43
  const MANAGE = 'MANAGE';
44
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdAssetFeedSpecCallToActionTypesValues.php CHANGED
@@ -95,6 +95,7 @@ class AdAssetFeedSpecCallToActionTypesValues extends AbstractEnum {
95
  const USE_APP = 'USE_APP';
96
  const USE_MOBILE_APP = 'USE_MOBILE_APP';
97
  const VIDEO_ANNOTATION = 'VIDEO_ANNOTATION';
 
98
  const VISIT_PAGES_FEED = 'VISIT_PAGES_FEED';
99
  const WATCH_MORE = 'WATCH_MORE';
100
  const WATCH_VIDEO = 'WATCH_VIDEO';
95
  const USE_APP = 'USE_APP';
96
  const USE_MOBILE_APP = 'USE_MOBILE_APP';
97
  const VIDEO_ANNOTATION = 'VIDEO_ANNOTATION';
98
+ const VIDEO_CALL = 'VIDEO_CALL';
99
  const VISIT_PAGES_FEED = 'VISIT_PAGES_FEED';
100
  const WATCH_MORE = 'WATCH_MORE';
101
  const WATCH_VIDEO = 'WATCH_VIDEO';
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdCampaignActivityBidStrategyNewValues.php CHANGED
@@ -40,5 +40,4 @@ class AdCampaignActivityBidStrategyNewValues extends AbstractEnum {
40
  const COST_CAP = 'COST_CAP';
41
  const LOWEST_COST_WITHOUT_CAP = 'LOWEST_COST_WITHOUT_CAP';
42
  const LOWEST_COST_WITH_BID_CAP = 'LOWEST_COST_WITH_BID_CAP';
43
- const TARGET_COST = 'TARGET_COST';
44
  }
40
  const COST_CAP = 'COST_CAP';
41
  const LOWEST_COST_WITHOUT_CAP = 'LOWEST_COST_WITHOUT_CAP';
42
  const LOWEST_COST_WITH_BID_CAP = 'LOWEST_COST_WITH_BID_CAP';
 
43
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdCampaignActivityBidStrategyOldValues.php CHANGED
@@ -40,5 +40,4 @@ class AdCampaignActivityBidStrategyOldValues extends AbstractEnum {
40
  const COST_CAP = 'COST_CAP';
41
  const LOWEST_COST_WITHOUT_CAP = 'LOWEST_COST_WITHOUT_CAP';
42
  const LOWEST_COST_WITH_BID_CAP = 'LOWEST_COST_WITH_BID_CAP';
43
- const TARGET_COST = 'TARGET_COST';
44
  }
40
  const COST_CAP = 'COST_CAP';
41
  const LOWEST_COST_WITHOUT_CAP = 'LOWEST_COST_WITHOUT_CAP';
42
  const LOWEST_COST_WITH_BID_CAP = 'LOWEST_COST_WITH_BID_CAP';
 
43
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdCampaignActivityOptimizationGoalNewValues.php CHANGED
@@ -55,6 +55,7 @@ class AdCampaignActivityOptimizationGoalNewValues extends AbstractEnum {
55
  const PAGE_ENGAGEMENT = 'PAGE_ENGAGEMENT';
56
  const PAGE_LIKES = 'PAGE_LIKES';
57
  const POST_ENGAGEMENT = 'POST_ENGAGEMENT';
 
58
  const QUALITY_LEAD = 'QUALITY_LEAD';
59
  const REACH = 'REACH';
60
  const REPLIES = 'REPLIES';
55
  const PAGE_ENGAGEMENT = 'PAGE_ENGAGEMENT';
56
  const PAGE_LIKES = 'PAGE_LIKES';
57
  const POST_ENGAGEMENT = 'POST_ENGAGEMENT';
58
+ const QUALITY_CALL = 'QUALITY_CALL';
59
  const QUALITY_LEAD = 'QUALITY_LEAD';
60
  const REACH = 'REACH';
61
  const REPLIES = 'REPLIES';
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdCampaignActivityOptimizationGoalOldValues.php CHANGED
@@ -55,6 +55,7 @@ class AdCampaignActivityOptimizationGoalOldValues extends AbstractEnum {
55
  const PAGE_ENGAGEMENT = 'PAGE_ENGAGEMENT';
56
  const PAGE_LIKES = 'PAGE_LIKES';
57
  const POST_ENGAGEMENT = 'POST_ENGAGEMENT';
 
58
  const QUALITY_LEAD = 'QUALITY_LEAD';
59
  const REACH = 'REACH';
60
  const REPLIES = 'REPLIES';
55
  const PAGE_ENGAGEMENT = 'PAGE_ENGAGEMENT';
56
  const PAGE_LIKES = 'PAGE_LIKES';
57
  const POST_ENGAGEMENT = 'POST_ENGAGEMENT';
58
+ const QUALITY_CALL = 'QUALITY_CALL';
59
  const QUALITY_LEAD = 'QUALITY_LEAD';
60
  const REACH = 'REACH';
61
  const REPLIES = 'REPLIES';
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdCampaignDeliveryEstimateOptimizationGoalValues.php CHANGED
@@ -55,6 +55,7 @@ class AdCampaignDeliveryEstimateOptimizationGoalValues extends AbstractEnum {
55
  const PAGE_ENGAGEMENT = 'PAGE_ENGAGEMENT';
56
  const PAGE_LIKES = 'PAGE_LIKES';
57
  const POST_ENGAGEMENT = 'POST_ENGAGEMENT';
 
58
  const QUALITY_LEAD = 'QUALITY_LEAD';
59
  const REACH = 'REACH';
60
  const REPLIES = 'REPLIES';
55
  const PAGE_ENGAGEMENT = 'PAGE_ENGAGEMENT';
56
  const PAGE_LIKES = 'PAGE_LIKES';
57
  const POST_ENGAGEMENT = 'POST_ENGAGEMENT';
58
+ const QUALITY_CALL = 'QUALITY_CALL';
59
  const QUALITY_LEAD = 'QUALITY_LEAD';
60
  const REACH = 'REACH';
61
  const REPLIES = 'REPLIES';
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdCreativeCallToActionTypeValues.php CHANGED
@@ -95,6 +95,7 @@ class AdCreativeCallToActionTypeValues extends AbstractEnum {
95
  const USE_APP = 'USE_APP';
96
  const USE_MOBILE_APP = 'USE_MOBILE_APP';
97
  const VIDEO_ANNOTATION = 'VIDEO_ANNOTATION';
 
98
  const VISIT_PAGES_FEED = 'VISIT_PAGES_FEED';
99
  const WATCH_MORE = 'WATCH_MORE';
100
  const WATCH_VIDEO = 'WATCH_VIDEO';
95
  const USE_APP = 'USE_APP';
96
  const USE_MOBILE_APP = 'USE_MOBILE_APP';
97
  const VIDEO_ANNOTATION = 'VIDEO_ANNOTATION';
98
+ const VIDEO_CALL = 'VIDEO_CALL';
99
  const VISIT_PAGES_FEED = 'VISIT_PAGES_FEED';
100
  const WATCH_MORE = 'WATCH_MORE';
101
  const WATCH_VIDEO = 'WATCH_VIDEO';
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdCreativeLinkDataCallToActionTypeValues.php CHANGED
@@ -95,6 +95,7 @@ class AdCreativeLinkDataCallToActionTypeValues extends AbstractEnum {
95
  const USE_APP = 'USE_APP';
96
  const USE_MOBILE_APP = 'USE_MOBILE_APP';
97
  const VIDEO_ANNOTATION = 'VIDEO_ANNOTATION';
 
98
  const VISIT_PAGES_FEED = 'VISIT_PAGES_FEED';
99
  const WATCH_MORE = 'WATCH_MORE';
100
  const WATCH_VIDEO = 'WATCH_VIDEO';
95
  const USE_APP = 'USE_APP';
96
  const USE_MOBILE_APP = 'USE_MOBILE_APP';
97
  const VIDEO_ANNOTATION = 'VIDEO_ANNOTATION';
98
+ const VIDEO_CALL = 'VIDEO_CALL';
99
  const VISIT_PAGES_FEED = 'VISIT_PAGES_FEED';
100
  const WATCH_MORE = 'WATCH_MORE';
101
  const WATCH_VIDEO = 'WATCH_VIDEO';
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdSetBidStrategyValues.php CHANGED
@@ -40,5 +40,4 @@ class AdSetBidStrategyValues extends AbstractEnum {
40
  const COST_CAP = 'COST_CAP';
41
  const LOWEST_COST_WITHOUT_CAP = 'LOWEST_COST_WITHOUT_CAP';
42
  const LOWEST_COST_WITH_BID_CAP = 'LOWEST_COST_WITH_BID_CAP';
43
- const TARGET_COST = 'TARGET_COST';
44
  }
40
  const COST_CAP = 'COST_CAP';
41
  const LOWEST_COST_WITHOUT_CAP = 'LOWEST_COST_WITHOUT_CAP';
42
  const LOWEST_COST_WITH_BID_CAP = 'LOWEST_COST_WITH_BID_CAP';
 
43
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdSetOptimizationGoalValues.php CHANGED
@@ -55,6 +55,7 @@ class AdSetOptimizationGoalValues extends AbstractEnum {
55
  const PAGE_ENGAGEMENT = 'PAGE_ENGAGEMENT';
56
  const PAGE_LIKES = 'PAGE_LIKES';
57
  const POST_ENGAGEMENT = 'POST_ENGAGEMENT';
 
58
  const QUALITY_LEAD = 'QUALITY_LEAD';
59
  const REACH = 'REACH';
60
  const REPLIES = 'REPLIES';
55
  const PAGE_ENGAGEMENT = 'PAGE_ENGAGEMENT';
56
  const PAGE_LIKES = 'PAGE_LIKES';
57
  const POST_ENGAGEMENT = 'POST_ENGAGEMENT';
58
+ const QUALITY_CALL = 'QUALITY_CALL';
59
  const QUALITY_LEAD = 'QUALITY_LEAD';
60
  const REACH = 'REACH';
61
  const REPLIES = 'REPLIES';
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/AdVideoContainerTypeValues.php CHANGED
@@ -74,6 +74,7 @@ class AdVideoContainerTypeValues extends AbstractEnum {
74
  const EVENT_TOUR = 'EVENT_TOUR';
75
  const FACECAST_DVR = 'FACECAST_DVR';
76
  const FB_SHORTS = 'FB_SHORTS';
 
77
  const FUNDRAISER_COVER_VIDEO = 'FUNDRAISER_COVER_VIDEO';
78
  const GAME_CLIP = 'GAME_CLIP';
79
  const GAMING_UPDATE_VIDEO = 'GAMING_UPDATE_VIDEO';
74
  const EVENT_TOUR = 'EVENT_TOUR';
75
  const FACECAST_DVR = 'FACECAST_DVR';
76
  const FB_SHORTS = 'FB_SHORTS';
77
+ const FB_SHORTS_POST = 'FB_SHORTS_POST';
78
  const FUNDRAISER_COVER_VIDEO = 'FUNDRAISER_COVER_VIDEO';
79
  const GAME_CLIP = 'GAME_CLIP';
80
  const GAMING_UPDATE_VIDEO = 'GAMING_UPDATE_VIDEO';
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/ApplicationSupportedPlatformsValues.php CHANGED
@@ -46,6 +46,7 @@ class ApplicationSupportedPlatformsValues extends AbstractEnum {
46
  const IPHONE = 'IPHONE';
47
  const MOBILE_WEB = 'MOBILE_WEB';
48
  const OCULUS = 'OCULUS';
 
49
  const SUPPLEMENTARY_IMAGES = 'SUPPLEMENTARY_IMAGES';
50
  const WEB = 'WEB';
51
  const WINDOWS = 'WINDOWS';
46
  const IPHONE = 'IPHONE';
47
  const MOBILE_WEB = 'MOBILE_WEB';
48
  const OCULUS = 'OCULUS';
49
+ const SAMSUNG = 'SAMSUNG';
50
  const SUPPLEMENTARY_IMAGES = 'SUPPLEMENTARY_IMAGES';
51
  const WEB = 'WEB';
52
  const WINDOWS = 'WINDOWS';
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/BusinessAssetGroupAdaccountTasksValues.php CHANGED
@@ -39,5 +39,6 @@ class BusinessAssetGroupAdaccountTasksValues extends AbstractEnum {
39
 
40
  const ADVERTISE = 'ADVERTISE';
41
  const ANALYZE = 'ANALYZE';
 
42
  const MANAGE = 'MANAGE';
43
  }
39
 
40
  const ADVERTISE = 'ADVERTISE';
41
  const ANALYZE = 'ANALYZE';
42
+ const DRAFT = 'DRAFT';
43
  const MANAGE = 'MANAGE';
44
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/BusinessPermittedTasksValues.php CHANGED
@@ -39,5 +39,6 @@ class BusinessPermittedTasksValues extends AbstractEnum {
39
 
40
  const ADVERTISE = 'ADVERTISE';
41
  const ANALYZE = 'ANALYZE';
 
42
  const MANAGE = 'MANAGE';
43
  }
39
 
40
  const ADVERTISE = 'ADVERTISE';
41
  const ANALYZE = 'ANALYZE';
42
+ const DRAFT = 'DRAFT';
43
  const MANAGE = 'MANAGE';
44
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/CampaignBidStrategyValues.php CHANGED
@@ -40,5 +40,4 @@ class CampaignBidStrategyValues extends AbstractEnum {
40
  const COST_CAP = 'COST_CAP';
41
  const LOWEST_COST_WITHOUT_CAP = 'LOWEST_COST_WITHOUT_CAP';
42
  const LOWEST_COST_WITH_BID_CAP = 'LOWEST_COST_WITH_BID_CAP';
43
- const TARGET_COST = 'TARGET_COST';
44
  }
40
  const COST_CAP = 'COST_CAP';
41
  const LOWEST_COST_WITHOUT_CAP = 'LOWEST_COST_WITHOUT_CAP';
42
  const LOWEST_COST_WITH_BID_CAP = 'LOWEST_COST_WITH_BID_CAP';
 
43
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/GroupGroupTypeValues.php CHANGED
@@ -46,6 +46,7 @@ class GroupGroupTypeValues extends AbstractEnum {
46
  const DEALS = 'DEALS';
47
  const EPHEMERAL = 'EPHEMERAL';
48
  const EVENT_PLANNING = 'EVENT_PLANNING';
 
49
  const FAMILY = 'FAMILY';
50
  const FITNESS = 'FITNESS';
51
  const FOR_SALE = 'FOR_SALE';
46
  const DEALS = 'DEALS';
47
  const EPHEMERAL = 'EPHEMERAL';
48
  const EVENT_PLANNING = 'EVENT_PLANNING';
49
+ const FAITH = 'FAITH';
50
  const FAMILY = 'FAMILY';
51
  const FITNESS = 'FITNESS';
52
  const FOR_SALE = 'FOR_SALE';
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/GroupPurposeValues.php CHANGED
@@ -46,6 +46,7 @@ class GroupPurposeValues extends AbstractEnum {
46
  const DEALS = 'DEALS';
47
  const EPHEMERAL = 'EPHEMERAL';
48
  const EVENT_PLANNING = 'EVENT_PLANNING';
 
49
  const FAMILY = 'FAMILY';
50
  const FITNESS = 'FITNESS';
51
  const FOR_SALE = 'FOR_SALE';
46
  const DEALS = 'DEALS';
47
  const EPHEMERAL = 'EPHEMERAL';
48
  const EVENT_PLANNING = 'EVENT_PLANNING';
49
+ const FAITH = 'FAITH';
50
  const FAMILY = 'FAMILY';
51
  const FITNESS = 'FITNESS';
52
  const FOR_SALE = 'FOR_SALE';
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/LiveVideoBroadcastStatusValues.php CHANGED
@@ -37,13 +37,13 @@ use FacebookAds\Enum\AbstractEnum;
37
  */
38
  class LiveVideoBroadcastStatusValues extends AbstractEnum {
39
 
40
- const LIVE = 'live';
41
- const LIVE_STOPPED = 'live_stopped';
42
- const PROCESSING = 'processing';
43
- const SCHEDULED_CANCELED = 'scheduled_canceled';
44
- const SCHEDULED_EXPIRED = 'scheduled_expired';
45
- const SCHEDULED_LIVE = 'scheduled_live';
46
- const SCHEDULED_UNPUBLISHED = 'scheduled_unpublished';
47
- const UNPUBLISHED = 'unpublished';
48
- const VOD = 'vod';
49
  }
37
  */
38
  class LiveVideoBroadcastStatusValues extends AbstractEnum {
39
 
40
+ const LIVE = 'LIVE';
41
+ const LIVE_STOPPED = 'LIVE_STOPPED';
42
+ const PROCESSING = 'PROCESSING';
43
+ const SCHEDULED_CANCELED = 'SCHEDULED_CANCELED';
44
+ const SCHEDULED_EXPIRED = 'SCHEDULED_EXPIRED';
45
+ const SCHEDULED_LIVE = 'SCHEDULED_LIVE';
46
+ const SCHEDULED_UNPUBLISHED = 'SCHEDULED_UNPUBLISHED';
47
+ const UNPUBLISHED = 'UNPUBLISHED';
48
+ const VOD = 'VOD';
49
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/PaymentEnginePaymentReasonValues.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
+ *
5
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
+ * use, copy, modify, and distribute this software in source code or binary
7
+ * form for use in connection with the web services and APIs provided by
8
+ * Facebook.
9
+ *
10
+ * As with any software that integrates with the Facebook platform, your use
11
+ * of this software is subject to the Facebook Developer Principles and
12
+ * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
+ * shall be included in all copies or substantial portions of the software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
+ * DEALINGS IN THE SOFTWARE.
22
+ *
23
+ */
24
+
25
+ namespace FacebookAds\Object\Values;
26
+
27
+ use FacebookAds\Enum\AbstractEnum;
28
+
29
+ /**
30
+ * This class is auto-generated.
31
+ *
32
+ * For any issues or feature requests related to this class, please let us know
33
+ * on github and we'll fix in our codegen framework. We'll not be able to accept
34
+ * pull request for this class.
35
+ *
36
+ * @method static PaymentEnginePaymentReasonValues getInstance()
37
+ */
38
+ class PaymentEnginePaymentReasonValues extends AbstractEnum {
39
+
40
+ const BANNED_USER = 'BANNED_USER';
41
+ const DENIED_REFUND = 'DENIED_REFUND';
42
+ const GRANTED_REPLACEMENT_ITEM = 'GRANTED_REPLACEMENT_ITEM';
43
+ }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/TargetingDevicePlatformsValues.php CHANGED
@@ -37,7 +37,6 @@ use FacebookAds\Enum\AbstractEnum;
37
  */
38
  class TargetingDevicePlatformsValues extends AbstractEnum {
39
 
40
- const CONNECTED_TV = 'connected_tv';
41
  const DESKTOP = 'desktop';
42
  const MOBILE = 'mobile';
43
  }
37
  */
38
  class TargetingDevicePlatformsValues extends AbstractEnum {
39
 
 
40
  const DESKTOP = 'desktop';
41
  const MOBILE = 'mobile';
42
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/Values/TargetingEffectiveDevicePlatformsValues.php CHANGED
@@ -37,7 +37,6 @@ use FacebookAds\Enum\AbstractEnum;
37
  */
38
  class TargetingEffectiveDevicePlatformsValues extends AbstractEnum {
39
 
40
- const CONNECTED_TV = 'connected_tv';
41
  const DESKTOP = 'desktop';
42
  const MOBILE = 'mobile';
43
  }
37
  */
38
  class TargetingEffectiveDevicePlatformsValues extends AbstractEnum {
39
 
 
40
  const DESKTOP = 'desktop';
41
  const MOBILE = 'mobile';
42
  }
vendor/facebook/php-business-sdk/src/FacebookAds/Object/{AdAccountCreationRequest.php → WhatsAppBusinessProfile.php} RENAMED
@@ -28,7 +28,7 @@ use FacebookAds\ApiRequest;
28
  use FacebookAds\Cursor;
29
  use FacebookAds\Http\RequestInterface;
30
  use FacebookAds\TypeChecker;
31
- use FacebookAds\Object\Fields\AdAccountCreationRequestFields;
32
 
33
  /**
34
  * This class is auto-generated.
@@ -39,13 +39,13 @@ use FacebookAds\Object\Fields\AdAccountCreationRequestFields;
39
  *
40
  */
41
 
42
- class AdAccountCreationRequest extends AbstractCrudObject {
43
 
44
  /**
45
- * @return AdAccountCreationRequestFields
46
  */
47
  public static function getFieldsEnum() {
48
- return AdAccountCreationRequestFields::getInstance();
49
  }
50
 
51
  protected static function getReferencedEnums() {
@@ -54,7 +54,7 @@ class AdAccountCreationRequest extends AbstractCrudObject {
54
  }
55
 
56
 
57
- public function getAdAccounts(array $fields = array(), array $params = array(), $pending = false) {
58
  $this->assureId();
59
 
60
  $param_types = array(
@@ -66,10 +66,10 @@ class AdAccountCreationRequest extends AbstractCrudObject {
66
  $this->api,
67
  $this->data['id'],
68
  RequestInterface::METHOD_GET,
69
- '/adaccounts',
70
- new AdAccount(),
71
- 'EDGE',
72
- AdAccount::getFieldsEnum()->getValues(),
73
  new TypeChecker($param_types, $enums)
74
  );
75
  $request->addParams($params);
@@ -77,7 +77,7 @@ class AdAccountCreationRequest extends AbstractCrudObject {
77
  return $pending ? $request : $request->execute();
78
  }
79
 
80
- public function getSelf(array $fields = array(), array $params = array(), $pending = false) {
81
  $this->assureId();
82
 
83
  $param_types = array(
@@ -88,11 +88,11 @@ class AdAccountCreationRequest extends AbstractCrudObject {
88
  $request = new ApiRequest(
89
  $this->api,
90
  $this->data['id'],
91
- RequestInterface::METHOD_GET,
92
  '/',
93
- new AdAccountCreationRequest(),
94
  'NODE',
95
- AdAccountCreationRequest::getFieldsEnum()->getValues(),
96
  new TypeChecker($param_types, $enums)
97
  );
98
  $request->addParams($params);
28
  use FacebookAds\Cursor;
29
  use FacebookAds\Http\RequestInterface;
30
  use FacebookAds\TypeChecker;
31
+ use FacebookAds\Object\Fields\WhatsAppBusinessProfileFields;
32
 
33
  /**
34
  * This class is auto-generated.
39
  *
40
  */
41
 
42
+ class WhatsAppBusinessProfile extends AbstractCrudObject {
43
 
44
  /**
45
+ * @return WhatsAppBusinessProfileFields
46
  */
47
  public static function getFieldsEnum() {
48
+ return WhatsAppBusinessProfileFields::getInstance();
49
  }
50
 
51
  protected static function getReferencedEnums() {
54
  }
55
 
56
 
57
+ public function getSelf(array $fields = array(), array $params = array(), $pending = false) {
58
  $this->assureId();
59
 
60
  $param_types = array(
66
  $this->api,
67
  $this->data['id'],
68
  RequestInterface::METHOD_GET,
69
+ '/',
70
+ new WhatsAppBusinessProfile(),
71
+ 'NODE',
72
+ WhatsAppBusinessProfile::getFieldsEnum()->getValues(),
73
  new TypeChecker($param_types, $enums)
74
  );
75
  $request->addParams($params);
77
  return $pending ? $request : $request->execute();
78
  }
79
 
80
+ public function updateSelf(array $fields = array(), array $params = array(), $pending = false) {
81
  $this->assureId();
82
 
83
  $param_types = array(
88
  $request = new ApiRequest(
89
  $this->api,
90
  $this->data['id'],
91
+ RequestInterface::METHOD_POST,
92
  '/',
93
+ new WhatsAppBusinessProfile(),
94
  'NODE',
95
+ WhatsAppBusinessProfile::getFieldsEnum()->getValues(),
96
  new TypeChecker($param_types, $enums)
97
  );
98
  $request->addParams($params);
vendor/facebook/php-business-sdk/test/FacebookAdsTest/Object/ServerSide/EventTest.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
4
+ *
5
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
+ * use, copy, modify, and distribute this software in source code or binary
7
+ * form for use in connection with the web services and APIs provided by
8
+ * Facebook.
9
+ *
10
+ * As with any software that integrates with the Facebook platform, your use
11
+ * of this software is subject to the Facebook Developer Principles and
12
+ * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
+ * shall be included in all copies or substantial portions of the software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
+ * DEALINGS IN THE SOFTWARE.
22
+ *
23
+ */
24
+
25
+ namespace FacebookAdsTest\Object\ServerSide;
26
+
27
+ use FacebookAdsTest\AbstractUnitTestCase;
28
+ use FacebookAds\Object\ServerSide\ActionSource;
29
+ use FacebookAds\Object\ServerSide\CustomData;
30
+ use FacebookAds\Object\ServerSide\Event;
31
+ use FacebookAds\Object\ServerSide\UserData;
32
+
33
+ class EventTest extends AbstractUnitTestCase {
34
+ public function testBuilder() {
35
+ $user_data = new UserData(array('email' => 'eg@test.com'));
36
+ $custom_data = new CustomData(array('order_id' => '123'));
37
+ $expected = array(
38
+ 'event_name' => 'event_name-0',
39
+ 'event_time' => 1234,
40
+ 'event_source_url' => 'event_source_url-2',
41
+ 'opt_out' => false,
42
+ 'event_id' => 'event_id-3',
43
+ 'user_data' => $user_data->normalize(),
44
+ 'custom_data' => $custom_data->normalize(),
45
+ 'data_processing_options' => array('1', '2'),
46
+ 'data_processing_options_country' => 1,
47
+ 'data_processing_options_state' => 2,
48
+ 'action_source' => ActionSource::WEBSITE,
49
+ );
50
+
51
+ $event = (new Event())
52
+ ->setEventName($expected['event_name'])
53
+ ->setEventTime($expected['event_time'])
54
+ ->setEventSourceUrl($expected['event_source_url'])
55
+ ->setOptOut($expected['opt_out'])
56
+ ->setEventId($expected['event_id'])
57
+ ->setUserData($user_data)
58
+ ->setCustomData($custom_data)
59
+ ->setDataProcessingOptions($expected['data_processing_options'])
60
+ ->setDataProcessingOptionsCountry($expected['data_processing_options_country'])
61
+ ->setDataProcessingOptionsState($expected['data_processing_options_state'])
62
+ ->setActionSource($expected['action_source']);
63
+
64
+ $this->assertEquals($expected, $event->normalize());
65
+ }
66
+
67
+ public function testWhenOptOutIsTrue() {
68
+ $event = (new Event())->setOptOut(true);
69
+
70
+ $this->assertEquals(array('opt_out' => true), $event->normalize());
71
+ }
72
+
73
+ public function testInvalidActionSource() {
74
+ $action_source = 'invalid action source';
75
+ $event = (new Event())->setActionSource($action_source);
76
+
77
+ try {
78
+ $normalized_payload = $event->normalize();
79
+ } catch (\Exception $exception) {
80
+ $has_thrown_exception = true;
81
+ $expected_string = sprintf("Invalid action_source passed: %s",$action_source);
82
+ $this->assertStringContainsString($expected_string, $exception->getMessage());
83
+ }
84
+
85
+ $this->assertTrue($has_thrown_exception);
86
+ }
87
+
88
+ public function testActionSourceGetsNormalized() {
89
+ $event = (new Event())->setActionSource('Email');
90
+ $normalized_payload = $event->normalize();
91
+
92
+ $this->assertEquals($normalized_payload['action_source'], 'email');
93
+ }
94
+
95
+ public function testActionSourceIsNull() {
96
+ $event = (new Event());
97
+ $normalized_payload = $event->normalize();
98
+
99
+ $this->assertFalse(array_key_exists('action_source', $normalized_payload));
100
+ }
101
+ }
vendor/facebook/php-business-sdk/test/FacebookAdsTest/Object/Signal/EventTest.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
4
+ *
5
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
+ * use, copy, modify, and distribute this software in source code or binary
7
+ * form for use in connection with the web services and APIs provided by
8
+ * Facebook.
9
+ *
10
+ * As with any software that integrates with the Facebook platform, your use
11
+ * of this software is subject to the Facebook Developer Principles and
12
+ * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
+ * shall be included in all copies or substantial portions of the software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
+ * DEALINGS IN THE SOFTWARE.
22
+ *
23
+ */
24
+
25
+ namespace FacebookAdsTest\Object\Signal;
26
+
27
+ use FacebookAdsTest\AbstractUnitTestCase;
28
+ use FacebookAds\Object\Signal\CustomData;
29
+ use FacebookAds\Object\Signal\Event;
30
+ use FacebookAds\Object\Signal\UserData;
31
+
32
+ class EventTest extends AbstractUnitTestCase {
33
+ public function testBuilder() {
34
+ $user_data = new UserData(array('email' => 'aaa@fb.com'));
35
+ $billing_contact = new UserData(array('email' => 'bbb@fb.com'));
36
+ $shipping_contact = new UserData(array('email' => 'ccc@fb.com'));
37
+ $custom_data = (new CustomData())
38
+ ->setOrderId('order_id')
39
+ ->setBillingContact($billing_contact)
40
+ ->setShippingContact($shipping_contact);
41
+ $expected = array(
42
+ 'event_name' => 'event_name',
43
+ 'event_time' => 1234,
44
+ 'event_id' => 'event_id',
45
+ 'data_processing_options' => array('LDU'),
46
+ 'data_processing_options_country' => 1,
47
+ 'data_processing_options_state' => 1000,
48
+ );
49
+
50
+ $event = (new Event())
51
+ ->setEventName($expected['event_name'])
52
+ ->setEventTime($expected['event_time'])
53
+ ->setEventId($expected['event_id'])
54
+ ->setUserData($user_data)
55
+ ->setCustomData($custom_data)
56
+ ->setDataProcessingOptions($expected['data_processing_options'])
57
+ ->setDataProcessingOptionsCountry($expected['data_processing_options_country'])
58
+ ->setDataProcessingOptionsState($expected['data_processing_options_state']);
59
+
60
+ $expected['user_data'] = $user_data->getBusinessDataUserData()->toJson();
61
+ $expected['custom_data'] = $custom_data->getBusinessDataCustomData()->toJson();
62
+ $this->assertEquals($expected, $event->getBusinessDataEvent()->toJson());
63
+ $this->assertEquals('order_id', $event->getBusinessDataEvent()->getCustomData()->getOrderId());
64
+ $this->assertEquals('ccc@fb.com', $event->getBusinessDataEvent()->getCustomData()->getShippingContact()->getEmail());
65
+ $this->assertEquals('bbb@fb.com', $event->getBusinessDataEvent()->getCustomData()->getBillingContact()->getEmail());
66
+ $this->assertEquals('aaa@fb.com', $event->getBusinessDataEvent()->getUserData()->getEmail());
67
+
68
+ $expected['user_data'] = $user_data->getServerSideUserData()->normalize();
69
+ $expected['custom_data'] = $custom_data->getServerSideCustomData()->normalize();
70
+ $this->assertEquals($expected, $event->getServerSideEvent()->normalize());
71
+ $this->assertEquals('order_id', $event->getServerSideEvent()->getCustomData()->getOrderId());
72
+ $this->assertEquals('aaa@fb.com', $event->getServerSideEvent()->getUserData()->getEmail());
73
+
74
+ }
75
+ }
vendor/guzzlehttp/guzzle/.php_cs DELETED
@@ -1,23 +0,0 @@
1
- <?php
2
-
3
- $config = PhpCsFixer\Config::create()
4
- ->setRiskyAllowed(true)
5
- ->setRules([
6
- '@PSR2' => true,
7
- 'array_syntax' => ['syntax' => 'short'],
8
- 'declare_strict_types' => false,
9
- 'concat_space' => ['spacing'=>'one'],
10
- 'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
11
- 'ordered_imports' => true,
12
- // 'phpdoc_align' => ['align'=>'vertical'],
13
- // 'native_function_invocation' => true,
14
- ])
15
- ->setFinder(
16
- PhpCsFixer\Finder::create()
17
- ->in(__DIR__.'/src')
18
- ->in(__DIR__.'/tests')
19
- ->name('*.php')
20
- )
21
- ;
22
-
23
- return $config;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/guzzlehttp/guzzle/CHANGELOG.md CHANGED
@@ -1,17 +1,134 @@
1
  # Change Log
2
 
3
- ## 6.5.5 - 2020-06-16
4
 
5
- * Unpin version constraint for `symfony/polyfill-intl-idn` [#2678](https://github.com/guzzle/guzzle/pull/2678)
6
 
7
- ## 6.5.4 - 2020-05-25
8
 
9
- * Fix various intl icu issues [#2626](https://github.com/guzzle/guzzle/pull/2626)
 
10
 
11
- ## 6.5.3 - 2020-04-18
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  * Use Symfony intl-idn polyfill [#2550](https://github.com/guzzle/guzzle/pull/2550)
14
- * Remove use of internal functions [#2548](https://github.com/guzzle/guzzle/pull/2548)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  ## 6.5.2 - 2019-12-23
17
 
@@ -27,16 +144,13 @@
27
  * Improvement: Added support for reset internal queue in MockHandler. [#2143](https://github.com/guzzle/guzzle/pull/2143)
28
  * Improvement: Added support to pass arbitrary options to `curl_multi_init`. [#2287](https://github.com/guzzle/guzzle/pull/2287)
29
  * Fix: Gracefully handle passing `null` to the `header` option. [#2132](https://github.com/guzzle/guzzle/pull/2132)
30
- * Fix: `RetryMiddleware` did not do exponential delay between retries due unit mismatch. [#2132](https://github.com/guzzle/guzzle/pull/2132)
31
- Previously, `RetryMiddleware` would sleep for 1 millisecond, then 2 milliseconds, then 4 milliseconds.
32
- **After this change, `RetryMiddleware` will sleep for 1 second, then 2 seconds, then 4 seconds.**
33
- `Middleware::retry()` accepts a second callback parameter to override the default timeouts if needed.
34
  * Fix: Prevent undefined offset when using array for ssl_key options. [#2348](https://github.com/guzzle/guzzle/pull/2348)
35
  * Deprecated `ClientInterface::VERSION`
36
 
37
  ## 6.4.1 - 2019-10-23
38
 
39
- * No `guzzle.phar` was created in 6.4.0 due expired API token. This release will fix that
40
  * Added `parent::__construct()` to `FileCookieJar` and `SessionCookieJar`
41
 
42
  ## 6.4.0 - 2019-10-23
@@ -358,7 +472,7 @@ object).
358
  * Note: This has been changed in 5.0.3 to now encode query string values by
359
  default unless the `rawString` argument is provided when setting the query
360
  string on a URL: Now allowing many more characters to be present in the
361
- query string without being percent encoded. See http://tools.ietf.org/html/rfc3986#appendix-A
362
 
363
  ## 5.0.1 - 2014-10-16
364
 
@@ -400,7 +514,7 @@ interfaces.
400
  responses, `GuzzleHttp\Collection`, `GuzzleHttp\Url`,
401
  `GuzzleHttp\Query`, `GuzzleHttp\Post\PostBody`, and
402
  `GuzzleHttp\Cookie\SetCookie`. This blog post provides a good outline of
403
- why I did this: http://ocramius.github.io/blog/fluent-interfaces-are-evil/.
404
  This also makes the Guzzle message interfaces compatible with the current
405
  PSR-7 message proposal.
406
  * Removed "functions.php", so that Guzzle is truly PSR-4 compliant. Except
@@ -586,8 +700,6 @@ interfaces.
586
 
587
  ## 4.0.0 - 2014-03-29
588
 
589
- * For more information on the 4.0 transition, see:
590
- http://mtdowling.com/blog/2014/03/15/guzzle-4-rc/
591
  * For information on changes and upgrading, see:
592
  https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40
593
  * Added `GuzzleHttp\batch()` as a convenience function for sending requests in
@@ -896,7 +1008,7 @@ interfaces.
896
 
897
  ## 3.4.0 - 2013-04-11
898
 
899
- * Bug fix: URLs are now resolved correctly based on http://tools.ietf.org/html/rfc3986#section-5.2. #289
900
  * Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289
901
  * Bug fix: Parsing a query string with a single PHP array value will now result in an array. #263
902
  * Bug fix: Better normalization of the User-Agent header to prevent duplicate headers. #264.
1
  # Change Log
2
 
3
+ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version.
4
 
5
+ ## 7.2.0 - 2020-10-10
6
 
7
+ ### Added
8
 
9
+ - Support for PHP 8 [#2712](https://github.com/guzzle/guzzle/pull/2712), [#2715](https://github.com/guzzle/guzzle/pull/2715), [#2789](https://github.com/guzzle/guzzle/pull/2789)
10
+ - Support passing a body summarizer to the http errors middleware [#2795](https://github.com/guzzle/guzzle/pull/2795)
11
 
12
+ ### Fixed
13
 
14
+ - Handle exceptions during response creation [#2591](https://github.com/guzzle/guzzle/pull/2591)
15
+ - Fix CURLOPT_ENCODING not to be overwritten [#2595](https://github.com/guzzle/guzzle/pull/2595)
16
+ - Make sure the Request always has a body object [#2804](https://github.com/guzzle/guzzle/pull/2804)
17
+
18
+ ### Changed
19
+
20
+ - The `TooManyRedirectsException` has a response [#2660](https://github.com/guzzle/guzzle/pull/2660)
21
+ - Avoid "functions" from dependencies [#2712](https://github.com/guzzle/guzzle/pull/2712)
22
+
23
+ ### Deprecated
24
+
25
+ - Using environment variable GUZZLE_CURL_SELECT_TIMEOUT [#2786](https://github.com/guzzle/guzzle/pull/2786)
26
+
27
+ ## 7.1.1 - 2020-09-30
28
+
29
+ ### Fixed
30
+
31
+ - Incorrect EOF detection for response body streams on Windows.
32
+
33
+ ### Changed
34
+
35
+ - We dont connect curl `sink` on HEAD requests.
36
+ - Removed some PHP 5 workarounds
37
+
38
+ ## 7.1.0 - 2020-09-22
39
+
40
+ ### Added
41
+
42
+ - `GuzzleHttp\MessageFormatterInterface`
43
+
44
+ ### Fixed
45
+
46
+ - Fixed issue that caused cookies with no value not to be stored.
47
+ - On redirects, we allow all safe methods like GET, HEAD and OPTIONS.
48
+ - Fixed logging on empty responses.
49
+ - Make sure MessageFormatter::format returns string
50
+
51
+ ### Deprecated
52
+
53
+ - All functions in `GuzzleHttp` has been deprecated. Use static methods on `Utils` instead.
54
+ - `ClientInterface::getConfig()`
55
+ - `Client::getConfig()`
56
+ - `Client::__call()`
57
+ - `Utils::defaultCaBundle()`
58
+ - `CurlFactory::LOW_CURL_VERSION_NUMBER`
59
+
60
+ ## 7.0.1 - 2020-06-27
61
+
62
+ * Fix multiply defined functions fatal error [#2699](https://github.com/guzzle/guzzle/pull/2699)
63
+
64
+ ## 7.0.0 - 2020-06-27
65
+
66
+ No changes since 7.0.0-rc1.
67
+
68
+ ## 7.0.0-rc1 - 2020-06-15
69
+
70
+ ### Changed
71
+
72
+ * Use error level for logging errors in Middleware [#2629](https://github.com/guzzle/guzzle/pull/2629)
73
+ * Disabled IDN support by default and require ext-intl to use it [#2675](https://github.com/guzzle/guzzle/pull/2675)
74
+
75
+ ## 7.0.0-beta2 - 2020-05-25
76
+
77
+ ### Added
78
+
79
+ * Using `Utils` class instead of functions in the `GuzzleHttp` namespace. [#2546](https://github.com/guzzle/guzzle/pull/2546)
80
+ * `ClientInterface::MAJOR_VERSION` [#2583](https://github.com/guzzle/guzzle/pull/2583)
81
+
82
+ ### Changed
83
+
84
+ * Avoid the `getenv` function when unsafe [#2531](https://github.com/guzzle/guzzle/pull/2531)
85
+ * Added real client methods [#2529](https://github.com/guzzle/guzzle/pull/2529)
86
+ * Avoid functions due to global install conflicts [#2546](https://github.com/guzzle/guzzle/pull/2546)
87
  * Use Symfony intl-idn polyfill [#2550](https://github.com/guzzle/guzzle/pull/2550)
88
+ * Adding methods for HTTP verbs like `Client::get()`, `Client::head()`, `Client::patch()` etc [#2529](https://github.com/guzzle/guzzle/pull/2529)
89
+ * `ConnectException` extends `TransferException` [#2541](https://github.com/guzzle/guzzle/pull/2541)
90
+ * Updated the default User Agent to "GuzzleHttp/7" [#2654](https://github.com/guzzle/guzzle/pull/2654)
91
+
92
+ ### Fixed
93
+
94
+ * Various intl icu issues [#2626](https://github.com/guzzle/guzzle/pull/2626)
95
+
96
+ ### Removed
97
+
98
+ * Pool option `pool_size` [#2528](https://github.com/guzzle/guzzle/pull/2528)
99
+
100
+ ## 7.0.0-beta1 - 2019-12-30
101
+
102
+ The diff might look very big but 95% of Guzzle users will be able to upgrade without modification.
103
+ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking changes.
104
+
105
+ ### Added
106
+
107
+ * Implement PSR-18 and dropped PHP 5 support [#2421](https://github.com/guzzle/guzzle/pull/2421) [#2474](https://github.com/guzzle/guzzle/pull/2474)
108
+ * PHP 7 types [#2442](https://github.com/guzzle/guzzle/pull/2442) [#2449](https://github.com/guzzle/guzzle/pull/2449) [#2466](https://github.com/guzzle/guzzle/pull/2466) [#2497](https://github.com/guzzle/guzzle/pull/2497) [#2499](https://github.com/guzzle/guzzle/pull/2499)
109
+ * IDN support for redirects [2424](https://github.com/guzzle/guzzle/pull/2424)
110
+
111
+ ### Changed
112
+
113
+ * Dont allow passing null as third argument to `BadResponseException::__construct()` [#2427](https://github.com/guzzle/guzzle/pull/2427)
114
+ * Use SAPI constant instead of method call [#2450](https://github.com/guzzle/guzzle/pull/2450)
115
+ * Use native function invocation [#2444](https://github.com/guzzle/guzzle/pull/2444)
116
+ * Better defaults for PHP installations with old ICU lib [2454](https://github.com/guzzle/guzzle/pull/2454)
117
+ * Added visibility to all constants [#2462](https://github.com/guzzle/guzzle/pull/2462)
118
+ * Dont allow passing `null` as URI to `Client::request()` and `Client::requestAsync()` [#2461](https://github.com/guzzle/guzzle/pull/2461)
119
+ * Widen the exception argument to throwable [#2495](https://github.com/guzzle/guzzle/pull/2495)
120
+
121
+ ### Fixed
122
+
123
+ * Logging when Promise rejected with a string [#2311](https://github.com/guzzle/guzzle/pull/2311)
124
+
125
+ ### Removed
126
+
127
+ * Class `SeekException` [#2162](https://github.com/guzzle/guzzle/pull/2162)
128
+ * `RequestException::getResponseBodySummary()` [#2425](https://github.com/guzzle/guzzle/pull/2425)
129
+ * `CookieJar::getCookieValue()` [#2433](https://github.com/guzzle/guzzle/pull/2433)
130
+ * `uri_template()` and `UriTemplate` [#2440](https://github.com/guzzle/guzzle/pull/2440)
131
+ * Request options `save_to` and `exceptions` [#2464](https://github.com/guzzle/guzzle/pull/2464)
132
 
133
  ## 6.5.2 - 2019-12-23
134
 
144
  * Improvement: Added support for reset internal queue in MockHandler. [#2143](https://github.com/guzzle/guzzle/pull/2143)
145
  * Improvement: Added support to pass arbitrary options to `curl_multi_init`. [#2287](https://github.com/guzzle/guzzle/pull/2287)
146
  * Fix: Gracefully handle passing `null` to the `header` option. [#2132](https://github.com/guzzle/guzzle/pull/2132)
147
+ * Fix: `RetryMiddleware` did not do exponential delay between retires due unit mismatch. [#2132](https://github.com/guzzle/guzzle/pull/2132)
 
 
 
148
  * Fix: Prevent undefined offset when using array for ssl_key options. [#2348](https://github.com/guzzle/guzzle/pull/2348)
149
  * Deprecated `ClientInterface::VERSION`
150
 
151
  ## 6.4.1 - 2019-10-23
152
 
153
+ * No `guzzle.phar` was created in 6.4.0 due expired API token. This release will fix that
154
  * Added `parent::__construct()` to `FileCookieJar` and `SessionCookieJar`
155
 
156
  ## 6.4.0 - 2019-10-23
472
  * Note: This has been changed in 5.0.3 to now encode query string values by
473
  default unless the `rawString` argument is provided when setting the query
474
  string on a URL: Now allowing many more characters to be present in the
475
+ query string without being percent encoded. See https://tools.ietf.org/html/rfc3986#appendix-A
476
 
477
  ## 5.0.1 - 2014-10-16
478
 
514
  responses, `GuzzleHttp\Collection`, `GuzzleHttp\Url`,
515
  `GuzzleHttp\Query`, `GuzzleHttp\Post\PostBody`, and
516
  `GuzzleHttp\Cookie\SetCookie`. This blog post provides a good outline of
517
+ why I did this: https://ocramius.github.io/blog/fluent-interfaces-are-evil/.
518
  This also makes the Guzzle message interfaces compatible with the current
519
  PSR-7 message proposal.
520
  * Removed "functions.php", so that Guzzle is truly PSR-4 compliant. Except
700
 
701
  ## 4.0.0 - 2014-03-29
702
 
 
 
703
  * For information on changes and upgrading, see:
704
  https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40
705
  * Added `GuzzleHttp\batch()` as a convenience function for sending requests in
1008
 
1009
  ## 3.4.0 - 2013-04-11
1010
 
1011
+ * Bug fix: URLs are now resolved correctly based on https://tools.ietf.org/html/rfc3986#section-5.2. #289
1012
  * Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289
1013
  * Bug fix: Parsing a query string with a single PHP array value will now result in an array. #263
1014
  * Bug fix: Better normalization of the User-Agent header to prevent duplicate headers. #264.
vendor/guzzlehttp/guzzle/Dockerfile DELETED
@@ -1,18 +0,0 @@
1
- FROM composer:latest as setup
2
-
3
- RUN mkdir /guzzle
4
-
5
- WORKDIR /guzzle
6
-
7
- RUN set -xe \
8
- && composer init --name=guzzlehttp/test --description="Simple project for testing Guzzle scripts" --author="Márk Sági-Kazár <mark.sagikazar@gmail.com>" --no-interaction \
9
- && composer require guzzlehttp/guzzle
10
-
11
-
12
- FROM php:7.3
13
-
14
- RUN mkdir /guzzle
15
-
16
- WORKDIR /guzzle
17
-
18
- COPY --from=setup /guzzle /guzzle
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/guzzlehttp/guzzle/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011-2018 Michael Dowling, https://github.com/mtdowling <mtdowling@gmail.com>
2
 
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
  of this software and associated documentation files (the "Software"), to deal
1
+ Copyright (c) 2011 Michael Dowling, https://github.com/mtdowling <mtdowling@gmail.com>
2
 
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
  of this software and associated documentation files (the "Software"), to deal
vendor/guzzlehttp/guzzle/README.md CHANGED
@@ -1,8 +1,9 @@
1
- Guzzle, PHP HTTP client
2
- =======================
 
3
 
4
  [![Latest Version](https://img.shields.io/github/release/guzzle/guzzle.svg?style=flat-square)](https://github.com/guzzle/guzzle/releases)
5
- [![Build Status](https://img.shields.io/travis/guzzle/guzzle.svg?style=flat-square)](https://travis-ci.org/guzzle/guzzle)
6
  [![Total Downloads](https://img.shields.io/packagist/dt/guzzlehttp/guzzle.svg?style=flat-square)](https://packagist.org/packages/guzzlehttp/guzzle)
7
 
8
  Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and
@@ -14,6 +15,7 @@ trivial to integrate with web services.
14
  - Can send both synchronous and asynchronous requests using the same interface.
15
  - Uses PSR-7 interfaces for requests, responses, and streams. This allows you
16
  to utilize other PSR-7 compatible libraries with Guzzle.
 
17
  - Abstracts away the underlying HTTP transport, allowing you to write
18
  environment and transport agnostic code; i.e., no hard dependency on cURL,
19
  PHP streams, sockets, or non-blocking event loops.
@@ -23,11 +25,11 @@ trivial to integrate with web services.
23
  $client = new \GuzzleHttp\Client();
24
  $response = $client->request('GET', 'https://api.github.com/repos/guzzle/guzzle');
25
 
26
- echo $response->getStatusCode(); # 200
27
- echo $response->getHeaderLine('content-type'); # 'application/json; charset=utf8'
28
- echo $response->getBody(); # '{"id": 1420053, "name": "guzzle", ...}'
29
 
30
- # Send an asynchronous request.
31
  $request = new \GuzzleHttp\Psr7\Request('GET', 'http://httpbin.org');
32
  $promise = $client->sendAsync($request)->then(function ($response) {
33
  echo 'I completed! ' . $response->getBody();
@@ -38,39 +40,23 @@ $promise->wait();
38
 
39
  ## Help and docs
40
 
 
 
41
  - [Documentation](http://guzzlephp.org/)
42
  - [Stack Overflow](http://stackoverflow.com/questions/tagged/guzzle)
 
43
  - [Gitter](https://gitter.im/guzzle/guzzle)
44
 
45
 
46
  ## Installing Guzzle
47
 
48
  The recommended way to install Guzzle is through
49
- [Composer](http://getcomposer.org).
50
-
51
- ```bash
52
- # Install Composer
53
- curl -sS https://getcomposer.org/installer | php
54
- ```
55
-
56
- Next, run the Composer command to install the latest stable version of Guzzle:
57
 
58
  ```bash
59
  composer require guzzlehttp/guzzle
60
  ```
61
 
62
- After installing, you need to require Composer's autoloader:
63
-
64
- ```php
65
- require 'vendor/autoload.php';
66
- ```
67
-
68
- You can then later update Guzzle using composer:
69
-
70
- ```bash
71
- composer update
72
- ```
73
-
74
 
75
  ## Version Guidance
76
 
@@ -79,12 +65,15 @@ composer update
79
  | 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >= 5.3.3 |
80
  | 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >= 5.4 |
81
  | 5.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >= 5.4 |
82
- | 6.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >= 5.5 |
 
83
 
84
  [guzzle-3-repo]: https://github.com/guzzle/guzzle3
85
  [guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x
86
  [guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3
87
- [guzzle-6-repo]: https://github.com/guzzle/guzzle
 
88
  [guzzle-3-docs]: http://guzzle3.readthedocs.org
89
- [guzzle-5-docs]: http://guzzle.readthedocs.org/en/5.3/
90
- [guzzle-6-docs]: http://guzzle.readthedocs.org/en/latest/
 
1
+ ![Guzzle](.github/logo.png?raw=true)
2
+
3
+ # Guzzle, PHP HTTP client
4
 
5
  [![Latest Version](https://img.shields.io/github/release/guzzle/guzzle.svg?style=flat-square)](https://github.com/guzzle/guzzle/releases)
6
+ [![Build Status](https://img.shields.io/github/workflow/status/guzzle/guzzle/CI?label=ci%20build&style=flat-square)](https://github.com/guzzle/guzzle/actions?query=workflow%3ACI)
7
  [![Total Downloads](https://img.shields.io/packagist/dt/guzzlehttp/guzzle.svg?style=flat-square)](https://packagist.org/packages/guzzlehttp/guzzle)
8
 
9
  Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and
15
  - Can send both synchronous and asynchronous requests using the same interface.
16
  - Uses PSR-7 interfaces for requests, responses, and streams. This allows you
17
  to utilize other PSR-7 compatible libraries with Guzzle.
18
+ - Supports PSR-18 allowing interoperability between other PSR-18 HTTP Clients.
19
  - Abstracts away the underlying HTTP transport, allowing you to write
20
  environment and transport agnostic code; i.e., no hard dependency on cURL,
21
  PHP streams, sockets, or non-blocking event loops.
25
  $client = new \GuzzleHttp\Client();
26
  $response = $client->request('GET', 'https://api.github.com/repos/guzzle/guzzle');
27
 
28
+ echo $response->getStatusCode(); // 200
29
+ echo $response->getHeaderLine('content-type'); // 'application/json; charset=utf8'
30
+ echo $response->getBody(); // '{"id": 1420053, "name": "guzzle", ...}'
31
 
32
+ // Send an asynchronous request.
33
  $request = new \GuzzleHttp\Psr7\Request('GET', 'http://httpbin.org');
34
  $promise = $client->sendAsync($request)->then(function ($response) {
35
  echo 'I completed! ' . $response->getBody();
40
 
41
  ## Help and docs
42
 
43
+ We use GitHub issues only to discuss bugs and new features. For support please refer to:
44
+
45
  - [Documentation](http://guzzlephp.org/)
46
  - [Stack Overflow](http://stackoverflow.com/questions/tagged/guzzle)
47
+ - [#guzzle](https://app.slack.com/client/T0D2S9JCT/CE6UAAKL4) channel on [PHP-HTTP Slack](http://slack.httplug.io/)
48
  - [Gitter](https://gitter.im/guzzle/guzzle)
49
 
50
 
51
  ## Installing Guzzle
52
 
53
  The recommended way to install Guzzle is through
54
+ [Composer](https://getcomposer.org/).
 
 
 
 
 
 
 
55
 
56
  ```bash
57
  composer require guzzlehttp/guzzle
58
  ```
59
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
  ## Version Guidance
62
 
65
  | 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >= 5.3.3 |
66
  | 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >= 5.4 |
67
  | 5.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >= 5.4 |
68
+ | 6.x | Security fixes | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >= 5.5 |
69
+ | 7.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v7][guzzle-7-repo] | [v7][guzzle-7-docs] | Yes | >= 7.2 |
70
 
71
  [guzzle-3-repo]: https://github.com/guzzle/guzzle3
72
  [guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x
73
  [guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3
74
+ [guzzle-6-repo]: https://github.com/guzzle/guzzle/tree/6.5
75
+ [guzzle-7-repo]: https://github.com/guzzle/guzzle
76
  [guzzle-3-docs]: http://guzzle3.readthedocs.org
77
+ [guzzle-5-docs]: http://docs.guzzlephp.org/en/5.3/
78
+ [guzzle-6-docs]: http://docs.guzzlephp.org/en/6.5/
79
+ [guzzle-7-docs]: http://docs.guzzlephp.org/en/latest/
vendor/guzzlehttp/guzzle/UPGRADING.md CHANGED
@@ -1,10 +1,60 @@
1
  Guzzle Upgrade Guide
2
  ====================
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  5.0 to 6.0
5
  ----------
6
 
7
- Guzzle now uses [PSR-7](http://www.php-fig.org/psr/psr-7/) for HTTP messages.
8
  Due to the fact that these messages are immutable, this prompted a refactoring
9
  of Guzzle to use a middleware based system rather than an event system. Any
10
  HTTP message interaction (e.g., `GuzzleHttp\Message\Request`) need to be
@@ -167,7 +217,7 @@ passing a `GuzzleHttp\Adapter\AdapterInterface`, you must now pass a PHP
167
 
168
  ## Removed Fluent Interfaces
169
 
170
- [Fluent interfaces were removed](http://ocramius.github.io/blog/fluent-interfaces-are-evil)
171
  from the following classes:
172
 
173
  - `GuzzleHttp\Collection`
@@ -820,7 +870,7 @@ HeaderInterface (e.g. toArray(), getAll(), etc.).
820
  3.3 to 3.4
821
  ----------
822
 
823
- Base URLs of a client now follow the rules of http://tools.ietf.org/html/rfc3986#section-5.2.2 when merging URLs.
824
 
825
  3.2 to 3.3
826
  ----------
1
  Guzzle Upgrade Guide
2
  ====================
3
 
4
+ 6.0 to 7.0
5
+ ----------
6
+
7
+ In order to take advantage of the new features of PHP, Guzzle dropped the support
8
+ of PHP 5. The minimum supported PHP version is now PHP 7.2. Type hints and return
9
+ types for functions and methods have been added wherever possible.
10
+
11
+ Please make sure:
12
+ - You are calling a function or a method with the correct type.
13
+ - If you extend a class of Guzzle; update all signatures on methods you override.
14
+
15
+ #### Other backwards compatibility breaking changes
16
+
17
+ - Class `GuzzleHttp\UriTemplate` is removed.
18
+ - Class `GuzzleHttp\Exception\SeekException` is removed.
19
+ - Classes `GuzzleHttp\Exception\BadResponseException`, `GuzzleHttp\Exception\ClientException`,
20
+ `GuzzleHttp\Exception\ServerException` can no longer be initialized with an empty
21
+ Response as argument.
22
+ - Class `GuzzleHttp\Exception\ConnectException` now extends `GuzzleHttp\Exception\TransferException`
23
+ instead of `GuzzleHttp\Exception\RequestException`.
24
+ - Function `GuzzleHttp\Exception\ConnectException::getResponse()` is removed.
25
+ - Function `GuzzleHttp\Exception\ConnectException::hasResponse()` is removed.
26
+ - Constant `GuzzleHttp\ClientInterface::VERSION` is removed. Added `GuzzleHttp\ClientInterface::MAJOR_VERSION` instead.
27
+ - Function `GuzzleHttp\Exception\RequestException::getResponseBodySummary` is removed.
28
+ Use `\GuzzleHttp\Psr7\get_message_body_summary` as an alternative.
29
+ - Function `GuzzleHttp\Cookie\CookieJar::getCookieValue` is removed.
30
+ - Request option `exception` is removed. Please use `http_errors`.
31
+ - Request option `save_to` is removed. Please use `sink`.
32
+ - Pool option `pool_size` is removed. Please use `concurrency`.
33
+ - We now look for environment variables in the `$_SERVER` super global, due to thread safety issues with `getenv`. We continue to fallback to `getenv` in CLI environments, for maximum compatibility.
34
+ - The `get`, `head`, `put`, `post`, `patch`, `delete`, `getAsync`, `headAsync`, `putAsync`, `postAsync`, `patchAsync`, and `deleteAsync` methods are now implemented as genuine methods on `GuzzleHttp\Client`, with strong typing. The original `__call` implementation remains unchanged for now, for maximum backwards compatibility, but won't be invoked under normal operation.
35
+ - The `log` middleware will log the errors with level `error` instead of `notice`
36
+ - Support for international domain names (IDN) is now disabled by default, and enabling it requires installing ext-intl, linked against a modern version of the C library (ICU 4.6 or higher).
37
+
38
+ #### Native functions calls
39
+
40
+ All internal native functions calls of Guzzle are now prefixed with a slash. This
41
+ change makes it impossible for method overloading by other libraries or applications.
42
+ Example:
43
+
44
+ ```php
45
+ // Before:
46
+ curl_version();
47
+
48
+ // After:
49
+ \curl_version();
50
+ ```
51
+
52
+ For the full diff you can check [here](https://github.com/guzzle/guzzle/compare/6.5.4..master).
53
+
54
  5.0 to 6.0
55
  ----------
56
 
57
+ Guzzle now uses [PSR-7](https://www.php-fig.org/psr/psr-7/) for HTTP messages.
58
  Due to the fact that these messages are immutable, this prompted a refactoring
59
  of Guzzle to use a middleware based system rather than an event system. Any
60
  HTTP message interaction (e.g., `GuzzleHttp\Message\Request`) need to be
217
 
218
  ## Removed Fluent Interfaces
219
 
220
+ [Fluent interfaces were removed](https://ocramius.github.io/blog/fluent-interfaces-are-evil/)
221
  from the following classes:
222
 
223
  - `GuzzleHttp\Collection`
870
  3.3 to 3.4
871
  ----------
872
 
873
+ Base URLs of a client now follow the rules of https://tools.ietf.org/html/rfc3986#section-5.2.2 when merging URLs.
874
 
875
  3.2 to 3.3
876
  ----------
vendor/guzzlehttp/guzzle/composer.json CHANGED
@@ -9,7 +9,9 @@
9
  "web service",
10
  "curl",
11
  "client",
12
- "HTTP client"
 
 
13
  ],
14
  "homepage": "http://guzzlephp.org/",
15
  "license": "MIT",
@@ -18,21 +20,32 @@
18
  "name": "Michael Dowling",
19
  "email": "mtdowling@gmail.com",
20
  "homepage": "https://github.com/mtdowling"
 
 
 
 
 
21
  }
22
  ],
23
  "require": {
24
- "php": ">=5.5",
25
  "ext-json": "*",
26
- "symfony/polyfill-intl-idn": "^1.17.0",
27
- "guzzlehttp/promises": "^1.0",
28
- "guzzlehttp/psr7": "^1.6.1"
 
 
 
29
  },
30
  "require-dev": {
31
  "ext-curl": "*",
32
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
 
33
  "psr/log": "^1.1"
34
  },
35
  "suggest": {
 
 
36
  "psr/log": "Required for using the Log middleware"
37
  },
38
  "config": {
@@ -40,7 +53,7 @@
40
  },
41
  "extra": {
42
  "branch-alias": {
43
- "dev-master": "6.5-dev"
44
  }
45
  },
46
  "autoload": {
9
  "web service",
10
  "curl",
11
  "client",
12
+ "HTTP client",
13
+ "PSR-7",
14
+ "PSR-18"
15
  ],
16
  "homepage": "http://guzzlephp.org/",
17
  "license": "MIT",
20
  "name": "Michael Dowling",
21
  "email": "mtdowling@gmail.com",
22
  "homepage": "https://github.com/mtdowling"
23
+ },
24
+ {
25
+ "name": "Márk Sági-Kazár",
26
+ "email": "mark.sagikazar@gmail.com",
27
+ "homepage": "https://sagikazarmark.hu"
28
  }
29
  ],
30
  "require": {
31
+ "php": "^7.2.5 || ^8.0",
32
  "ext-json": "*",
33
+ "guzzlehttp/promises": "^1.4",
34
+ "guzzlehttp/psr7": "^1.7",
35
+ "psr/http-client": "^1.0"
36
+ },
37
+ "provide": {
38
+ "psr/http-client-implementation": "1.0"
39
  },
40
  "require-dev": {
41
  "ext-curl": "*",
42
+ "php-http/client-integration-tests": "^3.0",
43
+ "phpunit/phpunit": "^8.5.5 || ^9.3.5",
44
  "psr/log": "^1.1"
45
  },
46
  "suggest": {
47
+ "ext-curl": "Required for CURL handler support",
48
+ "ext-intl": "Required for Internationalized Domain Name (IDN) support",
49
  "psr/log": "Required for using the Log middleware"
50
  },
51
  "config": {
53
  },
54
  "extra": {
55
  "branch-alias": {
56
+ "dev-master": "7.1-dev"
57
  }
58
  },
59
  "autoload": {
vendor/guzzlehttp/guzzle/src/BodySummarizer.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp;
4
+
5
+ use Psr\Http\Message\MessageInterface;
6
+
7
+ final class BodySummarizer implements BodySummarizerInterface
8
+ {
9
+ /**
10
+ * @var int|null
11
+ */
12
+ private $truncateAt;
13
+
14
+ public function __construct(int $truncateAt = null)
15
+ {
16
+ $this->truncateAt = $truncateAt;
17
+ }
18
+
19
+ /**
20
+ * Returns a summarized message body.
21
+ */
22
+ public function summarize(MessageInterface $message): ?string
23
+ {
24
+ return $this->truncateAt === null
25
+ ? \GuzzleHttp\Psr7\Message::bodySummary($message)
26
+ : \GuzzleHttp\Psr7\Message::bodySummary($message, $this->truncateAt);
27
+ }
28
+ }
vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp;
4
+
5
+ use Psr\Http\Message\MessageInterface;
6
+
7
+ interface BodySummarizerInterface
8
+ {
9
+ /**
10
+ * Returns a summarized message body.
11
+ */
12
+ public function summarize(MessageInterface $message): ?string;
13
+ }
vendor/guzzlehttp/guzzle/src/Client.php CHANGED
@@ -1,31 +1,26 @@
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
  use GuzzleHttp\Cookie\CookieJar;
5
  use GuzzleHttp\Exception\GuzzleException;
6
- use GuzzleHttp\Promise;
7
- use GuzzleHttp\Psr7;
 
8
  use Psr\Http\Message\RequestInterface;
9
  use Psr\Http\Message\ResponseInterface;
10
  use Psr\Http\Message\UriInterface;
11
 
12
  /**
13
- * @method ResponseInterface get(string|UriInterface $uri, array $options = [])
14
- * @method ResponseInterface head(string|UriInterface $uri, array $options = [])
15
- * @method ResponseInterface put(string|UriInterface $uri, array $options = [])
16
- * @method ResponseInterface post(string|UriInterface $uri, array $options = [])
17
- * @method ResponseInterface patch(string|UriInterface $uri, array $options = [])
18
- * @method ResponseInterface delete(string|UriInterface $uri, array $options = [])
19
- * @method Promise\PromiseInterface getAsync(string|UriInterface $uri, array $options = [])
20
- * @method Promise\PromiseInterface headAsync(string|UriInterface $uri, array $options = [])
21
- * @method Promise\PromiseInterface putAsync(string|UriInterface $uri, array $options = [])
22
- * @method Promise\PromiseInterface postAsync(string|UriInterface $uri, array $options = [])
23
- * @method Promise\PromiseInterface patchAsync(string|UriInterface $uri, array $options = [])
24
- * @method Promise\PromiseInterface deleteAsync(string|UriInterface $uri, array $options = [])
25
  */
26
- class Client implements ClientInterface
27
  {
28
- /** @var array Default request options */
 
 
 
 
29
  private $config;
30
 
31
  /**
@@ -63,13 +58,13 @@ class Client implements ClientInterface
63
  {
64
  if (!isset($config['handler'])) {
65
  $config['handler'] = HandlerStack::create();
66
- } elseif (!is_callable($config['handler'])) {
67
- throw new \InvalidArgumentException('handler must be a callable');
68
  }
69
 
70
  // Convert the base_uri to a UriInterface
71
  if (isset($config['base_uri'])) {
72
- $config['base_uri'] = Psr7\uri_for($config['base_uri']);
73
  }
74
 
75
  $this->configureDefaults($config);
@@ -79,19 +74,21 @@ class Client implements ClientInterface
79
  * @param string $method
80
  * @param array $args
81
  *
82
- * @return Promise\PromiseInterface
 
 
83
  */
84
  public function __call($method, $args)
85
  {
86
- if (count($args) < 1) {
87
- throw new \InvalidArgumentException('Magic request methods require a URI and optional options array');
88
  }
89
 
90
  $uri = $args[0];
91
- $opts = isset($args[1]) ? $args[1] : [];
92
 
93
- return substr($method, -5) === 'Async'
94
- ? $this->requestAsync(substr($method, 0, -5), $uri, $opts)
95
  : $this->request($method, $uri, $opts);
96
  }
97
 
@@ -100,10 +97,8 @@ class Client implements ClientInterface
100
  *
101
  * @param array $options Request options to apply to the given
102
  * request and to the transfer. See \GuzzleHttp\RequestOptions.
103
- *
104
- * @return Promise\PromiseInterface
105
  */
106
- public function sendAsync(RequestInterface $request, array $options = [])
107
  {
108
  // Merge the base URI into the request URI if needed.
109
  $options = $this->prepareDefaults($options);
@@ -120,15 +115,28 @@ class Client implements ClientInterface
120
  * @param array $options Request options to apply to the given
121
  * request and to the transfer. See \GuzzleHttp\RequestOptions.
122
  *
123
- * @return ResponseInterface
124
  * @throws GuzzleException
125
  */
126
- public function send(RequestInterface $request, array $options = [])
127
  {
128
  $options[RequestOptions::SYNCHRONOUS] = true;
129
  return $this->sendAsync($request, $options)->wait();
130
  }
131
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  /**
133
  * Create and send an asynchronous HTTP request.
134
  *
@@ -140,20 +148,18 @@ class Client implements ClientInterface
140
  * @param string $method HTTP method
141
  * @param string|UriInterface $uri URI object or string.
142
  * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions.
143
- *
144
- * @return Promise\PromiseInterface
145
  */
146
- public function requestAsync($method, $uri = '', array $options = [])
147
  {
148
  $options = $this->prepareDefaults($options);
149
  // Remove request modifying parameter because it can be done up-front.
150
- $headers = isset($options['headers']) ? $options['headers'] : [];
151
- $body = isset($options['body']) ? $options['body'] : null;
152
- $version = isset($options['version']) ? $options['version'] : '1.1';
153
  // Merge the URI into the base URI.
154
- $uri = $this->buildUri($uri, $options);
155
- if (is_array($body)) {
156
- $this->invalidBody();
157
  }
158
  $request = new Psr7\Request($method, $uri, $headers, $body, $version);
159
  // Remove the option so that they are not doubly-applied.
@@ -173,10 +179,9 @@ class Client implements ClientInterface
173
  * @param string|UriInterface $uri URI object or string.
174
  * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions.
175
  *
176
- * @return ResponseInterface
177
  * @throws GuzzleException
178
  */
179
- public function request($method, $uri = '', array $options = [])
180
  {
181
  $options[RequestOptions::SYNCHRONOUS] = true;
182
  return $this->requestAsync($method, $uri, $options)->wait();
@@ -192,30 +197,24 @@ class Client implements ClientInterface
192
  * @param string|null $option The config option to retrieve.
193
  *
194
  * @return mixed
 
 
195
  */
196
- public function getConfig($option = null)
197
  {
198
  return $option === null
199
  ? $this->config
200
  : (isset($this->config[$option]) ? $this->config[$option] : null);
201
  }
202
 
203
- /**
204
- * @param string|null $uri
205
- *
206
- * @return UriInterface
207
- */
208
- private function buildUri($uri, array $config)
209
  {
210
- // for BC we accept null which would otherwise fail in uri_for
211
- $uri = Psr7\uri_for($uri === null ? '' : $uri);
212
-
213
  if (isset($config['base_uri'])) {
214
- $uri = Psr7\UriResolver::resolve(Psr7\uri_for($config['base_uri']), $uri);
215
  }
216
 
217
  if (isset($config['idn_conversion']) && ($config['idn_conversion'] !== false)) {
218
- $idnOptions = ($config['idn_conversion'] === true) ? IDNA_DEFAULT : $config['idn_conversion'];
219
  $uri = Utils::idnUriConvert($uri, $idnOptions);
220
  }
221
 
@@ -224,11 +223,8 @@ class Client implements ClientInterface
224
 
225
  /**
226
  * Configures the default options for a client.
227
- *
228
- * @param array $config
229
- * @return void
230
  */
231
- private function configureDefaults(array $config)
232
  {
233
  $defaults = [
234
  'allow_redirects' => RedirectMiddleware::$defaultSettings,
@@ -236,7 +232,7 @@ class Client implements ClientInterface
236
  'decode_content' => true,
237
  'verify' => true,
238
  'cookies' => false,
239
- 'idn_conversion' => true,
240
  ];
241
 
242
  // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set.
@@ -244,17 +240,17 @@ class Client implements ClientInterface
244
  // We can only trust the HTTP_PROXY environment variable in a CLI
245
  // process due to the fact that PHP has no reliable mechanism to
246
  // get environment variables that start with "HTTP_".
247
- if (php_sapi_name() === 'cli' && getenv('HTTP_PROXY')) {
248
- $defaults['proxy']['http'] = getenv('HTTP_PROXY');
249
  }
250
 
251
- if ($proxy = getenv('HTTPS_PROXY')) {
252
  $defaults['proxy']['https'] = $proxy;
253
  }
254
 
255
- if ($noProxy = getenv('NO_PROXY')) {
256
- $cleanedNoProxy = str_replace(' ', '', $noProxy);
257
- $defaults['proxy']['no'] = explode(',', $cleanedNoProxy);
258
  }
259
 
260
  $this->config = $config + $defaults;
@@ -265,15 +261,15 @@ class Client implements ClientInterface
265
 
266
  // Add the default user-agent header.
267
  if (!isset($this->config['headers'])) {
268
- $this->config['headers'] = ['User-Agent' => default_user_agent()];
269
  } else {
270
  // Add the User-Agent header if one was not already set.
271
- foreach (array_keys($this->config['headers']) as $name) {
272
- if (strtolower($name) === 'user-agent') {
273
  return;
274
  }
275
  }
276
- $this->config['headers']['User-Agent'] = default_user_agent();
277
  }
278
  }
279
 
@@ -281,10 +277,8 @@ class Client implements ClientInterface
281
  * Merges default options into the array.
282
  *
283
  * @param array $options Options to modify by reference
284
- *
285
- * @return array
286
  */
287
- private function prepareDefaults(array $options)
288
  {
289
  $defaults = $this->config;
290
 
@@ -296,13 +290,13 @@ class Client implements ClientInterface
296
 
297
  // Special handling for headers is required as they are added as
298
  // conditional headers and as headers passed to a request ctor.
299
- if (array_key_exists('headers', $options)) {
300
  // Allows default headers to be unset.
301
  if ($options['headers'] === null) {
302
  $defaults['_conditional'] = [];
303
  unset($options['headers']);
304
- } elseif (!is_array($options['headers'])) {
305
- throw new \InvalidArgumentException('headers must be an array');
306
  }
307
  }
308
 
@@ -326,43 +320,24 @@ class Client implements ClientInterface
326
  * as-is without merging in default options.
327
  *
328
  * @param array $options See \GuzzleHttp\RequestOptions.
329
- *
330
- * @return Promise\PromiseInterface
331
  */
332
- private function transfer(RequestInterface $request, array $options)
333
  {
334
- // save_to -> sink
335
- if (isset($options['save_to'])) {
336
- $options['sink'] = $options['save_to'];
337
- unset($options['save_to']);
338
- }
339
-
340
- // exceptions -> http_errors
341
- if (isset($options['exceptions'])) {
342
- $options['http_errors'] = $options['exceptions'];
343
- unset($options['exceptions']);
344
- }
345
-
346
  $request = $this->applyOptions($request, $options);
347
  /** @var HandlerStack $handler */
348
  $handler = $options['handler'];
349
 
350
  try {
351
- return Promise\promise_for($handler($request, $options));
352
  } catch (\Exception $e) {
353
- return Promise\rejection_for($e);
354
  }
355
  }
356
 
357
  /**
358
  * Applies the array of request options to a request.
359
- *
360
- * @param RequestInterface $request
361
- * @param array $options
362
- *
363
- * @return RequestInterface
364
  */
365
- private function applyOptions(RequestInterface $request, array &$options)
366
  {
367
  $modify = [
368
  'set_headers' => [],
@@ -375,16 +350,16 @@ class Client implements ClientInterface
375
 
376
  if (isset($options['form_params'])) {
377
  if (isset($options['multipart'])) {
378
- throw new \InvalidArgumentException('You cannot use '
379
  . 'form_params and multipart at the same time. Use the '
380
  . 'form_params option if you want to send application/'
381
  . 'x-www-form-urlencoded requests, and the multipart '
382
  . 'option to send multipart/form-data requests.');
383
  }
384
- $options['body'] = http_build_query($options['form_params'], '', '&');
385
  unset($options['form_params']);
386
  // Ensure that we don't have the header in different case and set the new value.
387
- $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']);
388
  $options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded';
389
  }
390
 
@@ -394,10 +369,10 @@ class Client implements ClientInterface
394
  }
395
 
396
  if (isset($options['json'])) {
397
- $options['body'] = \GuzzleHttp\json_encode($options['json']);
398
  unset($options['json']);
399
  // Ensure that we don't have the header in different case and set the new value.
400
- $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']);
401
  $options['_conditional']['Content-Type'] = 'application/json';
402
  }
403
 
@@ -405,47 +380,47 @@ class Client implements ClientInterface
405
  && $options['decode_content'] !== true
406
  ) {
407
  // Ensure that we don't have the header in different case and set the new value.
408
- $options['_conditional'] = Psr7\_caseless_remove(['Accept-Encoding'], $options['_conditional']);
409
  $modify['set_headers']['Accept-Encoding'] = $options['decode_content'];
410
  }
411
 
412
  if (isset($options['body'])) {
413
- if (is_array($options['body'])) {
414
- $this->invalidBody();
415
  }
416
- $modify['body'] = Psr7\stream_for($options['body']);
417
  unset($options['body']);
418
  }
419
 
420
- if (!empty($options['auth']) && is_array($options['auth'])) {
421
  $value = $options['auth'];
422
- $type = isset($value[2]) ? strtolower($value[2]) : 'basic';
423
  switch ($type) {
424
  case 'basic':
425
  // Ensure that we don't have the header in different case and set the new value.
426
- $modify['set_headers'] = Psr7\_caseless_remove(['Authorization'], $modify['set_headers']);
427
  $modify['set_headers']['Authorization'] = 'Basic '
428
- . base64_encode("$value[0]:$value[1]");
429
  break;
430
  case 'digest':
431
  // @todo: Do not rely on curl
432
- $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_DIGEST;
433
- $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]";
434
  break;
435
  case 'ntlm':
436
- $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_NTLM;
437
- $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]";
438
  break;
439
  }
440
  }
441
 
442
  if (isset($options['query'])) {
443
  $value = $options['query'];
444
- if (is_array($value)) {
445
- $value = http_build_query($value, null, '&', PHP_QUERY_RFC3986);
446
  }
447
- if (!is_string($value)) {
448
- throw new \InvalidArgumentException('query must be a string or array');
449
  }
450
  $modify['query'] = $value;
451
  unset($options['query']);
@@ -454,16 +429,16 @@ class Client implements ClientInterface
454
  // Ensure that sink is not an invalid value.
455
  if (isset($options['sink'])) {
456
  // TODO: Add more sink validation?
457
- if (is_bool($options['sink'])) {
458
- throw new \InvalidArgumentException('sink must not be a boolean');
459
  }
460
  }
461
 
462
- $request = Psr7\modify_request($request, $modify);
463
  if ($request->getBody() instanceof Psr7\MultipartStream) {
464
  // Use a multipart/form-data POST if a Content-Type is not set.
465
  // Ensure that we don't have the header in different case and set the new value.
466
- $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']);
467
  $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary='
468
  . $request->getBody()->getBoundary();
469
  }
@@ -477,7 +452,7 @@ class Client implements ClientInterface
477
  $modify['set_headers'][$k] = $v;
478
  }
479
  }
480
- $request = Psr7\modify_request($request, $modify);
481
  // Don't pass this internal value along to middleware/handlers.
482
  unset($options['_conditional']);
483
  }
@@ -486,14 +461,12 @@ class Client implements ClientInterface
486
  }
487
 
488
  /**
489
- * Throw Exception with pre-set message.
490
- * @return void
491
- * @throws \InvalidArgumentException Invalid body.
492
  */
493
- private function invalidBody()
494
  {
495
- throw new \InvalidArgumentException('Passing in the "body" request '
496
- . 'option as an array to send a POST request has been deprecated. '
497
  . 'Please use the "form_params" request option to send a '
498
  . 'application/x-www-form-urlencoded request, or the "multipart" '
499
  . 'request option to send a multipart/form-data request.');
1
  <?php
2
+
3
  namespace GuzzleHttp;
4
 
5
  use GuzzleHttp\Cookie\CookieJar;
6
  use GuzzleHttp\Exception\GuzzleException;
7
+ use GuzzleHttp\Exception\InvalidArgumentException;
8
+ use GuzzleHttp\Promise as P;
9
+ use GuzzleHttp\Promise\PromiseInterface;
10
  use Psr\Http\Message\RequestInterface;
11
  use Psr\Http\Message\ResponseInterface;
12
  use Psr\Http\Message\UriInterface;
13
 
14
  /**
15
+ * @final
 
 
 
 
 
 
 
 
 
 
 
16
  */
17
+ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
18
  {
19
+ use ClientTrait;
20
+
21
+ /**
22
+ * @var array Default request options
23
+ */
24
  private $config;
25
 
26
  /**
58
  {
59
  if (!isset($config['handler'])) {
60
  $config['handler'] = HandlerStack::create();
61
+ } elseif (!\is_callable($config['handler'])) {
62
+ throw new InvalidArgumentException('handler must be a callable');
63
  }
64
 
65
  // Convert the base_uri to a UriInterface
66
  if (isset($config['base_uri'])) {
67
+ $config['base_uri'] = Psr7\Utils::uriFor($config['base_uri']);
68
  }
69
 
70
  $this->configureDefaults($config);
74
  * @param string $method
75
  * @param array $args
76
  *
77
+ * @return PromiseInterface|ResponseInterface
78
+ *
79
+ * @deprecated Client::__call will be removed in guzzlehttp/guzzle:8.0.
80
  */
81
  public function __call($method, $args)
82
  {
83
+ if (\count($args) < 1) {
84
+ throw new InvalidArgumentException('Magic request methods require a URI and optional options array');
85
  }
86
 
87
  $uri = $args[0];
88
+ $opts = $args[1] ?? [];
89
 
90
+ return \substr($method, -5) === 'Async'
91
+ ? $this->requestAsync(\substr($method, 0, -5), $uri, $opts)
92
  : $this->request($method, $uri, $opts);
93
  }
94
 
97
  *
98
  * @param array $options Request options to apply to the given
99
  * request and to the transfer. See \GuzzleHttp\RequestOptions.
 
 
100
  */
101
+ public function sendAsync(RequestInterface $request, array $options = []): PromiseInterface
102
  {
103
  // Merge the base URI into the request URI if needed.
104
  $options = $this->prepareDefaults($options);
115
  * @param array $options Request options to apply to the given
116
  * request and to the transfer. See \GuzzleHttp\RequestOptions.
117
  *
 
118
  * @throws GuzzleException
119
  */
120
+ public function send(RequestInterface $request, array $options = []): ResponseInterface
121
  {
122
  $options[RequestOptions::SYNCHRONOUS] = true;
123
  return $this->sendAsync($request, $options)->wait();
124
  }
125
 
126
+ /**
127
+ * The HttpClient PSR (PSR-18) specify this method.
128
+ *
129
+ * @inheritDoc
130
+ */
131
+ public function sendRequest(RequestInterface $request): ResponseInterface
132
+ {
133
+ $options[RequestOptions::SYNCHRONOUS] = true;
134
+ $options[RequestOptions::ALLOW_REDIRECTS] = false;
135
+ $options[RequestOptions::HTTP_ERRORS] = false;
136
+
137
+ return $this->sendAsync($request, $options)->wait();
138
+ }
139
+
140
  /**
141
  * Create and send an asynchronous HTTP request.
142
  *
148
  * @param string $method HTTP method
149
  * @param string|UriInterface $uri URI object or string.
150
  * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions.
 
 
151
  */
152
+ public function requestAsync(string $method, $uri = '', array $options = []): PromiseInterface
153
  {
154
  $options = $this->prepareDefaults($options);
155
  // Remove request modifying parameter because it can be done up-front.
156
+ $headers = $options['headers'] ?? [];
157
+ $body = $options['body'] ?? null;
158
+ $version = $options['version'] ?? '1.1';
159
  // Merge the URI into the base URI.
160
+ $uri = $this->buildUri(Psr7\Utils::uriFor($uri), $options);
161
+ if (\is_array($body)) {
162
+ throw $this->invalidBody();
163
  }
164
  $request = new Psr7\Request($method, $uri, $headers, $body, $version);
165
  // Remove the option so that they are not doubly-applied.
179
  * @param string|UriInterface $uri URI object or string.
180
  * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions.
181
  *
 
182
  * @throws GuzzleException
183
  */
184
+ public function request(string $method, $uri = '', array $options = []): ResponseInterface
185
  {
186
  $options[RequestOptions::SYNCHRONOUS] = true;
187
  return $this->requestAsync($method, $uri, $options)->wait();
197
  * @param string|null $option The config option to retrieve.
198
  *
199
  * @return mixed
200
+ *
201
+ * @deprecated Client::getConfig will be removed in guzzlehttp/guzzle:8.0.
202
  */
203
+ public function getConfig(?string $option = null)
204
  {
205
  return $option === null
206
  ? $this->config
207
  : (isset($this->config[$option]) ? $this->config[$option] : null);
208
  }
209
 
210
+ private function buildUri(UriInterface $uri, array $config): UriInterface
 
 
 
 
 
211
  {
 
 
 
212
  if (isset($config['base_uri'])) {
213
+ $uri = Psr7\UriResolver::resolve(Psr7\Utils::uriFor($config['base_uri']), $uri);
214
  }
215
 
216
  if (isset($config['idn_conversion']) && ($config['idn_conversion'] !== false)) {
217
+ $idnOptions = ($config['idn_conversion'] === true) ? \IDNA_DEFAULT : $config['idn_conversion'];
218
  $uri = Utils::idnUriConvert($uri, $idnOptions);
219
  }
220
 
223
 
224
  /**
225
  * Configures the default options for a client.
 
 
 
226
  */
227
+ private function configureDefaults(array $config): void
228
  {
229
  $defaults = [
230
  'allow_redirects' => RedirectMiddleware::$defaultSettings,
232
  'decode_content' => true,
233
  'verify' => true,
234
  'cookies' => false,
235
+ 'idn_conversion' => false,
236
  ];
237
 
238
  // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set.
240
  // We can only trust the HTTP_PROXY environment variable in a CLI
241
  // process due to the fact that PHP has no reliable mechanism to
242
  // get environment variables that start with "HTTP_".
243
+ if (\PHP_SAPI === 'cli' && ($proxy = Utils::getenv('HTTP_PROXY'))) {
244
+ $defaults['proxy']['http'] = $proxy;
245
  }
246
 
247
+ if ($proxy = Utils::getenv('HTTPS_PROXY')) {
248
  $defaults['proxy']['https'] = $proxy;
249
  }
250
 
251
+ if ($noProxy = Utils::getenv('NO_PROXY')) {
252
+ $cleanedNoProxy = \str_replace(' ', '', $noProxy);
253
+ $defaults['proxy']['no'] = \explode(',', $cleanedNoProxy);
254
  }
255
 
256
  $this->config = $config + $defaults;
261
 
262
  // Add the default user-agent header.
263
  if (!isset($this->config['headers'])) {
264
+ $this->config['headers'] = ['User-Agent' => Utils::defaultUserAgent()];
265
  } else {
266
  // Add the User-Agent header if one was not already set.
267
+ foreach (\array_keys($this->config['headers']) as $name) {
268
+ if (\strtolower($name) === 'user-agent') {
269
  return;
270
  }
271
  }
272
+ $this->config['headers']['User-Agent'] = Utils::defaultUserAgent();
273
  }
274
  }
275
 
277
  * Merges default options into the array.
278
  *
279
  * @param array $options Options to modify by reference
 
 
280
  */
281
+ private function prepareDefaults(array $options): array
282
  {
283
  $defaults = $this->config;
284
 
290
 
291
  // Special handling for headers is required as they are added as
292
  // conditional headers and as headers passed to a request ctor.
293
+ if (\array_key_exists('headers', $options)) {
294
  // Allows default headers to be unset.
295
  if ($options['headers'] === null) {
296
  $defaults['_conditional'] = [];
297
  unset($options['headers']);
298
+ } elseif (!\is_array($options['headers'])) {
299
+ throw new InvalidArgumentException('headers must be an array');
300
  }
301
  }
302
 
320
  * as-is without merging in default options.
321
  *
322
  * @param array $options See \GuzzleHttp\RequestOptions.
 
 
323
  */
324
+ private function transfer(RequestInterface $request, array $options): PromiseInterface
325
  {
 
 
 
 
 
 
 
 
 
 
 
 
326
  $request = $this->applyOptions($request, $options);
327
  /** @var HandlerStack $handler */
328
  $handler = $options['handler'];
329
 
330
  try {
331
+ return P\Create::promiseFor($handler($request, $options));
332
  } catch (\Exception $e) {
333
+ return P\Create::rejectionFor($e);
334
  }
335
  }
336
 
337
  /**
338
  * Applies the array of request options to a request.
 
 
 
 
 
339
  */
340
+ private function applyOptions(RequestInterface $request, array &$options): RequestInterface
341
  {
342
  $modify = [
343
  'set_headers' => [],
350
 
351
  if (isset($options['form_params'])) {
352
  if (isset($options['multipart'])) {
353
+ throw new InvalidArgumentException('You cannot use '
354
  . 'form_params and multipart at the same time. Use the '
355
  . 'form_params option if you want to send application/'
356
  . 'x-www-form-urlencoded requests, and the multipart '
357
  . 'option to send multipart/form-data requests.');
358
  }
359
+ $options['body'] = \http_build_query($options['form_params'], '', '&');
360
  unset($options['form_params']);
361
  // Ensure that we don't have the header in different case and set the new value.
362
+ $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']);
363
  $options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded';
364
  }
365
 
369
  }
370
 
371
  if (isset($options['json'])) {
372
+ $options['body'] = Utils::jsonEncode($options['json']);
373
  unset($options['json']);
374
  // Ensure that we don't have the header in different case and set the new value.
375
+ $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']);
376
  $options['_conditional']['Content-Type'] = 'application/json';
377
  }
378
 
380
  && $options['decode_content'] !== true
381
  ) {
382
  // Ensure that we don't have the header in different case and set the new value.
383
+ $options['_conditional'] = Psr7\Utils::caselessRemove(['Accept-Encoding'], $options['_conditional']);
384
  $modify['set_headers']['Accept-Encoding'] = $options['decode_content'];
385
  }
386
 
387
  if (isset($options['body'])) {
388
+ if (\is_array($options['body'])) {
389
+ throw $this->invalidBody();
390
  }
391
+ $modify['body'] = Psr7\Utils::streamFor($options['body']);
392
  unset($options['body']);
393
  }
394
 
395
+ if (!empty($options['auth']) && \is_array($options['auth'])) {
396
  $value = $options['auth'];
397
+ $type = isset($value[2]) ? \strtolower($value[2]) : 'basic';
398
  switch ($type) {
399
  case 'basic':
400
  // Ensure that we don't have the header in different case and set the new value.
401
+ $modify['set_headers'] = Psr7\Utils::caselessRemove(['Authorization'], $modify['set_headers']);
402
  $modify['set_headers']['Authorization'] = 'Basic '
403
+ . \base64_encode("$value[0]:$value[1]");
404
  break;
405
  case 'digest':
406
  // @todo: Do not rely on curl
407
+ $options['curl'][\CURLOPT_HTTPAUTH] = \CURLAUTH_DIGEST;
408
+ $options['curl'][\CURLOPT_USERPWD] = "$value[0]:$value[1]";
409
  break;
410
  case 'ntlm':
411
+ $options['curl'][\CURLOPT_HTTPAUTH] = \CURLAUTH_NTLM;
412
+ $options['curl'][\CURLOPT_USERPWD] = "$value[0]:$value[1]";
413
  break;
414
  }
415
  }
416
 
417
  if (isset($options['query'])) {
418
  $value = $options['query'];
419
+ if (\is_array($value)) {
420
+ $value = \http_build_query($value, '', '&', \PHP_QUERY_RFC3986);
421
  }
422
+ if (!\is_string($value)) {
423
+ throw new InvalidArgumentException('query must be a string or array');
424
  }
425
  $modify['query'] = $value;
426
  unset($options['query']);
429
  // Ensure that sink is not an invalid value.
430
  if (isset($options['sink'])) {
431
  // TODO: Add more sink validation?
432
+ if (\is_bool($options['sink'])) {
433
+ throw new InvalidArgumentException('sink must not be a boolean');
434
  }
435
  }
436
 
437
+ $request = Psr7\Utils::modifyRequest($request, $modify);
438
  if ($request->getBody() instanceof Psr7\MultipartStream) {
439
  // Use a multipart/form-data POST if a Content-Type is not set.
440
  // Ensure that we don't have the header in different case and set the new value.
441
+ $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']);
442
  $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary='
443
  . $request->getBody()->getBoundary();
444
  }
452
  $modify['set_headers'][$k] = $v;
453
  }
454
  }
455
+ $request = Psr7\Utils::modifyRequest($request, $modify);
456
  // Don't pass this internal value along to middleware/handlers.
457
  unset($options['_conditional']);
458
  }
461
  }
462
 
463
  /**
464
+ * Return an InvalidArgumentException with pre-set message.
 
 
465
  */
466
+ private function invalidBody(): InvalidArgumentException
467
  {
468
+ return new InvalidArgumentException('Passing in the "body" request '
469
+ . 'option as an array to send a request is not supported. '
470
  . 'Please use the "form_params" request option to send a '
471
  . 'application/x-www-form-urlencoded request, or the "multipart" '
472
  . 'request option to send a multipart/form-data request.');
vendor/guzzlehttp/guzzle/src/ClientInterface.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
  use GuzzleHttp\Exception\GuzzleException;
@@ -13,9 +14,9 @@ use Psr\Http\Message\UriInterface;
13
  interface ClientInterface
14
  {
15
  /**
16
- * @deprecated Will be removed in Guzzle 7.0.0
17
  */
18
- const VERSION = '6.5.5';
19
 
20
  /**
21
  * Send an HTTP request.
@@ -24,10 +25,9 @@ interface ClientInterface
24
  * @param array $options Request options to apply to the given
25
  * request and to the transfer.
26
  *
27
- * @return ResponseInterface
28
  * @throws GuzzleException
29
  */
30
- public function send(RequestInterface $request, array $options = []);
31
 
32
  /**
33
  * Asynchronously send an HTTP request.
@@ -35,10 +35,8 @@ interface ClientInterface
35
  * @param RequestInterface $request Request to send
36
  * @param array $options Request options to apply to the given
37
  * request and to the transfer.
38
- *
39
- * @return PromiseInterface
40
  */
41
- public function sendAsync(RequestInterface $request, array $options = []);
42
 
43
  /**
44
  * Create and send an HTTP request.
@@ -51,10 +49,9 @@ interface ClientInterface
51
  * @param string|UriInterface $uri URI object or string.
52
  * @param array $options Request options to apply.
53
  *
54
- * @return ResponseInterface
55
  * @throws GuzzleException
56
  */
57
- public function request($method, $uri, array $options = []);
58
 
59
  /**
60
  * Create and send an asynchronous HTTP request.
@@ -67,10 +64,8 @@ interface ClientInterface
67
  * @param string $method HTTP method
68
  * @param string|UriInterface $uri URI object or string.
69
  * @param array $options Request options to apply.
70
- *
71
- * @return PromiseInterface
72
  */
73
- public function requestAsync($method, $uri, array $options = []);
74
 
75
  /**
76
  * Get a client configuration option.
@@ -82,6 +77,8 @@ interface ClientInterface
82
  * @param string|null $option The config option to retrieve.
83
  *
84
  * @return mixed
 
 
85
  */
86
- public function getConfig($option = null);
87
  }
1
  <?php
2
+
3
  namespace GuzzleHttp;
4
 
5
  use GuzzleHttp\Exception\GuzzleException;
14
  interface ClientInterface
15
  {
16
  /**
17
+ * The Guzzle major version.
18
  */
19
+ const MAJOR_VERSION = 7;
20
 
21
  /**
22
  * Send an HTTP request.
25
  * @param array $options Request options to apply to the given
26
  * request and to the transfer.
27
  *
 
28
  * @throws GuzzleException
29
  */
30
+ public function send(RequestInterface $request, array $options = []): ResponseInterface;
31
 
32
  /**
33
  * Asynchronously send an HTTP request.
35
  * @param RequestInterface $request Request to send
36
  * @param array $options Request options to apply to the given
37
  * request and to the transfer.
 
 
38
  */
39
+ public function sendAsync(RequestInterface $request, array $options = []): PromiseInterface;
40
 
41
  /**
42
  * Create and send an HTTP request.
49
  * @param string|UriInterface $uri URI object or string.
50
  * @param array $options Request options to apply.
51
  *
 
52
  * @throws GuzzleException
53
  */
54
+ public function request(string $method, $uri, array $options = []): ResponseInterface;
55
 
56
  /**
57
  * Create and send an asynchronous HTTP request.
64
  * @param string $method HTTP method
65
  * @param string|UriInterface $uri URI object or string.
66
  * @param array $options Request options to apply.
 
 
67
  */
68
+ public function requestAsync(string $method, $uri, array $options = []): PromiseInterface;
69
 
70
  /**
71
  * Get a client configuration option.
77
  * @param string|null $option The config option to retrieve.
78
  *
79
  * @return mixed
80
+ *
81
+ * @deprecated ClientInterface::getConfig will be removed in guzzlehttp/guzzle:8.0.
82
  */
83
+ public function getConfig(?string $option = null);
84
  }
vendor/guzzlehttp/guzzle/src/ClientTrait.php ADDED
@@ -0,0 +1,241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp;
4
+
5
+ use GuzzleHttp\Exception\GuzzleException;
6
+ use GuzzleHttp\Promise\PromiseInterface;
7
+ use Psr\Http\Message\ResponseInterface;
8
+ use Psr\Http\Message\UriInterface;
9
+
10
+ /**
11
+ * Client interface for sending HTTP requests.
12
+ */
13
+ trait ClientTrait
14
+ {
15
+ /**
16
+ * Create and send an HTTP request.
17
+ *
18
+ * Use an absolute path to override the base path of the client, or a
19
+ * relative path to append to the base path of the client. The URL can
20
+ * contain the query string as well.
21
+ *
22
+ * @param string $method HTTP method.
23
+ * @param string|UriInterface $uri URI object or string.
24
+ * @param array $options Request options to apply.
25
+ *
26
+ * @throws GuzzleException
27
+ */
28
+ abstract public function request(string $method, $uri, array $options = []): ResponseInterface;
29
+
30
+ /**
31
+ * Create and send an HTTP GET request.
32
+ *
33
+ * Use an absolute path to override the base path of the client, or a
34
+ * relative path to append to the base path of the client. The URL can
35
+ * contain the query string as well.
36
+ *
37
+ * @param string|UriInterface $uri URI object or string.
38
+ * @param array $options Request options to apply.
39
+ *
40
+ * @throws GuzzleException
41
+ */
42
+ public function get($uri, array $options = []): ResponseInterface
43
+ {
44
+ return $this->request('GET', $uri, $options);
45
+ }
46
+
47
+ /**
48
+ * Create and send an HTTP HEAD request.
49
+ *
50
+ * Use an absolute path to override the base path of the client, or a
51
+ * relative path to append to the base path of the client. The URL can
52
+ * contain the query string as well.
53
+ *
54
+ * @param string|UriInterface $uri URI object or string.
55
+ * @param array $options Request options to apply.
56
+ *
57
+ * @throws GuzzleException
58
+ */
59
+ public function head($uri, array $options = []): ResponseInterface
60
+ {
61
+ return $this->request('HEAD', $uri, $options);
62
+ }
63
+
64
+ /**
65
+ * Create and send an HTTP PUT request.
66
+ *
67
+ * Use an absolute path to override the base path of the client, or a
68
+ * relative path to append to the base path of the client. The URL can
69
+ * contain the query string as well.
70
+ *
71
+ * @param string|UriInterface $uri URI object or string.
72
+ * @param array $options Request options to apply.
73
+ *
74
+ * @throws GuzzleException
75
+ */
76
+ public function put($uri, array $options = []): ResponseInterface
77
+ {
78
+ return $this->request('PUT', $uri, $options);
79
+ }
80
+
81
+ /**
82
+ * Create and send an HTTP POST request.
83
+ *
84
+ * Use an absolute path to override the base path of the client, or a
85
+ * relative path to append to the base path of the client. The URL can
86
+ * contain the query string as well.
87
+ *
88
+ * @param string|UriInterface $uri URI object or string.
89
+ * @param array $options Request options to apply.
90
+ *
91
+ * @throws GuzzleException
92
+ */
93
+ public function post($uri, array $options = []): ResponseInterface
94
+ {
95
+ return $this->request('POST', $uri, $options);
96
+ }
97
+
98
+ /**
99
+ * Create and send an HTTP PATCH request.
100
+ *
101
+ * Use an absolute path to override the base path of the client, or a
102
+ * relative path to append to the base path of the client. The URL can
103
+ * contain the query string as well.
104
+ *
105
+ * @param string|UriInterface $uri URI object or string.
106
+ * @param array $options Request options to apply.
107
+ *
108
+ * @throws GuzzleException
109
+ */
110
+ public function patch($uri, array $options = []): ResponseInterface
111
+ {
112
+ return $this->request('PATCH', $uri, $options);
113
+ }
114
+
115
+ /**
116
+ * Create and send an HTTP DELETE request.
117
+ *
118
+ * Use an absolute path to override the base path of the client, or a
119
+ * relative path to append to the base path of the client. The URL can
120
+ * contain the query string as well.
121
+ *
122
+ * @param string|UriInterface $uri URI object or string.
123
+ * @param array $options Request options to apply.
124
+ *
125
+ * @throws GuzzleException
126
+ */
127
+ public function delete($uri, array $options = []): ResponseInterface
128
+ {
129
+ return $this->request('DELETE', $uri, $options);
130
+ }
131
+
132
+ /**
133
+ * Create and send an asynchronous HTTP request.
134
+ *
135
+ * Use an absolute path to override the base path of the client, or a
136
+ * relative path to append to the base path of the client. The URL can
137
+ * contain the query string as well. Use an array to provide a URL
138
+ * template and additional variables to use in the URL template expansion.
139
+ *
140
+ * @param string $method HTTP method
141
+ * @param string|UriInterface $uri URI object or string.
142
+ * @param array $options Request options to apply.
143
+ */
144
+ abstract public function requestAsync(string $method, $uri, array $options = []): PromiseInterface;
145
+
146
+ /**
147
+ * Create and send an asynchronous HTTP GET request.
148
+ *
149
+ * Use an absolute path to override the base path of the client, or a
150
+ * relative path to append to the base path of the client. The URL can
151
+ * contain the query string as well. Use an array to provide a URL
152
+ * template and additional variables to use in the URL template expansion.
153
+ *
154
+ * @param string|UriInterface $uri URI object or string.
155
+ * @param array $options Request options to apply.
156
+ */
157
+ public function getAsync($uri, array $options = []): PromiseInterface
158
+ {
159
+ return $this->requestAsync('GET', $uri, $options);
160
+ }
161
+
162
+ /**
163
+ * Create and send an asynchronous HTTP HEAD request.
164
+ *
165
+ * Use an absolute path to override the base path of the client, or a
166
+ * relative path to append to the base path of the client. The URL can
167
+ * contain the query string as well. Use an array to provide a URL
168
+ * template and additional variables to use in the URL template expansion.
169
+ *
170
+ * @param string|UriInterface $uri URI object or string.
171
+ * @param array $options Request options to apply.
172
+ */
173
+ public function headAsync($uri, array $options = []): PromiseInterface
174
+ {
175
+ return $this->requestAsync('HEAD', $uri, $options);
176
+ }
177
+
178
+ /**
179
+ * Create and send an asynchronous HTTP PUT request.
180
+ *
181
+ * Use an absolute path to override the base path of the client, or a
182
+ * relative path to append to the base path of the client. The URL can
183
+ * contain the query string as well. Use an array to provide a URL
184
+ * template and additional variables to use in the URL template expansion.
185
+ *
186
+ * @param string|UriInterface $uri URI object or string.
187
+ * @param array $options Request options to apply.
188
+ */
189
+ public function putAsync($uri, array $options = []): PromiseInterface
190
+ {
191
+ return $this->requestAsync('PUT', $uri, $options);
192
+ }
193
+
194
+ /**
195
+ * Create and send an asynchronous HTTP POST request.
196
+ *
197
+ * Use an absolute path to override the base path of the client, or a
198
+ * relative path to append to the base path of the client. The URL can
199
+ * contain the query string as well. Use an array to provide a URL
200
+ * template and additional variables to use in the URL template expansion.
201
+ *
202
+ * @param string|UriInterface $uri URI object or string.
203
+ * @param array $options Request options to apply.
204
+ */
205
+ public function postAsync($uri, array $options = []): PromiseInterface
206
+ {
207
+ return $this->requestAsync('POST', $uri, $options);
208
+ }
209
+
210
+ /**
211
+ * Create and send an asynchronous HTTP PATCH request.
212
+ *
213
+ * Use an absolute path to override the base path of the client, or a
214
+ * relative path to append to the base path of the client. The URL can
215
+ * contain the query string as well. Use an array to provide a URL
216
+ * template and additional variables to use in the URL template expansion.
217
+ *
218
+ * @param string|UriInterface $uri URI object or string.
219
+ * @param array $options Request options to apply.
220
+ */
221
+ public function patchAsync($uri, array $options = []): PromiseInterface
222
+ {
223
+ return $this->requestAsync('PATCH', $uri, $options);
224
+ }
225
+
226
+ /**
227
+ * Create and send an asynchronous HTTP DELETE request.
228
+ *
229
+ * Use an absolute path to override the base path of the client, or a
230
+ * relative path to append to the base path of the client. The URL can
231
+ * contain the query string as well. Use an array to provide a URL
232
+ * template and additional variables to use in the URL template expansion.
233
+ *
234
+ * @param string|UriInterface $uri URI object or string.
235
+ * @param array $options Request options to apply.
236
+ */
237
+ public function deleteAsync($uri, array $options = []): PromiseInterface
238
+ {
239
+ return $this->requestAsync('DELETE', $uri, $options);
240
+ }
241
+ }
vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Cookie;
3
 
4
  use Psr\Http\Message\RequestInterface;
@@ -9,20 +10,24 @@ use Psr\Http\Message\ResponseInterface;
9
  */
10
  class CookieJar implements CookieJarInterface
11
  {
12
- /** @var SetCookie[] Loaded cookie data */
 
 
13
  private $cookies = [];
14
 
15
- /** @var bool */
 
 
16
  private $strictMode;
17
 
18
  /**
19
- * @param bool $strictMode Set to true to throw exceptions when invalid
20
  * cookies are added to the cookie jar.
21
  * @param array $cookieArray Array of SetCookie objects or a hash of
22
  * arrays that can be used with the SetCookie
23
  * constructor
24
  */
25
- public function __construct($strictMode = false, $cookieArray = [])
26
  {
27
  $this->strictMode = $strictMode;
28
 
@@ -39,10 +44,8 @@ class CookieJar implements CookieJarInterface
39
  *
40
  * @param array $cookies Cookies to create the jar from
41
  * @param string $domain Domain to set the cookies to
42
- *
43
- * @return self
44
  */
45
- public static function fromArray(array $cookies, $domain)
46
  {
47
  $cookieJar = new self();
48
  foreach ($cookies as $name => $value) {
@@ -57,26 +60,15 @@ class CookieJar implements CookieJarInterface
57
  return $cookieJar;
58
  }
59
 
60
- /**
61
- * @deprecated
62
- */
63
- public static function getCookieValue($value)
64
- {
65
- return $value;
66
- }
67
-
68
  /**
69
  * Evaluate if this cookie should be persisted to storage
70
  * that survives between requests.
71
  *
72
- * @param SetCookie $cookie Being evaluated.
73
- * @param bool $allowSessionCookies If we should persist session cookies
74
- * @return bool
75
  */
76
- public static function shouldPersist(
77
- SetCookie $cookie,
78
- $allowSessionCookies = false
79
- ) {
80
  if ($cookie->getExpires() || $allowSessionCookies) {
81
  if (!$cookie->getDiscard()) {
82
  return true;
@@ -90,16 +82,13 @@ class CookieJar implements CookieJarInterface
90
  * Finds and returns the cookie based on the name
91
  *
92
  * @param string $name cookie name to search for
 
93
  * @return SetCookie|null cookie that was found or null if not found
94
  */
95
- public function getCookieByName($name)
96
  {
97
- // don't allow a non string name
98
- if ($name === null || !is_scalar($name)) {
99
- return null;
100
- }
101
  foreach ($this->cookies as $cookie) {
102
- if ($cookie->getName() !== null && strcasecmp($cookie->getName(), $name) === 0) {
103
  return $cookie;
104
  }
105
  }
@@ -107,37 +96,43 @@ class CookieJar implements CookieJarInterface
107
  return null;
108
  }
109
 
110
- public function toArray()
 
 
 
111
  {
112
- return array_map(function (SetCookie $cookie) {
113
  return $cookie->toArray();
114
  }, $this->getIterator()->getArrayCopy());
115
  }
116
 
117
- public function clear($domain = null, $path = null, $name = null)
 
 
 
118
  {
119
  if (!$domain) {
120
  $this->cookies = [];
121
  return;
122
  } elseif (!$path) {
123
- $this->cookies = array_filter(
124
  $this->cookies,
125
- function (SetCookie $cookie) use ($domain) {
126
  return !$cookie->matchesDomain($domain);
127
  }
128
  );
129
  } elseif (!$name) {
130
- $this->cookies = array_filter(
131
  $this->cookies,
132
- function (SetCookie $cookie) use ($path, $domain) {
133
  return !($cookie->matchesPath($path) &&
134
  $cookie->matchesDomain($domain));
135
  }
136
  );
137
  } else {
138
- $this->cookies = array_filter(
139
  $this->cookies,
140
- function (SetCookie $cookie) use ($path, $domain, $name) {
141
  return !($cookie->getName() == $name &&
142
  $cookie->matchesPath($path) &&
143
  $cookie->matchesDomain($domain));
@@ -146,17 +141,23 @@ class CookieJar implements CookieJarInterface
146
  }
147
  }
148
 
149
- public function clearSessionCookies()
 
 
 
150
  {
151
- $this->cookies = array_filter(
152
  $this->cookies,
153
- function (SetCookie $cookie) {
154
  return !$cookie->getDiscard() && $cookie->getExpires();
155
  }
156
  );
157
  }
158
 
159
- public function setCookie(SetCookie $cookie)
 
 
 
160
  {
161
  // If the name string is empty (but not 0), ignore the set-cookie
162
  // string entirely.
@@ -170,10 +171,9 @@ class CookieJar implements CookieJarInterface
170
  if ($result !== true) {
171
  if ($this->strictMode) {
172
  throw new \RuntimeException('Invalid cookie: ' . $result);
173
- } else {
174
- $this->removeCookieIfEmpty($cookie);
175
- return false;
176
  }
 
 
177
  }
178
 
179
  // Resolve conflicts with previously set cookies
@@ -217,27 +217,28 @@ class CookieJar implements CookieJarInterface
217
  return true;
218
  }
219
 
220
- public function count()
221
  {
222
- return count($this->cookies);
223
  }
224
 
225
- public function getIterator()
 
 
 
226
  {
227
- return new \ArrayIterator(array_values($this->cookies));
228
  }
229
 
230
- public function extractCookies(
231
- RequestInterface $request,
232
- ResponseInterface $response
233
- ) {
234
  if ($cookieHeader = $response->getHeader('Set-Cookie')) {
235
  foreach ($cookieHeader as $cookie) {
236
  $sc = SetCookie::fromString($cookie);
237
  if (!$sc->getDomain()) {
238
  $sc->setDomain($request->getUri()->getHost());
239
  }
240
- if (0 !== strpos($sc->getPath(), '/')) {
241
  $sc->setPath($this->getCookiePathFromRequest($request));
242
  }
243
  $this->setCookie($sc);
@@ -249,30 +250,28 @@ class CookieJar implements CookieJarInterface
249
  * Computes cookie path following RFC 6265 section 5.1.4
250
  *
251
  * @link https://tools.ietf.org/html/rfc6265#section-5.1.4
252
- *
253
- * @param RequestInterface $request
254
- * @return string
255
  */
256
- private function getCookiePathFromRequest(RequestInterface $request)
257
  {
258
  $uriPath = $request->getUri()->getPath();
259
- if ('' === $uriPath) {
260
  return '/';
261
  }
262
- if (0 !== strpos($uriPath, '/')) {
263
  return '/';
264
  }
265
  if ('/' === $uriPath) {
266
  return '/';
267
  }
268
- if (0 === $lastSlashPos = strrpos($uriPath, '/')) {
 
269
  return '/';
270
  }
271
 
272
- return substr($uriPath, 0, $lastSlashPos);
273
  }
274
 
275
- public function withCookieHeader(RequestInterface $request)
276
  {
277
  $values = [];
278
  $uri = $request->getUri();
@@ -292,17 +291,15 @@ class CookieJar implements CookieJarInterface
292
  }
293
 
294
  return $values
295
- ? $request->withHeader('Cookie', implode('; ', $values))
296
  : $request;
297
  }
298
 
299
  /**
300
  * If a cookie already exists and the server asks to set it again with a
301
  * null value, the cookie must be deleted.
302
- *
303
- * @param SetCookie $cookie
304
  */
305
- private function removeCookieIfEmpty(SetCookie $cookie)
306
  {
307
  $cookieValue = $cookie->getValue();
308
  if ($cookieValue === null || $cookieValue === '') {
1
  <?php
2
+
3
  namespace GuzzleHttp\Cookie;
4
 
5
  use Psr\Http\Message\RequestInterface;
10
  */
11
  class CookieJar implements CookieJarInterface
12
  {
13
+ /**
14
+ * @var SetCookie[] Loaded cookie data
15
+ */
16
  private $cookies = [];
17
 
18
+ /**
19
+ * @var bool
20
+ */
21
  private $strictMode;
22
 
23
  /**
24
+ * @param bool $strictMode Set to true to throw exceptions when invalid
25
  * cookies are added to the cookie jar.
26
  * @param array $cookieArray Array of SetCookie objects or a hash of
27
  * arrays that can be used with the SetCookie
28
  * constructor
29
  */
30
+ public function __construct(bool $strictMode = false, array $cookieArray = [])
31
  {
32
  $this->strictMode = $strictMode;
33
 
44
  *
45
  * @param array $cookies Cookies to create the jar from
46
  * @param string $domain Domain to set the cookies to
 
 
47
  */
48
+ public static function fromArray(array $cookies, string $domain): self
49
  {
50
  $cookieJar = new self();
51
  foreach ($cookies as $name => $value) {
60
  return $cookieJar;
61
  }
62
 
 
 
 
 
 
 
 
 
63
  /**
64
  * Evaluate if this cookie should be persisted to storage
65
  * that survives between requests.
66
  *
67
+ * @param SetCookie $cookie Being evaluated.
68
+ * @param bool $allowSessionCookies If we should persist session cookies
 
69
  */
70
+ public static function shouldPersist(SetCookie $cookie, bool $allowSessionCookies = false): bool
71
+ {
 
 
72
  if ($cookie->getExpires() || $allowSessionCookies) {
73
  if (!$cookie->getDiscard()) {
74
  return true;
82
  * Finds and returns the cookie based on the name
83
  *
84
  * @param string $name cookie name to search for
85
+ *
86
  * @return SetCookie|null cookie that was found or null if not found
87
  */
88
+ public function getCookieByName(string $name): ?SetCookie
89
  {
 
 
 
 
90
  foreach ($this->cookies as $cookie) {
91
+ if ($cookie->getName() !== null && \strcasecmp($cookie->getName(), $name) === 0) {
92
  return $cookie;
93
  }
94
  }
96
  return null;
97
  }
98
 
99
+ /**
100
+ * @inheritDoc
101
+ */
102
+ public function toArray(): array
103
  {
104
+ return \array_map(static function (SetCookie $cookie): array {
105
  return $cookie->toArray();
106
  }, $this->getIterator()->getArrayCopy());
107
  }
108
 
109
+ /**
110
+ * @inheritDoc
111
+ */
112
+ public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void
113
  {
114
  if (!$domain) {
115
  $this->cookies = [];
116
  return;
117
  } elseif (!$path) {
118
+ $this->cookies = \array_filter(
119
  $this->cookies,
120
+ static function (SetCookie $cookie) use ($domain): bool {
121
  return !$cookie->matchesDomain($domain);
122
  }
123
  );
124
  } elseif (!$name) {
125
+ $this->cookies = \array_filter(
126
  $this->cookies,
127
+ static function (SetCookie $cookie) use ($path, $domain): bool {
128
  return !($cookie->matchesPath($path) &&
129
  $cookie->matchesDomain($domain));
130
  }
131
  );
132
  } else {
133
+ $this->cookies = \array_filter(
134
  $this->cookies,
135
+ static function (SetCookie $cookie) use ($path, $domain, $name) {
136
  return !($cookie->getName() == $name &&
137
  $cookie->matchesPath($path) &&
138
  $cookie->matchesDomain($domain));
141
  }
142
  }
143
 
144
+ /**
145
+ * @inheritDoc
146
+ */
147
+ public function clearSessionCookies(): void
148
  {
149
+ $this->cookies = \array_filter(
150
  $this->cookies,
151
+ static function (SetCookie $cookie): bool {
152
  return !$cookie->getDiscard() && $cookie->getExpires();
153
  }
154
  );
155
  }
156
 
157
+ /**
158
+ * @inheritDoc
159
+ */
160
+ public function setCookie(SetCookie $cookie): bool
161
  {
162
  // If the name string is empty (but not 0), ignore the set-cookie
163
  // string entirely.
171
  if ($result !== true) {
172
  if ($this->strictMode) {
173
  throw new \RuntimeException('Invalid cookie: ' . $result);
 
 
 
174
  }
175
+ $this->removeCookieIfEmpty($cookie);
176
+ return false;
177
  }
178
 
179
  // Resolve conflicts with previously set cookies
217
  return true;
218
  }
219
 
220
+ public function count(): int
221
  {
222
+ return \count($this->cookies);
223
  }
224
 
225
+ /**
226
+ * @return \ArrayIterator<int, SetCookie>
227
+ */
228
+ public function getIterator(): \ArrayIterator
229
  {
230
+ return new \ArrayIterator(\array_values($this->cookies));
231
  }
232
 
233
+ public function extractCookies(RequestInterface $request, ResponseInterface $response): void
234
+ {
 
 
235
  if ($cookieHeader = $response->getHeader('Set-Cookie')) {
236
  foreach ($cookieHeader as $cookie) {
237
  $sc = SetCookie::fromString($cookie);
238
  if (!$sc->getDomain()) {
239
  $sc->setDomain($request->getUri()->getHost());
240
  }
241
+ if (0 !== \strpos($sc->getPath(), '/')) {
242
  $sc->setPath($this->getCookiePathFromRequest($request));
243
  }
244
  $this->setCookie($sc);
250
  * Computes cookie path following RFC 6265 section 5.1.4
251
  *
252
  * @link https://tools.ietf.org/html/rfc6265#section-5.1.4
 
 
 
253
  */
254
+ private function getCookiePathFromRequest(RequestInterface $request): string
255
  {
256
  $uriPath = $request->getUri()->getPath();
257
+ if ('' === $uriPath) {
258
  return '/';
259
  }
260
+ if (0 !== \strpos($uriPath, '/')) {
261
  return '/';
262
  }
263
  if ('/' === $uriPath) {
264
  return '/';
265
  }
266
+ $lastSlashPos = \strrpos($uriPath, '/');
267
+ if (0 === $lastSlashPos || false === $lastSlashPos) {
268
  return '/';
269
  }
270
 
271
+ return \substr($uriPath, 0, $lastSlashPos);
272
  }
273
 
274
+ public function withCookieHeader(RequestInterface $request): RequestInterface
275
  {
276
  $values = [];
277
  $uri = $request->getUri();
291
  }
292
 
293
  return $values
294
+ ? $request->withHeader('Cookie', \implode('; ', $values))
295
  : $request;
296
  }
297
 
298
  /**
299
  * If a cookie already exists and the server asks to set it again with a
300
  * null value, the cookie must be deleted.
 
 
301
  */
302
+ private function removeCookieIfEmpty(SetCookie $cookie): void
303
  {
304
  $cookieValue = $cookie->getValue();
305
  if ($cookieValue === null || $cookieValue === '') {
vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Cookie;
3
 
4
  use Psr\Http\Message\RequestInterface;
@@ -12,7 +13,8 @@ use Psr\Http\Message\ResponseInterface;
12
  * necessary. Subclasses are also responsible for storing and retrieving
13
  * cookies from a file, database, etc.
14
  *
15
- * @link http://docs.python.org/2/library/cookielib.html Inspiration
 
16
  */
17
  interface CookieJarInterface extends \Countable, \IteratorAggregate
18
  {
@@ -26,7 +28,7 @@ interface CookieJarInterface extends \Countable, \IteratorAggregate
26
  *
27
  * @return RequestInterface returns the modified request.
28
  */
29
- public function withCookieHeader(RequestInterface $request);
30
 
31
  /**
32
  * Extract cookies from an HTTP response and store them in the CookieJar.
@@ -34,10 +36,7 @@ interface CookieJarInterface extends \Countable, \IteratorAggregate
34
  * @param RequestInterface $request Request that was sent
35
  * @param ResponseInterface $response Response that was received
36
  */
37
- public function extractCookies(
38
- RequestInterface $request,
39
- ResponseInterface $response
40
- );
41
 
42
  /**
43
  * Sets a cookie in the cookie jar.
@@ -46,7 +45,7 @@ interface CookieJarInterface extends \Countable, \IteratorAggregate
46
  *
47
  * @return bool Returns true on success or false on failure
48
  */
49
- public function setCookie(SetCookie $cookie);
50
 
51
  /**
52
  * Remove cookies currently held in the cookie jar.
@@ -61,10 +60,8 @@ interface CookieJarInterface extends \Countable, \IteratorAggregate
61
  * @param string|null $domain Clears cookies matching a domain
62
  * @param string|null $path Clears cookies matching a domain and path
63
  * @param string|null $name Clears cookies matching a domain, path, and name
64
- *
65
- * @return CookieJarInterface
66
  */
67
- public function clear($domain = null, $path = null, $name = null);
68
 
69
  /**
70
  * Discard all sessions cookies.
@@ -73,12 +70,10 @@ interface CookieJarInterface extends \Countable, \IteratorAggregate
73
  * field set to true. To be called when the user agent shuts down according
74
  * to RFC 2965.
75
  */
76
- public function clearSessionCookies();
77
 
78
  /**
79
  * Converts the cookie jar to an array.
80
- *
81
- * @return array
82
  */
83
- public function toArray();
84
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Cookie;
4
 
5
  use Psr\Http\Message\RequestInterface;
13
  * necessary. Subclasses are also responsible for storing and retrieving
14
  * cookies from a file, database, etc.
15
  *
16
+ * @link https://docs.python.org/2/library/cookielib.html Inspiration
17
+ * @extends \IteratorAggregate<SetCookie>
18
  */
19
  interface CookieJarInterface extends \Countable, \IteratorAggregate
20
  {
28
  *
29
  * @return RequestInterface returns the modified request.
30
  */
31
+ public function withCookieHeader(RequestInterface $request): RequestInterface;
32
 
33
  /**
34
  * Extract cookies from an HTTP response and store them in the CookieJar.
36
  * @param RequestInterface $request Request that was sent
37
  * @param ResponseInterface $response Response that was received
38
  */
39
+ public function extractCookies(RequestInterface $request, ResponseInterface $response): void;
 
 
 
40
 
41
  /**
42
  * Sets a cookie in the cookie jar.
45
  *
46
  * @return bool Returns true on success or false on failure
47
  */
48
+ public function setCookie(SetCookie $cookie): bool;
49
 
50
  /**
51
  * Remove cookies currently held in the cookie jar.
60
  * @param string|null $domain Clears cookies matching a domain
61
  * @param string|null $path Clears cookies matching a domain and path
62
  * @param string|null $name Clears cookies matching a domain, path, and name
 
 
63
  */
64
+ public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void;
65
 
66
  /**
67
  * Discard all sessions cookies.
70
  * field set to true. To be called when the user agent shuts down according
71
  * to RFC 2965.
72
  */
73
+ public function clearSessionCookies(): void;
74
 
75
  /**
76
  * Converts the cookie jar to an array.
 
 
77
  */
78
+ public function toArray(): array;
79
  }
vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php CHANGED
@@ -1,33 +1,40 @@
1
  <?php
 
2
  namespace GuzzleHttp\Cookie;
3
 
 
 
4
  /**
5
  * Persists non-session cookies using a JSON formatted file
6
  */
7
  class FileCookieJar extends CookieJar
8
  {
9
- /** @var string filename */
 
 
10
  private $filename;
11
 
12
- /** @var bool Control whether to persist session cookies or not. */
 
 
13
  private $storeSessionCookies;
14
 
15
  /**
16
  * Create a new FileCookieJar object
17
  *
18
- * @param string $cookieFile File to store the cookie data
19
- * @param bool $storeSessionCookies Set to true to store session cookies
20
- * in the cookie jar.
21
  *
22
  * @throws \RuntimeException if the file cannot be found or created
23
  */
24
- public function __construct($cookieFile, $storeSessionCookies = false)
25
  {
26
  parent::__construct();
27
  $this->filename = $cookieFile;
28
  $this->storeSessionCookies = $storeSessionCookies;
29
 
30
- if (file_exists($cookieFile)) {
31
  $this->load($cookieFile);
32
  }
33
  }
@@ -44,20 +51,21 @@ class FileCookieJar extends CookieJar
44
  * Saves the cookies to a file.
45
  *
46
  * @param string $filename File to save
 
47
  * @throws \RuntimeException if the file cannot be found or created
48
  */
49
- public function save($filename)
50
  {
51
  $json = [];
 
52
  foreach ($this as $cookie) {
53
- /** @var SetCookie $cookie */
54
  if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) {
55
  $json[] = $cookie->toArray();
56
  }
57
  }
58
 
59
- $jsonStr = \GuzzleHttp\json_encode($json);
60
- if (false === file_put_contents($filename, $jsonStr, LOCK_EX)) {
61
  throw new \RuntimeException("Unable to save file {$filename}");
62
  }
63
  }
@@ -68,23 +76,25 @@ class FileCookieJar extends CookieJar
68
  * Old cookies are kept unless overwritten by newly loaded ones.
69
  *
70
  * @param string $filename Cookie file to load.
 
71
  * @throws \RuntimeException if the file cannot be loaded.
72
  */
73
- public function load($filename)
74
  {
75
- $json = file_get_contents($filename);
76
  if (false === $json) {
77
  throw new \RuntimeException("Unable to load file {$filename}");
78
- } elseif ($json === '') {
 
79
  return;
80
  }
81
 
82
- $data = \GuzzleHttp\json_decode($json, true);
83
- if (is_array($data)) {
84
- foreach (json_decode($json, true) as $cookie) {
85
  $this->setCookie(new SetCookie($cookie));
86
  }
87
- } elseif (strlen($data)) {
88
  throw new \RuntimeException("Invalid cookie file: {$filename}");
89
  }
90
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Cookie;
4
 
5
+ use GuzzleHttp\Utils;
6
+
7
  /**
8
  * Persists non-session cookies using a JSON formatted file
9
  */
10
  class FileCookieJar extends CookieJar
11
  {
12
+ /**
13
+ * @var string filename
14
+ */
15
  private $filename;
16
 
17
+ /**
18
+ * @var bool Control whether to persist session cookies or not.
19
+ */
20
  private $storeSessionCookies;
21
 
22
  /**
23
  * Create a new FileCookieJar object
24
  *
25
+ * @param string $cookieFile File to store the cookie data
26
+ * @param bool $storeSessionCookies Set to true to store session cookies
27
+ * in the cookie jar.
28
  *
29
  * @throws \RuntimeException if the file cannot be found or created
30
  */
31
+ public function __construct(string $cookieFile, bool $storeSessionCookies = false)
32
  {
33
  parent::__construct();
34
  $this->filename = $cookieFile;
35
  $this->storeSessionCookies = $storeSessionCookies;
36
 
37
+ if (\file_exists($cookieFile)) {
38
  $this->load($cookieFile);
39
  }
40
  }
51
  * Saves the cookies to a file.
52
  *
53
  * @param string $filename File to save
54
+ *
55
  * @throws \RuntimeException if the file cannot be found or created
56
  */
57
+ public function save(string $filename): void
58
  {
59
  $json = [];
60
+ /** @var SetCookie $cookie */
61
  foreach ($this as $cookie) {
 
62
  if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) {
63
  $json[] = $cookie->toArray();
64
  }
65
  }
66
 
67
+ $jsonStr = Utils::jsonEncode($json);
68
+ if (false === \file_put_contents($filename, $jsonStr, \LOCK_EX)) {
69
  throw new \RuntimeException("Unable to save file {$filename}");
70
  }
71
  }
76
  * Old cookies are kept unless overwritten by newly loaded ones.
77
  *
78
  * @param string $filename Cookie file to load.
79
+ *
80
  * @throws \RuntimeException if the file cannot be loaded.
81
  */
82
+ public function load(string $filename): void
83
  {
84
+ $json = \file_get_contents($filename);
85
  if (false === $json) {
86
  throw new \RuntimeException("Unable to load file {$filename}");
87
+ }
88
+ if ($json === '') {
89
  return;
90
  }
91
 
92
+ $data = Utils::jsonDecode($json, true);
93
+ if (\is_array($data)) {
94
+ foreach ($data as $cookie) {
95
  $this->setCookie(new SetCookie($cookie));
96
  }
97
+ } elseif (\is_scalar($data) && !empty($data)) {
98
  throw new \RuntimeException("Invalid cookie file: {$filename}");
99
  }
100
  }
vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Cookie;
3
 
4
  /**
@@ -6,21 +7,25 @@ namespace GuzzleHttp\Cookie;
6
  */
7
  class SessionCookieJar extends CookieJar
8
  {
9
- /** @var string session key */
 
 
10
  private $sessionKey;
11
-
12
- /** @var bool Control whether to persist session cookies or not. */
 
 
13
  private $storeSessionCookies;
14
 
15
  /**
16
  * Create a new SessionCookieJar object
17
  *
18
- * @param string $sessionKey Session key name to store the cookie
19
- * data in session
20
- * @param bool $storeSessionCookies Set to true to store session cookies
21
- * in the cookie jar.
22
  */
23
- public function __construct($sessionKey, $storeSessionCookies = false)
24
  {
25
  parent::__construct();
26
  $this->sessionKey = $sessionKey;
@@ -39,33 +44,33 @@ class SessionCookieJar extends CookieJar
39
  /**
40
  * Save cookies to the client session
41
  */
42
- public function save()
43
  {
44
  $json = [];
 
45
  foreach ($this as $cookie) {
46
- /** @var SetCookie $cookie */
47
  if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) {
48
  $json[] = $cookie->toArray();
49
  }
50
  }
51
 
52
- $_SESSION[$this->sessionKey] = json_encode($json);
53
  }
54
 
55
  /**
56
  * Load the contents of the client session into the data array
57
  */
58
- protected function load()
59
  {
60
  if (!isset($_SESSION[$this->sessionKey])) {
61
  return;
62
  }
63
- $data = json_decode($_SESSION[$this->sessionKey], true);
64
- if (is_array($data)) {
65
  foreach ($data as $cookie) {
66
  $this->setCookie(new SetCookie($cookie));
67
  }
68
- } elseif (strlen($data)) {
69
  throw new \RuntimeException("Invalid cookie data");
70
  }
71
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Cookie;
4
 
5
  /**
7
  */
8
  class SessionCookieJar extends CookieJar
9
  {
10
+ /**
11
+ * @var string session key
12
+ */
13
  private $sessionKey;
14
+
15
+ /**
16
+ * @var bool Control whether to persist session cookies or not.
17
+ */
18
  private $storeSessionCookies;
19
 
20
  /**
21
  * Create a new SessionCookieJar object
22
  *
23
+ * @param string $sessionKey Session key name to store the cookie
24
+ * data in session
25
+ * @param bool $storeSessionCookies Set to true to store session cookies
26
+ * in the cookie jar.
27
  */
28
+ public function __construct(string $sessionKey, bool $storeSessionCookies = false)
29
  {
30
  parent::__construct();
31
  $this->sessionKey = $sessionKey;
44
  /**
45
  * Save cookies to the client session
46
  */
47
+ public function save(): void
48
  {
49
  $json = [];
50
+ /** @var SetCookie $cookie */
51
  foreach ($this as $cookie) {
 
52
  if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) {
53
  $json[] = $cookie->toArray();
54
  }
55
  }
56
 
57
+ $_SESSION[$this->sessionKey] = \json_encode($json);
58
  }
59
 
60
  /**
61
  * Load the contents of the client session into the data array
62
  */
63
+ protected function load(): void
64
  {
65
  if (!isset($_SESSION[$this->sessionKey])) {
66
  return;
67
  }
68
+ $data = \json_decode($_SESSION[$this->sessionKey], true);
69
+ if (\is_array($data)) {
70
  foreach ($data as $cookie) {
71
  $this->setCookie(new SetCookie($cookie));
72
  }
73
+ } elseif (\strlen($data)) {
74
  throw new \RuntimeException("Invalid cookie data");
75
  }
76
  }
vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Cookie;
3
 
4
  /**
@@ -6,7 +7,9 @@ namespace GuzzleHttp\Cookie;
6
  */
7
  class SetCookie
8
  {
9
- /** @var array */
 
 
10
  private static $defaults = [
11
  'Name' => null,
12
  'Value' => null,
@@ -19,42 +22,42 @@ class SetCookie
19
  'HttpOnly' => false
20
  ];
21
 
22
- /** @var array Cookie data */
 
 
23
  private $data;
24
 
25
  /**
26
- * Create a new SetCookie object from a string
27
  *
28
  * @param string $cookie Set-Cookie header string
29
- *
30
- * @return self
31
  */
32
- public static function fromString($cookie)
33
  {
34
  // Create the default return array
35
  $data = self::$defaults;
36
  // Explode the cookie string using a series of semicolons
37
- $pieces = array_filter(array_map('trim', explode(';', $cookie)));
38
  // The name of the cookie (first kvp) must exist and include an equal sign.
39
- if (empty($pieces[0]) || !strpos($pieces[0], '=')) {
40
  return new self($data);
41
  }
42
 
43
  // Add the cookie pieces into the parsed data array
44
  foreach ($pieces as $part) {
45
- $cookieParts = explode('=', $part, 2);
46
- $key = trim($cookieParts[0]);
47
  $value = isset($cookieParts[1])
48
- ? trim($cookieParts[1], " \n\r\t\0\x0B")
49
  : true;
50
 
51
  // Only check for non-cookies when cookies have been found
52
- if (empty($data['Name'])) {
53
  $data['Name'] = $key;
54
  $data['Value'] = $value;
55
  } else {
56
- foreach (array_keys(self::$defaults) as $search) {
57
- if (!strcasecmp($search, $key)) {
58
  $data[$search] = $value;
59
  continue 2;
60
  }
@@ -71,13 +74,19 @@ class SetCookie
71
  */
72
  public function __construct(array $data = [])
73
  {
74
- $this->data = array_replace(self::$defaults, $data);
 
 
 
 
 
 
75
  // Extract the Expires value and turn it into a UNIX timestamp if needed
76
  if (!$this->getExpires() && $this->getMaxAge()) {
77
  // Calculate the Expires date
78
- $this->setExpires(time() + $this->getMaxAge());
79
- } elseif ($this->getExpires() && !is_numeric($this->getExpires())) {
80
- $this->setExpires($this->getExpires());
81
  }
82
  }
83
 
@@ -87,23 +96,23 @@ class SetCookie
87
  foreach ($this->data as $k => $v) {
88
  if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== false) {
89
  if ($k === 'Expires') {
90
- $str .= 'Expires=' . gmdate('D, d M Y H:i:s \G\M\T', $v) . '; ';
91
  } else {
92
  $str .= ($v === true ? $k : "{$k}={$v}") . '; ';
93
  }
94
  }
95
  }
96
 
97
- return rtrim($str, '; ');
98
  }
99
 
100
- public function toArray()
101
  {
102
  return $this->data;
103
  }
104
 
105
  /**
106
- * Get the cookie name
107
  *
108
  * @return string
109
  */
@@ -113,19 +122,19 @@ class SetCookie
113
  }
114
 
115
  /**
116
- * Set the cookie name
117
  *
118
  * @param string $name Cookie name
119
  */
120
- public function setName($name)
121
  {
122
  $this->data['Name'] = $name;
123
  }
124
 
125
  /**
126
- * Get the cookie value
127
  *
128
- * @return string
129
  */
130
  public function getValue()
131
  {
@@ -133,17 +142,17 @@ class SetCookie
133
  }
134
 
135
  /**
136
- * Set the cookie value
137
  *
138
  * @param string $value Cookie value
139
  */
140
- public function setValue($value)
141
  {
142
  $this->data['Value'] = $value;
143
  }
144
 
145
  /**
146
- * Get the domain
147
  *
148
  * @return string|null
149
  */
@@ -153,17 +162,17 @@ class SetCookie
153
  }
154
 
155
  /**
156
- * Set the domain of the cookie
157
  *
158
  * @param string $domain
159
  */
160
- public function setDomain($domain)
161
  {
162
  $this->data['Domain'] = $domain;
163
  }
164
 
165
  /**
166
- * Get the path
167
  *
168
  * @return string
169
  */
@@ -173,17 +182,17 @@ class SetCookie
173
  }
174
 
175
  /**
176
- * Set the path of the cookie
177
  *
178
  * @param string $path Path of the cookie
179
  */
180
- public function setPath($path)
181
  {
182
  $this->data['Path'] = $path;
183
  }
184
 
185
  /**
186
- * Maximum lifetime of the cookie in seconds
187
  *
188
  * @return int|null
189
  */
@@ -193,19 +202,19 @@ class SetCookie
193
  }
194
 
195
  /**
196
- * Set the max-age of the cookie
197
  *
198
  * @param int $maxAge Max age of the cookie in seconds
199
  */
200
- public function setMaxAge($maxAge)
201
  {
202
  $this->data['Max-Age'] = $maxAge;
203
  }
204
 
205
  /**
206
- * The UNIX timestamp when the cookie Expires
207
  *
208
- * @return mixed
209
  */
210
  public function getExpires()
211
  {
@@ -213,19 +222,19 @@ class SetCookie
213
  }
214
 
215
  /**
216
- * Set the unix timestamp for which the cookie will expire
217
  *
218
- * @param int $timestamp Unix timestamp
219
  */
220
- public function setExpires($timestamp)
221
  {
222
- $this->data['Expires'] = is_numeric($timestamp)
223
  ? (int) $timestamp
224
- : strtotime($timestamp);
225
  }
226
 
227
  /**
228
- * Get whether or not this is a secure cookie
229
  *
230
  * @return bool|null
231
  */
@@ -235,17 +244,17 @@ class SetCookie
235
  }
236
 
237
  /**
238
- * Set whether or not the cookie is secure
239
  *
240
  * @param bool $secure Set to true or false if secure
241
  */
242
- public function setSecure($secure)
243
  {
244
  $this->data['Secure'] = $secure;
245
  }
246
 
247
  /**
248
- * Get whether or not this is a session cookie
249
  *
250
  * @return bool|null
251
  */
@@ -255,17 +264,17 @@ class SetCookie
255
  }
256
 
257
  /**
258
- * Set whether or not this is a session cookie
259
  *
260
  * @param bool $discard Set to true or false if this is a session cookie
261
  */
262
- public function setDiscard($discard)
263
  {
264
  $this->data['Discard'] = $discard;
265
  }
266
 
267
  /**
268
- * Get whether or not this is an HTTP only cookie
269
  *
270
  * @return bool
271
  */
@@ -275,11 +284,11 @@ class SetCookie
275
  }
276
 
277
  /**
278
- * Set whether or not this is an HTTP only cookie
279
  *
280
  * @param bool $httpOnly Set to true or false if this is HTTP only
281
  */
282
- public function setHttpOnly($httpOnly)
283
  {
284
  $this->data['HttpOnly'] = $httpOnly;
285
  }
@@ -298,10 +307,8 @@ class SetCookie
298
  * path is a %x2F ("/") character.
299
  *
300
  * @param string $requestPath Path to check against
301
- *
302
- * @return bool
303
  */
304
- public function matchesPath($requestPath)
305
  {
306
  $cookiePath = $this->getPath();
307
 
@@ -311,71 +318,71 @@ class SetCookie
311
  }
312
 
313
  // Ensure that the cookie-path is a prefix of the request path.
314
- if (0 !== strpos($requestPath, $cookiePath)) {
315
  return false;
316
  }
317
 
318
  // Match if the last character of the cookie-path is "/"
319
- if (substr($cookiePath, -1, 1) === '/') {
320
  return true;
321
  }
322
 
323
  // Match if the first character not included in cookie path is "/"
324
- return substr($requestPath, strlen($cookiePath), 1) === '/';
325
  }
326
 
327
  /**
328
- * Check if the cookie matches a domain value
329
  *
330
  * @param string $domain Domain to check against
331
- *
332
- * @return bool
333
  */
334
- public function matchesDomain($domain)
335
  {
 
 
 
 
 
336
  // Remove the leading '.' as per spec in RFC 6265.
337
- // http://tools.ietf.org/html/rfc6265#section-5.2.3
338
- $cookieDomain = ltrim($this->getDomain(), '.');
339
 
340
  // Domain not set or exact match.
341
- if (!$cookieDomain || !strcasecmp($domain, $cookieDomain)) {
342
  return true;
343
  }
344
 
345
  // Matching the subdomain according to RFC 6265.
346
- // http://tools.ietf.org/html/rfc6265#section-5.1.3
347
- if (filter_var($domain, FILTER_VALIDATE_IP)) {
348
  return false;
349
  }
350
 
351
- return (bool) preg_match('/\.' . preg_quote($cookieDomain, '/') . '$/', $domain);
352
  }
353
 
354
  /**
355
- * Check if the cookie is expired
356
- *
357
- * @return bool
358
  */
359
- public function isExpired()
360
  {
361
- return $this->getExpires() !== null && time() > $this->getExpires();
362
  }
363
 
364
  /**
365
- * Check if the cookie is valid according to RFC 6265
366
  *
367
  * @return bool|string Returns true if valid or an error message if invalid
368
  */
369
  public function validate()
370
  {
371
- // Names must not be empty, but can be 0
372
  $name = $this->getName();
373
- if (empty($name) && !is_numeric($name)) {
374
  return 'The cookie name must not be empty';
375
  }
376
 
377
  // Check if any of the invalid characters are present in the cookie name
378
- if (preg_match(
379
  '/[\x00-\x20\x22\x28-\x29\x2c\x2f\x3a-\x40\x5c\x7b\x7d\x7f]/',
380
  $name
381
  )) {
@@ -384,17 +391,17 @@ class SetCookie
384
  . 'following characters: ()<>@,;:\"/?={}';
385
  }
386
 
387
- // Value must not be empty, but can be 0
 
388
  $value = $this->getValue();
389
- if (empty($value) && !is_numeric($value)) {
390
  return 'The cookie value must not be empty';
391
  }
392
 
393
- // Domains must not be empty, but can be 0
394
- // A "0" is not a valid internet domain, but may be used as server name
395
- // in a private network.
396
  $domain = $this->getDomain();
397
- if (empty($domain) && !is_numeric($domain)) {
398
  return 'The cookie domain must not be empty';
399
  }
400
 
1
  <?php
2
+
3
  namespace GuzzleHttp\Cookie;
4
 
5
  /**
7
  */
8
  class SetCookie
9
  {
10
+ /**
11
+ * @var array
12
+ */
13
  private static $defaults = [
14
  'Name' => null,
15
  'Value' => null,
22
  'HttpOnly' => false
23
  ];
24
 
25
+ /**
26
+ * @var array Cookie data
27
+ */
28
  private $data;
29
 
30
  /**
31
+ * Create a new SetCookie object from a string.
32
  *
33
  * @param string $cookie Set-Cookie header string
 
 
34
  */
35
+ public static function fromString(string $cookie): self
36
  {
37
  // Create the default return array
38
  $data = self::$defaults;
39
  // Explode the cookie string using a series of semicolons
40
+ $pieces = \array_filter(\array_map('trim', \explode(';', $cookie)));
41
  // The name of the cookie (first kvp) must exist and include an equal sign.
42
+ if (!isset($pieces[0]) || \strpos($pieces[0], '=') === false) {
43
  return new self($data);
44
  }
45
 
46
  // Add the cookie pieces into the parsed data array
47
  foreach ($pieces as $part) {
48
+ $cookieParts = \explode('=', $part, 2);
49
+ $key = \trim($cookieParts[0]);
50
  $value = isset($cookieParts[1])
51
+ ? \trim($cookieParts[1], " \n\r\t\0\x0B")
52
  : true;
53
 
54
  // Only check for non-cookies when cookies have been found
55
+ if (!isset($data['Name'])) {
56
  $data['Name'] = $key;
57
  $data['Value'] = $value;
58
  } else {
59
+ foreach (\array_keys(self::$defaults) as $search) {
60
+ if (!\strcasecmp($search, $key)) {
61
  $data[$search] = $value;
62
  continue 2;
63
  }
74
  */
75
  public function __construct(array $data = [])
76
  {
77
+ /** @var array|null $replaced will be null in case of replace error */
78
+ $replaced = \array_replace(self::$defaults, $data);
79
+ if ($replaced === null) {
80
+ throw new \InvalidArgumentException('Unable to replace the default values for the Cookie.');
81
+ }
82
+
83
+ $this->data = $replaced;
84
  // Extract the Expires value and turn it into a UNIX timestamp if needed
85
  if (!$this->getExpires() && $this->getMaxAge()) {
86
  // Calculate the Expires date
87
+ $this->setExpires(\time() + $this->getMaxAge());
88
+ } elseif (null !== ($expires = $this->getExpires()) && !\is_numeric($expires)) {
89
+ $this->setExpires($expires);
90
  }
91
  }
92
 
96
  foreach ($this->data as $k => $v) {
97
  if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== false) {
98
  if ($k === 'Expires') {
99
+ $str .= 'Expires=' . \gmdate('D, d M Y H:i:s \G\M\T', $v) . '; ';
100
  } else {
101
  $str .= ($v === true ? $k : "{$k}={$v}") . '; ';
102
  }
103
  }
104
  }
105
 
106
+ return \rtrim($str, '; ');
107
  }
108
 
109
+ public function toArray(): array
110
  {
111
  return $this->data;
112
  }
113
 
114
  /**
115
+ * Get the cookie name.
116
  *
117
  * @return string
118
  */
122
  }
123
 
124
  /**
125
+ * Set the cookie name.
126
  *
127
  * @param string $name Cookie name
128
  */
129
+ public function setName($name): void
130
  {
131
  $this->data['Name'] = $name;
132
  }
133
 
134
  /**
135
+ * Get the cookie value.
136
  *
137
+ * @return string|null
138
  */
139
  public function getValue()
140
  {
142
  }
143
 
144
  /**
145
+ * Set the cookie value.
146
  *
147
  * @param string $value Cookie value
148
  */
149
+ public function setValue($value): void
150
  {
151
  $this->data['Value'] = $value;
152
  }
153
 
154
  /**
155
+ * Get the domain.
156
  *
157
  * @return string|null
158
  */
162
  }
163
 
164
  /**
165
+ * Set the domain of the cookie.
166
  *
167
  * @param string $domain
168
  */
169
+ public function setDomain($domain): void
170
  {
171
  $this->data['Domain'] = $domain;
172
  }
173
 
174
  /**
175
+ * Get the path.
176
  *
177
  * @return string
178
  */
182
  }
183
 
184
  /**
185
+ * Set the path of the cookie.
186
  *
187
  * @param string $path Path of the cookie
188
  */
189
+ public function setPath($path): void
190
  {
191
  $this->data['Path'] = $path;
192
  }
193
 
194
  /**
195
+ * Maximum lifetime of the cookie in seconds.
196
  *
197
  * @return int|null
198
  */
202
  }
203
 
204
  /**
205
+ * Set the max-age of the cookie.
206
  *
207
  * @param int $maxAge Max age of the cookie in seconds
208
  */
209
+ public function setMaxAge($maxAge): void
210
  {
211
  $this->data['Max-Age'] = $maxAge;
212
  }
213
 
214
  /**
215
+ * The UNIX timestamp when the cookie Expires.
216
  *
217
+ * @return string|int|null
218
  */
219
  public function getExpires()
220
  {
222
  }
223
 
224
  /**
225
+ * Set the unix timestamp for which the cookie will expire.
226
  *
227
+ * @param int|string $timestamp Unix timestamp or any English textual datetime description.
228
  */
229
+ public function setExpires($timestamp): void
230
  {
231
+ $this->data['Expires'] = \is_numeric($timestamp)
232
  ? (int) $timestamp
233
+ : \strtotime($timestamp);
234
  }
235
 
236
  /**
237
+ * Get whether or not this is a secure cookie.
238
  *
239
  * @return bool|null
240
  */
244
  }
245
 
246
  /**
247
+ * Set whether or not the cookie is secure.
248
  *
249
  * @param bool $secure Set to true or false if secure
250
  */
251
+ public function setSecure($secure): void
252
  {
253
  $this->data['Secure'] = $secure;
254
  }
255
 
256
  /**
257
+ * Get whether or not this is a session cookie.
258
  *
259
  * @return bool|null
260
  */
264
  }
265
 
266
  /**
267
+ * Set whether or not this is a session cookie.
268
  *
269
  * @param bool $discard Set to true or false if this is a session cookie
270
  */
271
+ public function setDiscard($discard): void
272
  {
273
  $this->data['Discard'] = $discard;
274
  }
275
 
276
  /**
277
+ * Get whether or not this is an HTTP only cookie.
278
  *
279
  * @return bool
280
  */
284
  }
285
 
286
  /**
287
+ * Set whether or not this is an HTTP only cookie.
288
  *
289
  * @param bool $httpOnly Set to true or false if this is HTTP only
290
  */
291
+ public function setHttpOnly($httpOnly): void
292
  {
293
  $this->data['HttpOnly'] = $httpOnly;
294
  }
307
  * path is a %x2F ("/") character.
308
  *
309
  * @param string $requestPath Path to check against
 
 
310
  */
311
+ public function matchesPath(string $requestPath): bool
312
  {
313
  $cookiePath = $this->getPath();
314
 
318
  }
319
 
320
  // Ensure that the cookie-path is a prefix of the request path.
321
+ if (0 !== \strpos($requestPath, $cookiePath)) {
322
  return false;
323
  }
324
 
325
  // Match if the last character of the cookie-path is "/"
326
+ if (\substr($cookiePath, -1, 1) === '/') {
327
  return true;
328
  }
329
 
330
  // Match if the first character not included in cookie path is "/"
331
+ return \substr($requestPath, \strlen($cookiePath), 1) === '/';
332
  }
333
 
334
  /**
335
+ * Check if the cookie matches a domain value.
336
  *
337
  * @param string $domain Domain to check against
 
 
338
  */
339
+ public function matchesDomain(string $domain): bool
340
  {
341
+ $cookieDomain = $this->getDomain();
342
+ if (null === $cookieDomain) {
343
+ return true;
344
+ }
345
+
346
  // Remove the leading '.' as per spec in RFC 6265.
347
+ // https://tools.ietf.org/html/rfc6265#section-5.2.3
348
+ $cookieDomain = \ltrim($cookieDomain, '.');
349
 
350
  // Domain not set or exact match.
351
+ if (!$cookieDomain || !\strcasecmp($domain, $cookieDomain)) {
352
  return true;
353
  }
354
 
355
  // Matching the subdomain according to RFC 6265.
356
+ // https://tools.ietf.org/html/rfc6265#section-5.1.3
357
+ if (\filter_var($domain, \FILTER_VALIDATE_IP)) {
358
  return false;
359
  }
360
 
361
+ return (bool) \preg_match('/\.' . \preg_quote($cookieDomain, '/') . '$/', $domain);
362
  }
363
 
364
  /**
365
+ * Check if the cookie is expired.
 
 
366
  */
367
+ public function isExpired(): bool
368
  {
369
+ return $this->getExpires() !== null && \time() > $this->getExpires();
370
  }
371
 
372
  /**
373
+ * Check if the cookie is valid according to RFC 6265.
374
  *
375
  * @return bool|string Returns true if valid or an error message if invalid
376
  */
377
  public function validate()
378
  {
 
379
  $name = $this->getName();
380
+ if ($name === '') {
381
  return 'The cookie name must not be empty';
382
  }
383
 
384
  // Check if any of the invalid characters are present in the cookie name
385
+ if (\preg_match(
386
  '/[\x00-\x20\x22\x28-\x29\x2c\x2f\x3a-\x40\x5c\x7b\x7d\x7f]/',
387
  $name
388
  )) {
391
  . 'following characters: ()<>@,;:\"/?={}';
392
  }
393
 
394
+ // Value must not be null. 0 and empty string are valid. Empty strings
395
+ // are technically against RFC 6265, but known to happen in the wild.
396
  $value = $this->getValue();
397
+ if ($value === null) {
398
  return 'The cookie value must not be empty';
399
  }
400
 
401
+ // Domains must not be empty, but can be 0. "0" is not a valid internet
402
+ // domain, but may be used as server name in a private network.
 
403
  $domain = $this->getDomain();
404
+ if ($domain === null || $domain === '') {
405
  return 'The cookie domain must not be empty';
406
  }
407
 
vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Exception;
3
 
4
  use Psr\Http\Message\RequestInterface;
@@ -10,18 +11,29 @@ use Psr\Http\Message\ResponseInterface;
10
  class BadResponseException extends RequestException
11
  {
12
  public function __construct(
13
- $message,
14
  RequestInterface $request,
15
- ResponseInterface $response = null,
16
- \Exception $previous = null,
17
  array $handlerContext = []
18
  ) {
19
- if (null === $response) {
20
- @trigger_error(
21
- 'Instantiating the ' . __CLASS__ . ' class without a Response is deprecated since version 6.3 and will be removed in 7.0.',
22
- E_USER_DEPRECATED
23
- );
24
- }
25
  parent::__construct($message, $request, $response, $previous, $handlerContext);
26
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Exception;
4
 
5
  use Psr\Http\Message\RequestInterface;
11
  class BadResponseException extends RequestException
12
  {
13
  public function __construct(
14
+ string $message,
15
  RequestInterface $request,
16
+ ResponseInterface $response,
17
+ \Throwable $previous = null,
18
  array $handlerContext = []
19
  ) {
 
 
 
 
 
 
20
  parent::__construct($message, $request, $response, $previous, $handlerContext);
21
  }
22
+
23
+ /**
24
+ * Current exception and the ones that extend it will always have a response.
25
+ */
26
+ public function hasResponse(): bool
27
+ {
28
+ return true;
29
+ }
30
+
31
+ /**
32
+ * This function narrows the return type from the parent class and does not allow it to be nullable.
33
+ */
34
+ public function getResponse(): ResponseInterface
35
+ {
36
+ /** @var ResponseInterface */
37
+ return parent::getResponse();
38
+ }
39
  }
vendor/guzzlehttp/guzzle/src/Exception/ClientException.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Exception;
3
 
4
  /**
1
  <?php
2
+
3
  namespace GuzzleHttp\Exception;
4
 
5
  /**
vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php CHANGED
@@ -1,6 +1,8 @@
1
  <?php
 
2
  namespace GuzzleHttp\Exception;
3
 
 
4
  use Psr\Http\Message\RequestInterface;
5
 
6
  /**
@@ -8,30 +10,47 @@ use Psr\Http\Message\RequestInterface;
8
  *
9
  * Note that no response is present for a ConnectException
10
  */
11
- class ConnectException extends RequestException
12
  {
 
 
 
 
 
 
 
 
 
 
13
  public function __construct(
14
- $message,
15
  RequestInterface $request,
16
- \Exception $previous = null,
17
  array $handlerContext = []
18
  ) {
19
- parent::__construct($message, $request, null, $previous, $handlerContext);
 
 
20
  }
21
 
22
  /**
23
- * @return null
24
  */
25
- public function getResponse()
26
  {
27
- return null;
28
  }
29
 
30
  /**
31
- * @return bool
 
 
 
 
 
32
  */
33
- public function hasResponse()
34
  {
35
- return false;
36
  }
37
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Exception;
4
 
5
+ use Psr\Http\Client\NetworkExceptionInterface;
6
  use Psr\Http\Message\RequestInterface;
7
 
8
  /**
10
  *
11
  * Note that no response is present for a ConnectException
12
  */
13
+ class ConnectException extends TransferException implements NetworkExceptionInterface
14
  {
15
+ /**
16
+ * @var RequestInterface
17
+ */
18
+ private $request;
19
+
20
+ /**
21
+ * @var array
22
+ */
23
+ private $handlerContext;
24
+
25
  public function __construct(
26
+ string $message,
27
  RequestInterface $request,
28
+ \Throwable $previous = null,
29
  array $handlerContext = []
30
  ) {
31
+ parent::__construct($message, 0, $previous);
32
+ $this->request = $request;
33
+ $this->handlerContext = $handlerContext;
34
  }
35
 
36
  /**
37
+ * Get the request that caused the exception
38
  */
39
+ public function getRequest(): RequestInterface
40
  {
41
+ return $this->request;
42
  }
43
 
44
  /**
45
+ * Get contextual information about the error from the underlying handler.
46
+ *
47
+ * The contents of this array will vary depending on which handler you are
48
+ * using. It may also be just an empty array. Relying on this data will
49
+ * couple you to a specific handler, but can give more debug information
50
+ * when needed.
51
  */
52
+ public function getHandlerContext(): array
53
  {
54
+ return $this->handlerContext;
55
  }
56
  }
vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php CHANGED
@@ -1,23 +1,9 @@
1
  <?php
 
2
  namespace GuzzleHttp\Exception;
3
 
4
- use Throwable;
5
 
6
- if (interface_exists(Throwable::class)) {
7
- interface GuzzleException extends Throwable
8
- {
9
- }
10
- } else {
11
- /**
12
- * @method string getMessage()
13
- * @method \Throwable|null getPrevious()
14
- * @method mixed getCode()
15
- * @method string getFile()
16
- * @method int getLine()
17
- * @method array getTrace()
18
- * @method string getTraceAsString()
19
- */
20
- interface GuzzleException
21
- {
22
- }
23
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Exception;
4
 
5
+ use Psr\Http\Client\ClientExceptionInterface;
6
 
7
+ interface GuzzleException extends ClientExceptionInterface
8
+ {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  }
vendor/guzzlehttp/guzzle/src/Exception/RequestException.php CHANGED
@@ -1,7 +1,10 @@
1
  <?php
 
2
  namespace GuzzleHttp\Exception;
3
 
4
- use GuzzleHttp\Promise\PromiseInterface;
 
 
5
  use Psr\Http\Message\RequestInterface;
6
  use Psr\Http\Message\ResponseInterface;
7
  use Psr\Http\Message\UriInterface;
@@ -9,28 +12,32 @@ use Psr\Http\Message\UriInterface;
9
  /**
10
  * HTTP Request exception
11
  */
12
- class RequestException extends TransferException
13
  {
14
- /** @var RequestInterface */
 
 
15
  private $request;
16
 
17
- /** @var ResponseInterface|null */
 
 
18
  private $response;
19
 
20
- /** @var array */
 
 
21
  private $handlerContext;
22
 
23
  public function __construct(
24
- $message,
25
  RequestInterface $request,
26
  ResponseInterface $response = null,
27
- \Exception $previous = null,
28
  array $handlerContext = []
29
  ) {
30
  // Set the code of the exception if the response is set and not future.
31
- $code = $response && !($response instanceof PromiseInterface)
32
- ? $response->getStatusCode()
33
- : 0;
34
  parent::__construct($message, $code, $previous);
35
  $this->request = $request;
36
  $this->response = $response;
@@ -39,46 +46,39 @@ class RequestException extends TransferException
39
 
40
  /**
41
  * Wrap non-RequestExceptions with a RequestException
42
- *
43
- * @param RequestInterface $request
44
- * @param \Exception $e
45
- *
46
- * @return RequestException
47
  */
48
- public static function wrapException(RequestInterface $request, \Exception $e)
49
  {
50
- return $e instanceof RequestException
51
- ? $e
52
- : new RequestException($e->getMessage(), $request, null, $e);
53
  }
54
 
55
  /**
56
  * Factory method to create a new exception with a normalized error message
57
  *
58
- * @param RequestInterface $request Request
59
- * @param ResponseInterface $response Response received
60
- * @param \Exception $previous Previous exception
61
- * @param array $ctx Optional handler context.
62
- *
63
- * @return self
64
  */
65
  public static function create(
66
  RequestInterface $request,
67
  ResponseInterface $response = null,
68
- \Exception $previous = null,
69
- array $ctx = []
70
- ) {
 
71
  if (!$response) {
72
  return new self(
73
  'Error completing request',
74
  $request,
75
  null,
76
  $previous,
77
- $ctx
78
  );
79
  }
80
 
81
- $level = (int) floor($response->getStatusCode() / 100);
82
  if ($level === 4) {
83
  $label = 'Client error';
84
  $className = ClientException::class;
@@ -95,7 +95,7 @@ class RequestException extends TransferException
95
 
96
  // Client Error: `GET /` resulted in a `404 Not Found` response:
97
  // <html> ... (truncated)
98
- $message = sprintf(
99
  '%s: `%s %s` resulted in a `%s %s` response',
100
  $label,
101
  $request->getMethod(),
@@ -104,42 +104,24 @@ class RequestException extends TransferException
104
  $response->getReasonPhrase()
105
  );
106
 
107
- $summary = static::getResponseBodySummary($response);
108
 
109
  if ($summary !== null) {
110
  $message .= ":\n{$summary}\n";
111
  }
112
 
113
- return new $className($message, $request, $response, $previous, $ctx);
114
- }
115
-
116
- /**
117
- * Get a short summary of the response
118
- *
119
- * Will return `null` if the response is not printable.
120
- *
121
- * @param ResponseInterface $response
122
- *
123
- * @return string|null
124
- */
125
- public static function getResponseBodySummary(ResponseInterface $response)
126
- {
127
- return \GuzzleHttp\Psr7\get_message_body_summary($response);
128
  }
129
 
130
  /**
131
  * Obfuscates URI if there is a username and a password present
132
- *
133
- * @param UriInterface $uri
134
- *
135
- * @return UriInterface
136
  */
137
- private static function obfuscateUri(UriInterface $uri)
138
  {
139
  $userInfo = $uri->getUserInfo();
140
 
141
- if (false !== ($pos = strpos($userInfo, ':'))) {
142
- return $uri->withUserInfo(substr($userInfo, 0, $pos), '***');
143
  }
144
 
145
  return $uri;
@@ -147,30 +129,24 @@ class RequestException extends TransferException
147
 
148
  /**
149
  * Get the request that caused the exception
150
- *
151
- * @return RequestInterface
152
  */
153
- public function getRequest()
154
  {
155
  return $this->request;
156
  }
157
 
158
  /**
159
  * Get the associated response
160
- *
161
- * @return ResponseInterface|null
162
  */
163
- public function getResponse()
164
  {
165
  return $this->response;
166
  }
167
 
168
  /**
169
  * Check if a response was received
170
- *
171
- * @return bool
172
  */
173
- public function hasResponse()
174
  {
175
  return $this->response !== null;
176
  }
@@ -182,10 +158,8 @@ class RequestException extends TransferException
182
  * using. It may also be just an empty array. Relying on this data will
183
  * couple you to a specific handler, but can give more debug information
184
  * when needed.
185
- *
186
- * @return array
187
  */
188
- public function getHandlerContext()
189
  {
190
  return $this->handlerContext;
191
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Exception;
4
 
5
+ use GuzzleHttp\BodySummarizer;
6
+ use GuzzleHttp\BodySummarizerInterface;
7
+ use Psr\Http\Client\RequestExceptionInterface;
8
  use Psr\Http\Message\RequestInterface;
9
  use Psr\Http\Message\ResponseInterface;
10
  use Psr\Http\Message\UriInterface;
12
  /**
13
  * HTTP Request exception
14
  */
15
+ class RequestException extends TransferException implements RequestExceptionInterface
16
  {
17
+ /**
18
+ * @var RequestInterface
19
+ */
20
  private $request;
21
 
22
+ /**
23
+ * @var ResponseInterface|null
24
+ */
25
  private $response;
26
 
27
+ /**
28
+ * @var array
29
+ */
30
  private $handlerContext;
31
 
32
  public function __construct(
33
+ string $message,
34
  RequestInterface $request,
35
  ResponseInterface $response = null,
36
+ \Throwable $previous = null,
37
  array $handlerContext = []
38
  ) {
39
  // Set the code of the exception if the response is set and not future.
40
+ $code = $response ? $response->getStatusCode() : 0;
 
 
41
  parent::__construct($message, $code, $previous);
42
  $this->request = $request;
43
  $this->response = $response;
46
 
47
  /**
48
  * Wrap non-RequestExceptions with a RequestException
 
 
 
 
 
49
  */
50
+ public static function wrapException(RequestInterface $request, \Throwable $e): RequestException
51
  {
52
+ return $e instanceof RequestException ? $e : new RequestException($e->getMessage(), $request, null, $e);
 
 
53
  }
54
 
55
  /**
56
  * Factory method to create a new exception with a normalized error message
57
  *
58
+ * @param RequestInterface $request Request sent
59
+ * @param ResponseInterface $response Response received
60
+ * @param \Throwable|null $previous Previous exception
61
+ * @param array $handlerContext Optional handler context
62
+ * @param BodySummarizerInterface|null $bodySummarizer Optional body summarizer
 
63
  */
64
  public static function create(
65
  RequestInterface $request,
66
  ResponseInterface $response = null,
67
+ \Throwable $previous = null,
68
+ array $handlerContext = [],
69
+ BodySummarizerInterface $bodySummarizer = null
70
+ ): self {
71
  if (!$response) {
72
  return new self(
73
  'Error completing request',
74
  $request,
75
  null,
76
  $previous,
77
+ $handlerContext
78
  );
79
  }
80
 
81
+ $level = (int) \floor($response->getStatusCode() / 100);
82
  if ($level === 4) {
83
  $label = 'Client error';
84
  $className = ClientException::class;
95
 
96
  // Client Error: `GET /` resulted in a `404 Not Found` response:
97
  // <html> ... (truncated)
98
+ $message = \sprintf(
99
  '%s: `%s %s` resulted in a `%s %s` response',
100
  $label,
101
  $request->getMethod(),
104
  $response->getReasonPhrase()
105
  );
106
 
107
+ $summary = ($bodySummarizer ?? new BodySummarizer())->summarize($response);
108
 
109
  if ($summary !== null) {
110
  $message .= ":\n{$summary}\n";
111
  }
112
 
113
+ return new $className($message, $request, $response, $previous, $handlerContext);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  }
115
 
116
  /**
117
  * Obfuscates URI if there is a username and a password present
 
 
 
 
118
  */
119
+ private static function obfuscateUri(UriInterface $uri): UriInterface
120
  {
121
  $userInfo = $uri->getUserInfo();
122
 
123
+ if (false !== ($pos = \strpos($userInfo, ':'))) {
124
+ return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***');
125
  }
126
 
127
  return $uri;
129
 
130
  /**
131
  * Get the request that caused the exception
 
 
132
  */
133
+ public function getRequest(): RequestInterface
134
  {
135
  return $this->request;
136
  }
137
 
138
  /**
139
  * Get the associated response
 
 
140
  */
141
+ public function getResponse(): ?ResponseInterface
142
  {
143
  return $this->response;
144
  }
145
 
146
  /**
147
  * Check if a response was received
 
 
148
  */
149
+ public function hasResponse(): bool
150
  {
151
  return $this->response !== null;
152
  }
158
  * using. It may also be just an empty array. Relying on this data will
159
  * couple you to a specific handler, but can give more debug information
160
  * when needed.
 
 
161
  */
162
+ public function getHandlerContext(): array
163
  {
164
  return $this->handlerContext;
165
  }
vendor/guzzlehttp/guzzle/src/Exception/SeekException.php DELETED
@@ -1,27 +0,0 @@
1
- <?php
2
- namespace GuzzleHttp\Exception;
3
-
4
- use Psr\Http\Message\StreamInterface;
5
-
6
- /**
7
- * Exception thrown when a seek fails on a stream.
8
- */
9
- class SeekException extends \RuntimeException implements GuzzleException
10
- {
11
- private $stream;
12
-
13
- public function __construct(StreamInterface $stream, $pos = 0, $msg = '')
14
- {
15
- $this->stream = $stream;
16
- $msg = $msg ?: 'Could not seek the stream to position ' . $pos;
17
- parent::__construct($msg);
18
- }
19
-
20
- /**
21
- * @return StreamInterface
22
- */
23
- public function getStream()
24
- {
25
- return $this->stream;
26
- }
27
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/guzzlehttp/guzzle/src/Exception/ServerException.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Exception;
3
 
4
  /**
1
  <?php
2
+
3
  namespace GuzzleHttp\Exception;
4
 
5
  /**
vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Exception;
3
 
4
  class TooManyRedirectsException extends RequestException
1
  <?php
2
+
3
  namespace GuzzleHttp\Exception;
4
 
5
  class TooManyRedirectsException extends RequestException
vendor/guzzlehttp/guzzle/src/Exception/TransferException.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Exception;
3
 
4
  class TransferException extends \RuntimeException implements GuzzleException
1
  <?php
2
+
3
  namespace GuzzleHttp\Exception;
4
 
5
  class TransferException extends \RuntimeException implements GuzzleException
vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php CHANGED
@@ -1,37 +1,50 @@
1
  <?php
 
2
  namespace GuzzleHttp\Handler;
3
 
4
  use GuzzleHttp\Exception\ConnectException;
5
  use GuzzleHttp\Exception\RequestException;
 
6
  use GuzzleHttp\Promise\FulfilledPromise;
7
- use GuzzleHttp\Psr7;
8
  use GuzzleHttp\Psr7\LazyOpenStream;
9
  use GuzzleHttp\TransferStats;
 
10
  use Psr\Http\Message\RequestInterface;
11
 
12
  /**
13
  * Creates curl resources from a request
 
 
14
  */
15
  class CurlFactory implements CurlFactoryInterface
16
  {
17
- const CURL_VERSION_STR = 'curl_version';
18
- const LOW_CURL_VERSION_NUMBER = '7.21.2';
 
 
 
 
19
 
20
- /** @var array */
 
 
21
  private $handles = [];
22
 
23
- /** @var int Total number of idle handles to keep in cache */
 
 
24
  private $maxHandles;
25
 
26
  /**
27
  * @param int $maxHandles Maximum number of idle handles.
28
  */
29
- public function __construct($maxHandles)
30
  {
31
  $this->maxHandles = $maxHandles;
32
  }
33
 
34
- public function create(RequestInterface $request, array $options)
35
  {
36
  if (isset($options['curl']['body_as_string'])) {
37
  $options['_body_as_string'] = $options['curl']['body_as_string'];
@@ -49,35 +62,33 @@ class CurlFactory implements CurlFactoryInterface
49
 
50
  // Add handler options from the request configuration options
51
  if (isset($options['curl'])) {
52
- $conf = array_replace($conf, $options['curl']);
53
  }
54
 
55
- $conf[CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy);
56
- $easy->handle = $this->handles
57
- ? array_pop($this->handles)
58
- : curl_init();
59
  curl_setopt_array($easy->handle, $conf);
60
 
61
  return $easy;
62
  }
63
 
64
- public function release(EasyHandle $easy)
65
  {
66
  $resource = $easy->handle;
67
  unset($easy->handle);
68
 
69
- if (count($this->handles) >= $this->maxHandles) {
70
- curl_close($resource);
71
  } else {
72
  // Remove all callback functions as they can hold onto references
73
  // and are not cleaned up by curl_reset. Using curl_setopt_array
74
  // does not work for some reason, so removing each one
75
  // individually.
76
- curl_setopt($resource, CURLOPT_HEADERFUNCTION, null);
77
- curl_setopt($resource, CURLOPT_READFUNCTION, null);
78
- curl_setopt($resource, CURLOPT_WRITEFUNCTION, null);
79
- curl_setopt($resource, CURLOPT_PROGRESSFUNCTION, null);
80
- curl_reset($resource);
81
  $this->handles[] = $resource;
82
  }
83
  }
@@ -86,17 +97,11 @@ class CurlFactory implements CurlFactoryInterface
86
  * Completes a cURL transaction, either returning a response promise or a
87
  * rejected promise.
88
  *
89
- * @param callable $handler
90
- * @param EasyHandle $easy
91
- * @param CurlFactoryInterface $factory Dictates how the handle is released
92
- *
93
- * @return \GuzzleHttp\Promise\PromiseInterface
94
  */
95
- public static function finish(
96
- callable $handler,
97
- EasyHandle $easy,
98
- CurlFactoryInterface $factory
99
- ) {
100
  if (isset($easy->options['on_stats'])) {
101
  self::invokeStats($easy);
102
  }
@@ -117,10 +122,10 @@ class CurlFactory implements CurlFactoryInterface
117
  return new FulfilledPromise($easy->response);
118
  }
119
 
120
- private static function invokeStats(EasyHandle $easy)
121
  {
122
- $curlStats = curl_getinfo($easy->handle);
123
- $curlStats['appconnect_time'] = curl_getinfo($easy->handle, CURLINFO_APPCONNECT_TIME);
124
  $stats = new TransferStats(
125
  $easy->request,
126
  $easy->response,
@@ -128,47 +133,57 @@ class CurlFactory implements CurlFactoryInterface
128
  $easy->errno,
129
  $curlStats
130
  );
131
- call_user_func($easy->options['on_stats'], $stats);
132
  }
133
 
134
- private static function finishError(
135
- callable $handler,
136
- EasyHandle $easy,
137
- CurlFactoryInterface $factory
138
- ) {
139
  // Get error information and release the handle to the factory.
140
  $ctx = [
141
  'errno' => $easy->errno,
142
- 'error' => curl_error($easy->handle),
143
- 'appconnect_time' => curl_getinfo($easy->handle, CURLINFO_APPCONNECT_TIME),
144
- ] + curl_getinfo($easy->handle);
145
- $ctx[self::CURL_VERSION_STR] = curl_version()['version'];
146
  $factory->release($easy);
147
 
148
  // Retry when nothing is present or when curl failed to rewind.
149
- if (empty($easy->options['_err_message'])
150
- && (!$easy->errno || $easy->errno == 65)
151
- ) {
152
  return self::retryFailedRewind($handler, $easy, $ctx);
153
  }
154
 
155
  return self::createRejection($easy, $ctx);
156
  }
157
 
158
- private static function createRejection(EasyHandle $easy, array $ctx)
159
  {
160
  static $connectionErrors = [
161
- CURLE_OPERATION_TIMEOUTED => true,
162
- CURLE_COULDNT_RESOLVE_HOST => true,
163
- CURLE_COULDNT_CONNECT => true,
164
- CURLE_SSL_CONNECT_ERROR => true,
165
- CURLE_GOT_NOTHING => true,
166
  ];
167
 
 
 
 
 
 
 
 
 
 
 
 
 
168
  // If an exception was encountered during the onHeaders event, then
169
  // return a rejected promise that wraps that exception.
170
  if ($easy->onHeadersException) {
171
- return \GuzzleHttp\Promise\rejection_for(
172
  new RequestException(
173
  'An error was encountered during the on_headers event',
174
  $easy->request,
@@ -178,21 +193,16 @@ class CurlFactory implements CurlFactoryInterface
178
  )
179
  );
180
  }
181
- if (version_compare($ctx[self::CURL_VERSION_STR], self::LOW_CURL_VERSION_NUMBER)) {
182
- $message = sprintf(
183
- 'cURL error %s: %s (%s)',
184
- $ctx['errno'],
185
- $ctx['error'],
186
- 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html'
187
- );
188
- } else {
189
- $message = sprintf(
190
- 'cURL error %s: %s (%s) for %s',
191
- $ctx['errno'],
192
- $ctx['error'],
193
- 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html',
194
- $easy->request->getUri()
195
- );
196
  }
197
 
198
  // Create a connection exception if it was a specific error code.
@@ -200,37 +210,40 @@ class CurlFactory implements CurlFactoryInterface
200
  ? new ConnectException($message, $easy->request, null, $ctx)
201
  : new RequestException($message, $easy->request, $easy->response, null, $ctx);
202
 
203
- return \GuzzleHttp\Promise\rejection_for($error);
204
  }
205
 
206
- private function getDefaultConf(EasyHandle $easy)
 
 
 
207
  {
208
  $conf = [
209
- '_headers' => $easy->request->getHeaders(),
210
- CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(),
211
- CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''),
212
- CURLOPT_RETURNTRANSFER => false,
213
- CURLOPT_HEADER => false,
214
- CURLOPT_CONNECTTIMEOUT => 150,
215
  ];
216
 
217
- if (defined('CURLOPT_PROTOCOLS')) {
218
- $conf[CURLOPT_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS;
219
  }
220
 
221
  $version = $easy->request->getProtocolVersion();
222
  if ($version == 1.1) {
223
- $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_1;
224
  } elseif ($version == 2.0) {
225
- $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_2_0;
226
  } else {
227
- $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_0;
228
  }
229
 
230
  return $conf;
231
  }
232
 
233
- private function applyMethod(EasyHandle $easy, array &$conf)
234
  {
235
  $body = $easy->request->getBody();
236
  $size = $body->getSize();
@@ -242,22 +255,22 @@ class CurlFactory implements CurlFactoryInterface
242
 
243
  $method = $easy->request->getMethod();
244
  if ($method === 'PUT' || $method === 'POST') {
245
- // See http://tools.ietf.org/html/rfc7230#section-3.3.2
246
  if (!$easy->request->hasHeader('Content-Length')) {
247
- $conf[CURLOPT_HTTPHEADER][] = 'Content-Length: 0';
248
  }
249
  } elseif ($method === 'HEAD') {
250
- $conf[CURLOPT_NOBODY] = true;
251
  unset(
252
- $conf[CURLOPT_WRITEFUNCTION],
253
- $conf[CURLOPT_READFUNCTION],
254
- $conf[CURLOPT_FILE],
255
- $conf[CURLOPT_INFILE]
256
  );
257
  }
258
  }
259
 
260
- private function applyBody(RequestInterface $request, array $options, array &$conf)
261
  {
262
  $size = $request->hasHeader('Content-Length')
263
  ? (int) $request->getHeaderLine('Content-Length')
@@ -265,40 +278,38 @@ class CurlFactory implements CurlFactoryInterface
265
 
266
  // Send the body as a string if the size is less than 1MB OR if the
267
  // [curl][body_as_string] request value is set.
268
- if (($size !== null && $size < 1000000) ||
269
- !empty($options['_body_as_string'])
270
- ) {
271
- $conf[CURLOPT_POSTFIELDS] = (string) $request->getBody();
272
  // Don't duplicate the Content-Length header
273
  $this->removeHeader('Content-Length', $conf);
274
  $this->removeHeader('Transfer-Encoding', $conf);
275
  } else {
276
- $conf[CURLOPT_UPLOAD] = true;
277
  if ($size !== null) {
278
- $conf[CURLOPT_INFILESIZE] = $size;
279
  $this->removeHeader('Content-Length', $conf);
280
  }
281
  $body = $request->getBody();
282
  if ($body->isSeekable()) {
283
  $body->rewind();
284
  }
285
- $conf[CURLOPT_READFUNCTION] = function ($ch, $fd, $length) use ($body) {
286
  return $body->read($length);
287
  };
288
  }
289
 
290
  // If the Expect header is not present, prevent curl from adding it
291
  if (!$request->hasHeader('Expect')) {
292
- $conf[CURLOPT_HTTPHEADER][] = 'Expect:';
293
  }
294
 
295
  // cURL sometimes adds a content-type by default. Prevent this.
296
  if (!$request->hasHeader('Content-Type')) {
297
- $conf[CURLOPT_HTTPHEADER][] = 'Content-Type:';
298
  }
299
  }
300
 
301
- private function applyHeaders(EasyHandle $easy, array &$conf)
302
  {
303
  foreach ($conf['_headers'] as $name => $values) {
304
  foreach ($values as $value) {
@@ -306,16 +317,16 @@ class CurlFactory implements CurlFactoryInterface
306
  if ($value === '') {
307
  // cURL requires a special format for empty headers.
308
  // See https://github.com/guzzle/guzzle/issues/1882 for more details.
309
- $conf[CURLOPT_HTTPHEADER][] = "$name;";
310
  } else {
311
- $conf[CURLOPT_HTTPHEADER][] = "$name: $value";
312
  }
313
  }
314
  }
315
 
316
  // Remove the Accept header if one was not set
317
  if (!$easy->request->hasHeader('Accept')) {
318
- $conf[CURLOPT_HTTPHEADER][] = 'Accept:';
319
  }
320
  }
321
 
@@ -325,115 +336,112 @@ class CurlFactory implements CurlFactoryInterface
325
  * @param string $name Case-insensitive header to remove
326
  * @param array $options Array of options to modify
327
  */
328
- private function removeHeader($name, array &$options)
329
  {
330
- foreach (array_keys($options['_headers']) as $key) {
331
- if (!strcasecmp($key, $name)) {
332
  unset($options['_headers'][$key]);
333
  return;
334
  }
335
  }
336
  }
337
 
338
- private function applyHandlerOptions(EasyHandle $easy, array &$conf)
339
  {
340
  $options = $easy->options;
341
  if (isset($options['verify'])) {
342
  if ($options['verify'] === false) {
343
- unset($conf[CURLOPT_CAINFO]);
344
- $conf[CURLOPT_SSL_VERIFYHOST] = 0;
345
- $conf[CURLOPT_SSL_VERIFYPEER] = false;
346
  } else {
347
- $conf[CURLOPT_SSL_VERIFYHOST] = 2;
348
- $conf[CURLOPT_SSL_VERIFYPEER] = true;
349
- if (is_string($options['verify'])) {
350
  // Throw an error if the file/folder/link path is not valid or doesn't exist.
351
- if (!file_exists($options['verify'])) {
352
- throw new \InvalidArgumentException(
353
- "SSL CA bundle not found: {$options['verify']}"
354
- );
355
  }
356
  // If it's a directory or a link to a directory use CURLOPT_CAPATH.
357
  // If not, it's probably a file, or a link to a file, so use CURLOPT_CAINFO.
358
- if (is_dir($options['verify']) ||
359
- (is_link($options['verify']) && is_dir(readlink($options['verify'])))) {
360
- $conf[CURLOPT_CAPATH] = $options['verify'];
 
 
 
 
 
 
361
  } else {
362
- $conf[CURLOPT_CAINFO] = $options['verify'];
363
  }
364
  }
365
  }
366
  }
367
 
368
- if (!empty($options['decode_content'])) {
369
  $accept = $easy->request->getHeaderLine('Accept-Encoding');
370
  if ($accept) {
371
- $conf[CURLOPT_ENCODING] = $accept;
372
  } else {
373
- $conf[CURLOPT_ENCODING] = '';
374
  // Don't let curl send the header over the wire
375
- $conf[CURLOPT_HTTPHEADER][] = 'Accept-Encoding:';
376
  }
377
  }
378
 
379
- if (isset($options['sink'])) {
380
- $sink = $options['sink'];
381
- if (!is_string($sink)) {
382
- $sink = \GuzzleHttp\Psr7\stream_for($sink);
383
- } elseif (!is_dir(dirname($sink))) {
384
- // Ensure that the directory exists before failing in curl.
385
- throw new \RuntimeException(sprintf(
386
- 'Directory %s does not exist for sink value of %s',
387
- dirname($sink),
388
- $sink
389
- ));
390
- } else {
391
- $sink = new LazyOpenStream($sink, 'w+');
392
- }
393
- $easy->sink = $sink;
394
- $conf[CURLOPT_WRITEFUNCTION] = function ($ch, $write) use ($sink) {
395
- return $sink->write($write);
396
- };
397
- } else {
398
  // Use a default temp stream if no sink was set.
399
- $conf[CURLOPT_FILE] = fopen('php://temp', 'w+');
400
- $easy->sink = Psr7\stream_for($conf[CURLOPT_FILE]);
 
 
 
 
 
 
 
 
401
  }
 
 
 
 
 
402
  $timeoutRequiresNoSignal = false;
403
  if (isset($options['timeout'])) {
404
  $timeoutRequiresNoSignal |= $options['timeout'] < 1;
405
- $conf[CURLOPT_TIMEOUT_MS] = $options['timeout'] * 1000;
406
  }
407
 
408
  // CURL default value is CURL_IPRESOLVE_WHATEVER
409
  if (isset($options['force_ip_resolve'])) {
410
  if ('v4' === $options['force_ip_resolve']) {
411
- $conf[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V4;
412
  } elseif ('v6' === $options['force_ip_resolve']) {
413
- $conf[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V6;
414
  }
415
  }
416
 
417
  if (isset($options['connect_timeout'])) {
418
  $timeoutRequiresNoSignal |= $options['connect_timeout'] < 1;
419
- $conf[CURLOPT_CONNECTTIMEOUT_MS] = $options['connect_timeout'] * 1000;
420
  }
421
 
422
- if ($timeoutRequiresNoSignal && strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
423
- $conf[CURLOPT_NOSIGNAL] = true;
424
  }
425
 
426
  if (isset($options['proxy'])) {
427
- if (!is_array($options['proxy'])) {
428
- $conf[CURLOPT_PROXY] = $options['proxy'];
429
  } else {
430
  $scheme = $easy->request->getUri()->getScheme();
431
  if (isset($options['proxy'][$scheme])) {
432
  $host = $easy->request->getUri()->getHost();
433
- if (!isset($options['proxy']['no']) ||
434
- !\GuzzleHttp\is_host_in_noproxy($host, $options['proxy']['no'])
435
- ) {
436
- $conf[CURLOPT_PROXY] = $options['proxy'][$scheme];
437
  }
438
  }
439
  }
@@ -441,58 +449,47 @@ class CurlFactory implements CurlFactoryInterface
441
 
442
  if (isset($options['cert'])) {
443
  $cert = $options['cert'];
444
- if (is_array($cert)) {
445
- $conf[CURLOPT_SSLCERTPASSWD] = $cert[1];
446
  $cert = $cert[0];
447
  }
448
- if (!file_exists($cert)) {
449
- throw new \InvalidArgumentException(
450
- "SSL certificate not found: {$cert}"
451
- );
452
  }
453
- $conf[CURLOPT_SSLCERT] = $cert;
454
  }
455
 
456
  if (isset($options['ssl_key'])) {
457
- if (is_array($options['ssl_key'])) {
458
- if (count($options['ssl_key']) === 2) {
459
- list($sslKey, $conf[CURLOPT_SSLKEYPASSWD]) = $options['ssl_key'];
460
  } else {
461
- list($sslKey) = $options['ssl_key'];
462
  }
463
  }
464
 
465
- $sslKey = isset($sslKey) ? $sslKey: $options['ssl_key'];
466
 
467
- if (!file_exists($sslKey)) {
468
- throw new \InvalidArgumentException(
469
- "SSL private key not found: {$sslKey}"
470
- );
471
  }
472
- $conf[CURLOPT_SSLKEY] = $sslKey;
473
  }
474
 
475
  if (isset($options['progress'])) {
476
  $progress = $options['progress'];
477
- if (!is_callable($progress)) {
478
- throw new \InvalidArgumentException(
479
- 'progress client option must be callable'
480
- );
481
  }
482
- $conf[CURLOPT_NOPROGRESS] = false;
483
- $conf[CURLOPT_PROGRESSFUNCTION] = function () use ($progress) {
484
- $args = func_get_args();
485
- // PHP 5.5 pushed the handle onto the start of the args
486
- if (is_resource($args[0])) {
487
- array_shift($args);
488
- }
489
- call_user_func_array($progress, $args);
490
  };
491
  }
492
 
493
  if (!empty($options['debug'])) {
494
- $conf[CURLOPT_STDERR] = \GuzzleHttp\debug_resource($options['debug']);
495
- $conf[CURLOPT_VERBOSE] = true;
496
  }
497
  }
498
 
@@ -504,12 +501,11 @@ class CurlFactory implements CurlFactoryInterface
504
  * stream, and then encountered a "necessary data rewind wasn't possible"
505
  * error, causing the request to be sent through curl_multi_info_read()
506
  * without an error status.
 
 
507
  */
508
- private static function retryFailedRewind(
509
- callable $handler,
510
- EasyHandle $easy,
511
- array $ctx
512
- ) {
513
  try {
514
  // Only rewind if the body has been read from.
515
  $body = $easy->request->getBody();
@@ -542,27 +538,32 @@ class CurlFactory implements CurlFactoryInterface
542
  return $handler($easy->request, $easy->options);
543
  }
544
 
545
- private function createHeaderFn(EasyHandle $easy)
546
  {
547
  if (isset($easy->options['on_headers'])) {
548
  $onHeaders = $easy->options['on_headers'];
549
 
550
- if (!is_callable($onHeaders)) {
551
  throw new \InvalidArgumentException('on_headers must be callable');
552
  }
553
  } else {
554
  $onHeaders = null;
555
  }
556
 
557
- return function ($ch, $h) use (
558
  $onHeaders,
559
  $easy,
560
  &$startingResponse
561
  ) {
562
- $value = trim($h);
563
  if ($value === '') {
564
  $startingResponse = true;
565
- $easy->createResponse();
 
 
 
 
 
566
  if ($onHeaders !== null) {
567
  try {
568
  $onHeaders($easy->response);
@@ -579,7 +580,7 @@ class CurlFactory implements CurlFactoryInterface
579
  } else {
580
  $easy->headers[] = $value;
581
  }
582
- return strlen($h);
583
  };
584
  }
585
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Handler;
4
 
5
  use GuzzleHttp\Exception\ConnectException;
6
  use GuzzleHttp\Exception\RequestException;
7
+ use GuzzleHttp\Promise as P;
8
  use GuzzleHttp\Promise\FulfilledPromise;
9
+ use GuzzleHttp\Promise\PromiseInterface;
10
  use GuzzleHttp\Psr7\LazyOpenStream;
11
  use GuzzleHttp\TransferStats;
12
+ use GuzzleHttp\Utils;
13
  use Psr\Http\Message\RequestInterface;
14
 
15
  /**
16
  * Creates curl resources from a request
17
+ *
18
+ * @final
19
  */
20
  class CurlFactory implements CurlFactoryInterface
21
  {
22
+ public const CURL_VERSION_STR = 'curl_version';
23
+
24
+ /**
25
+ * @deprecated
26
+ */
27
+ public const LOW_CURL_VERSION_NUMBER = '7.21.2';
28
 
29
+ /**
30
+ * @var resource[]|\CurlHandle[]
31
+ */
32
  private $handles = [];
33
 
34
+ /**
35
+ * @var int Total number of idle handles to keep in cache
36
+ */
37
  private $maxHandles;
38
 
39
  /**
40
  * @param int $maxHandles Maximum number of idle handles.
41
  */
42
+ public function __construct(int $maxHandles)
43
  {
44
  $this->maxHandles = $maxHandles;
45
  }
46
 
47
+ public function create(RequestInterface $request, array $options): EasyHandle
48
  {
49
  if (isset($options['curl']['body_as_string'])) {
50
  $options['_body_as_string'] = $options['curl']['body_as_string'];
62
 
63
  // Add handler options from the request configuration options
64
  if (isset($options['curl'])) {
65
+ $conf = \array_replace($conf, $options['curl']);
66
  }
67
 
68
+ $conf[\CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy);
69
+ $easy->handle = $this->handles ? \array_pop($this->handles) : \curl_init();
 
 
70
  curl_setopt_array($easy->handle, $conf);
71
 
72
  return $easy;
73
  }
74
 
75
+ public function release(EasyHandle $easy): void
76
  {
77
  $resource = $easy->handle;
78
  unset($easy->handle);
79
 
80
+ if (\count($this->handles) >= $this->maxHandles) {
81
+ \curl_close($resource);
82
  } else {
83
  // Remove all callback functions as they can hold onto references
84
  // and are not cleaned up by curl_reset. Using curl_setopt_array
85
  // does not work for some reason, so removing each one
86
  // individually.
87
+ \curl_setopt($resource, \CURLOPT_HEADERFUNCTION, null);
88
+ \curl_setopt($resource, \CURLOPT_READFUNCTION, null);
89
+ \curl_setopt($resource, \CURLOPT_WRITEFUNCTION, null);
90
+ \curl_setopt($resource, \CURLOPT_PROGRESSFUNCTION, null);
91
+ \curl_reset($resource);
92
  $this->handles[] = $resource;
93
  }
94
  }
97
  * Completes a cURL transaction, either returning a response promise or a
98
  * rejected promise.
99
  *
100
+ * @param callable(RequestInterface, array): PromiseInterface $handler
101
+ * @param CurlFactoryInterface $factory Dictates how the handle is released
 
 
 
102
  */
103
+ public static function finish(callable $handler, EasyHandle $easy, CurlFactoryInterface $factory): PromiseInterface
104
+ {
 
 
 
105
  if (isset($easy->options['on_stats'])) {
106
  self::invokeStats($easy);
107
  }
122
  return new FulfilledPromise($easy->response);
123
  }
124
 
125
+ private static function invokeStats(EasyHandle $easy): void
126
  {
127
+ $curlStats = \curl_getinfo($easy->handle);
128
+ $curlStats['appconnect_time'] = \curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME);
129
  $stats = new TransferStats(
130
  $easy->request,
131
  $easy->response,
133
  $easy->errno,
134
  $curlStats
135
  );
136
+ ($easy->options['on_stats'])($stats);
137
  }
138
 
139
+ /**
140
+ * @param callable(RequestInterface, array): PromiseInterface $handler
141
+ */
142
+ private static function finishError(callable $handler, EasyHandle $easy, CurlFactoryInterface $factory): PromiseInterface
143
+ {
144
  // Get error information and release the handle to the factory.
145
  $ctx = [
146
  'errno' => $easy->errno,
147
+ 'error' => \curl_error($easy->handle),
148
+ 'appconnect_time' => \curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME),
149
+ ] + \curl_getinfo($easy->handle);
150
+ $ctx[self::CURL_VERSION_STR] = \curl_version()['version'];
151
  $factory->release($easy);
152
 
153
  // Retry when nothing is present or when curl failed to rewind.
154
+ if (empty($easy->options['_err_message']) && (!$easy->errno || $easy->errno == 65)) {
 
 
155
  return self::retryFailedRewind($handler, $easy, $ctx);
156
  }
157
 
158
  return self::createRejection($easy, $ctx);
159
  }
160
 
161
+ private static function createRejection(EasyHandle $easy, array $ctx): PromiseInterface
162
  {
163
  static $connectionErrors = [
164
+ \CURLE_OPERATION_TIMEOUTED => true,
165
+ \CURLE_COULDNT_RESOLVE_HOST => true,
166
+ \CURLE_COULDNT_CONNECT => true,
167
+ \CURLE_SSL_CONNECT_ERROR => true,
168
+ \CURLE_GOT_NOTHING => true,
169
  ];
170
 
171
+ if ($easy->createResponseException) {
172
+ return P\Create::rejectionFor(
173
+ new RequestException(
174
+ 'An error was encountered while creating the response',
175
+ $easy->request,
176
+ $easy->response,
177
+ $easy->createResponseException,
178
+ $ctx
179
+ )
180
+ );
181
+ }
182
+
183
  // If an exception was encountered during the onHeaders event, then
184
  // return a rejected promise that wraps that exception.
185
  if ($easy->onHeadersException) {
186
+ return P\Create::rejectionFor(
187
  new RequestException(
188
  'An error was encountered during the on_headers event',
189
  $easy->request,
193
  )
194
  );
195
  }
196
+
197
+ $message = \sprintf(
198
+ 'cURL error %s: %s (%s)',
199
+ $ctx['errno'],
200
+ $ctx['error'],
201
+ 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html'
202
+ );
203
+ $uriString = (string) $easy->request->getUri();
204
+ if ($uriString !== '' && false === \strpos($ctx['error'], $uriString)) {
205
+ $message .= \sprintf(' for %s', $uriString);
 
 
 
 
 
206
  }
207
 
208
  // Create a connection exception if it was a specific error code.
210
  ? new ConnectException($message, $easy->request, null, $ctx)
211
  : new RequestException($message, $easy->request, $easy->response, null, $ctx);
212
 
213
+ return P\Create::rejectionFor($error);
214
  }
215
 
216
+ /**
217
+ * @return array<int|string, mixed>
218
+ */
219
+ private function getDefaultConf(EasyHandle $easy): array
220
  {
221
  $conf = [
222
+ '_headers' => $easy->request->getHeaders(),
223
+ \CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(),
224
+ \CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''),
225
+ \CURLOPT_RETURNTRANSFER => false,
226
+ \CURLOPT_HEADER => false,
227
+ \CURLOPT_CONNECTTIMEOUT => 150,
228
  ];
229
 
230
+ if (\defined('CURLOPT_PROTOCOLS')) {
231
+ $conf[\CURLOPT_PROTOCOLS] = \CURLPROTO_HTTP | \CURLPROTO_HTTPS;
232
  }
233
 
234
  $version = $easy->request->getProtocolVersion();
235
  if ($version == 1.1) {
236
+ $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_1;
237
  } elseif ($version == 2.0) {
238
+ $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0;
239
  } else {
240
+ $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_0;
241
  }
242
 
243
  return $conf;
244
  }
245
 
246
+ private function applyMethod(EasyHandle $easy, array &$conf): void
247
  {
248
  $body = $easy->request->getBody();
249
  $size = $body->getSize();
255
 
256
  $method = $easy->request->getMethod();
257
  if ($method === 'PUT' || $method === 'POST') {
258
+ // See https://tools.ietf.org/html/rfc7230#section-3.3.2
259
  if (!$easy->request->hasHeader('Content-Length')) {
260
+ $conf[\CURLOPT_HTTPHEADER][] = 'Content-Length: 0';
261
  }
262
  } elseif ($method === 'HEAD') {
263
+ $conf[\CURLOPT_NOBODY] = true;
264
  unset(
265
+ $conf[\CURLOPT_WRITEFUNCTION],
266
+ $conf[\CURLOPT_READFUNCTION],
267
+ $conf[\CURLOPT_FILE],
268
+ $conf[\CURLOPT_INFILE]
269
  );
270
  }
271
  }
272
 
273
+ private function applyBody(RequestInterface $request, array $options, array &$conf): void
274
  {
275
  $size = $request->hasHeader('Content-Length')
276
  ? (int) $request->getHeaderLine('Content-Length')
278
 
279
  // Send the body as a string if the size is less than 1MB OR if the
280
  // [curl][body_as_string] request value is set.
281
+ if (($size !== null && $size < 1000000) || !empty($options['_body_as_string'])) {
282
+ $conf[\CURLOPT_POSTFIELDS] = (string) $request->getBody();
 
 
283
  // Don't duplicate the Content-Length header
284
  $this->removeHeader('Content-Length', $conf);
285
  $this->removeHeader('Transfer-Encoding', $conf);
286
  } else {
287
+ $conf[\CURLOPT_UPLOAD] = true;
288
  if ($size !== null) {
289
+ $conf[\CURLOPT_INFILESIZE] = $size;
290
  $this->removeHeader('Content-Length', $conf);
291
  }
292
  $body = $request->getBody();
293
  if ($body->isSeekable()) {
294
  $body->rewind();
295
  }
296
+ $conf[\CURLOPT_READFUNCTION] = static function ($ch, $fd, $length) use ($body) {
297
  return $body->read($length);
298
  };
299
  }
300
 
301
  // If the Expect header is not present, prevent curl from adding it
302
  if (!$request->hasHeader('Expect')) {
303
+ $conf[\CURLOPT_HTTPHEADER][] = 'Expect:';
304
  }
305
 
306
  // cURL sometimes adds a content-type by default. Prevent this.
307
  if (!$request->hasHeader('Content-Type')) {
308
+ $conf[\CURLOPT_HTTPHEADER][] = 'Content-Type:';
309
  }
310
  }
311
 
312
+ private function applyHeaders(EasyHandle $easy, array &$conf): void
313
  {
314
  foreach ($conf['_headers'] as $name => $values) {
315
  foreach ($values as $value) {
317
  if ($value === '') {
318
  // cURL requires a special format for empty headers.
319
  // See https://github.com/guzzle/guzzle/issues/1882 for more details.
320
+ $conf[\CURLOPT_HTTPHEADER][] = "$name;";
321
  } else {
322
+ $conf[\CURLOPT_HTTPHEADER][] = "$name: $value";
323
  }
324
  }
325
  }
326
 
327
  // Remove the Accept header if one was not set
328
  if (!$easy->request->hasHeader('Accept')) {
329
+ $conf[\CURLOPT_HTTPHEADER][] = 'Accept:';
330
  }
331
  }
332
 
336
  * @param string $name Case-insensitive header to remove
337
  * @param array $options Array of options to modify
338
  */
339
+ private function removeHeader(string $name, array &$options): void
340
  {
341
+ foreach (\array_keys($options['_headers']) as $key) {
342
+ if (!\strcasecmp($key, $name)) {
343
  unset($options['_headers'][$key]);
344
  return;
345
  }
346
  }
347
  }
348
 
349
+ private function applyHandlerOptions(EasyHandle $easy, array &$conf): void
350
  {
351
  $options = $easy->options;
352
  if (isset($options['verify'])) {
353
  if ($options['verify'] === false) {
354
+ unset($conf[\CURLOPT_CAINFO]);
355
+ $conf[\CURLOPT_SSL_VERIFYHOST] = 0;
356
+ $conf[\CURLOPT_SSL_VERIFYPEER] = false;
357
  } else {
358
+ $conf[\CURLOPT_SSL_VERIFYHOST] = 2;
359
+ $conf[\CURLOPT_SSL_VERIFYPEER] = true;
360
+ if (\is_string($options['verify'])) {
361
  // Throw an error if the file/folder/link path is not valid or doesn't exist.
362
+ if (!\file_exists($options['verify'])) {
363
+ throw new \InvalidArgumentException("SSL CA bundle not found: {$options['verify']}");
 
 
364
  }
365
  // If it's a directory or a link to a directory use CURLOPT_CAPATH.
366
  // If not, it's probably a file, or a link to a file, so use CURLOPT_CAINFO.
367
+ if (
368
+ \is_dir($options['verify']) ||
369
+ (
370
+ \is_link($options['verify']) === true &&
371
+ ($verifyLink = \readlink($options['verify'])) !== false &&
372
+ \is_dir($verifyLink)
373
+ )
374
+ ) {
375
+ $conf[\CURLOPT_CAPATH] = $options['verify'];
376
  } else {
377
+ $conf[\CURLOPT_CAINFO] = $options['verify'];
378
  }
379
  }
380
  }
381
  }
382
 
383
+ if (!isset($options['curl'][\CURLOPT_ENCODING]) && !empty($options['decode_content'])) {
384
  $accept = $easy->request->getHeaderLine('Accept-Encoding');
385
  if ($accept) {
386
+ $conf[\CURLOPT_ENCODING] = $accept;
387
  } else {
388
+ $conf[\CURLOPT_ENCODING] = '';
389
  // Don't let curl send the header over the wire
390
+ $conf[\CURLOPT_HTTPHEADER][] = 'Accept-Encoding:';
391
  }
392
  }
393
 
394
+ if (!isset($options['sink'])) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
395
  // Use a default temp stream if no sink was set.
396
+ $options['sink'] = \fopen('php://temp', 'w+');
397
+ }
398
+ $sink = $options['sink'];
399
+ if (!\is_string($sink)) {
400
+ $sink = \GuzzleHttp\Psr7\stream_for($sink);
401
+ } elseif (!\is_dir(\dirname($sink))) {
402
+ // Ensure that the directory exists before failing in curl.
403
+ throw new \RuntimeException(\sprintf('Directory %s does not exist for sink value of %s', \dirname($sink), $sink));
404
+ } else {
405
+ $sink = new LazyOpenStream($sink, 'w+');
406
  }
407
+ $easy->sink = $sink;
408
+ $conf[\CURLOPT_WRITEFUNCTION] = static function ($ch, $write) use ($sink): int {
409
+ return $sink->write($write);
410
+ };
411
+
412
  $timeoutRequiresNoSignal = false;
413
  if (isset($options['timeout'])) {
414
  $timeoutRequiresNoSignal |= $options['timeout'] < 1;
415
+ $conf[\CURLOPT_TIMEOUT_MS] = $options['timeout'] * 1000;
416
  }
417
 
418
  // CURL default value is CURL_IPRESOLVE_WHATEVER
419
  if (isset($options['force_ip_resolve'])) {
420
  if ('v4' === $options['force_ip_resolve']) {
421
+ $conf[\CURLOPT_IPRESOLVE] = \CURL_IPRESOLVE_V4;
422
  } elseif ('v6' === $options['force_ip_resolve']) {
423
+ $conf[\CURLOPT_IPRESOLVE] = \CURL_IPRESOLVE_V6;
424
  }
425
  }
426
 
427
  if (isset($options['connect_timeout'])) {
428
  $timeoutRequiresNoSignal |= $options['connect_timeout'] < 1;
429
+ $conf[\CURLOPT_CONNECTTIMEOUT_MS] = $options['connect_timeout'] * 1000;
430
  }
431
 
432
+ if ($timeoutRequiresNoSignal && \strtoupper(\substr(\PHP_OS, 0, 3)) !== 'WIN') {
433
+ $conf[\CURLOPT_NOSIGNAL] = true;
434
  }
435
 
436
  if (isset($options['proxy'])) {
437
+ if (!\is_array($options['proxy'])) {
438
+ $conf[\CURLOPT_PROXY] = $options['proxy'];
439
  } else {
440
  $scheme = $easy->request->getUri()->getScheme();
441
  if (isset($options['proxy'][$scheme])) {
442
  $host = $easy->request->getUri()->getHost();
443
+ if (!isset($options['proxy']['no']) || !Utils::isHostInNoProxy($host, $options['proxy']['no'])) {
444
+ $conf[\CURLOPT_PROXY] = $options['proxy'][$scheme];
 
 
445
  }
446
  }
447
  }
449
 
450
  if (isset($options['cert'])) {
451
  $cert = $options['cert'];
452
+ if (\is_array($cert)) {
453
+ $conf[\CURLOPT_SSLCERTPASSWD] = $cert[1];
454
  $cert = $cert[0];
455
  }
456
+ if (!\file_exists($cert)) {
457
+ throw new \InvalidArgumentException("SSL certificate not found: {$cert}");
 
 
458
  }
459
+ $conf[\CURLOPT_SSLCERT] = $cert;
460
  }
461
 
462
  if (isset($options['ssl_key'])) {
463
+ if (\is_array($options['ssl_key'])) {
464
+ if (\count($options['ssl_key']) === 2) {
465
+ [$sslKey, $conf[\CURLOPT_SSLKEYPASSWD]] = $options['ssl_key'];
466
  } else {
467
+ [$sslKey] = $options['ssl_key'];
468
  }
469
  }
470
 
471
+ $sslKey = $sslKey ?? $options['ssl_key'];
472
 
473
+ if (!\file_exists($sslKey)) {
474
+ throw new \InvalidArgumentException("SSL private key not found: {$sslKey}");
 
 
475
  }
476
+ $conf[\CURLOPT_SSLKEY] = $sslKey;
477
  }
478
 
479
  if (isset($options['progress'])) {
480
  $progress = $options['progress'];
481
+ if (!\is_callable($progress)) {
482
+ throw new \InvalidArgumentException('progress client option must be callable');
 
 
483
  }
484
+ $conf[\CURLOPT_NOPROGRESS] = false;
485
+ $conf[\CURLOPT_PROGRESSFUNCTION] = static function ($resource, int $downloadSize, int $downloaded, int $uploadSize, int $uploaded) use ($progress) {
486
+ $progress($downloadSize, $downloaded, $uploadSize, $uploaded);
 
 
 
 
 
487
  };
488
  }
489
 
490
  if (!empty($options['debug'])) {
491
+ $conf[\CURLOPT_STDERR] = Utils::debugResource($options['debug']);
492
+ $conf[\CURLOPT_VERBOSE] = true;
493
  }
494
  }
495
 
501
  * stream, and then encountered a "necessary data rewind wasn't possible"
502
  * error, causing the request to be sent through curl_multi_info_read()
503
  * without an error status.
504
+ *
505
+ * @param callable(RequestInterface, array): PromiseInterface $handler
506
  */
507
+ private static function retryFailedRewind(callable $handler, EasyHandle $easy, array $ctx): PromiseInterface
508
+ {
 
 
 
509
  try {
510
  // Only rewind if the body has been read from.
511
  $body = $easy->request->getBody();
538
  return $handler($easy->request, $easy->options);
539
  }
540
 
541
+ private function createHeaderFn(EasyHandle $easy): callable
542
  {
543
  if (isset($easy->options['on_headers'])) {
544
  $onHeaders = $easy->options['on_headers'];
545
 
546
+ if (!\is_callable($onHeaders)) {
547
  throw new \InvalidArgumentException('on_headers must be callable');
548
  }
549
  } else {
550
  $onHeaders = null;
551
  }
552
 
553
+ return static function ($ch, $h) use (
554
  $onHeaders,
555
  $easy,
556
  &$startingResponse
557
  ) {
558
+ $value = \trim($h);
559
  if ($value === '') {
560
  $startingResponse = true;
561
+ try {
562
+ $easy->createResponse();
563
+ } catch (\Exception $e) {
564
+ $easy->createResponseException = $e;
565
+ return -1;
566
+ }
567
  if ($onHeaders !== null) {
568
  try {
569
  $onHeaders($easy->response);
580
  } else {
581
  $easy->headers[] = $value;
582
  }
583
+ return \strlen($h);
584
  };
585
  }
586
  }
vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Handler;
3
 
4
  use Psr\Http\Message\RequestInterface;
@@ -11,17 +12,14 @@ interface CurlFactoryInterface
11
  * @param RequestInterface $request Request
12
  * @param array $options Transfer options
13
  *
14
- * @return EasyHandle
15
  * @throws \RuntimeException when an option cannot be applied
16
  */
17
- public function create(RequestInterface $request, array $options);
18
 
19
  /**
20
  * Release an easy handle, allowing it to be reused or closed.
21
  *
22
  * This function must call unset on the easy handle's "handle" property.
23
- *
24
- * @param EasyHandle $easy
25
  */
26
- public function release(EasyHandle $easy);
27
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Handler;
4
 
5
  use Psr\Http\Message\RequestInterface;
12
  * @param RequestInterface $request Request
13
  * @param array $options Transfer options
14
  *
 
15
  * @throws \RuntimeException when an option cannot be applied
16
  */
17
+ public function create(RequestInterface $request, array $options): EasyHandle;
18
 
19
  /**
20
  * Release an easy handle, allowing it to be reused or closed.
21
  *
22
  * This function must call unset on the easy handle's "handle" property.
 
 
23
  */
24
+ public function release(EasyHandle $easy): void;
25
  }
vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php CHANGED
@@ -1,7 +1,8 @@
1
  <?php
 
2
  namespace GuzzleHttp\Handler;
3
 
4
- use GuzzleHttp\Psr7;
5
  use Psr\Http\Message\RequestInterface;
6
 
7
  /**
@@ -10,10 +11,14 @@ use Psr\Http\Message\RequestInterface;
10
  * When using the CurlHandler, custom curl options can be specified as an
11
  * associative array of curl option constants mapping to values in the
12
  * **curl** key of the "client" key of the request.
 
 
13
  */
14
  class CurlHandler
15
  {
16
- /** @var CurlFactoryInterface */
 
 
17
  private $factory;
18
 
19
  /**
@@ -25,20 +30,19 @@ class CurlHandler
25
  */
26
  public function __construct(array $options = [])
27
  {
28
- $this->factory = isset($options['handle_factory'])
29
- ? $options['handle_factory']
30
- : new CurlFactory(3);
31
  }
32
 
33
- public function __invoke(RequestInterface $request, array $options)
34
  {
35
  if (isset($options['delay'])) {
36
- usleep($options['delay'] * 1000);
37
  }
38
 
39
  $easy = $this->factory->create($request, $options);
40
- curl_exec($easy->handle);
41
- $easy->errno = curl_errno($easy->handle);
42
 
43
  return CurlFactory::finish($this, $easy, $this->factory);
44
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Handler;
4
 
5
+ use GuzzleHttp\Promise\PromiseInterface;
6
  use Psr\Http\Message\RequestInterface;
7
 
8
  /**
11
  * When using the CurlHandler, custom curl options can be specified as an
12
  * associative array of curl option constants mapping to values in the
13
  * **curl** key of the "client" key of the request.
14
+ *
15
+ * @final
16
  */
17
  class CurlHandler
18
  {
19
+ /**
20
+ * @var CurlFactoryInterface
21
+ */
22
  private $factory;
23
 
24
  /**
30
  */
31
  public function __construct(array $options = [])
32
  {
33
+ $this->factory = $options['handle_factory']
34
+ ?? new CurlFactory(3);
 
35
  }
36
 
37
+ public function __invoke(RequestInterface $request, array $options): PromiseInterface
38
  {
39
  if (isset($options['delay'])) {
40
+ \usleep($options['delay'] * 1000);
41
  }
42
 
43
  $easy = $this->factory->create($request, $options);
44
+ \curl_exec($easy->handle);
45
+ $easy->errno = \curl_errno($easy->handle);
46
 
47
  return CurlFactory::finish($this, $easy, $this->factory);
48
  }
vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php CHANGED
@@ -1,8 +1,10 @@
1
  <?php
 
2
  namespace GuzzleHttp\Handler;
3
 
4
  use GuzzleHttp\Promise as P;
5
  use GuzzleHttp\Promise\Promise;
 
6
  use GuzzleHttp\Utils;
7
  use Psr\Http\Message\RequestInterface;
8
 
@@ -13,16 +15,44 @@ use Psr\Http\Message\RequestInterface;
13
  * associative array of curl option constants mapping to values in the
14
  * **curl** key of the provided request options.
15
  *
16
- * @property resource $_mh Internal use only. Lazy loaded multi-handle.
 
 
17
  */
18
  class CurlMultiHandler
19
  {
20
- /** @var CurlFactoryInterface */
 
 
21
  private $factory;
 
 
 
 
22
  private $selectTimeout;
 
 
 
 
23
  private $active;
 
 
 
 
 
 
24
  private $handles = [];
 
 
 
 
 
 
25
  private $delays = [];
 
 
 
 
26
  private $options = [];
27
 
28
  /**
@@ -33,52 +63,62 @@ class CurlMultiHandler
33
  * out while selecting curl handles. Defaults to 1 second.
34
  * - options: An associative array of CURLMOPT_* options and
35
  * corresponding values for curl_multi_setopt()
36
- *
37
- * @param array $options
38
  */
39
  public function __construct(array $options = [])
40
  {
41
- $this->factory = isset($options['handle_factory'])
42
- ? $options['handle_factory'] : new CurlFactory(50);
43
 
44
  if (isset($options['select_timeout'])) {
45
  $this->selectTimeout = $options['select_timeout'];
46
- } elseif ($selectTimeout = getenv('GUZZLE_CURL_SELECT_TIMEOUT')) {
47
- $this->selectTimeout = $selectTimeout;
 
48
  } else {
49
  $this->selectTimeout = 1;
50
  }
51
 
52
- $this->options = isset($options['options']) ? $options['options'] : [];
53
  }
54
 
 
 
 
 
 
 
 
 
55
  public function __get($name)
56
  {
57
- if ($name === '_mh') {
58
- $this->_mh = curl_multi_init();
 
59
 
60
- foreach ($this->options as $option => $value) {
61
- // A warning is raised in case of a wrong option.
62
- curl_multi_setopt($this->_mh, $option, $value);
63
- }
 
 
 
64
 
65
- // Further calls to _mh will return the value directly, without entering the
66
- // __get() method at all.
67
- return $this->_mh;
68
  }
69
 
70
- throw new \BadMethodCallException();
71
  }
72
 
73
  public function __destruct()
74
  {
75
  if (isset($this->_mh)) {
76
- curl_multi_close($this->_mh);
77
  unset($this->_mh);
78
  }
79
  }
80
 
81
- public function __invoke(RequestInterface $request, array $options)
82
  {
83
  $easy = $this->factory->create($request, $options);
84
  $id = (int) $easy->handle;
@@ -98,7 +138,7 @@ class CurlMultiHandler
98
  /**
99
  * Ticks the curl event loop.
100
  */
101
- public function tick()
102
  {
103
  // Add any delayed handles if needed.
104
  if ($this->delays) {
@@ -106,7 +146,7 @@ class CurlMultiHandler
106
  foreach ($this->delays as $id => $delay) {
107
  if ($currentTime >= $delay) {
108
  unset($this->delays[$id]);
109
- curl_multi_add_handle(
110
  $this->_mh,
111
  $this->handles[$id]['easy']->handle
112
  );
@@ -115,17 +155,15 @@ class CurlMultiHandler
115
  }
116
 
117
  // Step through the task queue which may add additional requests.
118
- P\queue()->run();
119
 
120
- if ($this->active &&
121
- curl_multi_select($this->_mh, $this->selectTimeout) === -1
122
- ) {
123
  // Perform a usleep if a select returns -1.
124
  // See: https://bugs.php.net/bug.php?id=61141
125
- usleep(250);
126
  }
127
 
128
- while (curl_multi_exec($this->_mh, $this->active) === CURLM_CALL_MULTI_PERFORM);
129
 
130
  $this->processMessages();
131
  }
@@ -133,26 +171,26 @@ class CurlMultiHandler
133
  /**
134
  * Runs until all outstanding connections have completed.
135
  */
136
- public function execute()
137
  {
138
- $queue = P\queue();
139
 
140
  while ($this->handles || !$queue->isEmpty()) {
141
  // If there are no transfers, then sleep for the next delay
142
  if (!$this->active && $this->delays) {
143
- usleep($this->timeToNext());
144
  }
145
  $this->tick();
146
  }
147
  }
148
 
149
- private function addRequest(array $entry)
150
  {
151
  $easy = $entry['easy'];
152
  $id = (int) $easy->handle;
153
  $this->handles[$id] = $entry;
154
  if (empty($easy->options['delay'])) {
155
- curl_multi_add_handle($this->_mh, $easy->handle);
156
  } else {
157
  $this->delays[$id] = Utils::currentTime() + ($easy->options['delay'] / 1000);
158
  }
@@ -165,7 +203,7 @@ class CurlMultiHandler
165
  *
166
  * @return bool True on success, false on failure.
167
  */
168
- private function cancel($id)
169
  {
170
  // Cannot cancel if it has been processed.
171
  if (!isset($this->handles[$id])) {
@@ -174,17 +212,17 @@ class CurlMultiHandler
174
 
175
  $handle = $this->handles[$id]['easy']->handle;
176
  unset($this->delays[$id], $this->handles[$id]);
177
- curl_multi_remove_handle($this->_mh, $handle);
178
- curl_close($handle);
179
 
180
  return true;
181
  }
182
 
183
- private function processMessages()
184
  {
185
- while ($done = curl_multi_info_read($this->_mh)) {
186
  $id = (int) $done['handle'];
187
- curl_multi_remove_handle($this->_mh, $done['handle']);
188
 
189
  if (!isset($this->handles[$id])) {
190
  // Probably was cancelled.
@@ -195,25 +233,21 @@ class CurlMultiHandler
195
  unset($this->handles[$id], $this->delays[$id]);
196
  $entry['easy']->errno = $done['result'];
197
  $entry['deferred']->resolve(
198
- CurlFactory::finish(
199
- $this,
200
- $entry['easy'],
201
- $this->factory
202
- )
203
  );
204
  }
205
  }
206
 
207
- private function timeToNext()
208
  {
209
  $currentTime = Utils::currentTime();
210
- $nextTime = PHP_INT_MAX;
211
  foreach ($this->delays as $time) {
212
  if ($time < $nextTime) {
213
  $nextTime = $time;
214
  }
215
  }
216
 
217
- return max(0, $nextTime - $currentTime) * 1000000;
218
  }
219
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Handler;
4
 
5
  use GuzzleHttp\Promise as P;
6
  use GuzzleHttp\Promise\Promise;
7
+ use GuzzleHttp\Promise\PromiseInterface;
8
  use GuzzleHttp\Utils;
9
  use Psr\Http\Message\RequestInterface;
10
 
15
  * associative array of curl option constants mapping to values in the
16
  * **curl** key of the provided request options.
17
  *
18
+ * @property resource|\CurlMultiHandle $_mh Internal use only. Lazy loaded multi-handle.
19
+ *
20
+ * @final
21
  */
22
  class CurlMultiHandler
23
  {
24
+ /**
25
+ * @var CurlFactoryInterface
26
+ */
27
  private $factory;
28
+
29
+ /**
30
+ * @var int
31
+ */
32
  private $selectTimeout;
33
+
34
+ /**
35
+ * @var resource|\CurlMultiHandle|null the currently executing resource in `curl_multi_exec`.
36
+ */
37
  private $active;
38
+
39
+ /**
40
+ * @var array Request entry handles, indexed by handle id in `addRequest`.
41
+ *
42
+ * @see CurlMultiHandler::addRequest
43
+ */
44
  private $handles = [];
45
+
46
+ /**
47
+ * @var array<int, float> An array of delay times, indexed by handle id in `addRequest`.
48
+ *
49
+ * @see CurlMultiHandler::addRequest
50
+ */
51
  private $delays = [];
52
+
53
+ /**
54
+ * @var array<mixed> An associative array of CURLMOPT_* options and corresponding values for curl_multi_setopt()
55
+ */
56
  private $options = [];
57
 
58
  /**
63
  * out while selecting curl handles. Defaults to 1 second.
64
  * - options: An associative array of CURLMOPT_* options and
65
  * corresponding values for curl_multi_setopt()
 
 
66
  */
67
  public function __construct(array $options = [])
68
  {
69
+ $this->factory = $options['handle_factory'] ?? new CurlFactory(50);
 
70
 
71
  if (isset($options['select_timeout'])) {
72
  $this->selectTimeout = $options['select_timeout'];
73
+ } elseif ($selectTimeout = Utils::getenv('GUZZLE_CURL_SELECT_TIMEOUT')) {
74
+ @trigger_error('Since guzzlehttp/guzzle 7.2.0: Using environment variable GUZZLE_CURL_SELECT_TIMEOUT is deprecated. Use option "select_timeout" instead.', \E_USER_DEPRECATED);
75
+ $this->selectTimeout = (int) $selectTimeout;
76
  } else {
77
  $this->selectTimeout = 1;
78
  }
79
 
80
+ $this->options = $options['options'] ?? [];
81
  }
82
 
83
+ /**
84
+ * @param string $name
85
+ *
86
+ * @return resource|\CurlMultiHandle
87
+ *
88
+ * @throws \BadMethodCallException when another field as `_mh` will be gotten
89
+ * @throws \RuntimeException when curl can not initialize a multi handle
90
+ */
91
  public function __get($name)
92
  {
93
+ if ($name !== '_mh') {
94
+ throw new \BadMethodCallException("Can not get other property as '_mh'.");
95
+ }
96
 
97
+ $multiHandle = \curl_multi_init();
98
+
99
+ if (false === $multiHandle) {
100
+ throw new \RuntimeException('Can not initialize curl multi handle.');
101
+ }
102
+
103
+ $this->_mh = $multiHandle;
104
 
105
+ foreach ($this->options as $option => $value) {
106
+ // A warning is raised in case of a wrong option.
107
+ curl_multi_setopt($this->_mh, $option, $value);
108
  }
109
 
110
+ return $this->_mh;
111
  }
112
 
113
  public function __destruct()
114
  {
115
  if (isset($this->_mh)) {
116
+ \curl_multi_close($this->_mh);
117
  unset($this->_mh);
118
  }
119
  }
120
 
121
+ public function __invoke(RequestInterface $request, array $options): PromiseInterface
122
  {
123
  $easy = $this->factory->create($request, $options);
124
  $id = (int) $easy->handle;
138
  /**
139
  * Ticks the curl event loop.
140
  */
141
+ public function tick(): void
142
  {
143
  // Add any delayed handles if needed.
144
  if ($this->delays) {
146
  foreach ($this->delays as $id => $delay) {
147
  if ($currentTime >= $delay) {
148
  unset($this->delays[$id]);
149
+ \curl_multi_add_handle(
150
  $this->_mh,
151
  $this->handles[$id]['easy']->handle
152
  );
155
  }
156
 
157
  // Step through the task queue which may add additional requests.
158
+ P\Utils::queue()->run();
159
 
160
+ if ($this->active && \curl_multi_select($this->_mh, $this->selectTimeout) === -1) {
 
 
161
  // Perform a usleep if a select returns -1.
162
  // See: https://bugs.php.net/bug.php?id=61141
163
+ \usleep(250);
164
  }
165
 
166
+ while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM);
167
 
168
  $this->processMessages();
169
  }
171
  /**
172
  * Runs until all outstanding connections have completed.
173
  */
174
+ public function execute(): void
175
  {
176
+ $queue = P\Utils::queue();
177
 
178
  while ($this->handles || !$queue->isEmpty()) {
179
  // If there are no transfers, then sleep for the next delay
180
  if (!$this->active && $this->delays) {
181
+ \usleep($this->timeToNext());
182
  }
183
  $this->tick();
184
  }
185
  }
186
 
187
+ private function addRequest(array $entry): void
188
  {
189
  $easy = $entry['easy'];
190
  $id = (int) $easy->handle;
191
  $this->handles[$id] = $entry;
192
  if (empty($easy->options['delay'])) {
193
+ \curl_multi_add_handle($this->_mh, $easy->handle);
194
  } else {
195
  $this->delays[$id] = Utils::currentTime() + ($easy->options['delay'] / 1000);
196
  }
203
  *
204
  * @return bool True on success, false on failure.
205
  */
206
+ private function cancel($id): bool
207
  {
208
  // Cannot cancel if it has been processed.
209
  if (!isset($this->handles[$id])) {
212
 
213
  $handle = $this->handles[$id]['easy']->handle;
214
  unset($this->delays[$id], $this->handles[$id]);
215
+ \curl_multi_remove_handle($this->_mh, $handle);
216
+ \curl_close($handle);
217
 
218
  return true;
219
  }
220
 
221
+ private function processMessages(): void
222
  {
223
+ while ($done = \curl_multi_info_read($this->_mh)) {
224
  $id = (int) $done['handle'];
225
+ \curl_multi_remove_handle($this->_mh, $done['handle']);
226
 
227
  if (!isset($this->handles[$id])) {
228
  // Probably was cancelled.
233
  unset($this->handles[$id], $this->delays[$id]);
234
  $entry['easy']->errno = $done['result'];
235
  $entry['deferred']->resolve(
236
+ CurlFactory::finish($this, $entry['easy'], $this->factory)
 
 
 
 
237
  );
238
  }
239
  }
240
 
241
+ private function timeToNext(): int
242
  {
243
  $currentTime = Utils::currentTime();
244
+ $nextTime = \PHP_INT_MAX;
245
  foreach ($this->delays as $time) {
246
  if ($time < $nextTime) {
247
  $nextTime = $time;
248
  }
249
  }
250
 
251
+ return ((int) \max(0, $nextTime - $currentTime)) * 1000000;
252
  }
253
  }
vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php CHANGED
@@ -1,7 +1,9 @@
1
  <?php
 
2
  namespace GuzzleHttp\Handler;
3
 
4
  use GuzzleHttp\Psr7\Response;
 
5
  use Psr\Http\Message\RequestInterface;
6
  use Psr\Http\Message\ResponseInterface;
7
  use Psr\Http\Message\StreamInterface;
@@ -13,55 +15,72 @@ use Psr\Http\Message\StreamInterface;
13
  */
14
  final class EasyHandle
15
  {
16
- /** @var resource cURL resource */
 
 
17
  public $handle;
18
 
19
- /** @var StreamInterface Where data is being written */
 
 
20
  public $sink;
21
 
22
- /** @var array Received HTTP headers so far */
 
 
23
  public $headers = [];
24
 
25
- /** @var ResponseInterface Received response (if any) */
 
 
26
  public $response;
27
 
28
- /** @var RequestInterface Request being sent */
 
 
29
  public $request;
30
 
31
- /** @var array Request options */
 
 
32
  public $options = [];
33
 
34
- /** @var int cURL error number (if any) */
 
 
35
  public $errno = 0;
36
 
37
- /** @var \Exception Exception during on_headers (if any) */
 
 
38
  public $onHeadersException;
39
 
 
 
 
 
 
40
  /**
41
  * Attach a response to the easy handle based on the received headers.
42
  *
43
  * @throws \RuntimeException if no headers have been received.
44
  */
45
- public function createResponse()
46
  {
47
  if (empty($this->headers)) {
48
  throw new \RuntimeException('No headers have been received');
49
  }
50
 
51
  // HTTP-version SP status-code SP reason-phrase
52
- $startLine = explode(' ', array_shift($this->headers), 3);
53
- $headers = \GuzzleHttp\headers_from_lines($this->headers);
54
- $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers);
55
-
56
- if (!empty($this->options['decode_content'])
57
- && isset($normalizedKeys['content-encoding'])
58
- ) {
59
- $headers['x-encoded-content-encoding']
60
- = $headers[$normalizedKeys['content-encoding']];
61
  unset($headers[$normalizedKeys['content-encoding']]);
62
  if (isset($normalizedKeys['content-length'])) {
63
- $headers['x-encoded-content-length']
64
- = $headers[$normalizedKeys['content-length']];
65
 
66
  $bodyLength = (int) $this->sink->getSize();
67
  if ($bodyLength) {
@@ -72,21 +91,28 @@ final class EasyHandle
72
  }
73
  }
74
 
 
 
75
  // Attach a response to the easy handle with the parsed headers.
76
  $this->response = new Response(
77
- $startLine[1],
78
  $headers,
79
  $this->sink,
80
- substr($startLine[0], 5),
81
  isset($startLine[2]) ? (string) $startLine[2] : null
82
  );
83
  }
84
 
 
 
 
 
 
 
 
85
  public function __get($name)
86
  {
87
- $msg = $name === 'handle'
88
- ? 'The EasyHandle has been released'
89
- : 'Invalid property: ' . $name;
90
  throw new \BadMethodCallException($msg);
91
  }
92
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Handler;
4
 
5
  use GuzzleHttp\Psr7\Response;
6
+ use GuzzleHttp\Utils;
7
  use Psr\Http\Message\RequestInterface;
8
  use Psr\Http\Message\ResponseInterface;
9
  use Psr\Http\Message\StreamInterface;
15
  */
16
  final class EasyHandle
17
  {
18
+ /**
19
+ * @var resource|\CurlHandle cURL resource
20
+ */
21
  public $handle;
22
 
23
+ /**
24
+ * @var StreamInterface Where data is being written
25
+ */
26
  public $sink;
27
 
28
+ /**
29
+ * @var array Received HTTP headers so far
30
+ */
31
  public $headers = [];
32
 
33
+ /**
34
+ * @var ResponseInterface|null Received response (if any)
35
+ */
36
  public $response;
37
 
38
+ /**
39
+ * @var RequestInterface Request being sent
40
+ */
41
  public $request;
42
 
43
+ /**
44
+ * @var array Request options
45
+ */
46
  public $options = [];
47
 
48
+ /**
49
+ * @var int cURL error number (if any)
50
+ */
51
  public $errno = 0;
52
 
53
+ /**
54
+ * @var \Throwable|null Exception during on_headers (if any)
55
+ */
56
  public $onHeadersException;
57
 
58
+ /**
59
+ * @var \Exception|null Exception during createResponse (if any)
60
+ */
61
+ public $createResponseException;
62
+
63
  /**
64
  * Attach a response to the easy handle based on the received headers.
65
  *
66
  * @throws \RuntimeException if no headers have been received.
67
  */
68
+ public function createResponse(): void
69
  {
70
  if (empty($this->headers)) {
71
  throw new \RuntimeException('No headers have been received');
72
  }
73
 
74
  // HTTP-version SP status-code SP reason-phrase
75
+ $startLine = \explode(' ', \array_shift($this->headers), 3);
76
+ $headers = Utils::headersFromLines($this->headers);
77
+ $normalizedKeys = Utils::normalizeHeaderKeys($headers);
78
+
79
+ if (!empty($this->options['decode_content']) && isset($normalizedKeys['content-encoding'])) {
80
+ $headers['x-encoded-content-encoding'] = $headers[$normalizedKeys['content-encoding']];
 
 
 
81
  unset($headers[$normalizedKeys['content-encoding']]);
82
  if (isset($normalizedKeys['content-length'])) {
83
+ $headers['x-encoded-content-length'] = $headers[$normalizedKeys['content-length']];
 
84
 
85
  $bodyLength = (int) $this->sink->getSize();
86
  if ($bodyLength) {
91
  }
92
  }
93
 
94
+ $statusCode = (int) $startLine[1];
95
+
96
  // Attach a response to the easy handle with the parsed headers.
97
  $this->response = new Response(
98
+ $statusCode,
99
  $headers,
100
  $this->sink,
101
+ \substr($startLine[0], 5),
102
  isset($startLine[2]) ? (string) $startLine[2] : null
103
  );
104
  }
105
 
106
+ /**
107
+ * @param string $name
108
+ *
109
+ * @return void
110
+ *
111
+ * @throws \BadMethodCallException
112
+ */
113
  public function __get($name)
114
  {
115
+ $msg = $name === 'handle' ? 'The EasyHandle has been released' : 'Invalid property: ' . $name;
 
 
116
  throw new \BadMethodCallException($msg);
117
  }
118
  }
vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php CHANGED
@@ -1,81 +1,98 @@
1
  <?php
 
2
  namespace GuzzleHttp\Handler;
3
 
4
  use GuzzleHttp\Exception\RequestException;
5
  use GuzzleHttp\HandlerStack;
 
6
  use GuzzleHttp\Promise\PromiseInterface;
7
- use GuzzleHttp\Promise\RejectedPromise;
8
  use GuzzleHttp\TransferStats;
 
9
  use Psr\Http\Message\RequestInterface;
10
  use Psr\Http\Message\ResponseInterface;
 
11
 
12
  /**
13
  * Handler that returns responses or throw exceptions from a queue.
 
 
14
  */
15
  class MockHandler implements \Countable
16
  {
 
 
 
17
  private $queue = [];
 
 
 
 
18
  private $lastRequest;
19
- private $lastOptions;
 
 
 
 
 
 
 
 
20
  private $onFulfilled;
 
 
 
 
21
  private $onRejected;
22
 
23
  /**
24
  * Creates a new MockHandler that uses the default handler stack list of
25
  * middlewares.
26
  *
27
- * @param array $queue Array of responses, callables, or exceptions.
28
- * @param callable $onFulfilled Callback to invoke when the return value is fulfilled.
29
- * @param callable $onRejected Callback to invoke when the return value is rejected.
30
- *
31
- * @return HandlerStack
32
  */
33
- public static function createWithMiddleware(
34
- array $queue = null,
35
- callable $onFulfilled = null,
36
- callable $onRejected = null
37
- ) {
38
  return HandlerStack::create(new self($queue, $onFulfilled, $onRejected));
39
  }
40
 
41
  /**
42
  * The passed in value must be an array of
43
- * {@see Psr7\Http\Message\ResponseInterface} objects, Exceptions,
44
  * callables, or Promises.
45
  *
46
- * @param array $queue
47
- * @param callable $onFulfilled Callback to invoke when the return value is fulfilled.
48
- * @param callable $onRejected Callback to invoke when the return value is rejected.
49
  */
50
- public function __construct(
51
- array $queue = null,
52
- callable $onFulfilled = null,
53
- callable $onRejected = null
54
- ) {
55
  $this->onFulfilled = $onFulfilled;
56
  $this->onRejected = $onRejected;
57
 
58
  if ($queue) {
59
- call_user_func_array([$this, 'append'], $queue);
 
60
  }
61
  }
62
 
63
- public function __invoke(RequestInterface $request, array $options)
64
  {
65
  if (!$this->queue) {
66
  throw new \OutOfBoundsException('Mock queue is empty');
67
  }
68
 
69
- if (isset($options['delay']) && is_numeric($options['delay'])) {
70
- usleep($options['delay'] * 1000);
71
  }
72
 
73
  $this->lastRequest = $request;
74
  $this->lastOptions = $options;
75
- $response = array_shift($this->queue);
76
 
77
  if (isset($options['on_headers'])) {
78
- if (!is_callable($options['on_headers'])) {
79
  throw new \InvalidArgumentException('on_headers must be callable');
80
  }
81
  try {
@@ -86,29 +103,30 @@ class MockHandler implements \Countable
86
  }
87
  }
88
 
89
- if (is_callable($response)) {
90
- $response = call_user_func($response, $request, $options);
91
  }
92
 
93
- $response = $response instanceof \Exception
94
- ? \GuzzleHttp\Promise\rejection_for($response)
95
- : \GuzzleHttp\Promise\promise_for($response);
96
 
97
  return $response->then(
98
- function ($value) use ($request, $options) {
99
  $this->invokeStats($request, $options, $value);
100
  if ($this->onFulfilled) {
101
- call_user_func($this->onFulfilled, $value);
102
  }
103
- if (isset($options['sink'])) {
 
104
  $contents = (string) $value->getBody();
105
  $sink = $options['sink'];
106
 
107
- if (is_resource($sink)) {
108
- fwrite($sink, $contents);
109
- } elseif (is_string($sink)) {
110
- file_put_contents($sink, $contents);
111
- } elseif ($sink instanceof \Psr\Http\Message\StreamInterface) {
112
  $sink->write($contents);
113
  }
114
  }
@@ -118,9 +136,9 @@ class MockHandler implements \Countable
118
  function ($reason) use ($request, $options) {
119
  $this->invokeStats($request, $options, null, $reason);
120
  if ($this->onRejected) {
121
- call_user_func($this->onRejected, $reason);
122
  }
123
- return \GuzzleHttp\Promise\rejection_for($reason);
124
  }
125
  );
126
  }
@@ -128,68 +146,66 @@ class MockHandler implements \Countable
128
  /**
129
  * Adds one or more variadic requests, exceptions, callables, or promises
130
  * to the queue.
 
 
131
  */
132
- public function append()
133
  {
134
- foreach (func_get_args() as $value) {
135
  if ($value instanceof ResponseInterface
136
- || $value instanceof \Exception
137
  || $value instanceof PromiseInterface
138
- || is_callable($value)
139
  ) {
140
  $this->queue[] = $value;
141
  } else {
142
- throw new \InvalidArgumentException('Expected a response or '
143
- . 'exception. Found ' . \GuzzleHttp\describe_type($value));
144
  }
145
  }
146
  }
147
 
148
  /**
149
  * Get the last received request.
150
- *
151
- * @return RequestInterface
152
  */
153
- public function getLastRequest()
154
  {
155
  return $this->lastRequest;
156
  }
157
 
158
  /**
159
  * Get the last received request options.
160
- *
161
- * @return array
162
  */
163
- public function getLastOptions()
164
  {
165
  return $this->lastOptions;
166
  }
167
 
168
  /**
169
  * Returns the number of remaining items in the queue.
170
- *
171
- * @return int
172
  */
173
- public function count()
174
  {
175
- return count($this->queue);
176
  }
177
 
178
- public function reset()
179
  {
180
  $this->queue = [];
181
  }
182
 
 
 
 
183
  private function invokeStats(
184
  RequestInterface $request,
185
  array $options,
186
  ResponseInterface $response = null,
187
  $reason = null
188
- ) {
189
  if (isset($options['on_stats'])) {
190
- $transferTime = isset($options['transfer_time']) ? $options['transfer_time'] : 0;
191
  $stats = new TransferStats($request, $response, $transferTime, $reason);
192
- call_user_func($options['on_stats'], $stats);
193
  }
194
  }
195
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Handler;
4
 
5
  use GuzzleHttp\Exception\RequestException;
6
  use GuzzleHttp\HandlerStack;
7
+ use GuzzleHttp\Promise as P;
8
  use GuzzleHttp\Promise\PromiseInterface;
 
9
  use GuzzleHttp\TransferStats;
10
+ use GuzzleHttp\Utils;
11
  use Psr\Http\Message\RequestInterface;
12
  use Psr\Http\Message\ResponseInterface;
13
+ use Psr\Http\Message\StreamInterface;
14
 
15
  /**
16
  * Handler that returns responses or throw exceptions from a queue.
17
+ *
18
+ * @final
19
  */
20
  class MockHandler implements \Countable
21
  {
22
+ /**
23
+ * @var array
24
+ */
25
  private $queue = [];
26
+
27
+ /**
28
+ * @var RequestInterface|null
29
+ */
30
  private $lastRequest;
31
+
32
+ /**
33
+ * @var array
34
+ */
35
+ private $lastOptions = [];
36
+
37
+ /**
38
+ * @var callable|null
39
+ */
40
  private $onFulfilled;
41
+
42
+ /**
43
+ * @var callable|null
44
+ */
45
  private $onRejected;
46
 
47
  /**
48
  * Creates a new MockHandler that uses the default handler stack list of
49
  * middlewares.
50
  *
51
+ * @param array|null $queue Array of responses, callables, or exceptions.
52
+ * @param callable|null $onFulfilled Callback to invoke when the return value is fulfilled.
53
+ * @param callable|null $onRejected Callback to invoke when the return value is rejected.
 
 
54
  */
55
+ public static function createWithMiddleware(array $queue = null, callable $onFulfilled = null, callable $onRejected = null): HandlerStack
56
+ {
 
 
 
57
  return HandlerStack::create(new self($queue, $onFulfilled, $onRejected));
58
  }
59
 
60
  /**
61
  * The passed in value must be an array of
62
+ * {@see \Psr\Http\Message\ResponseInterface} objects, Exceptions,
63
  * callables, or Promises.
64
  *
65
+ * @param array<int, mixed>|null $queue The parameters to be passed to the append function, as an indexed array.
66
+ * @param callable|null $onFulfilled Callback to invoke when the return value is fulfilled.
67
+ * @param callable|null $onRejected Callback to invoke when the return value is rejected.
68
  */
69
+ public function __construct(array $queue = null, callable $onFulfilled = null, callable $onRejected = null)
70
+ {
 
 
 
71
  $this->onFulfilled = $onFulfilled;
72
  $this->onRejected = $onRejected;
73
 
74
  if ($queue) {
75
+ // array_values included for BC
76
+ $this->append(...array_values($queue));
77
  }
78
  }
79
 
80
+ public function __invoke(RequestInterface $request, array $options): PromiseInterface
81
  {
82
  if (!$this->queue) {
83
  throw new \OutOfBoundsException('Mock queue is empty');
84
  }
85
 
86
+ if (isset($options['delay']) && \is_numeric($options['delay'])) {
87
+ \usleep((int) $options['delay'] * 1000);
88
  }
89
 
90
  $this->lastRequest = $request;
91
  $this->lastOptions = $options;
92
+ $response = \array_shift($this->queue);
93
 
94
  if (isset($options['on_headers'])) {
95
+ if (!\is_callable($options['on_headers'])) {
96
  throw new \InvalidArgumentException('on_headers must be callable');
97
  }
98
  try {
103
  }
104
  }
105
 
106
+ if (\is_callable($response)) {
107
+ $response = $response($request, $options);
108
  }
109
 
110
+ $response = $response instanceof \Throwable
111
+ ? P\Create::rejectionFor($response)
112
+ : P\Create::promiseFor($response);
113
 
114
  return $response->then(
115
+ function (?ResponseInterface $value) use ($request, $options) {
116
  $this->invokeStats($request, $options, $value);
117
  if ($this->onFulfilled) {
118
+ ($this->onFulfilled)($value);
119
  }
120
+
121
+ if ($value !== null && isset($options['sink'])) {
122
  $contents = (string) $value->getBody();
123
  $sink = $options['sink'];
124
 
125
+ if (\is_resource($sink)) {
126
+ \fwrite($sink, $contents);
127
+ } elseif (\is_string($sink)) {
128
+ \file_put_contents($sink, $contents);
129
+ } elseif ($sink instanceof StreamInterface) {
130
  $sink->write($contents);
131
  }
132
  }
136
  function ($reason) use ($request, $options) {
137
  $this->invokeStats($request, $options, null, $reason);
138
  if ($this->onRejected) {
139
+ ($this->onRejected)($reason);
140
  }
141
+ return P\Create::rejectionFor($reason);
142
  }
143
  );
144
  }
146
  /**
147
  * Adds one or more variadic requests, exceptions, callables, or promises
148
  * to the queue.
149
+ *
150
+ * @param mixed ...$values
151
  */
152
+ public function append(...$values): void
153
  {
154
+ foreach ($values as $value) {
155
  if ($value instanceof ResponseInterface
156
+ || $value instanceof \Throwable
157
  || $value instanceof PromiseInterface
158
+ || \is_callable($value)
159
  ) {
160
  $this->queue[] = $value;
161
  } else {
162
+ throw new \TypeError('Expected a Response, Promise, Throwable or callable. Found ' . Utils::describeType($value));
 
163
  }
164
  }
165
  }
166
 
167
  /**
168
  * Get the last received request.
 
 
169
  */
170
+ public function getLastRequest(): ?RequestInterface
171
  {
172
  return $this->lastRequest;
173
  }
174
 
175
  /**
176
  * Get the last received request options.
 
 
177
  */
178
+ public function getLastOptions(): array
179
  {
180
  return $this->lastOptions;
181
  }
182
 
183
  /**
184
  * Returns the number of remaining items in the queue.
 
 
185
  */
186
+ public function count(): int
187
  {
188
+ return \count($this->queue);
189
  }
190
 
191
+ public function reset(): void
192
  {
193
  $this->queue = [];
194
  }
195
 
196
+ /**
197
+ * @param mixed $reason Promise or reason.
198
+ */
199
  private function invokeStats(
200
  RequestInterface $request,
201
  array $options,
202
  ResponseInterface $response = null,
203
  $reason = null
204
+ ): void {
205
  if (isset($options['on_stats'])) {
206
+ $transferTime = $options['transfer_time'] ?? 0;
207
  $stats = new TransferStats($request, $response, $transferTime, $reason);
208
+ ($options['on_stats'])($stats);
209
  }
210
  }
211
  }
vendor/guzzlehttp/guzzle/src/Handler/Proxy.php CHANGED
@@ -1,11 +1,15 @@
1
  <?php
 
2
  namespace GuzzleHttp\Handler;
3
 
 
4
  use GuzzleHttp\RequestOptions;
5
  use Psr\Http\Message\RequestInterface;
6
 
7
  /**
8
  * Provides basic proxies for handlers.
 
 
9
  */
10
  class Proxy
11
  {
@@ -13,19 +17,15 @@ class Proxy
13
  * Sends synchronous requests to a specific handler while sending all other
14
  * requests to another handler.
15
  *
16
- * @param callable $default Handler used for normal responses
17
- * @param callable $sync Handler used for synchronous responses.
18
  *
19
- * @return callable Returns the composed handler.
20
  */
21
- public static function wrapSync(
22
- callable $default,
23
- callable $sync
24
- ) {
25
- return function (RequestInterface $request, array $options) use ($default, $sync) {
26
- return empty($options[RequestOptions::SYNCHRONOUS])
27
- ? $default($request, $options)
28
- : $sync($request, $options);
29
  };
30
  }
31
 
@@ -37,19 +37,15 @@ class Proxy
37
  * performance benefits of curl while still supporting true streaming
38
  * through the StreamHandler.
39
  *
40
- * @param callable $default Handler used for non-streaming responses
41
- * @param callable $streaming Handler used for streaming responses
42
  *
43
- * @return callable Returns the composed handler.
44
  */
45
- public static function wrapStreaming(
46
- callable $default,
47
- callable $streaming
48
- ) {
49
- return function (RequestInterface $request, array $options) use ($default, $streaming) {
50
- return empty($options['stream'])
51
- ? $default($request, $options)
52
- : $streaming($request, $options);
53
  };
54
  }
55
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Handler;
4
 
5
+ use GuzzleHttp\Promise\PromiseInterface;
6
  use GuzzleHttp\RequestOptions;
7
  use Psr\Http\Message\RequestInterface;
8
 
9
  /**
10
  * Provides basic proxies for handlers.
11
+ *
12
+ * @final
13
  */
14
  class Proxy
15
  {
17
  * Sends synchronous requests to a specific handler while sending all other
18
  * requests to another handler.
19
  *
20
+ * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $default Handler used for normal responses
21
+ * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $sync Handler used for synchronous responses.
22
  *
23
+ * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.
24
  */
25
+ public static function wrapSync(callable $default, callable $sync): callable
26
+ {
27
+ return static function (RequestInterface $request, array $options) use ($default, $sync): PromiseInterface {
28
+ return empty($options[RequestOptions::SYNCHRONOUS]) ? $default($request, $options) : $sync($request, $options);
 
 
 
 
29
  };
30
  }
31
 
37
  * performance benefits of curl while still supporting true streaming
38
  * through the StreamHandler.
39
  *
40
+ * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $default Handler used for non-streaming responses
41
+ * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $streaming Handler used for streaming responses
42
  *
43
+ * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.
44
  */
45
+ public static function wrapStreaming(callable $default, callable $streaming): callable
46
+ {
47
+ return static function (RequestInterface $request, array $options) use ($default, $streaming): PromiseInterface {
48
+ return empty($options['stream']) ? $default($request, $options) : $streaming($request, $options);
 
 
 
 
49
  };
50
  }
51
  }
vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php CHANGED
@@ -1,8 +1,10 @@
1
  <?php
 
2
  namespace GuzzleHttp\Handler;
3
 
4
  use GuzzleHttp\Exception\ConnectException;
5
  use GuzzleHttp\Exception\RequestException;
 
6
  use GuzzleHttp\Promise\FulfilledPromise;
7
  use GuzzleHttp\Promise\PromiseInterface;
8
  use GuzzleHttp\Psr7;
@@ -11,12 +13,18 @@ use GuzzleHttp\Utils;
11
  use Psr\Http\Message\RequestInterface;
12
  use Psr\Http\Message\ResponseInterface;
13
  use Psr\Http\Message\StreamInterface;
 
14
 
15
  /**
16
  * HTTP handler that uses PHP's HTTP stream wrapper.
 
 
17
  */
18
  class StreamHandler
19
  {
 
 
 
20
  private $lastHeaders = [];
21
 
22
  /**
@@ -24,14 +32,12 @@ class StreamHandler
24
  *
25
  * @param RequestInterface $request Request to send.
26
  * @param array $options Request transfer options.
27
- *
28
- * @return PromiseInterface
29
  */
30
- public function __invoke(RequestInterface $request, array $options)
31
  {
32
  // Sleep if there is a delay specified.
33
  if (isset($options['delay'])) {
34
- usleep($options['delay'] * 1000);
35
  }
36
 
37
  $startTime = isset($options['on_stats']) ? Utils::currentTime() : null;
@@ -58,57 +64,51 @@ class StreamHandler
58
  // Determine if the error was a networking error.
59
  $message = $e->getMessage();
60
  // This list can probably get more comprehensive.
61
- if (strpos($message, 'getaddrinfo') // DNS lookup failed
62
- || strpos($message, 'Connection refused')
63
- || strpos($message, "couldn't connect to host") // error on HHVM
64
- || strpos($message, "connection attempt failed")
65
  ) {
66
  $e = new ConnectException($e->getMessage(), $request, $e);
 
 
67
  }
68
- $e = RequestException::wrapException($request, $e);
69
  $this->invokeStats($options, $request, $startTime, null, $e);
70
 
71
- return \GuzzleHttp\Promise\rejection_for($e);
72
  }
73
  }
74
 
75
  private function invokeStats(
76
  array $options,
77
  RequestInterface $request,
78
- $startTime,
79
  ResponseInterface $response = null,
80
- $error = null
81
- ) {
82
  if (isset($options['on_stats'])) {
83
- $stats = new TransferStats(
84
- $request,
85
- $response,
86
- Utils::currentTime() - $startTime,
87
- $error,
88
- []
89
- );
90
- call_user_func($options['on_stats'], $stats);
91
  }
92
  }
93
 
94
- private function createResponse(
95
- RequestInterface $request,
96
- array $options,
97
- $stream,
98
- $startTime
99
- ) {
100
  $hdrs = $this->lastHeaders;
101
  $this->lastHeaders = [];
102
- $parts = explode(' ', array_shift($hdrs), 3);
103
- $ver = explode('/', $parts[0])[1];
104
- $status = $parts[1];
105
- $reason = isset($parts[2]) ? $parts[2] : null;
106
- $headers = \GuzzleHttp\headers_from_lines($hdrs);
107
- list($stream, $headers) = $this->checkDecode($options, $headers, $stream);
108
- $stream = Psr7\stream_for($stream);
109
  $sink = $stream;
110
 
111
- if (strcasecmp('HEAD', $request->getMethod())) {
112
  $sink = $this->createSink($stream, $options);
113
  }
114
 
@@ -120,18 +120,14 @@ class StreamHandler
120
  } catch (\Exception $e) {
121
  $msg = 'An error was encountered during the on_headers event';
122
  $ex = new RequestException($msg, $request, $response, $e);
123
- return \GuzzleHttp\Promise\rejection_for($ex);
124
  }
125
  }
126
 
127
  // Do not drain when the request is a HEAD request because they have
128
  // no body.
129
  if ($sink !== $stream) {
130
- $this->drain(
131
- $stream,
132
- $sink,
133
- $response->getHeaderLine('Content-Length')
134
- );
135
  }
136
 
137
  $this->invokeStats($options, $request, $startTime, $response, null);
@@ -139,41 +135,37 @@ class StreamHandler
139
  return new FulfilledPromise($response);
140
  }
141
 
142
- private function createSink(StreamInterface $stream, array $options)
143
  {
144
  if (!empty($options['stream'])) {
145
  return $stream;
146
  }
147
 
148
- $sink = isset($options['sink'])
149
- ? $options['sink']
150
- : fopen('php://temp', 'r+');
151
 
152
- return is_string($sink)
153
- ? new Psr7\LazyOpenStream($sink, 'w+')
154
- : Psr7\stream_for($sink);
155
  }
156
 
157
- private function checkDecode(array $options, array $headers, $stream)
 
 
 
158
  {
159
  // Automatically decode responses when instructed.
160
  if (!empty($options['decode_content'])) {
161
- $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers);
162
  if (isset($normalizedKeys['content-encoding'])) {
163
  $encoding = $headers[$normalizedKeys['content-encoding']];
164
  if ($encoding[0] === 'gzip' || $encoding[0] === 'deflate') {
165
- $stream = new Psr7\InflateStream(
166
- Psr7\stream_for($stream)
167
- );
168
- $headers['x-encoded-content-encoding']
169
- = $headers[$normalizedKeys['content-encoding']];
170
  // Remove content-encoding header
171
  unset($headers[$normalizedKeys['content-encoding']]);
 
172
  // Fix content-length header
173
  if (isset($normalizedKeys['content-length'])) {
174
- $headers['x-encoded-content-length']
175
- = $headers[$normalizedKeys['content-length']];
176
-
177
  $length = (int) $stream->getSize();
178
  if ($length === 0) {
179
  unset($headers[$normalizedKeys['content-length']]);
@@ -191,27 +183,21 @@ class StreamHandler
191
  /**
192
  * Drains the source stream into the "sink" client option.
193
  *
194
- * @param StreamInterface $source
195
- * @param StreamInterface $sink
196
- * @param string $contentLength Header specifying the amount of
197
- * data to read.
198
  *
199
- * @return StreamInterface
200
  * @throws \RuntimeException when the sink option is invalid.
201
  */
202
- private function drain(
203
- StreamInterface $source,
204
- StreamInterface $sink,
205
- $contentLength
206
- ) {
207
  // If a content-length header is provided, then stop reading once
208
  // that number of bytes has been read. This can prevent infinitely
209
  // reading from a stream when dealing with servers that do not honor
210
  // Connection: Close headers.
211
- Psr7\copy_to_stream(
212
  $source,
213
  $sink,
214
- (strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1
215
  );
216
 
217
  $sink->seek(0);
@@ -226,12 +212,13 @@ class StreamHandler
226
  * @param callable $callback Callable that returns stream resource
227
  *
228
  * @return resource
 
229
  * @throws \RuntimeException on error
230
  */
231
  private function createResource(callable $callback)
232
  {
233
- $errors = null;
234
- set_error_handler(function ($_, $msg, $file, $line) use (&$errors) {
235
  $errors[] = [
236
  'message' => $msg,
237
  'file' => $file,
@@ -241,26 +228,29 @@ class StreamHandler
241
  });
242
 
243
  $resource = $callback();
244
- restore_error_handler();
245
 
246
  if (!$resource) {
247
  $message = 'Error creating resource: ';
248
  foreach ($errors as $err) {
249
  foreach ($err as $key => $value) {
250
- $message .= "[$key] $value" . PHP_EOL;
251
  }
252
  }
253
- throw new \RuntimeException(trim($message));
254
  }
255
 
256
  return $resource;
257
  }
258
 
 
 
 
259
  private function createStream(RequestInterface $request, array $options)
260
  {
261
  static $methods;
262
  if (!$methods) {
263
- $methods = array_flip(get_class_methods(__CLASS__));
264
  }
265
 
266
  // HTTP/1.1 streams using the PHP stream wrapper require a
@@ -279,7 +269,7 @@ class StreamHandler
279
  $params = [];
280
  $context = $this->getDefaultContext($request);
281
 
282
- if (isset($options['on_headers']) && !is_callable($options['on_headers'])) {
283
  throw new \InvalidArgumentException('on_headers must be callable');
284
  }
285
 
@@ -293,42 +283,39 @@ class StreamHandler
293
  }
294
 
295
  if (isset($options['stream_context'])) {
296
- if (!is_array($options['stream_context'])) {
297
  throw new \InvalidArgumentException('stream_context must be an array');
298
  }
299
- $context = array_replace_recursive(
300
- $context,
301
- $options['stream_context']
302
- );
303
  }
304
 
305
  // Microsoft NTLM authentication only supported with curl handler
306
- if (isset($options['auth'])
307
- && is_array($options['auth'])
308
- && isset($options['auth'][2])
309
- && 'ntlm' == $options['auth'][2]
310
- ) {
311
  throw new \InvalidArgumentException('Microsoft NTLM authentication only supported with curl handler');
312
  }
313
 
314
  $uri = $this->resolveHost($request, $options);
315
 
316
- $context = $this->createResource(
317
- function () use ($context, $params) {
318
- return stream_context_create($context, $params);
319
  }
320
  );
321
 
322
  return $this->createResource(
323
- function () use ($uri, &$http_response_header, $context, $options) {
324
- $resource = fopen((string) $uri, 'r', null, $context);
325
  $this->lastHeaders = $http_response_header;
326
 
 
 
 
 
327
  if (isset($options['read_timeout'])) {
328
  $readTimeout = $options['read_timeout'];
329
  $sec = (int) $readTimeout;
330
  $usec = ($readTimeout - $sec) * 100000;
331
- stream_set_timeout($resource, $sec, $usec);
332
  }
333
 
334
  return $resource;
@@ -336,42 +323,31 @@ class StreamHandler
336
  );
337
  }
338
 
339
- private function resolveHost(RequestInterface $request, array $options)
340
  {
341
  $uri = $request->getUri();
342
 
343
- if (isset($options['force_ip_resolve']) && !filter_var($uri->getHost(), FILTER_VALIDATE_IP)) {
344
  if ('v4' === $options['force_ip_resolve']) {
345
- $records = dns_get_record($uri->getHost(), DNS_A);
346
- if (!isset($records[0]['ip'])) {
347
- throw new ConnectException(
348
- sprintf(
349
- "Could not resolve IPv4 address for host '%s'",
350
- $uri->getHost()
351
- ),
352
- $request
353
- );
354
  }
355
- $uri = $uri->withHost($records[0]['ip']);
356
- } elseif ('v6' === $options['force_ip_resolve']) {
357
- $records = dns_get_record($uri->getHost(), DNS_AAAA);
358
- if (!isset($records[0]['ipv6'])) {
359
- throw new ConnectException(
360
- sprintf(
361
- "Could not resolve IPv6 address for host '%s'",
362
- $uri->getHost()
363
- ),
364
- $request
365
- );
366
  }
367
- $uri = $uri->withHost('[' . $records[0]['ipv6'] . ']');
368
  }
369
  }
370
 
371
  return $uri;
372
  }
373
 
374
- private function getDefaultContext(RequestInterface $request)
375
  {
376
  $headers = '';
377
  foreach ($request->getHeaders() as $name => $value) {
@@ -400,55 +376,56 @@ class StreamHandler
400
  }
401
  }
402
 
403
- $context['http']['header'] = rtrim($context['http']['header']);
404
 
405
  return $context;
406
  }
407
 
408
- private function add_proxy(RequestInterface $request, &$options, $value, &$params)
 
 
 
409
  {
410
- if (!is_array($value)) {
411
  $options['http']['proxy'] = $value;
412
  } else {
413
  $scheme = $request->getUri()->getScheme();
414
  if (isset($value[$scheme])) {
415
- if (!isset($value['no'])
416
- || !\GuzzleHttp\is_host_in_noproxy(
417
- $request->getUri()->getHost(),
418
- $value['no']
419
- )
420
- ) {
421
  $options['http']['proxy'] = $value[$scheme];
422
  }
423
  }
424
  }
425
  }
426
 
427
- private function add_timeout(RequestInterface $request, &$options, $value, &$params)
 
 
 
428
  {
429
  if ($value > 0) {
430
  $options['http']['timeout'] = $value;
431
  }
432
  }
433
 
434
- private function add_verify(RequestInterface $request, &$options, $value, &$params)
 
 
 
435
  {
436
- if ($value === true) {
437
- // PHP 5.6 or greater will find the system cert by default. When
438
- // < 5.6, use the Guzzle bundled cacert.
439
- if (PHP_VERSION_ID < 50600) {
440
- $options['ssl']['cafile'] = \GuzzleHttp\default_ca_bundle();
441
- }
442
- } elseif (is_string($value)) {
443
- $options['ssl']['cafile'] = $value;
444
- if (!file_exists($value)) {
445
- throw new \RuntimeException("SSL CA bundle not found: $value");
446
- }
447
- } elseif ($value === false) {
448
  $options['ssl']['verify_peer'] = false;
449
  $options['ssl']['verify_peer_name'] = false;
 
450
  return;
451
- } else {
 
 
 
 
 
 
 
452
  throw new \InvalidArgumentException('Invalid verify request option');
453
  }
454
 
@@ -457,88 +434,93 @@ class StreamHandler
457
  $options['ssl']['allow_self_signed'] = false;
458
  }
459
 
460
- private function add_cert(RequestInterface $request, &$options, $value, &$params)
 
 
 
461
  {
462
- if (is_array($value)) {
463
  $options['ssl']['passphrase'] = $value[1];
464
  $value = $value[0];
465
  }
466
 
467
- if (!file_exists($value)) {
468
  throw new \RuntimeException("SSL certificate not found: {$value}");
469
  }
470
 
471
  $options['ssl']['local_cert'] = $value;
472
  }
473
 
474
- private function add_progress(RequestInterface $request, &$options, $value, &$params)
 
 
 
475
  {
476
- $this->addNotification(
477
  $params,
478
- function ($code, $a, $b, $c, $transferred, $total) use ($value) {
479
- if ($code == STREAM_NOTIFY_PROGRESS) {
480
  $value($total, $transferred, null, null);
481
  }
482
  }
483
  );
484
  }
485
 
486
- private function add_debug(RequestInterface $request, &$options, $value, &$params)
 
 
 
487
  {
488
  if ($value === false) {
489
  return;
490
  }
491
 
492
  static $map = [
493
- STREAM_NOTIFY_CONNECT => 'CONNECT',
494
- STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED',
495
- STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT',
496
- STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS',
497
- STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS',
498
- STREAM_NOTIFY_REDIRECTED => 'REDIRECTED',
499
- STREAM_NOTIFY_PROGRESS => 'PROGRESS',
500
- STREAM_NOTIFY_FAILURE => 'FAILURE',
501
- STREAM_NOTIFY_COMPLETED => 'COMPLETED',
502
- STREAM_NOTIFY_RESOLVE => 'RESOLVE',
503
  ];
504
- static $args = ['severity', 'message', 'message_code',
505
- 'bytes_transferred', 'bytes_max'];
506
 
507
- $value = \GuzzleHttp\debug_resource($value);
508
  $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment('');
509
- $this->addNotification(
510
  $params,
511
- function () use ($ident, $value, $map, $args) {
512
- $passed = func_get_args();
513
- $code = array_shift($passed);
514
- fprintf($value, '<%s> [%s] ', $ident, $map[$code]);
515
- foreach (array_filter($passed) as $i => $v) {
516
- fwrite($value, $args[$i] . ': "' . $v . '" ');
517
  }
518
- fwrite($value, "\n");
519
  }
520
  );
521
  }
522
 
523
- private function addNotification(array &$params, callable $notify)
524
  {
525
  // Wrap the existing function if needed.
526
  if (!isset($params['notification'])) {
527
  $params['notification'] = $notify;
528
  } else {
529
- $params['notification'] = $this->callArray([
530
  $params['notification'],
531
  $notify
532
  ]);
533
  }
534
  }
535
 
536
- private function callArray(array $functions)
537
  {
538
- return function () use ($functions) {
539
- $args = func_get_args();
540
  foreach ($functions as $fn) {
541
- call_user_func_array($fn, $args);
542
  }
543
  };
544
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Handler;
4
 
5
  use GuzzleHttp\Exception\ConnectException;
6
  use GuzzleHttp\Exception\RequestException;
7
+ use GuzzleHttp\Promise as P;
8
  use GuzzleHttp\Promise\FulfilledPromise;
9
  use GuzzleHttp\Promise\PromiseInterface;
10
  use GuzzleHttp\Psr7;
13
  use Psr\Http\Message\RequestInterface;
14
  use Psr\Http\Message\ResponseInterface;
15
  use Psr\Http\Message\StreamInterface;
16
+ use Psr\Http\Message\UriInterface;
17
 
18
  /**
19
  * HTTP handler that uses PHP's HTTP stream wrapper.
20
+ *
21
+ * @final
22
  */
23
  class StreamHandler
24
  {
25
+ /**
26
+ * @var array
27
+ */
28
  private $lastHeaders = [];
29
 
30
  /**
32
  *
33
  * @param RequestInterface $request Request to send.
34
  * @param array $options Request transfer options.
 
 
35
  */
36
+ public function __invoke(RequestInterface $request, array $options): PromiseInterface
37
  {
38
  // Sleep if there is a delay specified.
39
  if (isset($options['delay'])) {
40
+ \usleep($options['delay'] * 1000);
41
  }
42
 
43
  $startTime = isset($options['on_stats']) ? Utils::currentTime() : null;
64
  // Determine if the error was a networking error.
65
  $message = $e->getMessage();
66
  // This list can probably get more comprehensive.
67
+ if (false !== \strpos($message, 'getaddrinfo') // DNS lookup failed
68
+ || false !== \strpos($message, 'Connection refused')
69
+ || false !== \strpos($message, "couldn't connect to host") // error on HHVM
70
+ || false !== \strpos($message, "connection attempt failed")
71
  ) {
72
  $e = new ConnectException($e->getMessage(), $request, $e);
73
+ } else {
74
+ $e = RequestException::wrapException($request, $e);
75
  }
 
76
  $this->invokeStats($options, $request, $startTime, null, $e);
77
 
78
+ return P\Create::rejectionFor($e);
79
  }
80
  }
81
 
82
  private function invokeStats(
83
  array $options,
84
  RequestInterface $request,
85
+ ?float $startTime,
86
  ResponseInterface $response = null,
87
+ \Throwable $error = null
88
+ ): void {
89
  if (isset($options['on_stats'])) {
90
+ $stats = new TransferStats($request, $response, Utils::currentTime() - $startTime, $error, []);
91
+ ($options['on_stats'])($stats);
 
 
 
 
 
 
92
  }
93
  }
94
 
95
+ /**
96
+ * @param resource $stream
97
+ */
98
+ private function createResponse(RequestInterface $request, array $options, $stream, ?float $startTime): PromiseInterface
99
+ {
 
100
  $hdrs = $this->lastHeaders;
101
  $this->lastHeaders = [];
102
+ $parts = \explode(' ', \array_shift($hdrs), 3);
103
+ $ver = \explode('/', $parts[0])[1];
104
+ $status = (int) $parts[1];
105
+ $reason = $parts[2] ?? null;
106
+ $headers = Utils::headersFromLines($hdrs);
107
+ [$stream, $headers] = $this->checkDecode($options, $headers, $stream);
108
+ $stream = Psr7\Utils::streamFor($stream);
109
  $sink = $stream;
110
 
111
+ if (\strcasecmp('HEAD', $request->getMethod())) {
112
  $sink = $this->createSink($stream, $options);
113
  }
114
 
120
  } catch (\Exception $e) {
121
  $msg = 'An error was encountered during the on_headers event';
122
  $ex = new RequestException($msg, $request, $response, $e);
123
+ return P\Create::rejectionFor($ex);
124
  }
125
  }
126
 
127
  // Do not drain when the request is a HEAD request because they have
128
  // no body.
129
  if ($sink !== $stream) {
130
+ $this->drain($stream, $sink, $response->getHeaderLine('Content-Length'));
 
 
 
 
131
  }
132
 
133
  $this->invokeStats($options, $request, $startTime, $response, null);
135
  return new FulfilledPromise($response);
136
  }
137
 
138
+ private function createSink(StreamInterface $stream, array $options): StreamInterface
139
  {
140
  if (!empty($options['stream'])) {
141
  return $stream;
142
  }
143
 
144
+ $sink = $options['sink'] ?? \fopen('php://temp', 'r+');
 
 
145
 
146
+ return \is_string($sink) ? new Psr7\LazyOpenStream($sink, 'w+') : Psr7\Utils::streamFor($sink);
 
 
147
  }
148
 
149
+ /**
150
+ * @param resource $stream
151
+ */
152
+ private function checkDecode(array $options, array $headers, $stream): array
153
  {
154
  // Automatically decode responses when instructed.
155
  if (!empty($options['decode_content'])) {
156
+ $normalizedKeys = Utils::normalizeHeaderKeys($headers);
157
  if (isset($normalizedKeys['content-encoding'])) {
158
  $encoding = $headers[$normalizedKeys['content-encoding']];
159
  if ($encoding[0] === 'gzip' || $encoding[0] === 'deflate') {
160
+ $stream = new Psr7\InflateStream(Psr7\Utils::streamFor($stream));
161
+ $headers['x-encoded-content-encoding'] = $headers[$normalizedKeys['content-encoding']];
162
+
 
 
163
  // Remove content-encoding header
164
  unset($headers[$normalizedKeys['content-encoding']]);
165
+
166
  // Fix content-length header
167
  if (isset($normalizedKeys['content-length'])) {
168
+ $headers['x-encoded-content-length'] = $headers[$normalizedKeys['content-length']];
 
 
169
  $length = (int) $stream->getSize();
170
  if ($length === 0) {
171
  unset($headers[$normalizedKeys['content-length']]);
183
  /**
184
  * Drains the source stream into the "sink" client option.
185
  *
186
+ * @param string $contentLength Header specifying the amount of
187
+ * data to read.
 
 
188
  *
 
189
  * @throws \RuntimeException when the sink option is invalid.
190
  */
191
+ private function drain(StreamInterface $source, StreamInterface $sink, string $contentLength): StreamInterface
192
+ {
 
 
 
193
  // If a content-length header is provided, then stop reading once
194
  // that number of bytes has been read. This can prevent infinitely
195
  // reading from a stream when dealing with servers that do not honor
196
  // Connection: Close headers.
197
+ Psr7\Utils::copyToStream(
198
  $source,
199
  $sink,
200
+ (\strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1
201
  );
202
 
203
  $sink->seek(0);
212
  * @param callable $callback Callable that returns stream resource
213
  *
214
  * @return resource
215
+ *
216
  * @throws \RuntimeException on error
217
  */
218
  private function createResource(callable $callback)
219
  {
220
+ $errors = [];
221
+ \set_error_handler(static function ($_, $msg, $file, $line) use (&$errors): bool {
222
  $errors[] = [
223
  'message' => $msg,
224
  'file' => $file,
228
  });
229
 
230
  $resource = $callback();
231
+ \restore_error_handler();
232
 
233
  if (!$resource) {
234
  $message = 'Error creating resource: ';
235
  foreach ($errors as $err) {
236
  foreach ($err as $key => $value) {
237
+ $message .= "[$key] $value" . \PHP_EOL;
238
  }
239
  }
240
+ throw new \RuntimeException(\trim($message));
241
  }
242
 
243
  return $resource;
244
  }
245
 
246
+ /**
247
+ * @return resource
248
+ */
249
  private function createStream(RequestInterface $request, array $options)
250
  {
251
  static $methods;
252
  if (!$methods) {
253
+ $methods = \array_flip(\get_class_methods(__CLASS__));
254
  }
255
 
256
  // HTTP/1.1 streams using the PHP stream wrapper require a
269
  $params = [];
270
  $context = $this->getDefaultContext($request);
271
 
272
+ if (isset($options['on_headers']) && !\is_callable($options['on_headers'])) {
273
  throw new \InvalidArgumentException('on_headers must be callable');
274
  }
275
 
283
  }
284
 
285
  if (isset($options['stream_context'])) {
286
+ if (!\is_array($options['stream_context'])) {
287
  throw new \InvalidArgumentException('stream_context must be an array');
288
  }
289
+ $context = \array_replace_recursive($context, $options['stream_context']);
 
 
 
290
  }
291
 
292
  // Microsoft NTLM authentication only supported with curl handler
293
+ if (isset($options['auth'][2]) && 'ntlm' === $options['auth'][2]) {
 
 
 
 
294
  throw new \InvalidArgumentException('Microsoft NTLM authentication only supported with curl handler');
295
  }
296
 
297
  $uri = $this->resolveHost($request, $options);
298
 
299
+ $contextResource = $this->createResource(
300
+ static function () use ($context, $params) {
301
+ return \stream_context_create($context, $params);
302
  }
303
  );
304
 
305
  return $this->createResource(
306
+ function () use ($uri, &$http_response_header, $contextResource, $context, $options, $request) {
307
+ $resource = \fopen((string) $uri, 'r', false, $contextResource);
308
  $this->lastHeaders = $http_response_header;
309
 
310
+ if (false === $resource) {
311
+ throw new ConnectException(sprintf('Connection refused for URI %s', $uri), $request, null, $context);
312
+ }
313
+
314
  if (isset($options['read_timeout'])) {
315
  $readTimeout = $options['read_timeout'];
316
  $sec = (int) $readTimeout;
317
  $usec = ($readTimeout - $sec) * 100000;
318
+ \stream_set_timeout($resource, $sec, $usec);
319
  }
320
 
321
  return $resource;
323
  );
324
  }
325
 
326
+ private function resolveHost(RequestInterface $request, array $options): UriInterface
327
  {
328
  $uri = $request->getUri();
329
 
330
+ if (isset($options['force_ip_resolve']) && !\filter_var($uri->getHost(), \FILTER_VALIDATE_IP)) {
331
  if ('v4' === $options['force_ip_resolve']) {
332
+ $records = \dns_get_record($uri->getHost(), \DNS_A);
333
+ if (false === $records || !isset($records[0]['ip'])) {
334
+ throw new ConnectException(\sprintf("Could not resolve IPv4 address for host '%s'", $uri->getHost()), $request);
 
 
 
 
 
 
335
  }
336
+ return $uri->withHost($records[0]['ip']);
337
+ }
338
+ if ('v6' === $options['force_ip_resolve']) {
339
+ $records = \dns_get_record($uri->getHost(), \DNS_AAAA);
340
+ if (false === $records || !isset($records[0]['ipv6'])) {
341
+ throw new ConnectException(\sprintf("Could not resolve IPv6 address for host '%s'", $uri->getHost()), $request);
 
 
 
 
 
342
  }
343
+ return $uri->withHost('[' . $records[0]['ipv6'] . ']');
344
  }
345
  }
346
 
347
  return $uri;
348
  }
349
 
350
+ private function getDefaultContext(RequestInterface $request): array
351
  {
352
  $headers = '';
353
  foreach ($request->getHeaders() as $name => $value) {
376
  }
377
  }
378
 
379
+ $context['http']['header'] = \rtrim($context['http']['header']);
380
 
381
  return $context;
382
  }
383
 
384
+ /**
385
+ * @param mixed $value as passed via Request transfer options.
386
+ */
387
+ private function add_proxy(RequestInterface $request, array &$options, $value, array &$params): void
388
  {
389
+ if (!\is_array($value)) {
390
  $options['http']['proxy'] = $value;
391
  } else {
392
  $scheme = $request->getUri()->getScheme();
393
  if (isset($value[$scheme])) {
394
+ if (!isset($value['no']) || !Utils::isHostInNoProxy($request->getUri()->getHost(), $value['no'])) {
 
 
 
 
 
395
  $options['http']['proxy'] = $value[$scheme];
396
  }
397
  }
398
  }
399
  }
400
 
401
+ /**
402
+ * @param mixed $value as passed via Request transfer options.
403
+ */
404
+ private function add_timeout(RequestInterface $request, array &$options, $value, array &$params): void
405
  {
406
  if ($value > 0) {
407
  $options['http']['timeout'] = $value;
408
  }
409
  }
410
 
411
+ /**
412
+ * @param mixed $value as passed via Request transfer options.
413
+ */
414
+ private function add_verify(RequestInterface $request, array &$options, $value, array &$params): void
415
  {
416
+ if ($value === false) {
 
 
 
 
 
 
 
 
 
 
 
417
  $options['ssl']['verify_peer'] = false;
418
  $options['ssl']['verify_peer_name'] = false;
419
+
420
  return;
421
+ }
422
+
423
+ if (\is_string($value)) {
424
+ $options['ssl']['cafile'] = $value;
425
+ if (!\file_exists($value)) {
426
+ throw new \RuntimeException("SSL CA bundle not found: $value");
427
+ }
428
+ } elseif ($value !== true) {
429
  throw new \InvalidArgumentException('Invalid verify request option');
430
  }
431
 
434
  $options['ssl']['allow_self_signed'] = false;
435
  }
436
 
437
+ /**
438
+ * @param mixed $value as passed via Request transfer options.
439
+ */
440
+ private function add_cert(RequestInterface $request, array &$options, $value, array &$params): void
441
  {
442
+ if (\is_array($value)) {
443
  $options['ssl']['passphrase'] = $value[1];
444
  $value = $value[0];
445
  }
446
 
447
+ if (!\file_exists($value)) {
448
  throw new \RuntimeException("SSL certificate not found: {$value}");
449
  }
450
 
451
  $options['ssl']['local_cert'] = $value;
452
  }
453
 
454
+ /**
455
+ * @param mixed $value as passed via Request transfer options.
456
+ */
457
+ private function add_progress(RequestInterface $request, array &$options, $value, array &$params): void
458
  {
459
+ self::addNotification(
460
  $params,
461
+ static function ($code, $a, $b, $c, $transferred, $total) use ($value) {
462
+ if ($code == \STREAM_NOTIFY_PROGRESS) {
463
  $value($total, $transferred, null, null);
464
  }
465
  }
466
  );
467
  }
468
 
469
+ /**
470
+ * @param mixed $value as passed via Request transfer options.
471
+ */
472
+ private function add_debug(RequestInterface $request, array &$options, $value, array &$params): void
473
  {
474
  if ($value === false) {
475
  return;
476
  }
477
 
478
  static $map = [
479
+ \STREAM_NOTIFY_CONNECT => 'CONNECT',
480
+ \STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED',
481
+ \STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT',
482
+ \STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS',
483
+ \STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS',
484
+ \STREAM_NOTIFY_REDIRECTED => 'REDIRECTED',
485
+ \STREAM_NOTIFY_PROGRESS => 'PROGRESS',
486
+ \STREAM_NOTIFY_FAILURE => 'FAILURE',
487
+ \STREAM_NOTIFY_COMPLETED => 'COMPLETED',
488
+ \STREAM_NOTIFY_RESOLVE => 'RESOLVE',
489
  ];
490
+ static $args = ['severity', 'message', 'message_code', 'bytes_transferred', 'bytes_max'];
 
491
 
492
+ $value = Utils::debugResource($value);
493
  $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment('');
494
+ self::addNotification(
495
  $params,
496
+ static function (int $code, ...$passed) use ($ident, $value, $map, $args): void {
497
+ \fprintf($value, '<%s> [%s] ', $ident, $map[$code]);
498
+ foreach (\array_filter($passed) as $i => $v) {
499
+ \fwrite($value, $args[$i] . ': "' . $v . '" ');
 
 
500
  }
501
+ \fwrite($value, "\n");
502
  }
503
  );
504
  }
505
 
506
+ private static function addNotification(array &$params, callable $notify): void
507
  {
508
  // Wrap the existing function if needed.
509
  if (!isset($params['notification'])) {
510
  $params['notification'] = $notify;
511
  } else {
512
+ $params['notification'] = self::callArray([
513
  $params['notification'],
514
  $notify
515
  ]);
516
  }
517
  }
518
 
519
+ private static function callArray(array $functions): callable
520
  {
521
+ return static function (...$args) use ($functions) {
 
522
  foreach ($functions as $fn) {
523
+ $fn(...$args);
524
  }
525
  };
526
  }
vendor/guzzlehttp/guzzle/src/HandlerStack.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
  use GuzzleHttp\Promise\PromiseInterface;
@@ -8,16 +9,24 @@ use Psr\Http\Message\ResponseInterface;
8
  /**
9
  * Creates a composed Guzzle handler function by stacking middlewares on top of
10
  * an HTTP handler function.
 
 
11
  */
12
  class HandlerStack
13
  {
14
- /** @var callable|null */
 
 
15
  private $handler;
16
 
17
- /** @var array */
 
 
18
  private $stack = [];
19
 
20
- /** @var callable|null */
 
 
21
  private $cached;
22
 
23
  /**
@@ -31,15 +40,13 @@ class HandlerStack
31
  * The returned handler stack can be passed to a client in the "handler"
32
  * option.
33
  *
34
- * @param callable $handler HTTP handler function to use with the stack. If no
35
- * handler is provided, the best handler for your
36
- * system will be utilized.
37
- *
38
- * @return HandlerStack
39
  */
40
- public static function create(callable $handler = null)
41
  {
42
- $stack = new self($handler ?: choose_handler());
43
  $stack->push(Middleware::httpErrors(), 'http_errors');
44
  $stack->push(Middleware::redirect(), 'allow_redirects');
45
  $stack->push(Middleware::cookies(), 'cookies');
@@ -49,7 +56,7 @@ class HandlerStack
49
  }
50
 
51
  /**
52
- * @param callable $handler Underlying HTTP handler.
53
  */
54
  public function __construct(callable $handler = null)
55
  {
@@ -59,9 +66,6 @@ class HandlerStack
59
  /**
60
  * Invokes the handler stack as a composed handler
61
  *
62
- * @param RequestInterface $request
63
- * @param array $options
64
- *
65
  * @return ResponseInterface|PromiseInterface
66
  */
67
  public function __invoke(RequestInterface $request, array $options)
@@ -80,12 +84,13 @@ class HandlerStack
80
  {
81
  $depth = 0;
82
  $stack = [];
83
- if ($this->handler) {
 
84
  $stack[] = "0) Handler: " . $this->debugCallable($this->handler);
85
  }
86
 
87
  $result = '';
88
- foreach (array_reverse($this->stack) as $tuple) {
89
  $depth++;
90
  $str = "{$depth}) Name: '{$tuple[1]}', ";
91
  $str .= "Function: " . $this->debugCallable($tuple[0]);
@@ -93,7 +98,7 @@ class HandlerStack
93
  $stack[] = $str;
94
  }
95
 
96
- foreach (array_keys($stack) as $k) {
97
  $result .= "< {$stack[$k]}\n";
98
  }
99
 
@@ -103,10 +108,10 @@ class HandlerStack
103
  /**
104
  * Set the HTTP handler that actually returns a promise.
105
  *
106
- * @param callable $handler Accepts a request and array of options and
107
- * returns a Promise.
108
  */
109
- public function setHandler(callable $handler)
110
  {
111
  $this->handler = $handler;
112
  $this->cached = null;
@@ -114,33 +119,31 @@ class HandlerStack
114
 
115
  /**
116
  * Returns true if the builder has a handler.
117
- *
118
- * @return bool
119
  */
120
- public function hasHandler()
121
  {
122
- return (bool) $this->handler;
123
  }
124
 
125
  /**
126
  * Unshift a middleware to the bottom of the stack.
127
  *
128
- * @param callable $middleware Middleware function
129
- * @param string $name Name to register for this middleware.
130
  */
131
- public function unshift(callable $middleware, $name = null)
132
  {
133
- array_unshift($this->stack, [$middleware, $name]);
134
  $this->cached = null;
135
  }
136
 
137
  /**
138
  * Push a middleware to the top of the stack.
139
  *
140
- * @param callable $middleware Middleware function
141
- * @param string $name Name to register for this middleware.
142
  */
143
- public function push(callable $middleware, $name = '')
144
  {
145
  $this->stack[] = [$middleware, $name];
146
  $this->cached = null;
@@ -149,11 +152,11 @@ class HandlerStack
149
  /**
150
  * Add a middleware before another middleware by name.
151
  *
152
- * @param string $findName Middleware to find
153
- * @param callable $middleware Middleware function
154
- * @param string $withName Name to register for this middleware.
155
  */
156
- public function before($findName, callable $middleware, $withName = '')
157
  {
158
  $this->splice($findName, $withName, $middleware, true);
159
  }
@@ -161,11 +164,11 @@ class HandlerStack
161
  /**
162
  * Add a middleware after another middleware by name.
163
  *
164
- * @param string $findName Middleware to find
165
- * @param callable $middleware Middleware function
166
- * @param string $withName Name to register for this middleware.
167
  */
168
- public function after($findName, callable $middleware, $withName = '')
169
  {
170
  $this->splice($findName, $withName, $middleware, false);
171
  }
@@ -175,13 +178,13 @@ class HandlerStack
175
  *
176
  * @param callable|string $remove Middleware to remove by instance or name.
177
  */
178
- public function remove($remove)
179
  {
180
  $this->cached = null;
181
- $idx = is_callable($remove) ? 0 : 1;
182
- $this->stack = array_values(array_filter(
183
  $this->stack,
184
- function ($tuple) use ($idx, $remove) {
185
  return $tuple[$idx] !== $remove;
186
  }
187
  ));
@@ -190,16 +193,17 @@ class HandlerStack
190
  /**
191
  * Compose the middleware and handler into a single callable function.
192
  *
193
- * @return callable
194
  */
195
- public function resolve()
196
  {
197
- if (!$this->cached) {
198
- if (!($prev = $this->handler)) {
199
  throw new \LogicException('No handler has been specified');
200
  }
201
 
202
- foreach (array_reverse($this->stack) as $fn) {
 
203
  $prev = $fn[0]($prev);
204
  }
205
 
@@ -209,11 +213,7 @@ class HandlerStack
209
  return $this->cached;
210
  }
211
 
212
- /**
213
- * @param string $name
214
- * @return int
215
- */
216
- private function findByName($name)
217
  {
218
  foreach ($this->stack as $k => $v) {
219
  if ($v[1] === $name) {
@@ -226,13 +226,8 @@ class HandlerStack
226
 
227
  /**
228
  * Splices a function into the middleware list at a specific position.
229
- *
230
- * @param string $findName
231
- * @param string $withName
232
- * @param callable $middleware
233
- * @param bool $before
234
  */
235
- private function splice($findName, $withName, callable $middleware, $before)
236
  {
237
  $this->cached = null;
238
  $idx = $this->findByName($findName);
@@ -240,38 +235,37 @@ class HandlerStack
240
 
241
  if ($before) {
242
  if ($idx === 0) {
243
- array_unshift($this->stack, $tuple);
244
  } else {
245
  $replacement = [$tuple, $this->stack[$idx]];
246
- array_splice($this->stack, $idx, 1, $replacement);
247
  }
248
- } elseif ($idx === count($this->stack) - 1) {
249
  $this->stack[] = $tuple;
250
  } else {
251
  $replacement = [$this->stack[$idx], $tuple];
252
- array_splice($this->stack, $idx, 1, $replacement);
253
  }
254
  }
255
 
256
  /**
257
  * Provides a debug string for a given callable.
258
  *
259
- * @param array|callable $fn Function to write as a string.
260
- *
261
- * @return string
262
  */
263
- private function debugCallable($fn)
264
  {
265
- if (is_string($fn)) {
266
  return "callable({$fn})";
267
  }
268
 
269
- if (is_array($fn)) {
270
- return is_string($fn[0])
271
  ? "callable({$fn[0]}::{$fn[1]})"
272
- : "callable(['" . get_class($fn[0]) . "', '{$fn[1]}'])";
273
  }
274
 
275
- return 'callable(' . spl_object_hash($fn) . ')';
 
276
  }
277
  }
1
  <?php
2
+
3
  namespace GuzzleHttp;
4
 
5
  use GuzzleHttp\Promise\PromiseInterface;
9
  /**
10
  * Creates a composed Guzzle handler function by stacking middlewares on top of
11
  * an HTTP handler function.
12
+ *
13
+ * @final
14
  */
15
  class HandlerStack
16
  {
17
+ /**
18
+ * @var null|callable(RequestInterface, array): PromiseInterface
19
+ */
20
  private $handler;
21
 
22
+ /**
23
+ * @var array{(callable(callable(RequestInterface, array): PromiseInterface): callable), (string|null)}[]
24
+ */
25
  private $stack = [];
26
 
27
+ /**
28
+ * @var null|callable(RequestInterface, array): PromiseInterface
29
+ */
30
  private $cached;
31
 
32
  /**
40
  * The returned handler stack can be passed to a client in the "handler"
41
  * option.
42
  *
43
+ * @param null|callable(RequestInterface, array): PromiseInterface $handler HTTP handler function to use with the stack. If no
44
+ * handler is provided, the best handler for your
45
+ * system will be utilized.
 
 
46
  */
47
+ public static function create(?callable $handler = null): self
48
  {
49
+ $stack = new self($handler ?: Utils::chooseHandler());
50
  $stack->push(Middleware::httpErrors(), 'http_errors');
51
  $stack->push(Middleware::redirect(), 'allow_redirects');
52
  $stack->push(Middleware::cookies(), 'cookies');
56
  }
57
 
58
  /**
59
+ * @param null|callable(RequestInterface, array): PromiseInterface $handler Underlying HTTP handler.
60
  */
61
  public function __construct(callable $handler = null)
62
  {
66
  /**
67
  * Invokes the handler stack as a composed handler
68
  *
 
 
 
69
  * @return ResponseInterface|PromiseInterface
70
  */
71
  public function __invoke(RequestInterface $request, array $options)
84
  {
85
  $depth = 0;
86
  $stack = [];
87
+
88
+ if ($this->handler !== null) {
89
  $stack[] = "0) Handler: " . $this->debugCallable($this->handler);
90
  }
91
 
92
  $result = '';
93
+ foreach (\array_reverse($this->stack) as $tuple) {
94
  $depth++;
95
  $str = "{$depth}) Name: '{$tuple[1]}', ";
96
  $str .= "Function: " . $this->debugCallable($tuple[0]);
98
  $stack[] = $str;
99
  }
100
 
101
+ foreach (\array_keys($stack) as $k) {
102
  $result .= "< {$stack[$k]}\n";
103
  }
104
 
108
  /**
109
  * Set the HTTP handler that actually returns a promise.
110
  *
111
+ * @param callable(RequestInterface, array): PromiseInterface $handler Accepts a request and array of options and
112
+ * returns a Promise.
113
  */
114
+ public function setHandler(callable $handler): void
115
  {
116
  $this->handler = $handler;
117
  $this->cached = null;
119
 
120
  /**
121
  * Returns true if the builder has a handler.
 
 
122
  */
123
+ public function hasHandler(): bool
124
  {
125
+ return $this->handler !== null ;
126
  }
127
 
128
  /**
129
  * Unshift a middleware to the bottom of the stack.
130
  *
131
+ * @param callable(callable): callable $middleware Middleware function
132
+ * @param string $name Name to register for this middleware.
133
  */
134
+ public function unshift(callable $middleware, ?string $name = null): void
135
  {
136
+ \array_unshift($this->stack, [$middleware, $name]);
137
  $this->cached = null;
138
  }
139
 
140
  /**
141
  * Push a middleware to the top of the stack.
142
  *
143
+ * @param callable(callable): callable $middleware Middleware function
144
+ * @param string $name Name to register for this middleware.
145
  */
146
+ public function push(callable $middleware, string $name = ''): void
147
  {
148
  $this->stack[] = [$middleware, $name];
149
  $this->cached = null;
152
  /**
153
  * Add a middleware before another middleware by name.
154
  *
155
+ * @param string $findName Middleware to find
156
+ * @param callable(callable): callable $middleware Middleware function
157
+ * @param string $withName Name to register for this middleware.
158
  */
159
+ public function before(string $findName, callable $middleware, string $withName = ''): void
160
  {
161
  $this->splice($findName, $withName, $middleware, true);
162
  }
164
  /**
165
  * Add a middleware after another middleware by name.
166
  *
167
+ * @param string $findName Middleware to find
168
+ * @param callable(callable): callable $middleware Middleware function
169
+ * @param string $withName Name to register for this middleware.
170
  */
171
+ public function after(string $findName, callable $middleware, string $withName = ''): void
172
  {
173
  $this->splice($findName, $withName, $middleware, false);
174
  }
178
  *
179
  * @param callable|string $remove Middleware to remove by instance or name.
180
  */
181
+ public function remove($remove): void
182
  {
183
  $this->cached = null;
184
+ $idx = \is_callable($remove) ? 0 : 1;
185
+ $this->stack = \array_values(\array_filter(
186
  $this->stack,
187
+ static function ($tuple) use ($idx, $remove) {
188
  return $tuple[$idx] !== $remove;
189
  }
190
  ));
193
  /**
194
  * Compose the middleware and handler into a single callable function.
195
  *
196
+ * @return callable(RequestInterface, array): PromiseInterface
197
  */
198
+ public function resolve(): callable
199
  {
200
+ if ($this->cached === null) {
201
+ if (($prev = $this->handler) === null) {
202
  throw new \LogicException('No handler has been specified');
203
  }
204
 
205
+ foreach (\array_reverse($this->stack) as $fn) {
206
+ /** @var callable(RequestInterface, array): PromiseInterface $prev */
207
  $prev = $fn[0]($prev);
208
  }
209
 
213
  return $this->cached;
214
  }
215
 
216
+ private function findByName(string $name): int
 
 
 
 
217
  {
218
  foreach ($this->stack as $k => $v) {
219
  if ($v[1] === $name) {
226
 
227
  /**
228
  * Splices a function into the middleware list at a specific position.
 
 
 
 
 
229
  */
230
+ private function splice(string $findName, string $withName, callable $middleware, bool $before): void
231
  {
232
  $this->cached = null;
233
  $idx = $this->findByName($findName);
235
 
236
  if ($before) {
237
  if ($idx === 0) {
238
+ \array_unshift($this->stack, $tuple);
239
  } else {
240
  $replacement = [$tuple, $this->stack[$idx]];
241
+ \array_splice($this->stack, $idx, 1, $replacement);
242
  }
243
+ } elseif ($idx === \count($this->stack) - 1) {
244
  $this->stack[] = $tuple;
245
  } else {
246
  $replacement = [$this->stack[$idx], $tuple];
247
+ \array_splice($this->stack, $idx, 1, $replacement);
248
  }
249
  }
250
 
251
  /**
252
  * Provides a debug string for a given callable.
253
  *
254
+ * @param callable $fn Function to write as a string.
 
 
255
  */
256
+ private function debugCallable($fn): string
257
  {
258
+ if (\is_string($fn)) {
259
  return "callable({$fn})";
260
  }
261
 
262
+ if (\is_array($fn)) {
263
+ return \is_string($fn[0])
264
  ? "callable({$fn[0]}::{$fn[1]})"
265
+ : "callable(['" . \get_class($fn[0]) . "', '{$fn[1]}'])";
266
  }
267
 
268
+ /** @var object $fn */
269
+ return 'callable(' . \spl_object_hash($fn) . ')';
270
  }
271
  }
vendor/guzzlehttp/guzzle/src/MessageFormatter.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
  use Psr\Http\Message\MessageInterface;
@@ -31,25 +32,31 @@ use Psr\Http\Message\ResponseInterface;
31
  * - {res_headers}: Response headers
32
  * - {req_body}: Request body
33
  * - {res_body}: Response body
 
 
34
  */
35
- class MessageFormatter
36
  {
37
  /**
38
  * Apache Common Log Format.
39
- * @link http://httpd.apache.org/docs/2.4/logs.html#common
 
 
40
  * @var string
41
  */
42
- const CLF = "{hostname} {req_header_User-Agent} - [{date_common_log}] \"{method} {target} HTTP/{version}\" {code} {res_header_Content-Length}";
43
- const DEBUG = ">>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}";
44
- const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}';
45
 
46
- /** @var string Template used to format log messages */
 
 
47
  private $template;
48
 
49
  /**
50
  * @param string $template Log message template
51
  */
52
- public function __construct($template = self::CLF)
53
  {
54
  $this->template = $template ?: self::CLF;
55
  }
@@ -57,20 +64,16 @@ class MessageFormatter
57
  /**
58
  * Returns a formatted message string.
59
  *
60
- * @param RequestInterface $request Request that was sent
61
- * @param ResponseInterface $response Response that was received
62
- * @param \Exception $error Exception that was received
63
- *
64
- * @return string
65
  */
66
- public function format(
67
- RequestInterface $request,
68
- ResponseInterface $response = null,
69
- \Exception $error = null
70
- ) {
71
  $cache = [];
72
 
73
- return preg_replace_callback(
 
74
  '/{\s*([A-Za-z_\-\.0-9]+)\s*}/',
75
  function (array $matches) use ($request, $response, $error, &$cache) {
76
  if (isset($cache[$matches[1]])) {
@@ -80,20 +83,20 @@ class MessageFormatter
80
  $result = '';
81
  switch ($matches[1]) {
82
  case 'request':
83
- $result = Psr7\str($request);
84
  break;
85
  case 'response':
86
- $result = $response ? Psr7\str($response) : '';
87
  break;
88
  case 'req_headers':
89
- $result = trim($request->getMethod()
90
  . ' ' . $request->getRequestTarget())
91
  . ' HTTP/' . $request->getProtocolVersion() . "\r\n"
92
  . $this->headers($request);
93
  break;
94
  case 'res_headers':
95
  $result = $response ?
96
- sprintf(
97
  'HTTP/%s %d %s',
98
  $response->getProtocolVersion(),
99
  $response->getStatusCode(),
@@ -102,17 +105,29 @@ class MessageFormatter
102
  : 'NULL';
103
  break;
104
  case 'req_body':
105
- $result = $request->getBody();
106
  break;
107
  case 'res_body':
108
- $result = $response ? $response->getBody() : 'NULL';
 
 
 
 
 
 
 
 
 
 
 
 
109
  break;
110
  case 'ts':
111
  case 'date_iso_8601':
112
- $result = gmdate('c');
113
  break;
114
  case 'date_common_log':
115
- $result = date('d/M/Y:H:i:s O');
116
  break;
117
  case 'method':
118
  $result = $request->getMethod();
@@ -139,7 +154,7 @@ class MessageFormatter
139
  $result = $request->getHeaderLine('Host');
140
  break;
141
  case 'hostname':
142
- $result = gethostname();
143
  break;
144
  case 'code':
145
  $result = $response ? $response->getStatusCode() : 'NULL';
@@ -152,11 +167,11 @@ class MessageFormatter
152
  break;
153
  default:
154
  // handle prefixed dynamic headers
155
- if (strpos($matches[1], 'req_header_') === 0) {
156
- $result = $request->getHeaderLine(substr($matches[1], 11));
157
- } elseif (strpos($matches[1], 'res_header_') === 0) {
158
  $result = $response
159
- ? $response->getHeaderLine(substr($matches[1], 11))
160
  : 'NULL';
161
  }
162
  }
@@ -170,16 +185,14 @@ class MessageFormatter
170
 
171
  /**
172
  * Get headers from message as string
173
- *
174
- * @return string
175
  */
176
- private function headers(MessageInterface $message)
177
  {
178
  $result = '';
179
  foreach ($message->getHeaders() as $name => $values) {
180
- $result .= $name . ': ' . implode(', ', $values) . "\r\n";
181
  }
182
 
183
- return trim($result);
184
  }
185
  }
1
  <?php
2
+
3
  namespace GuzzleHttp;
4
 
5
  use Psr\Http\Message\MessageInterface;
32
  * - {res_headers}: Response headers
33
  * - {req_body}: Request body
34
  * - {res_body}: Response body
35
+ *
36
+ * @final
37
  */
38
+ class MessageFormatter implements MessageFormatterInterface
39
  {
40
  /**
41
  * Apache Common Log Format.
42
+ *
43
+ * @link https://httpd.apache.org/docs/2.4/logs.html#common
44
+ *
45
  * @var string
46
  */
47
+ public const CLF = "{hostname} {req_header_User-Agent} - [{date_common_log}] \"{method} {target} HTTP/{version}\" {code} {res_header_Content-Length}";
48
+ public const DEBUG = ">>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}";
49
+ public const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}';
50
 
51
+ /**
52
+ * @var string Template used to format log messages
53
+ */
54
  private $template;
55
 
56
  /**
57
  * @param string $template Log message template
58
  */
59
+ public function __construct(?string $template = self::CLF)
60
  {
61
  $this->template = $template ?: self::CLF;
62
  }
64
  /**
65
  * Returns a formatted message string.
66
  *
67
+ * @param RequestInterface $request Request that was sent
68
+ * @param ResponseInterface|null $response Response that was received
69
+ * @param \Throwable|null $error Exception that was received
 
 
70
  */
71
+ public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string
72
+ {
 
 
 
73
  $cache = [];
74
 
75
+ /** @var string */
76
+ return \preg_replace_callback(
77
  '/{\s*([A-Za-z_\-\.0-9]+)\s*}/',
78
  function (array $matches) use ($request, $response, $error, &$cache) {
79
  if (isset($cache[$matches[1]])) {
83
  $result = '';
84
  switch ($matches[1]) {
85
  case 'request':
86
+ $result = Psr7\Message::toString($request);
87
  break;
88
  case 'response':
89
+ $result = $response ? Psr7\Message::toString($response) : '';
90
  break;
91
  case 'req_headers':
92
+ $result = \trim($request->getMethod()
93
  . ' ' . $request->getRequestTarget())
94
  . ' HTTP/' . $request->getProtocolVersion() . "\r\n"
95
  . $this->headers($request);
96
  break;
97
  case 'res_headers':
98
  $result = $response ?
99
+ \sprintf(
100
  'HTTP/%s %d %s',
101
  $response->getProtocolVersion(),
102
  $response->getStatusCode(),
105
  : 'NULL';
106
  break;
107
  case 'req_body':
108
+ $result = $request->getBody()->__toString();
109
  break;
110
  case 'res_body':
111
+ if (!$response instanceof ResponseInterface) {
112
+ $result = 'NULL';
113
+ break;
114
+ }
115
+
116
+ $body = $response->getBody();
117
+
118
+ if (!$body->isSeekable()) {
119
+ $result = 'RESPONSE_NOT_LOGGEABLE';
120
+ break;
121
+ }
122
+
123
+ $result = $response->getBody()->__toString();
124
  break;
125
  case 'ts':
126
  case 'date_iso_8601':
127
+ $result = \gmdate('c');
128
  break;
129
  case 'date_common_log':
130
+ $result = \date('d/M/Y:H:i:s O');
131
  break;
132
  case 'method':
133
  $result = $request->getMethod();
154
  $result = $request->getHeaderLine('Host');
155
  break;
156
  case 'hostname':
157
+ $result = \gethostname();
158
  break;
159
  case 'code':
160
  $result = $response ? $response->getStatusCode() : 'NULL';
167
  break;
168
  default:
169
  // handle prefixed dynamic headers
170
+ if (\strpos($matches[1], 'req_header_') === 0) {
171
+ $result = $request->getHeaderLine(\substr($matches[1], 11));
172
+ } elseif (\strpos($matches[1], 'res_header_') === 0) {
173
  $result = $response
174
+ ? $response->getHeaderLine(\substr($matches[1], 11))
175
  : 'NULL';
176
  }
177
  }
185
 
186
  /**
187
  * Get headers from message as string
 
 
188
  */
189
+ private function headers(MessageInterface $message): string
190
  {
191
  $result = '';
192
  foreach ($message->getHeaders() as $name => $values) {
193
+ $result .= $name . ': ' . \implode(', ', $values) . "\r\n";
194
  }
195
 
196
+ return \trim($result);
197
  }
198
  }
vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp;
4
+
5
+ use Psr\Http\Message\RequestInterface;
6
+ use Psr\Http\Message\ResponseInterface;
7
+
8
+ interface MessageFormatterInterface
9
+ {
10
+ /**
11
+ * Returns a formatted message string.
12
+ *
13
+ * @param RequestInterface $request Request that was sent
14
+ * @param ResponseInterface|null $response Response that was received
15
+ * @param \Throwable|null $error Exception that was received
16
+ */
17
+ public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string;
18
+ }
vendor/guzzlehttp/guzzle/src/Middleware.php CHANGED
@@ -1,10 +1,12 @@
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
  use GuzzleHttp\Cookie\CookieJarInterface;
5
  use GuzzleHttp\Exception\RequestException;
6
- use GuzzleHttp\Promise\RejectedPromise;
7
- use GuzzleHttp\Psr7;
 
8
  use Psr\Http\Message\ResponseInterface;
9
  use Psr\Log\LoggerInterface;
10
 
@@ -21,10 +23,10 @@ final class Middleware
21
  *
22
  * @return callable Returns a function that accepts the next handler.
23
  */
24
- public static function cookies()
25
  {
26
- return function (callable $handler) {
27
- return function ($request, array $options) use ($handler) {
28
  if (empty($options['cookies'])) {
29
  return $handler($request, $options);
30
  } elseif (!($options['cookies'] instanceof CookieJarInterface)) {
@@ -34,7 +36,7 @@ final class Middleware
34
  $request = $cookieJar->withCookieHeader($request);
35
  return $handler($request, $options)
36
  ->then(
37
- function ($response) use ($cookieJar, $request) {
38
  $cookieJar->extractCookies($request, $response);
39
  return $response;
40
  }
@@ -47,22 +49,24 @@ final class Middleware
47
  * Middleware that throws exceptions for 4xx or 5xx responses when the
48
  * "http_error" request option is set to true.
49
  *
50
- * @return callable Returns a function that accepts the next handler.
 
 
51
  */
52
- public static function httpErrors()
53
  {
54
- return function (callable $handler) {
55
- return function ($request, array $options) use ($handler) {
56
  if (empty($options['http_errors'])) {
57
  return $handler($request, $options);
58
  }
59
  return $handler($request, $options)->then(
60
- function (ResponseInterface $response) use ($request) {
61
  $code = $response->getStatusCode();
62
  if ($code < 400) {
63
  return $response;
64
  }
65
- throw RequestException::create($request, $response);
66
  }
67
  );
68
  };
@@ -72,21 +76,22 @@ final class Middleware
72
  /**
73
  * Middleware that pushes history data to an ArrayAccess container.
74
  *
75
- * @param array|\ArrayAccess $container Container to hold the history (by reference).
 
 
76
  *
77
- * @return callable Returns a function that accepts the next handler.
78
  * @throws \InvalidArgumentException if container is not an array or ArrayAccess.
79
  */
80
- public static function history(&$container)
81
  {
82
- if (!is_array($container) && !$container instanceof \ArrayAccess) {
83
  throw new \InvalidArgumentException('history container must be an array or object implementing ArrayAccess');
84
  }
85
 
86
- return function (callable $handler) use (&$container) {
87
- return function ($request, array $options) use ($handler, &$container) {
88
  return $handler($request, $options)->then(
89
- function ($value) use ($request, &$container, $options) {
90
  $container[] = [
91
  'request' => $request,
92
  'response' => $value,
@@ -95,14 +100,14 @@ final class Middleware
95
  ];
96
  return $value;
97
  },
98
- function ($reason) use ($request, &$container, $options) {
99
  $container[] = [
100
  'request' => $request,
101
  'response' => null,
102
  'error' => $reason,
103
  'options' => $options
104
  ];
105
- return \GuzzleHttp\Promise\rejection_for($reason);
106
  }
107
  );
108
  };
@@ -122,10 +127,10 @@ final class Middleware
122
  *
123
  * @return callable Returns a function that accepts the next handler.
124
  */
125
- public static function tap(callable $before = null, callable $after = null)
126
  {
127
- return function (callable $handler) use ($before, $after) {
128
- return function ($request, array $options) use ($handler, $before, $after) {
129
  if ($before) {
130
  $before($request, $options);
131
  }
@@ -143,9 +148,9 @@ final class Middleware
143
  *
144
  * @return callable Returns a function that accepts the next handler.
145
  */
146
- public static function redirect()
147
  {
148
- return function (callable $handler) {
149
  return new RedirectMiddleware($handler);
150
  };
151
  }
@@ -165,9 +170,9 @@ final class Middleware
165
  *
166
  * @return callable Returns a function that accepts the next handler.
167
  */
168
- public static function retry(callable $decider, callable $delay = null)
169
  {
170
- return function (callable $handler) use ($decider, $delay) {
171
  return new RetryMiddleware($decider, $handler, $delay);
172
  };
173
  }
@@ -176,29 +181,34 @@ final class Middleware
176
  * Middleware that logs requests, responses, and errors using a message
177
  * formatter.
178
  *
179
- * @param LoggerInterface $logger Logs messages.
180
- * @param MessageFormatter $formatter Formatter used to create message strings.
181
- * @param string $logLevel Level at which to log requests.
 
 
182
  *
183
  * @return callable Returns a function that accepts the next handler.
184
  */
185
- public static function log(LoggerInterface $logger, MessageFormatter $formatter, $logLevel = 'info' /* \Psr\Log\LogLevel::INFO */)
186
  {
187
- return function (callable $handler) use ($logger, $formatter, $logLevel) {
188
- return function ($request, array $options) use ($handler, $logger, $formatter, $logLevel) {
 
 
 
 
 
189
  return $handler($request, $options)->then(
190
- function ($response) use ($logger, $request, $formatter, $logLevel) {
191
  $message = $formatter->format($request, $response);
192
  $logger->log($logLevel, $message);
193
  return $response;
194
  },
195
- function ($reason) use ($logger, $request, $formatter) {
196
- $response = $reason instanceof RequestException
197
- ? $reason->getResponse()
198
- : null;
199
- $message = $formatter->format($request, $response, $reason);
200
- $logger->notice($message);
201
- return \GuzzleHttp\Promise\rejection_for($reason);
202
  }
203
  );
204
  };
@@ -208,12 +218,10 @@ final class Middleware
208
  /**
209
  * This middleware adds a default content-type if possible, a default
210
  * content-length or transfer-encoding header, and the expect header.
211
- *
212
- * @return callable
213
  */
214
- public static function prepareBody()
215
  {
216
- return function (callable $handler) {
217
  return new PrepareBodyMiddleware($handler);
218
  };
219
  }
@@ -224,12 +232,11 @@ final class Middleware
224
  *
225
  * @param callable $fn Function that accepts a RequestInterface and returns
226
  * a RequestInterface.
227
- * @return callable
228
  */
229
- public static function mapRequest(callable $fn)
230
  {
231
- return function (callable $handler) use ($fn) {
232
- return function ($request, array $options) use ($handler, $fn) {
233
  return $handler($fn($request), $options);
234
  };
235
  };
@@ -241,12 +248,11 @@ final class Middleware
241
  *
242
  * @param callable $fn Function that accepts a ResponseInterface and
243
  * returns a ResponseInterface.
244
- * @return callable
245
  */
246
- public static function mapResponse(callable $fn)
247
  {
248
- return function (callable $handler) use ($fn) {
249
- return function ($request, array $options) use ($handler, $fn) {
250
  return $handler($request, $options)->then($fn);
251
  };
252
  };
1
  <?php
2
+
3
  namespace GuzzleHttp;
4
 
5
  use GuzzleHttp\Cookie\CookieJarInterface;
6
  use GuzzleHttp\Exception\RequestException;
7
+ use GuzzleHttp\Promise as P;
8
+ use GuzzleHttp\Promise\PromiseInterface;
9
+ use Psr\Http\Message\RequestInterface;
10
  use Psr\Http\Message\ResponseInterface;
11
  use Psr\Log\LoggerInterface;
12
 
23
  *
24
  * @return callable Returns a function that accepts the next handler.
25
  */
26
+ public static function cookies(): callable
27
  {
28
+ return static function (callable $handler): callable {
29
+ return static function ($request, array $options) use ($handler) {
30
  if (empty($options['cookies'])) {
31
  return $handler($request, $options);
32
  } elseif (!($options['cookies'] instanceof CookieJarInterface)) {
36
  $request = $cookieJar->withCookieHeader($request);
37
  return $handler($request, $options)
38
  ->then(
39
+ static function (ResponseInterface $response) use ($cookieJar, $request): ResponseInterface {
40
  $cookieJar->extractCookies($request, $response);
41
  return $response;
42
  }
49
  * Middleware that throws exceptions for 4xx or 5xx responses when the
50
  * "http_error" request option is set to true.
51
  *
52
+ * @param BodySummarizerInterface|null $bodySummarizer The body summarizer to use in exception messages.
53
+ *
54
+ * @return callable(callable): callable Returns a function that accepts the next handler.
55
  */
56
+ public static function httpErrors(BodySummarizerInterface $bodySummarizer = null): callable
57
  {
58
+ return static function (callable $handler) use ($bodySummarizer): callable {
59
+ return static function ($request, array $options) use ($handler, $bodySummarizer) {
60
  if (empty($options['http_errors'])) {
61
  return $handler($request, $options);
62
  }
63
  return $handler($request, $options)->then(
64
+ static function (ResponseInterface $response) use ($request, $bodySummarizer) {
65
  $code = $response->getStatusCode();
66
  if ($code < 400) {
67
  return $response;
68
  }
69
+ throw RequestException::create($request, $response, null, [], $bodySummarizer);
70
  }
71
  );
72
  };
76
  /**
77
  * Middleware that pushes history data to an ArrayAccess container.
78
  *
79
+ * @param array|\ArrayAccess<int, array> $container Container to hold the history (by reference).
80
+ *
81
+ * @return callable(callable): callable Returns a function that accepts the next handler.
82
  *
 
83
  * @throws \InvalidArgumentException if container is not an array or ArrayAccess.
84
  */
85
+ public static function history(&$container): callable
86
  {
87
+ if (!\is_array($container) && !$container instanceof \ArrayAccess) {
88
  throw new \InvalidArgumentException('history container must be an array or object implementing ArrayAccess');
89
  }
90
 
91
+ return static function (callable $handler) use (&$container): callable {
92
+ return static function (RequestInterface $request, array $options) use ($handler, &$container) {
93
  return $handler($request, $options)->then(
94
+ static function ($value) use ($request, &$container, $options) {
95
  $container[] = [
96
  'request' => $request,
97
  'response' => $value,
100
  ];
101
  return $value;
102
  },
103
+ static function ($reason) use ($request, &$container, $options) {
104
  $container[] = [
105
  'request' => $request,
106
  'response' => null,
107
  'error' => $reason,
108
  'options' => $options
109
  ];
110
+ return P\Create::rejectionFor($reason);
111
  }
112
  );
113
  };
127
  *
128
  * @return callable Returns a function that accepts the next handler.
129
  */
130
+ public static function tap(callable $before = null, callable $after = null): callable
131
  {
132
+ return static function (callable $handler) use ($before, $after): callable {
133
+ return static function (RequestInterface $request, array $options) use ($handler, $before, $after) {
134
  if ($before) {
135
  $before($request, $options);
136
  }
148
  *
149
  * @return callable Returns a function that accepts the next handler.
150
  */
151
+ public static function redirect(): callable
152
  {
153
+ return static function (callable $handler): RedirectMiddleware {
154
  return new RedirectMiddleware($handler);
155
  };
156
  }
170
  *
171
  * @return callable Returns a function that accepts the next handler.
172
  */
173
+ public static function retry(callable $decider, callable $delay = null): callable
174
  {
175
+ return static function (callable $handler) use ($decider, $delay): RetryMiddleware {
176
  return new RetryMiddleware($decider, $handler, $delay);
177
  };
178
  }
181
  * Middleware that logs requests, responses, and errors using a message
182
  * formatter.
183
  *
184
+ * @phpstan-param \Psr\Log\LogLevel::* $logLevel Level at which to log requests.
185
+ *
186
+ * @param LoggerInterface $logger Logs messages.
187
+ * @param MessageFormatterInterface|MessageFormatter $formatter Formatter used to create message strings.
188
+ * @param string $logLevel Level at which to log requests.
189
  *
190
  * @return callable Returns a function that accepts the next handler.
191
  */
192
+ public static function log(LoggerInterface $logger, $formatter, string $logLevel = 'info'): callable
193
  {
194
+ // To be compatible with Guzzle 7.1.x we need to allow users to pass a MessageFormatter
195
+ if (!$formatter instanceof MessageFormatter && !$formatter instanceof MessageFormatterInterface) {
196
+ throw new \LogicException(sprintf('Argument 2 to %s::log() must be of type %s', self::class, MessageFormatterInterface::class));
197
+ }
198
+
199
+ return static function (callable $handler) use ($logger, $formatter, $logLevel): callable {
200
+ return static function (RequestInterface $request, array $options = []) use ($handler, $logger, $formatter, $logLevel) {
201
  return $handler($request, $options)->then(
202
+ static function ($response) use ($logger, $request, $formatter, $logLevel): ResponseInterface {
203
  $message = $formatter->format($request, $response);
204
  $logger->log($logLevel, $message);
205
  return $response;
206
  },
207
+ static function ($reason) use ($logger, $request, $formatter): PromiseInterface {
208
+ $response = $reason instanceof RequestException ? $reason->getResponse() : null;
209
+ $message = $formatter->format($request, $response, P\Create::exceptionFor($reason));
210
+ $logger->error($message);
211
+ return P\Create::rejectionFor($reason);
 
 
212
  }
213
  );
214
  };
218
  /**
219
  * This middleware adds a default content-type if possible, a default
220
  * content-length or transfer-encoding header, and the expect header.
 
 
221
  */
222
+ public static function prepareBody(): callable
223
  {
224
+ return static function (callable $handler): PrepareBodyMiddleware {
225
  return new PrepareBodyMiddleware($handler);
226
  };
227
  }
232
  *
233
  * @param callable $fn Function that accepts a RequestInterface and returns
234
  * a RequestInterface.
 
235
  */
236
+ public static function mapRequest(callable $fn): callable
237
  {
238
+ return static function (callable $handler) use ($fn): callable {
239
+ return static function (RequestInterface $request, array $options) use ($handler, $fn) {
240
  return $handler($fn($request), $options);
241
  };
242
  };
248
  *
249
  * @param callable $fn Function that accepts a ResponseInterface and
250
  * returns a ResponseInterface.
 
251
  */
252
+ public static function mapResponse(callable $fn): callable
253
  {
254
+ return static function (callable $handler) use ($fn): callable {
255
+ return static function (RequestInterface $request, array $options) use ($handler, $fn) {
256
  return $handler($request, $options)->then($fn);
257
  };
258
  };
vendor/guzzlehttp/guzzle/src/Pool.php CHANGED
@@ -1,6 +1,8 @@
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
 
4
  use GuzzleHttp\Promise\EachPromise;
5
  use GuzzleHttp\Promise\PromiseInterface;
6
  use GuzzleHttp\Promise\PromisorInterface;
@@ -16,10 +18,14 @@ use Psr\Http\Message\RequestInterface;
16
  * When a function is yielded by the iterator, the function is provided the
17
  * "request_options" array that should be merged on top of any existing
18
  * options, and the function MUST then return a wait-able promise.
 
 
19
  */
20
  class Pool implements PromisorInterface
21
  {
22
- /** @var EachPromise */
 
 
23
  private $each;
24
 
25
  /**
@@ -27,20 +33,14 @@ class Pool implements PromisorInterface
27
  * @param array|\Iterator $requests Requests or functions that return
28
  * requests to send concurrently.
29
  * @param array $config Associative array of options
30
- * - concurrency: (int) Maximum number of requests to send concurrently
31
- * - options: Array of request options to apply to each request.
32
- * - fulfilled: (callable) Function to invoke when a request completes.
33
- * - rejected: (callable) Function to invoke when a request is rejected.
34
  */
35
- public function __construct(
36
- ClientInterface $client,
37
- $requests,
38
- array $config = []
39
- ) {
40
- // Backwards compatibility.
41
- if (isset($config['pool_size'])) {
42
- $config['concurrency'] = $config['pool_size'];
43
- } elseif (!isset($config['concurrency'])) {
44
  $config['concurrency'] = 25;
45
  }
46
 
@@ -51,18 +51,15 @@ class Pool implements PromisorInterface
51
  $opts = [];
52
  }
53
 
54
- $iterable = \GuzzleHttp\Promise\iter_for($requests);
55
- $requests = function () use ($iterable, $client, $opts) {
56
  foreach ($iterable as $key => $rfn) {
57
  if ($rfn instanceof RequestInterface) {
58
  yield $key => $client->sendAsync($rfn, $opts);
59
- } elseif (is_callable($rfn)) {
60
  yield $key => $rfn($opts);
61
  } else {
62
- throw new \InvalidArgumentException('Each value yielded by '
63
- . 'the iterator must be a Psr7\Http\Message\RequestInterface '
64
- . 'or a callable that returns a promise that fulfills '
65
- . 'with a Psr7\Message\Http\ResponseInterface object.');
66
  }
67
  }
68
  };
@@ -72,10 +69,8 @@ class Pool implements PromisorInterface
72
 
73
  /**
74
  * Get promise
75
- *
76
- * @return PromiseInterface
77
  */
78
- public function promise()
79
  {
80
  return $this->each->promise();
81
  }
@@ -91,41 +86,37 @@ class Pool implements PromisorInterface
91
  * @param ClientInterface $client Client used to send the requests
92
  * @param array|\Iterator $requests Requests to send concurrently.
93
  * @param array $options Passes through the options available in
94
- * {@see GuzzleHttp\Pool::__construct}
95
  *
96
  * @return array Returns an array containing the response or an exception
97
  * in the same order that the requests were sent.
 
98
  * @throws \InvalidArgumentException if the event format is incorrect.
99
  */
100
- public static function batch(
101
- ClientInterface $client,
102
- $requests,
103
- array $options = []
104
- ) {
105
  $res = [];
106
  self::cmpCallback($options, 'fulfilled', $res);
107
  self::cmpCallback($options, 'rejected', $res);
108
  $pool = new static($client, $requests, $options);
109
  $pool->promise()->wait();
110
- ksort($res);
111
 
112
  return $res;
113
  }
114
 
115
  /**
116
  * Execute callback(s)
117
- *
118
- * @return void
119
  */
120
- private static function cmpCallback(array &$options, $name, array &$results)
121
  {
122
  if (!isset($options[$name])) {
123
- $options[$name] = function ($v, $k) use (&$results) {
124
  $results[$k] = $v;
125
  };
126
  } else {
127
  $currentFn = $options[$name];
128
- $options[$name] = function ($v, $k) use (&$results, $currentFn) {
129
  $currentFn($v, $k);
130
  $results[$k] = $v;
131
  };
1
  <?php
2
+
3
  namespace GuzzleHttp;
4
 
5
+ use GuzzleHttp\Promise as P;
6
  use GuzzleHttp\Promise\EachPromise;
7
  use GuzzleHttp\Promise\PromiseInterface;
8
  use GuzzleHttp\Promise\PromisorInterface;
18
  * When a function is yielded by the iterator, the function is provided the
19
  * "request_options" array that should be merged on top of any existing
20
  * options, and the function MUST then return a wait-able promise.
21
+ *
22
+ * @final
23
  */
24
  class Pool implements PromisorInterface
25
  {
26
+ /**
27
+ * @var EachPromise
28
+ */
29
  private $each;
30
 
31
  /**
33
  * @param array|\Iterator $requests Requests or functions that return
34
  * requests to send concurrently.
35
  * @param array $config Associative array of options
36
+ * - concurrency: (int) Maximum number of requests to send concurrently
37
+ * - options: Array of request options to apply to each request.
38
+ * - fulfilled: (callable) Function to invoke when a request completes.
39
+ * - rejected: (callable) Function to invoke when a request is rejected.
40
  */
41
+ public function __construct(ClientInterface $client, $requests, array $config = [])
42
+ {
43
+ if (!isset($config['concurrency'])) {
 
 
 
 
 
 
44
  $config['concurrency'] = 25;
45
  }
46
 
51
  $opts = [];
52
  }
53
 
54
+ $iterable = P\Create::iterFor($requests);
55
+ $requests = static function () use ($iterable, $client, $opts) {
56
  foreach ($iterable as $key => $rfn) {
57
  if ($rfn instanceof RequestInterface) {
58
  yield $key => $client->sendAsync($rfn, $opts);
59
+ } elseif (\is_callable($rfn)) {
60
  yield $key => $rfn($opts);
61
  } else {
62
+ 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.');
 
 
 
63
  }
64
  }
65
  };
69
 
70
  /**
71
  * Get promise
 
 
72
  */
73
+ public function promise(): PromiseInterface
74
  {
75
  return $this->each->promise();
76
  }
86
  * @param ClientInterface $client Client used to send the requests
87
  * @param array|\Iterator $requests Requests to send concurrently.
88
  * @param array $options Passes through the options available in
89
+ * {@see \GuzzleHttp\Pool::__construct}
90
  *
91
  * @return array Returns an array containing the response or an exception
92
  * in the same order that the requests were sent.
93
+ *
94
  * @throws \InvalidArgumentException if the event format is incorrect.
95
  */
96
+ public static function batch(ClientInterface $client, $requests, array $options = []): array
97
+ {
 
 
 
98
  $res = [];
99
  self::cmpCallback($options, 'fulfilled', $res);
100
  self::cmpCallback($options, 'rejected', $res);
101
  $pool = new static($client, $requests, $options);
102
  $pool->promise()->wait();
103
+ \ksort($res);
104
 
105
  return $res;
106
  }
107
 
108
  /**
109
  * Execute callback(s)
 
 
110
  */
111
+ private static function cmpCallback(array &$options, string $name, array &$results): void
112
  {
113
  if (!isset($options[$name])) {
114
+ $options[$name] = static function ($v, $k) use (&$results) {
115
  $results[$k] = $v;
116
  };
117
  } else {
118
  $currentFn = $options[$name];
119
+ $options[$name] = static function ($v, $k) use (&$results, $currentFn) {
120
  $currentFn($v, $k);
121
  $results[$k] = $v;
122
  };
vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php CHANGED
@@ -1,34 +1,32 @@
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
  use GuzzleHttp\Promise\PromiseInterface;
5
- use GuzzleHttp\Psr7;
6
  use Psr\Http\Message\RequestInterface;
7
 
8
  /**
9
  * Prepares requests that contain a body, adding the Content-Length,
10
  * Content-Type, and Expect headers.
 
 
11
  */
12
  class PrepareBodyMiddleware
13
  {
14
- /** @var callable */
 
 
15
  private $nextHandler;
16
 
17
  /**
18
- * @param callable $nextHandler Next handler to invoke.
19
  */
20
  public function __construct(callable $nextHandler)
21
  {
22
  $this->nextHandler = $nextHandler;
23
  }
24
 
25
- /**
26
- * @param RequestInterface $request
27
- * @param array $options
28
- *
29
- * @return PromiseInterface
30
- */
31
- public function __invoke(RequestInterface $request, array $options)
32
  {
33
  $fn = $this->nextHandler;
34
 
@@ -42,7 +40,7 @@ class PrepareBodyMiddleware
42
  // Add a default content-type if possible.
43
  if (!$request->hasHeader('Content-Type')) {
44
  if ($uri = $request->getBody()->getMetadata('uri')) {
45
- if ($type = Psr7\mimetype_from_filename($uri)) {
46
  $modify['set_headers']['Content-Type'] = $type;
47
  }
48
  }
@@ -63,25 +61,20 @@ class PrepareBodyMiddleware
63
  // Add the expect header if needed.
64
  $this->addExpectHeader($request, $options, $modify);
65
 
66
- return $fn(Psr7\modify_request($request, $modify), $options);
67
  }
68
 
69
  /**
70
  * Add expect header
71
- *
72
- * @return void
73
  */
74
- private function addExpectHeader(
75
- RequestInterface $request,
76
- array $options,
77
- array &$modify
78
- ) {
79
  // Determine if the Expect header should be used
80
  if ($request->hasHeader('Expect')) {
81
  return;
82
  }
83
 
84
- $expect = isset($options['expect']) ? $options['expect'] : null;
85
 
86
  // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.0
87
  if ($expect === false || $request->getProtocolVersion() < 1.1) {
1
  <?php
2
+
3
  namespace GuzzleHttp;
4
 
5
  use GuzzleHttp\Promise\PromiseInterface;
 
6
  use Psr\Http\Message\RequestInterface;
7
 
8
  /**
9
  * Prepares requests that contain a body, adding the Content-Length,
10
  * Content-Type, and Expect headers.
11
+ *
12
+ * @final
13
  */
14
  class PrepareBodyMiddleware
15
  {
16
+ /**
17
+ * @var callable(RequestInterface, array): PromiseInterface
18
+ */
19
  private $nextHandler;
20
 
21
  /**
22
+ * @param callable(RequestInterface, array): PromiseInterface $nextHandler Next handler to invoke.
23
  */
24
  public function __construct(callable $nextHandler)
25
  {
26
  $this->nextHandler = $nextHandler;
27
  }
28
 
29
+ public function __invoke(RequestInterface $request, array $options): PromiseInterface
 
 
 
 
 
 
30
  {
31
  $fn = $this->nextHandler;
32
 
40
  // Add a default content-type if possible.
41
  if (!$request->hasHeader('Content-Type')) {
42
  if ($uri = $request->getBody()->getMetadata('uri')) {
43
+ if (is_string($uri) && $type = Psr7\MimeType::fromFilename($uri)) {
44
  $modify['set_headers']['Content-Type'] = $type;
45
  }
46
  }
61
  // Add the expect header if needed.
62
  $this->addExpectHeader($request, $options, $modify);
63
 
64
+ return $fn(Psr7\Utils::modifyRequest($request, $modify), $options);
65
  }
66
 
67
  /**
68
  * Add expect header
 
 
69
  */
70
+ private function addExpectHeader(RequestInterface $request, array $options, array &$modify): void
71
+ {
 
 
 
72
  // Determine if the Expect header should be used
73
  if ($request->hasHeader('Expect')) {
74
  return;
75
  }
76
 
77
+ $expect = $options['expect'] ?? null;
78
 
79
  // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.0
80
  if ($expect === false || $request->getProtocolVersion() < 1.1) {
vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
  use GuzzleHttp\Exception\BadResponseException;
5
  use GuzzleHttp\Exception\TooManyRedirectsException;
6
  use GuzzleHttp\Promise\PromiseInterface;
7
- use GuzzleHttp\Psr7;
8
  use Psr\Http\Message\RequestInterface;
9
  use Psr\Http\Message\ResponseInterface;
10
  use Psr\Http\Message\UriInterface;
@@ -14,13 +14,18 @@ use Psr\Http\Message\UriInterface;
14
  *
15
  * Apply this middleware like other middleware using
16
  * {@see \GuzzleHttp\Middleware::redirect()}.
 
 
17
  */
18
  class RedirectMiddleware
19
  {
20
- const HISTORY_HEADER = 'X-Guzzle-Redirect-History';
21
 
22
- const STATUS_HISTORY_HEADER = 'X-Guzzle-Redirect-Status-History';
23
 
 
 
 
24
  public static $defaultSettings = [
25
  'max' => 5,
26
  'protocols' => ['http', 'https'],
@@ -29,24 +34,20 @@ class RedirectMiddleware
29
  'track_redirects' => false,
30
  ];
31
 
32
- /** @var callable */
 
 
33
  private $nextHandler;
34
 
35
  /**
36
- * @param callable $nextHandler Next handler to invoke.
37
  */
38
  public function __construct(callable $nextHandler)
39
  {
40
  $this->nextHandler = $nextHandler;
41
  }
42
 
43
- /**
44
- * @param RequestInterface $request
45
- * @param array $options
46
- *
47
- * @return PromiseInterface
48
- */
49
- public function __invoke(RequestInterface $request, array $options)
50
  {
51
  $fn = $this->nextHandler;
52
 
@@ -56,7 +57,7 @@ class RedirectMiddleware
56
 
57
  if ($options['allow_redirects'] === true) {
58
  $options['allow_redirects'] = self::$defaultSettings;
59
- } elseif (!is_array($options['allow_redirects'])) {
60
  throw new \InvalidArgumentException('allow_redirects must be true, false, or array');
61
  } else {
62
  // Merge the default settings with the provided settings
@@ -74,36 +75,27 @@ class RedirectMiddleware
74
  }
75
 
76
  /**
77
- * @param RequestInterface $request
78
- * @param array $options
79
- * @param ResponseInterface $response
80
- *
81
  * @return ResponseInterface|PromiseInterface
82
  */
83
- public function checkRedirect(
84
- RequestInterface $request,
85
- array $options,
86
- ResponseInterface $response
87
- ) {
88
- if (substr($response->getStatusCode(), 0, 1) != '3'
89
  || !$response->hasHeader('Location')
90
  ) {
91
  return $response;
92
  }
93
 
94
- $this->guardMax($request, $options);
95
  $nextRequest = $this->modifyRequest($request, $options, $response);
96
 
97
  if (isset($options['allow_redirects']['on_redirect'])) {
98
- call_user_func(
99
- $options['allow_redirects']['on_redirect'],
100
  $request,
101
  $response,
102
  $nextRequest->getUri()
103
  );
104
  }
105
 
106
- /** @var PromiseInterface|ResponseInterface $promise */
107
  $promise = $this($nextRequest, $options);
108
 
109
  // Add headers to be able to track history of redirects.
@@ -120,20 +112,19 @@ class RedirectMiddleware
120
 
121
  /**
122
  * Enable tracking on promise.
123
- *
124
- * @return PromiseInterface
125
  */
126
- private function withTracking(PromiseInterface $promise, $uri, $statusCode)
127
  {
128
  return $promise->then(
129
- function (ResponseInterface $response) use ($uri, $statusCode) {
130
  // Note that we are pushing to the front of the list as this
131
  // would be an earlier response than what is currently present
132
  // in the history header.
133
  $historyHeader = $response->getHeader(self::HISTORY_HEADER);
134
  $statusHeader = $response->getHeader(self::STATUS_HISTORY_HEADER);
135
- array_unshift($historyHeader, $uri);
136
- array_unshift($statusHeader, $statusCode);
 
137
  return $response->withHeader(self::HISTORY_HEADER, $historyHeader)
138
  ->withHeader(self::STATUS_HISTORY_HEADER, $statusHeader);
139
  }
@@ -143,38 +134,22 @@ class RedirectMiddleware
143
  /**
144
  * Check for too many redirects
145
  *
146
- * @return void
147
- *
148
  * @throws TooManyRedirectsException Too many redirects.
149
  */
150
- private function guardMax(RequestInterface $request, array &$options)
151
  {
152
- $current = isset($options['__redirect_count'])
153
- ? $options['__redirect_count']
154
- : 0;
155
  $options['__redirect_count'] = $current + 1;
156
  $max = $options['allow_redirects']['max'];
157
 
158
  if ($options['__redirect_count'] > $max) {
159
- throw new TooManyRedirectsException(
160
- "Will not follow more than {$max} redirects",
161
- $request
162
- );
163
  }
164
  }
165
 
166
- /**
167
- * @param RequestInterface $request
168
- * @param array $options
169
- * @param ResponseInterface $response
170
- *
171
- * @return RequestInterface
172
- */
173
- public function modifyRequest(
174
- RequestInterface $request,
175
- array $options,
176
- ResponseInterface $response
177
- ) {
178
  // Request modifications to apply.
179
  $modify = [];
180
  $protocols = $options['allow_redirects']['protocols'];
@@ -186,18 +161,21 @@ class RedirectMiddleware
186
  if ($statusCode == 303 ||
187
  ($statusCode <= 302 && !$options['allow_redirects']['strict'])
188
  ) {
189
- $modify['method'] = 'GET';
 
 
 
190
  $modify['body'] = '';
191
  }
192
 
193
  $uri = $this->redirectUri($request, $response, $protocols);
194
  if (isset($options['idn_conversion']) && ($options['idn_conversion'] !== false)) {
195
- $idnOptions = ($options['idn_conversion'] === true) ? IDNA_DEFAULT : $options['idn_conversion'];
196
  $uri = Utils::idnUriConvert($uri, $idnOptions);
197
  }
198
 
199
  $modify['uri'] = $uri;
200
- Psr7\rewind_body($request);
201
 
202
  // Add the Referer header if it is told to do so and only
203
  // add the header if we are not redirecting from https to http.
@@ -215,39 +193,22 @@ class RedirectMiddleware
215
  $modify['remove_headers'][] = 'Authorization';
216
  }
217
 
218
- return Psr7\modify_request($request, $modify);
219
  }
220
 
221
  /**
222
  * Set the appropriate URL on the request based on the location header
223
- *
224
- * @param RequestInterface $request
225
- * @param ResponseInterface $response
226
- * @param array $protocols
227
- *
228
- * @return UriInterface
229
  */
230
- private function redirectUri(
231
- RequestInterface $request,
232
- ResponseInterface $response,
233
- array $protocols
234
- ) {
235
  $location = Psr7\UriResolver::resolve(
236
  $request->getUri(),
237
  new Psr7\Uri($response->getHeaderLine('Location'))
238
  );
239
 
240
  // Ensure that the redirect URI is allowed based on the protocols.
241
- if (!in_array($location->getScheme(), $protocols)) {
242
- throw new BadResponseException(
243
- sprintf(
244
- 'Redirect URI, %s, does not use one of the allowed redirect protocols: %s',
245
- $location,
246
- implode(', ', $protocols)
247
- ),
248
- $request,
249
- $response
250
- );
251
  }
252
 
253
  return $location;
1
  <?php
2
+
3
  namespace GuzzleHttp;
4
 
5
  use GuzzleHttp\Exception\BadResponseException;
6
  use GuzzleHttp\Exception\TooManyRedirectsException;
7
  use GuzzleHttp\Promise\PromiseInterface;
 
8
  use Psr\Http\Message\RequestInterface;
9
  use Psr\Http\Message\ResponseInterface;
10
  use Psr\Http\Message\UriInterface;
14
  *
15
  * Apply this middleware like other middleware using
16
  * {@see \GuzzleHttp\Middleware::redirect()}.
17
+ *
18
+ * @final
19
  */
20
  class RedirectMiddleware
21
  {
22
+ public const HISTORY_HEADER = 'X-Guzzle-Redirect-History';
23
 
24
+ public const STATUS_HISTORY_HEADER = 'X-Guzzle-Redirect-Status-History';
25
 
26
+ /**
27
+ * @var array
28
+ */
29
  public static $defaultSettings = [
30
  'max' => 5,
31
  'protocols' => ['http', 'https'],
34
  'track_redirects' => false,
35
  ];
36
 
37
+ /**
38
+ * @var callable(RequestInterface, array): PromiseInterface
39
+ */
40
  private $nextHandler;
41
 
42
  /**
43
+ * @param callable(RequestInterface, array): PromiseInterface $nextHandler Next handler to invoke.
44
  */
45
  public function __construct(callable $nextHandler)
46
  {
47
  $this->nextHandler = $nextHandler;
48
  }
49
 
50
+ public function __invoke(RequestInterface $request, array $options): PromiseInterface
 
 
 
 
 
 
51
  {
52
  $fn = $this->nextHandler;
53
 
57
 
58
  if ($options['allow_redirects'] === true) {
59
  $options['allow_redirects'] = self::$defaultSettings;
60
+ } elseif (!\is_array($options['allow_redirects'])) {
61
  throw new \InvalidArgumentException('allow_redirects must be true, false, or array');
62
  } else {
63
  // Merge the default settings with the provided settings
75
  }
76
 
77
  /**
 
 
 
 
78
  * @return ResponseInterface|PromiseInterface
79
  */
80
+ public function checkRedirect(RequestInterface $request, array $options, ResponseInterface $response)
81
+ {
82
+ if (\strpos((string) $response->getStatusCode(), '3') !== 0
 
 
 
83
  || !$response->hasHeader('Location')
84
  ) {
85
  return $response;
86
  }
87
 
88
+ $this->guardMax($request, $response, $options);
89
  $nextRequest = $this->modifyRequest($request, $options, $response);
90
 
91
  if (isset($options['allow_redirects']['on_redirect'])) {
92
+ ($options['allow_redirects']['on_redirect'])(
 
93
  $request,
94
  $response,
95
  $nextRequest->getUri()
96
  );
97
  }
98
 
 
99
  $promise = $this($nextRequest, $options);
100
 
101
  // Add headers to be able to track history of redirects.
112
 
113
  /**
114
  * Enable tracking on promise.
 
 
115
  */
116
+ private function withTracking(PromiseInterface $promise, string $uri, int $statusCode): PromiseInterface
117
  {
118
  return $promise->then(
119
+ static function (ResponseInterface $response) use ($uri, $statusCode) {
120
  // Note that we are pushing to the front of the list as this
121
  // would be an earlier response than what is currently present
122
  // in the history header.
123
  $historyHeader = $response->getHeader(self::HISTORY_HEADER);
124
  $statusHeader = $response->getHeader(self::STATUS_HISTORY_HEADER);
125
+ \array_unshift($historyHeader, $uri);
126
+ \array_unshift($statusHeader, (string) $statusCode);
127
+
128
  return $response->withHeader(self::HISTORY_HEADER, $historyHeader)
129
  ->withHeader(self::STATUS_HISTORY_HEADER, $statusHeader);
130
  }
134
  /**
135
  * Check for too many redirects
136
  *
 
 
137
  * @throws TooManyRedirectsException Too many redirects.
138
  */
139
+ private function guardMax(RequestInterface $request, ResponseInterface $response, array &$options): void
140
  {
141
+ $current = $options['__redirect_count']
142
+ ?? 0;
 
143
  $options['__redirect_count'] = $current + 1;
144
  $max = $options['allow_redirects']['max'];
145
 
146
  if ($options['__redirect_count'] > $max) {
147
+ throw new TooManyRedirectsException("Will not follow more than {$max} redirects", $request, $response);
 
 
 
148
  }
149
  }
150
 
151
+ public function modifyRequest(RequestInterface $request, array $options, ResponseInterface $response): RequestInterface
152
+ {
 
 
 
 
 
 
 
 
 
 
153
  // Request modifications to apply.
154
  $modify = [];
155
  $protocols = $options['allow_redirects']['protocols'];
161
  if ($statusCode == 303 ||
162
  ($statusCode <= 302 && !$options['allow_redirects']['strict'])
163
  ) {
164
+ $safeMethods = ['GET', 'HEAD', 'OPTIONS'];
165
+ $requestMethod = $request->getMethod();
166
+
167
+ $modify['method'] = in_array($requestMethod, $safeMethods) ? $requestMethod : 'GET';
168
  $modify['body'] = '';
169
  }
170
 
171
  $uri = $this->redirectUri($request, $response, $protocols);
172
  if (isset($options['idn_conversion']) && ($options['idn_conversion'] !== false)) {
173
+ $idnOptions = ($options['idn_conversion'] === true) ? \IDNA_DEFAULT : $options['idn_conversion'];
174
  $uri = Utils::idnUriConvert($uri, $idnOptions);
175
  }
176
 
177
  $modify['uri'] = $uri;
178
+ Psr7\Message::rewindBody($request);
179
 
180
  // Add the Referer header if it is told to do so and only
181
  // add the header if we are not redirecting from https to http.
193
  $modify['remove_headers'][] = 'Authorization';
194
  }
195
 
196
+ return Psr7\Utils::modifyRequest($request, $modify);
197
  }
198
 
199
  /**
200
  * Set the appropriate URL on the request based on the location header
 
 
 
 
 
 
201
  */
202
+ private function redirectUri(RequestInterface $request, ResponseInterface $response, array $protocols): UriInterface
203
+ {
 
 
 
204
  $location = Psr7\UriResolver::resolve(
205
  $request->getUri(),
206
  new Psr7\Uri($response->getHeaderLine('Location'))
207
  );
208
 
209
  // Ensure that the redirect URI is allowed based on the protocols.
210
+ if (!\in_array($location->getScheme(), $protocols)) {
211
+ throw new BadResponseException(\sprintf('Redirect URI, %s, does not use one of the allowed redirect protocols: %s', $location, \implode(', ', $protocols)), $request, $response);
 
 
 
 
 
 
 
 
212
  }
213
 
214
  return $location;
vendor/guzzlehttp/guzzle/src/RequestOptions.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
  /**
@@ -31,7 +32,7 @@ final class RequestOptions
31
  * response that was received, and the effective URI. Any return value
32
  * from the on_redirect function is ignored.
33
  */
34
- const ALLOW_REDIRECTS = 'allow_redirects';
35
 
36
  /**
37
  * auth: (array) Pass an array of HTTP authentication parameters to use
@@ -40,13 +41,13 @@ final class RequestOptions
40
  * authentication type in index [2]. Pass null to disable authentication
41
  * for a request.
42
  */
43
- const AUTH = 'auth';
44
 
45
  /**
46
  * body: (resource|string|null|int|float|StreamInterface|callable|\Iterator)
47
  * Body to send in the request.
48
  */
49
- const BODY = 'body';
50
 
51
  /**
52
  * cert: (string|array) Set to a string to specify the path to a file
@@ -55,42 +56,42 @@ final class RequestOptions
55
  * file in the first array element followed by the certificate password
56
  * in the second array element.
57
  */
58
- const CERT = 'cert';
59
 
60
  /**
61
  * cookies: (bool|GuzzleHttp\Cookie\CookieJarInterface, default=false)
62
  * Specifies whether or not cookies are used in a request or what cookie
63
  * jar to use or what cookies to send. This option only works if your
64
  * handler has the `cookie` middleware. Valid values are `false` and
65
- * an instance of {@see GuzzleHttp\Cookie\CookieJarInterface}.
66
  */
67
- const COOKIES = 'cookies';
68
 
69
  /**
70
  * connect_timeout: (float, default=0) Float describing the number of
71
  * seconds to wait while trying to connect to a server. Use 0 to wait
72
  * indefinitely (the default behavior).
73
  */
74
- const CONNECT_TIMEOUT = 'connect_timeout';
75
 
76
  /**
77
  * debug: (bool|resource) Set to true or set to a PHP stream returned by
78
  * fopen() enable debug output with the HTTP handler used to send a
79
  * request.
80
  */
81
- const DEBUG = 'debug';
82
 
83
  /**
84
  * decode_content: (bool, default=true) Specify whether or not
85
  * Content-Encoding responses (gzip, deflate, etc.) are automatically
86
  * decoded.
87
  */
88
- const DECODE_CONTENT = 'decode_content';
89
 
90
  /**
91
  * delay: (int) The amount of time to delay before sending in milliseconds.
92
  */
93
- const DELAY = 'delay';
94
 
95
  /**
96
  * expect: (bool|integer) Controls the behavior of the
@@ -108,7 +109,7 @@ final class RequestOptions
108
  * size of the body of a request is greater than 1 MB and a request is
109
  * using HTTP/1.1.
110
  */
111
- const EXPECT = 'expect';
112
 
113
  /**
114
  * form_params: (array) Associative array of form field names to values
@@ -116,13 +117,13 @@ final class RequestOptions
116
  * header to application/x-www-form-urlencoded when no Content-Type header
117
  * is already present.
118
  */
119
- const FORM_PARAMS = 'form_params';
120
 
121
  /**
122
  * headers: (array) Associative array of HTTP headers. Each value MUST be
123
  * a string or array of strings.
124
  */
125
- const HEADERS = 'headers';
126
 
127
  /**
128
  * http_errors: (bool, default=true) Set to false to disable exceptions
@@ -130,7 +131,7 @@ final class RequestOptions
130
  * exceptions will be thrown for 4xx and 5xx responses. This option only
131
  * works if your handler has the `httpErrors` middleware.
132
  */
133
- const HTTP_ERRORS = 'http_errors';
134
 
135
  /**
136
  * idn: (bool|int, default=true) A combination of IDNA_* constants for
@@ -138,14 +139,14 @@ final class RequestOptions
138
  * disable IDN support completely, or to true to use the default
139
  * configuration (IDNA_DEFAULT constant).
140
  */
141
- const IDN_CONVERSION = 'idn_conversion';
142
 
143
  /**
144
  * json: (mixed) Adds JSON data to a request. The provided value is JSON
145
  * encoded and a Content-Type header of application/json will be added to
146
  * the request if no Content-Type header is already present.
147
  */
148
- const JSON = 'json';
149
 
150
  /**
151
  * multipart: (array) Array of associative arrays, each containing a
@@ -156,14 +157,14 @@ final class RequestOptions
156
  * the part. If no "filename" key is present, then no "filename" attribute
157
  * will be added to the part.
158
  */
159
- const MULTIPART = 'multipart';
160
 
161
  /**
162
  * on_headers: (callable) A callable that is invoked when the HTTP headers
163
  * of the response have been received but the body has not yet begun to
164
  * download.
165
  */
166
- const ON_HEADERS = 'on_headers';
167
 
168
  /**
169
  * on_stats: (callable) allows you to get access to transfer statistics of
@@ -174,7 +175,7 @@ final class RequestOptions
174
  * the error encountered. Included in the data is the total amount of time
175
  * taken to send the request.
176
  */
177
- const ON_STATS = 'on_stats';
178
 
179
  /**
180
  * progress: (callable) Defines a function to invoke when transfer
@@ -183,14 +184,14 @@ final class RequestOptions
183
  * number of bytes downloaded so far, the number of bytes expected to be
184
  * uploaded, the number of bytes uploaded so far.
185
  */
186
- const PROGRESS = 'progress';
187
 
188
  /**
189
  * proxy: (string|array) Pass a string to specify an HTTP proxy, or an
190
  * array to specify different proxies for different protocols (where the
191
  * key is the protocol and the value is a proxy string).
192
  */
193
- const PROXY = 'proxy';
194
 
195
  /**
196
  * query: (array|string) Associative array of query string values to add
@@ -198,14 +199,14 @@ final class RequestOptions
198
  * the string representation. Pass a string value if you need more
199
  * control than what this method provides
200
  */
201
- const QUERY = 'query';
202
 
203
  /**
204
  * sink: (resource|string|StreamInterface) Where the data of the
205
  * response is written to. Defaults to a PHP temp stream. Providing a
206
  * string will write data to a file by the given name.
207
  */
208
- const SINK = 'sink';
209
 
210
  /**
211
  * synchronous: (bool) Set to true to inform HTTP handlers that you intend
@@ -213,7 +214,7 @@ final class RequestOptions
213
  * that a promise is still returned if you are using one of the async
214
  * client methods.
215
  */
216
- const SYNCHRONOUS = 'synchronous';
217
 
218
  /**
219
  * ssl_key: (array|string) Specify the path to a file containing a private
@@ -221,13 +222,13 @@ final class RequestOptions
221
  * containing the path to the SSL key in the first array element followed
222
  * by the password required for the certificate in the second element.
223
  */
224
- const SSL_KEY = 'ssl_key';
225
 
226
  /**
227
  * stream: Set to true to attempt to stream a response rather than
228
  * download it all up-front.
229
  */
230
- const STREAM = 'stream';
231
 
232
  /**
233
  * verify: (bool|string, default=true) Describes the SSL certificate
@@ -237,27 +238,27 @@ final class RequestOptions
237
  * is insecure!). Set to a string to provide the path to a CA bundle on
238
  * disk to enable verification using a custom certificate.
239
  */
240
- const VERIFY = 'verify';
241
 
242
  /**
243
  * timeout: (float, default=0) Float describing the timeout of the
244
  * request in seconds. Use 0 to wait indefinitely (the default behavior).
245
  */
246
- const TIMEOUT = 'timeout';
247
 
248
  /**
249
  * read_timeout: (float, default=default_socket_timeout ini setting) Float describing
250
  * the body read timeout, for stream requests.
251
  */
252
- const READ_TIMEOUT = 'read_timeout';
253
 
254
  /**
255
  * version: (float) Specifies the HTTP protocol version to attempt to use.
256
  */
257
- const VERSION = 'version';
258
 
259
  /**
260
  * force_ip_resolve: (bool) Force client to use only ipv4 or ipv6 protocol
261
  */
262
- const FORCE_IP_RESOLVE = 'force_ip_resolve';
263
  }
1
  <?php
2
+
3
  namespace GuzzleHttp;
4
 
5
  /**
32
  * response that was received, and the effective URI. Any return value
33
  * from the on_redirect function is ignored.
34
  */
35
+ public const ALLOW_REDIRECTS = 'allow_redirects';
36
 
37
  /**
38
  * auth: (array) Pass an array of HTTP authentication parameters to use
41
  * authentication type in index [2]. Pass null to disable authentication
42
  * for a request.
43
  */
44
+ public const AUTH = 'auth';
45
 
46
  /**
47
  * body: (resource|string|null|int|float|StreamInterface|callable|\Iterator)
48
  * Body to send in the request.
49
  */
50
+ public const BODY = 'body';
51
 
52
  /**
53
  * cert: (string|array) Set to a string to specify the path to a file
56
  * file in the first array element followed by the certificate password
57
  * in the second array element.
58
  */
59
+ public const CERT = 'cert';
60
 
61
  /**
62
  * cookies: (bool|GuzzleHttp\Cookie\CookieJarInterface, default=false)
63
  * Specifies whether or not cookies are used in a request or what cookie
64
  * jar to use or what cookies to send. This option only works if your
65
  * handler has the `cookie` middleware. Valid values are `false` and
66
+ * an instance of {@see \GuzzleHttp\Cookie\CookieJarInterface}.
67
  */
68
+ public const COOKIES = 'cookies';
69
 
70
  /**
71
  * connect_timeout: (float, default=0) Float describing the number of
72
  * seconds to wait while trying to connect to a server. Use 0 to wait
73
  * indefinitely (the default behavior).
74
  */
75
+ public const CONNECT_TIMEOUT = 'connect_timeout';
76
 
77
  /**
78
  * debug: (bool|resource) Set to true or set to a PHP stream returned by
79
  * fopen() enable debug output with the HTTP handler used to send a
80
  * request.
81
  */
82
+ public const DEBUG = 'debug';
83
 
84
  /**
85
  * decode_content: (bool, default=true) Specify whether or not
86
  * Content-Encoding responses (gzip, deflate, etc.) are automatically
87
  * decoded.
88
  */
89
+ public const DECODE_CONTENT = 'decode_content';
90
 
91
  /**
92
  * delay: (int) The amount of time to delay before sending in milliseconds.
93
  */
94
+ public const DELAY = 'delay';
95
 
96
  /**
97
  * expect: (bool|integer) Controls the behavior of the
109
  * size of the body of a request is greater than 1 MB and a request is
110
  * using HTTP/1.1.
111
  */
112
+ public const EXPECT = 'expect';
113
 
114
  /**
115
  * form_params: (array) Associative array of form field names to values
117
  * header to application/x-www-form-urlencoded when no Content-Type header
118
  * is already present.
119
  */
120
+ public const FORM_PARAMS = 'form_params';
121
 
122
  /**
123
  * headers: (array) Associative array of HTTP headers. Each value MUST be
124
  * a string or array of strings.
125
  */
126
+ public const HEADERS = 'headers';
127
 
128
  /**
129
  * http_errors: (bool, default=true) Set to false to disable exceptions
131
  * exceptions will be thrown for 4xx and 5xx responses. This option only
132
  * works if your handler has the `httpErrors` middleware.
133
  */
134
+ public const HTTP_ERRORS = 'http_errors';
135
 
136
  /**
137
  * idn: (bool|int, default=true) A combination of IDNA_* constants for
139
  * disable IDN support completely, or to true to use the default
140
  * configuration (IDNA_DEFAULT constant).
141
  */
142
+ public const IDN_CONVERSION = 'idn_conversion';
143
 
144
  /**
145
  * json: (mixed) Adds JSON data to a request. The provided value is JSON
146
  * encoded and a Content-Type header of application/json will be added to
147
  * the request if no Content-Type header is already present.
148
  */
149
+ public const JSON = 'json';
150
 
151
  /**
152
  * multipart: (array) Array of associative arrays, each containing a
157
  * the part. If no "filename" key is present, then no "filename" attribute
158
  * will be added to the part.
159
  */
160
+ public const MULTIPART = 'multipart';
161
 
162
  /**
163
  * on_headers: (callable) A callable that is invoked when the HTTP headers
164
  * of the response have been received but the body has not yet begun to
165
  * download.
166
  */
167
+ public const ON_HEADERS = 'on_headers';
168
 
169
  /**
170
  * on_stats: (callable) allows you to get access to transfer statistics of
175
  * the error encountered. Included in the data is the total amount of time
176
  * taken to send the request.
177
  */
178
+ public const ON_STATS = 'on_stats';
179
 
180
  /**
181
  * progress: (callable) Defines a function to invoke when transfer
184
  * number of bytes downloaded so far, the number of bytes expected to be
185
  * uploaded, the number of bytes uploaded so far.
186
  */
187
+ public const PROGRESS = 'progress';
188
 
189
  /**
190
  * proxy: (string|array) Pass a string to specify an HTTP proxy, or an
191
  * array to specify different proxies for different protocols (where the
192
  * key is the protocol and the value is a proxy string).
193
  */
194
+ public const PROXY = 'proxy';
195
 
196
  /**
197
  * query: (array|string) Associative array of query string values to add
199
  * the string representation. Pass a string value if you need more
200
  * control than what this method provides
201
  */
202
+ public const QUERY = 'query';
203
 
204
  /**
205
  * sink: (resource|string|StreamInterface) Where the data of the
206
  * response is written to. Defaults to a PHP temp stream. Providing a
207
  * string will write data to a file by the given name.
208
  */
209
+ public const SINK = 'sink';
210
 
211
  /**
212
  * synchronous: (bool) Set to true to inform HTTP handlers that you intend
214
  * that a promise is still returned if you are using one of the async
215
  * client methods.
216
  */
217
+ public const SYNCHRONOUS = 'synchronous';
218
 
219
  /**
220
  * ssl_key: (array|string) Specify the path to a file containing a private
222
  * containing the path to the SSL key in the first array element followed
223
  * by the password required for the certificate in the second element.
224
  */
225
+ public const SSL_KEY = 'ssl_key';
226
 
227
  /**
228
  * stream: Set to true to attempt to stream a response rather than
229
  * download it all up-front.
230
  */
231
+ public const STREAM = 'stream';
232
 
233
  /**
234
  * verify: (bool|string, default=true) Describes the SSL certificate
238
  * is insecure!). Set to a string to provide the path to a CA bundle on
239
  * disk to enable verification using a custom certificate.
240
  */
241
+ public const VERIFY = 'verify';
242
 
243
  /**
244
  * timeout: (float, default=0) Float describing the timeout of the
245
  * request in seconds. Use 0 to wait indefinitely (the default behavior).
246
  */
247
+ public const TIMEOUT = 'timeout';
248
 
249
  /**
250
  * read_timeout: (float, default=default_socket_timeout ini setting) Float describing
251
  * the body read timeout, for stream requests.
252
  */
253
+ public const READ_TIMEOUT = 'read_timeout';
254
 
255
  /**
256
  * version: (float) Specifies the HTTP protocol version to attempt to use.
257
  */
258
+ public const VERSION = 'version';
259
 
260
  /**
261
  * force_ip_resolve: (bool) Force client to use only ipv4 or ipv6 protocol
262
  */
263
+ public const FORCE_IP_RESOLVE = 'force_ip_resolve';
264
  }
vendor/guzzlehttp/guzzle/src/RetryMiddleware.php CHANGED
@@ -1,42 +1,47 @@
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
 
4
  use GuzzleHttp\Promise\PromiseInterface;
5
- use GuzzleHttp\Promise\RejectedPromise;
6
- use GuzzleHttp\Psr7;
7
  use Psr\Http\Message\RequestInterface;
8
  use Psr\Http\Message\ResponseInterface;
9
 
10
  /**
11
  * Middleware that retries requests based on the boolean result of
12
  * invoking the provided "decider" function.
 
 
13
  */
14
  class RetryMiddleware
15
  {
16
- /** @var callable */
 
 
17
  private $nextHandler;
18
 
19
- /** @var callable */
 
 
20
  private $decider;
21
 
22
- /** @var callable */
 
 
23
  private $delay;
24
 
25
  /**
26
- * @param callable $decider Function that accepts the number of retries,
27
- * a request, [response], and [exception] and
28
- * returns true if the request is to be
29
- * retried.
30
- * @param callable $nextHandler Next handler to invoke.
31
- * @param callable $delay Function that accepts the number of retries
32
- * and [response] and returns the number of
33
- * milliseconds to delay.
34
  */
35
- public function __construct(
36
- callable $decider,
37
- callable $nextHandler,
38
- callable $delay = null
39
- ) {
40
  $this->decider = $decider;
41
  $this->nextHandler = $nextHandler;
42
  $this->delay = $delay ?: __CLASS__ . '::exponentialDelay';
@@ -45,22 +50,14 @@ class RetryMiddleware
45
  /**
46
  * Default exponential backoff delay function.
47
  *
48
- * @param int $retries
49
- *
50
  * @return int milliseconds.
51
  */
52
- public static function exponentialDelay($retries)
53
  {
54
- return (int) pow(2, $retries - 1) * 1000;
55
  }
56
 
57
- /**
58
- * @param RequestInterface $request
59
- * @param array $options
60
- *
61
- * @return PromiseInterface
62
- */
63
- public function __invoke(RequestInterface $request, array $options)
64
  {
65
  if (!isset($options['retries'])) {
66
  $options['retries'] = 0;
@@ -76,52 +73,43 @@ class RetryMiddleware
76
 
77
  /**
78
  * Execute fulfilled closure
79
- *
80
- * @return mixed
81
  */
82
- private function onFulfilled(RequestInterface $req, array $options)
83
  {
84
- return function ($value) use ($req, $options) {
85
- if (!call_user_func(
86
- $this->decider,
87
  $options['retries'],
88
- $req,
89
  $value,
90
  null
91
  )) {
92
  return $value;
93
  }
94
- return $this->doRetry($req, $options, $value);
95
  };
96
  }
97
 
98
  /**
99
  * Execute rejected closure
100
- *
101
- * @return callable
102
  */
103
- private function onRejected(RequestInterface $req, array $options)
104
  {
105
  return function ($reason) use ($req, $options) {
106
- if (!call_user_func(
107
- $this->decider,
108
  $options['retries'],
109
  $req,
110
  null,
111
  $reason
112
  )) {
113
- return \GuzzleHttp\Promise\rejection_for($reason);
114
  }
115
  return $this->doRetry($req, $options);
116
  };
117
  }
118
 
119
- /**
120
- * @return self
121
- */
122
- private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null)
123
  {
124
- $options['delay'] = call_user_func($this->delay, ++$options['retries'], $response);
125
 
126
  return $this($request, $options);
127
  }
1
  <?php
2
+
3
  namespace GuzzleHttp;
4
 
5
+ use GuzzleHttp\Promise as P;
6
  use GuzzleHttp\Promise\PromiseInterface;
 
 
7
  use Psr\Http\Message\RequestInterface;
8
  use Psr\Http\Message\ResponseInterface;
9
 
10
  /**
11
  * Middleware that retries requests based on the boolean result of
12
  * invoking the provided "decider" function.
13
+ *
14
+ * @final
15
  */
16
  class RetryMiddleware
17
  {
18
+ /**
19
+ * @var callable(RequestInterface, array): PromiseInterface
20
+ */
21
  private $nextHandler;
22
 
23
+ /**
24
+ * @var callable
25
+ */
26
  private $decider;
27
 
28
+ /**
29
+ * @var callable(int)
30
+ */
31
  private $delay;
32
 
33
  /**
34
+ * @param callable $decider Function that accepts the number of retries,
35
+ * a request, [response], and [exception] and
36
+ * returns true if the request is to be
37
+ * retried.
38
+ * @param callable(RequestInterface, array): PromiseInterface $nextHandler Next handler to invoke.
39
+ * @param null|callable(int): int $delay Function that accepts the number of retries
40
+ * and returns the number of
41
+ * milliseconds to delay.
42
  */
43
+ public function __construct(callable $decider, callable $nextHandler, callable $delay = null)
44
+ {
 
 
 
45
  $this->decider = $decider;
46
  $this->nextHandler = $nextHandler;
47
  $this->delay = $delay ?: __CLASS__ . '::exponentialDelay';
50
  /**
51
  * Default exponential backoff delay function.
52
  *
 
 
53
  * @return int milliseconds.
54
  */
55
+ public static function exponentialDelay(int $retries): int
56
  {
57
+ return (int) \pow(2, $retries - 1) * 1000;
58
  }
59
 
60
+ public function __invoke(RequestInterface $request, array $options): PromiseInterface
 
 
 
 
 
 
61
  {
62
  if (!isset($options['retries'])) {
63
  $options['retries'] = 0;
73
 
74
  /**
75
  * Execute fulfilled closure
 
 
76
  */
77
+ private function onFulfilled(RequestInterface $request, array $options): callable
78
  {
79
+ return function ($value) use ($request, $options) {
80
+ if (!($this->decider)(
 
81
  $options['retries'],
82
+ $request,
83
  $value,
84
  null
85
  )) {
86
  return $value;
87
  }
88
+ return $this->doRetry($request, $options, $value);
89
  };
90
  }
91
 
92
  /**
93
  * Execute rejected closure
 
 
94
  */
95
+ private function onRejected(RequestInterface $req, array $options): callable
96
  {
97
  return function ($reason) use ($req, $options) {
98
+ if (!($this->decider)(
 
99
  $options['retries'],
100
  $req,
101
  null,
102
  $reason
103
  )) {
104
+ return P\Create::rejectionFor($reason);
105
  }
106
  return $this->doRetry($req, $options);
107
  };
108
  }
109
 
110
+ private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null): PromiseInterface
 
 
 
111
  {
112
+ $options['delay'] = ($this->delay)(++$options['retries'], $response);
113
 
114
  return $this($request, $options);
115
  }
vendor/guzzlehttp/guzzle/src/TransferStats.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
  use Psr\Http\Message\RequestInterface;
@@ -11,10 +12,29 @@ use Psr\Http\Message\UriInterface;
11
  */
12
  final class TransferStats
13
  {
 
 
 
14
  private $request;
 
 
 
 
15
  private $response;
 
 
 
 
16
  private $transferTime;
 
 
 
 
17
  private $handlerStats;
 
 
 
 
18
  private $handlerErrorData;
19
 
20
  /**
@@ -26,10 +46,10 @@ final class TransferStats
26
  */
27
  public function __construct(
28
  RequestInterface $request,
29
- ResponseInterface $response = null,
30
- $transferTime = null,
31
  $handlerErrorData = null,
32
- $handlerStats = []
33
  ) {
34
  $this->request = $request;
35
  $this->response = $response;
@@ -38,30 +58,23 @@ final class TransferStats
38
  $this->handlerStats = $handlerStats;
39
  }
40
 
41
- /**
42
- * @return RequestInterface
43
- */
44
- public function getRequest()
45
  {
46
  return $this->request;
47
  }
48
 
49
  /**
50
  * Returns the response that was received (if any).
51
- *
52
- * @return ResponseInterface|null
53
  */
54
- public function getResponse()
55
  {
56
  return $this->response;
57
  }
58
 
59
  /**
60
  * Returns true if a response was received.
61
- *
62
- * @return bool
63
  */
64
- public function hasResponse()
65
  {
66
  return $this->response !== null;
67
  }
@@ -82,10 +95,8 @@ final class TransferStats
82
 
83
  /**
84
  * Get the effective URI the request was sent to.
85
- *
86
- * @return UriInterface
87
  */
88
- public function getEffectiveUri()
89
  {
90
  return $this->request->getUri();
91
  }
@@ -95,17 +106,15 @@ final class TransferStats
95
  *
96
  * @return float|null Time in seconds.
97
  */
98
- public function getTransferTime()
99
  {
100
  return $this->transferTime;
101
  }
102
 
103
  /**
104
  * Gets an array of all of the handler specific transfer data.
105
- *
106
- * @return array
107
  */
108
- public function getHandlerStats()
109
  {
110
  return $this->handlerStats;
111
  }
@@ -117,10 +126,8 @@ final class TransferStats
117
  *
118
  * @return mixed|null
119
  */
120
- public function getHandlerStat($stat)
121
  {
122
- return isset($this->handlerStats[$stat])
123
- ? $this->handlerStats[$stat]
124
- : null;
125
  }
126
  }
1
  <?php
2
+
3
  namespace GuzzleHttp;
4
 
5
  use Psr\Http\Message\RequestInterface;
12
  */
13
  final class TransferStats
14
  {
15
+ /**
16
+ * @var RequestInterface
17
+ */
18
  private $request;
19
+
20
+ /**
21
+ * @var ResponseInterface|null
22
+ */
23
  private $response;
24
+
25
+ /**
26
+ * @var float|null
27
+ */
28
  private $transferTime;
29
+
30
+ /**
31
+ * @var array
32
+ */
33
  private $handlerStats;
34
+
35
+ /**
36
+ * @var mixed|null
37
+ */
38
  private $handlerErrorData;
39
 
40
  /**
46
  */
47
  public function __construct(
48
  RequestInterface $request,
49
+ ?ResponseInterface $response = null,
50
+ ?float $transferTime = null,
51
  $handlerErrorData = null,
52
+ array $handlerStats = []
53
  ) {
54
  $this->request = $request;
55
  $this->response = $response;
58
  $this->handlerStats = $handlerStats;
59
  }
60
 
61
+ public function getRequest(): RequestInterface
 
 
 
62
  {
63
  return $this->request;
64
  }
65
 
66
  /**
67
  * Returns the response that was received (if any).
 
 
68
  */
69
+ public function getResponse(): ?ResponseInterface
70
  {
71
  return $this->response;
72
  }
73
 
74
  /**
75
  * Returns true if a response was received.
 
 
76
  */
77
+ public function hasResponse(): bool
78
  {
79
  return $this->response !== null;
80
  }
95
 
96
  /**
97
  * Get the effective URI the request was sent to.
 
 
98
  */
99
+ public function getEffectiveUri(): UriInterface
100
  {
101
  return $this->request->getUri();
102
  }
106
  *
107
  * @return float|null Time in seconds.
108
  */
109
+ public function getTransferTime(): ?float
110
  {
111
  return $this->transferTime;
112
  }
113
 
114
  /**
115
  * Gets an array of all of the handler specific transfer data.
 
 
116
  */
117
+ public function getHandlerStats(): array
118
  {
119
  return $this->handlerStats;
120
  }
126
  *
127
  * @return mixed|null
128
  */
129
+ public function getHandlerStat(string $stat)
130
  {
131
+ return isset($this->handlerStats[$stat]) ? $this->handlerStats[$stat] : null;
 
 
132
  }
133
  }
vendor/guzzlehttp/guzzle/src/UriTemplate.php DELETED
@@ -1,237 +0,0 @@
1
- <?php
2
- namespace GuzzleHttp;
3
-
4
- /**
5
- * Expands URI templates. Userland implementation of PECL uri_template.
6
- *
7
- * @link http://tools.ietf.org/html/rfc6570
8
- */
9
- class UriTemplate
10
- {
11
- /** @var string URI template */
12
- private $template;
13
-
14
- /** @var array Variables to use in the template expansion */
15
- private $variables;
16
-
17
- /** @var array Hash for quick operator lookups */
18
- private static $operatorHash = [
19
- '' => ['prefix' => '', 'joiner' => ',', 'query' => false],
20
- '+' => ['prefix' => '', 'joiner' => ',', 'query' => false],
21
- '#' => ['prefix' => '#', 'joiner' => ',', 'query' => false],
22
- '.' => ['prefix' => '.', 'joiner' => '.', 'query' => false],
23
- '/' => ['prefix' => '/', 'joiner' => '/', 'query' => false],
24
- ';' => ['prefix' => ';', 'joiner' => ';', 'query' => true],
25
- '?' => ['prefix' => '?', 'joiner' => '&', 'query' => true],
26
- '&' => ['prefix' => '&', 'joiner' => '&', 'query' => true]
27
- ];
28
-
29
- /** @var array Delimiters */
30
- private static $delims = [':', '/', '?', '#', '[', ']', '@', '!', '$',
31
- '&', '\'', '(', ')', '*', '+', ',', ';', '='];
32
-
33
- /** @var array Percent encoded delimiters */
34
- private static $delimsPct = ['%3A', '%2F', '%3F', '%23', '%5B', '%5D',
35
- '%40', '%21', '%24', '%26', '%27', '%28', '%29', '%2A', '%2B', '%2C',
36
- '%3B', '%3D'];
37
-
38
- public function expand($template, array $variables)
39
- {
40
- if (false === strpos($template, '{')) {
41
- return $template;
42
- }
43
-
44
- $this->template = $template;
45
- $this->variables = $variables;
46
-
47
- return preg_replace_callback(
48
- '/\{([^\}]+)\}/',
49
- [$this, 'expandMatch'],
50
- $this->template
51
- );
52
- }
53
-
54
- /**
55
- * Parse an expression into parts
56
- *
57
- * @param string $expression Expression to parse
58
- *
59
- * @return array Returns an associative array of parts
60
- */
61
- private function parseExpression($expression)
62
- {
63
- $result = [];
64
-
65
- if (isset(self::$operatorHash[$expression[0]])) {
66
- $result['operator'] = $expression[0];
67
- $expression = substr($expression, 1);
68
- } else {
69
- $result['operator'] = '';
70
- }
71
-
72
- foreach (explode(',', $expression) as $value) {
73
- $value = trim($value);
74
- $varspec = [];
75
- if ($colonPos = strpos($value, ':')) {
76
- $varspec['value'] = substr($value, 0, $colonPos);
77
- $varspec['modifier'] = ':';
78
- $varspec['position'] = (int) substr($value, $colonPos + 1);
79
- } elseif (substr($value, -1) === '*') {
80
- $varspec['modifier'] = '*';
81
- $varspec['value'] = substr($value, 0, -1);
82
- } else {
83
- $varspec['value'] = (string) $value;
84
- $varspec['modifier'] = '';
85
- }
86
- $result['values'][] = $varspec;
87
- }
88
-
89
- return $result;
90
- }
91
-
92
- /**
93
- * Process an expansion
94
- *
95
- * @param array $matches Matches met in the preg_replace_callback
96
- *
97
- * @return string Returns the replacement string
98
- */
99
- private function expandMatch(array $matches)
100
- {
101
- static $rfc1738to3986 = ['+' => '%20', '%7e' => '~'];
102
-
103
- $replacements = [];
104
- $parsed = self::parseExpression($matches[1]);
105
- $prefix = self::$operatorHash[$parsed['operator']]['prefix'];
106
- $joiner = self::$operatorHash[$parsed['operator']]['joiner'];
107
- $useQuery = self::$operatorHash[$parsed['operator']]['query'];
108
-
109
- foreach ($parsed['values'] as $value) {
110
- if (!isset($this->variables[$value['value']])) {
111
- continue;
112
- }
113
-
114
- $variable = $this->variables[$value['value']];
115
- $actuallyUseQuery = $useQuery;
116
- $expanded = '';
117
-
118
- if (is_array($variable)) {
119
- $isAssoc = $this->isAssoc($variable);
120
- $kvp = [];
121
- foreach ($variable as $key => $var) {
122
- if ($isAssoc) {
123
- $key = rawurlencode($key);
124
- $isNestedArray = is_array($var);
125
- } else {
126
- $isNestedArray = false;
127
- }
128
-
129
- if (!$isNestedArray) {
130
- $var = rawurlencode($var);
131
- if ($parsed['operator'] === '+' ||
132
- $parsed['operator'] === '#'
133
- ) {
134
- $var = $this->decodeReserved($var);
135
- }
136
- }
137
-
138
- if ($value['modifier'] === '*') {
139
- if ($isAssoc) {
140
- if ($isNestedArray) {
141
- // Nested arrays must allow for deeply nested
142
- // structures.
143
- $var = strtr(
144
- http_build_query([$key => $var]),
145
- $rfc1738to3986
146
- );
147
- } else {
148
- $var = $key . '=' . $var;
149
- }
150
- } elseif ($key > 0 && $actuallyUseQuery) {
151
- $var = $value['value'] . '=' . $var;
152
- }
153
- }
154
-
155
- $kvp[$key] = $var;
156
- }
157
-
158
- if (empty($variable)) {
159
- $actuallyUseQuery = false;
160
- } elseif ($value['modifier'] === '*') {
161
- $expanded = implode($joiner, $kvp);
162
- if ($isAssoc) {
163
- // Don't prepend the value name when using the explode
164
- // modifier with an associative array.
165
- $actuallyUseQuery = false;
166
- }
167
- } else {
168
- if ($isAssoc) {
169
- // When an associative array is encountered and the
170
- // explode modifier is not set, then the result must be
171
- // a comma separated list of keys followed by their
172
- // respective values.
173
- foreach ($kvp as $k => &$v) {
174
- $v = $k . ',' . $v;
175
- }
176
- }
177
- $expanded = implode(',', $kvp);
178
- }
179
- } else {
180
- if ($value['modifier'] === ':') {
181
- $variable = substr($variable, 0, $value['position']);
182
- }
183
- $expanded = rawurlencode($variable);
184
- if ($parsed['operator'] === '+' || $parsed['operator'] === '#') {
185
- $expanded = $this->decodeReserved($expanded);
186
- }
187
- }
188
-
189
- if ($actuallyUseQuery) {
190
- if (!$expanded && $joiner !== '&') {
191
- $expanded = $value['value'];
192
- } else {
193
- $expanded = $value['value'] . '=' . $expanded;
194
- }
195
- }
196
-
197
- $replacements[] = $expanded;
198
- }
199
-
200
- $ret = implode($joiner, $replacements);
201
- if ($ret && $prefix) {
202
- return $prefix . $ret;
203
- }
204
-
205
- return $ret;
206
- }
207
-
208
- /**
209
- * Determines if an array is associative.
210
- *
211
- * This makes the assumption that input arrays are sequences or hashes.
212
- * This assumption is a tradeoff for accuracy in favor of speed, but it
213
- * should work in almost every case where input is supplied for a URI
214
- * template.
215
- *
216
- * @param array $array Array to check
217
- *
218
- * @return bool
219
- */
220
- private function isAssoc(array $array)
221
- {
222
- return $array && array_keys($array)[0] !== 0;
223
- }
224
-
225
- /**
226
- * Removes percent encoding on reserved characters (used with + and #
227
- * modifiers).
228
- *
229
- * @param string $string String to fix
230
- *
231
- * @return string
232
- */
233
- private function decodeReserved($string)
234
- {
235
- return str_replace(self::$delimsPct, self::$delims, $string);
236
- }
237
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/guzzlehttp/guzzle/src/Utils.php CHANGED
@@ -1,41 +1,336 @@
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
  use GuzzleHttp\Exception\InvalidArgumentException;
 
 
 
 
5
  use Psr\Http\Message\UriInterface;
6
- use Symfony\Polyfill\Intl\Idn\Idn;
7
 
8
  final class Utils
9
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  /**
11
  * Wrapper for the hrtime() or microtime() functions
12
  * (depending on the PHP version, one of the two is used)
13
  *
14
- * @return float|mixed UNIX timestamp
15
  *
16
  * @internal
17
  */
18
- public static function currentTime()
19
  {
20
- return function_exists('hrtime') ? hrtime(true) / 1e9 : microtime(true);
21
  }
22
 
23
  /**
24
- * @param int $options
25
- *
26
- * @return UriInterface
27
  * @throws InvalidArgumentException
28
  *
29
  * @internal
30
  */
31
- public static function idnUriConvert(UriInterface $uri, $options = 0)
32
  {
33
  if ($uri->getHost()) {
34
  $asciiHost = self::idnToAsci($uri->getHost(), $options, $info);
35
  if ($asciiHost === false) {
36
- $errorBitSet = isset($info['errors']) ? $info['errors'] : 0;
37
 
38
- $errorConstants = array_filter(array_keys(get_defined_constants()), function ($name) {
39
  return substr($name, 0, 11) === 'IDNA_ERROR_';
40
  });
41
 
@@ -52,11 +347,10 @@ final class Utils
52
  }
53
 
54
  throw new InvalidArgumentException($errorMessage);
55
- } else {
56
- if ($uri->getHost() !== $asciiHost) {
57
- // Replace URI only if the ASCII version is different
58
- $uri = $uri->withHost($asciiHost);
59
- }
60
  }
61
  }
62
 
@@ -64,29 +358,30 @@ final class Utils
64
  }
65
 
66
  /**
67
- * @param string $domain
68
- * @param int $options
69
- * @param array $info
70
- *
71
- * @return string|false
72
  */
73
- private static function idnToAsci($domain, $options, &$info = [])
74
  {
75
- if (\preg_match('%^[ -~]+$%', $domain) === 1) {
76
- return $domain;
77
  }
78
 
79
- if (\extension_loaded('intl') && defined('INTL_IDNA_VARIANT_UTS46')) {
80
- return \idn_to_ascii($domain, $options, INTL_IDNA_VARIANT_UTS46, $info);
81
  }
82
 
83
- /*
84
- * The Idn class is marked as @internal. Verify that class and method exists.
85
- */
86
- if (method_exists(Idn::class, 'idn_to_ascii')) {
87
- return Idn::idn_to_ascii($domain, $options, Idn::INTL_IDNA_VARIANT_UTS46, $info);
 
 
 
 
 
88
  }
89
 
90
- throw new \RuntimeException('ext-intl or symfony/polyfill-intl-idn not loaded or too old');
91
  }
92
  }
1
  <?php
2
+
3
  namespace GuzzleHttp;
4
 
5
  use GuzzleHttp\Exception\InvalidArgumentException;
6
+ use GuzzleHttp\Handler\CurlHandler;
7
+ use GuzzleHttp\Handler\CurlMultiHandler;
8
+ use GuzzleHttp\Handler\Proxy;
9
+ use GuzzleHttp\Handler\StreamHandler;
10
  use Psr\Http\Message\UriInterface;
 
11
 
12
  final class Utils
13
  {
14
+ /**
15
+ * Debug function used to describe the provided value type and class.
16
+ *
17
+ * @param mixed $input
18
+ *
19
+ * @return string Returns a string containing the type of the variable and
20
+ * if a class is provided, the class name.
21
+ */
22
+ public static function describeType($input): string
23
+ {
24
+ switch (\gettype($input)) {
25
+ case 'object':
26
+ return 'object(' . \get_class($input) . ')';
27
+ case 'array':
28
+ return 'array(' . \count($input) . ')';
29
+ default:
30
+ \ob_start();
31
+ \var_dump($input);
32
+ // normalize float vs double
33
+ /** @var string $varDumpContent */
34
+ $varDumpContent = \ob_get_clean();
35
+
36
+ return \str_replace('double(', 'float(', \rtrim($varDumpContent));
37
+ }
38
+ }
39
+
40
+ /**
41
+ * Parses an array of header lines into an associative array of headers.
42
+ *
43
+ * @param iterable $lines Header lines array of strings in the following
44
+ * format: "Name: Value"
45
+ */
46
+ public static function headersFromLines(iterable $lines): array
47
+ {
48
+ $headers = [];
49
+
50
+ foreach ($lines as $line) {
51
+ $parts = \explode(':', $line, 2);
52
+ $headers[\trim($parts[0])][] = isset($parts[1]) ? \trim($parts[1]) : null;
53
+ }
54
+
55
+ return $headers;
56
+ }
57
+
58
+ /**
59
+ * Returns a debug stream based on the provided variable.
60
+ *
61
+ * @param mixed $value Optional value
62
+ *
63
+ * @return resource
64
+ */
65
+ public static function debugResource($value = null)
66
+ {
67
+ if (\is_resource($value)) {
68
+ return $value;
69
+ }
70
+ if (\defined('STDOUT')) {
71
+ return \STDOUT;
72
+ }
73
+
74
+ $resource = \fopen('php://output', 'w');
75
+ if (false === $resource) {
76
+ throw new \RuntimeException('Can not open php output for writing to debug the resource.');
77
+ }
78
+
79
+ return $resource;
80
+ }
81
+
82
+ /**
83
+ * Chooses and creates a default handler to use based on the environment.
84
+ *
85
+ * The returned handler is not wrapped by any default middlewares.
86
+ *
87
+ * @throws \RuntimeException if no viable Handler is available.
88
+ *
89
+ * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.
90
+ */
91
+ public static function chooseHandler(): callable
92
+ {
93
+ $handler = null;
94
+ if (\function_exists('curl_multi_exec') && \function_exists('curl_exec')) {
95
+ $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler());
96
+ } elseif (\function_exists('curl_exec')) {
97
+ $handler = new CurlHandler();
98
+ } elseif (\function_exists('curl_multi_exec')) {
99
+ $handler = new CurlMultiHandler();
100
+ }
101
+
102
+ if (\ini_get('allow_url_fopen')) {
103
+ $handler = $handler
104
+ ? Proxy::wrapStreaming($handler, new StreamHandler())
105
+ : new StreamHandler();
106
+ } elseif (!$handler) {
107
+ throw new \RuntimeException('GuzzleHttp requires cURL, the allow_url_fopen ini setting, or a custom HTTP handler.');
108
+ }
109
+
110
+ return $handler;
111
+ }
112
+
113
+ /**
114
+ * Get the default User-Agent string to use with Guzzle.
115
+ */
116
+ public static function defaultUserAgent(): string
117
+ {
118
+ return sprintf('GuzzleHttp/%d', ClientInterface::MAJOR_VERSION);
119
+ }
120
+
121
+ /**
122
+ * Returns the default cacert bundle for the current system.
123
+ *
124
+ * First, the openssl.cafile and curl.cainfo php.ini settings are checked.
125
+ * If those settings are not configured, then the common locations for
126
+ * bundles found on Red Hat, CentOS, Fedora, Ubuntu, Debian, FreeBSD, OS X
127
+ * and Windows are checked. If any of these file locations are found on
128
+ * disk, they will be utilized.
129
+ *
130
+ * Note: the result of this function is cached for subsequent calls.
131
+ *
132
+ * @throws \RuntimeException if no bundle can be found.
133
+ *
134
+ * @deprecated Utils::defaultCaBundle will be removed in guzzlehttp/guzzle:8.0. This method is not needed in PHP 5.6+.
135
+ */
136
+ public static function defaultCaBundle(): string
137
+ {
138
+ static $cached = null;
139
+ static $cafiles = [
140
+ // Red Hat, CentOS, Fedora (provided by the ca-certificates package)
141
+ '/etc/pki/tls/certs/ca-bundle.crt',
142
+ // Ubuntu, Debian (provided by the ca-certificates package)
143
+ '/etc/ssl/certs/ca-certificates.crt',
144
+ // FreeBSD (provided by the ca_root_nss package)
145
+ '/usr/local/share/certs/ca-root-nss.crt',
146
+ // SLES 12 (provided by the ca-certificates package)
147
+ '/var/lib/ca-certificates/ca-bundle.pem',
148
+ // OS X provided by homebrew (using the default path)
149
+ '/usr/local/etc/openssl/cert.pem',
150
+ // Google app engine
151
+ '/etc/ca-certificates.crt',
152
+ // Windows?
153
+ 'C:\\windows\\system32\\curl-ca-bundle.crt',
154
+ 'C:\\windows\\curl-ca-bundle.crt',
155
+ ];
156
+
157
+ if ($cached) {
158
+ return $cached;
159
+ }
160
+
161
+ if ($ca = \ini_get('openssl.cafile')) {
162
+ return $cached = $ca;
163
+ }
164
+
165
+ if ($ca = \ini_get('curl.cainfo')) {
166
+ return $cached = $ca;
167
+ }
168
+
169
+ foreach ($cafiles as $filename) {
170
+ if (\file_exists($filename)) {
171
+ return $cached = $filename;
172
+ }
173
+ }
174
+
175
+ throw new \RuntimeException(
176
+ <<< EOT
177
+ No system CA bundle could be found in any of the the common system locations.
178
+ PHP versions earlier than 5.6 are not properly configured to use the system's
179
+ CA bundle by default. In order to verify peer certificates, you will need to
180
+ supply the path on disk to a certificate bundle to the 'verify' request
181
+ option: http://docs.guzzlephp.org/en/latest/clients.html#verify. If you do not
182
+ need a specific certificate bundle, then Mozilla provides a commonly used CA
183
+ bundle which can be downloaded here (provided by the maintainer of cURL):
184
+ https://curl.haxx.se/ca/cacert.pem. Once
185
+ you have a CA bundle available on disk, you can set the 'openssl.cafile' PHP
186
+ ini setting to point to the path to the file, allowing you to omit the 'verify'
187
+ request option. See https://curl.haxx.se/docs/sslcerts.html for more
188
+ information.
189
+ EOT
190
+ );
191
+ }
192
+
193
+ /**
194
+ * Creates an associative array of lowercase header names to the actual
195
+ * header casing.
196
+ */
197
+ public static function normalizeHeaderKeys(array $headers): array
198
+ {
199
+ $result = [];
200
+ foreach (\array_keys($headers) as $key) {
201
+ $result[\strtolower($key)] = $key;
202
+ }
203
+
204
+ return $result;
205
+ }
206
+
207
+ /**
208
+ * Returns true if the provided host matches any of the no proxy areas.
209
+ *
210
+ * This method will strip a port from the host if it is present. Each pattern
211
+ * can be matched with an exact match (e.g., "foo.com" == "foo.com") or a
212
+ * partial match: (e.g., "foo.com" == "baz.foo.com" and ".foo.com" ==
213
+ * "baz.foo.com", but ".foo.com" != "foo.com").
214
+ *
215
+ * Areas are matched in the following cases:
216
+ * 1. "*" (without quotes) always matches any hosts.
217
+ * 2. An exact match.
218
+ * 3. The area starts with "." and the area is the last part of the host. e.g.
219
+ * '.mit.edu' will match any host that ends with '.mit.edu'.
220
+ *
221
+ * @param string $host Host to check against the patterns.
222
+ * @param string[] $noProxyArray An array of host patterns.
223
+ *
224
+ * @throws InvalidArgumentException
225
+ */
226
+ public static function isHostInNoProxy(string $host, array $noProxyArray): bool
227
+ {
228
+ if (\strlen($host) === 0) {
229
+ throw new InvalidArgumentException('Empty host provided');
230
+ }
231
+
232
+ // Strip port if present.
233
+ if (\strpos($host, ':')) {
234
+ /** @var string[] $hostParts will never be false because of the checks above */
235
+ $hostParts = \explode($host, ':', 2);
236
+ $host = $hostParts[0];
237
+ }
238
+
239
+ foreach ($noProxyArray as $area) {
240
+ // Always match on wildcards.
241
+ if ($area === '*') {
242
+ return true;
243
+ } elseif (empty($area)) {
244
+ // Don't match on empty values.
245
+ continue;
246
+ } elseif ($area === $host) {
247
+ // Exact matches.
248
+ return true;
249
+ }
250
+ // Special match if the area when prefixed with ".". Remove any
251
+ // existing leading "." and add a new leading ".".
252
+ $area = '.' . \ltrim($area, '.');
253
+ if (\substr($host, -(\strlen($area))) === $area) {
254
+ return true;
255
+ }
256
+ }
257
+
258
+ return false;
259
+ }
260
+
261
+ /**
262
+ * Wrapper for json_decode that throws when an error occurs.
263
+ *
264
+ * @param string $json JSON data to parse
265
+ * @param bool $assoc When true, returned objects will be converted
266
+ * into associative arrays.
267
+ * @param int $depth User specified recursion depth.
268
+ * @param int $options Bitmask of JSON decode options.
269
+ *
270
+ * @return object|array|string|int|float|bool|null
271
+ *
272
+ * @throws InvalidArgumentException if the JSON cannot be decoded.
273
+ *
274
+ * @link https://www.php.net/manual/en/function.json-decode.php
275
+ */
276
+ public static function jsonDecode(string $json, bool $assoc = false, int $depth = 512, int $options = 0)
277
+ {
278
+ $data = \json_decode($json, $assoc, $depth, $options);
279
+ if (\JSON_ERROR_NONE !== \json_last_error()) {
280
+ throw new InvalidArgumentException('json_decode error: ' . \json_last_error_msg());
281
+ }
282
+
283
+ return $data;
284
+ }
285
+
286
+ /**
287
+ * Wrapper for JSON encoding that throws when an error occurs.
288
+ *
289
+ * @param mixed $value The value being encoded
290
+ * @param int $options JSON encode option bitmask
291
+ * @param int $depth Set the maximum depth. Must be greater than zero.
292
+ *
293
+ * @throws InvalidArgumentException if the JSON cannot be encoded.
294
+ *
295
+ * @link https://www.php.net/manual/en/function.json-encode.php
296
+ */
297
+ public static function jsonEncode($value, int $options = 0, int $depth = 512): string
298
+ {
299
+ $json = \json_encode($value, $options, $depth);
300
+ if (\JSON_ERROR_NONE !== \json_last_error()) {
301
+ throw new InvalidArgumentException('json_encode error: ' . \json_last_error_msg());
302
+ }
303
+
304
+ /** @var string */
305
+ return $json;
306
+ }
307
+
308
  /**
309
  * Wrapper for the hrtime() or microtime() functions
310
  * (depending on the PHP version, one of the two is used)
311
  *
312
+ * @return float UNIX timestamp
313
  *
314
  * @internal
315
  */
316
+ public static function currentTime(): float
317
  {
318
+ return (float) \function_exists('hrtime') ? \hrtime(true) / 1e9 : \microtime(true);
319
  }
320
 
321
  /**
 
 
 
322
  * @throws InvalidArgumentException
323
  *
324
  * @internal
325
  */
326
+ public static function idnUriConvert(UriInterface $uri, int $options = 0): UriInterface
327
  {
328
  if ($uri->getHost()) {
329
  $asciiHost = self::idnToAsci($uri->getHost(), $options, $info);
330
  if ($asciiHost === false) {
331
+ $errorBitSet = $info['errors'] ?? 0;
332
 
333
+ $errorConstants = array_filter(array_keys(get_defined_constants()), static function ($name) {
334
  return substr($name, 0, 11) === 'IDNA_ERROR_';
335
  });
336
 
347
  }
348
 
349
  throw new InvalidArgumentException($errorMessage);
350
+ }
351
+ if ($uri->getHost() !== $asciiHost) {
352
+ // Replace URI only if the ASCII version is different
353
+ $uri = $uri->withHost($asciiHost);
 
354
  }
355
  }
356
 
358
  }
359
 
360
  /**
361
+ * @internal
 
 
 
 
362
  */
363
+ public static function getenv(string $name): ?string
364
  {
365
+ if (isset($_SERVER[$name])) {
366
+ return (string) $_SERVER[$name];
367
  }
368
 
369
+ if (\PHP_SAPI === 'cli' && ($value = \getenv($name)) !== false && $value !== null) {
370
+ return (string) $value;
371
  }
372
 
373
+ return null;
374
+ }
375
+
376
+ /**
377
+ * @return string|false
378
+ */
379
+ private static function idnToAsci(string $domain, int $options, ?array &$info = [])
380
+ {
381
+ if (\function_exists('idn_to_ascii') && \defined('INTL_IDNA_VARIANT_UTS46')) {
382
+ return \idn_to_ascii($domain, $options, \INTL_IDNA_VARIANT_UTS46, $info);
383
  }
384
 
385
+ throw new \Error('ext-idn or symfony/polyfill-intl-idn not loaded or too old');
386
  }
387
  }
vendor/guzzlehttp/guzzle/src/functions.php CHANGED
@@ -1,77 +1,34 @@
1
  <?php
2
- namespace GuzzleHttp;
3
-
4
- use GuzzleHttp\Handler\CurlHandler;
5
- use GuzzleHttp\Handler\CurlMultiHandler;
6
- use GuzzleHttp\Handler\Proxy;
7
- use GuzzleHttp\Handler\StreamHandler;
8
-
9
- /**
10
- * Expands a URI template
11
- *
12
- * @param string $template URI template
13
- * @param array $variables Template variables
14
- *
15
- * @return string
16
- */
17
- function uri_template($template, array $variables)
18
- {
19
- if (extension_loaded('uri_template')) {
20
- // @codeCoverageIgnoreStart
21
- return \uri_template($template, $variables);
22
- // @codeCoverageIgnoreEnd
23
- }
24
 
25
- static $uriTemplate;
26
- if (!$uriTemplate) {
27
- $uriTemplate = new UriTemplate();
28
- }
29
-
30
- return $uriTemplate->expand($template, $variables);
31
- }
32
 
33
  /**
34
  * Debug function used to describe the provided value type and class.
35
  *
36
- * @param mixed $input
 
37
  *
38
  * @return string Returns a string containing the type of the variable and
39
  * if a class is provided, the class name.
 
 
40
  */
41
- function describe_type($input)
42
  {
43
- switch (gettype($input)) {
44
- case 'object':
45
- return 'object(' . get_class($input) . ')';
46
- case 'array':
47
- return 'array(' . count($input) . ')';
48
- default:
49
- ob_start();
50
- var_dump($input);
51
- // normalize float vs double
52
- return str_replace('double(', 'float(', rtrim(ob_get_clean()));
53
- }
54
  }
55
 
56
  /**
57
  * Parses an array of header lines into an associative array of headers.
58
  *
59
  * @param iterable $lines Header lines array of strings in the following
60
- * format: "Name: Value"
61
- * @return array
 
62
  */
63
- function headers_from_lines($lines)
64
  {
65
- $headers = [];
66
-
67
- foreach ($lines as $line) {
68
- $parts = explode(':', $line, 2);
69
- $headers[trim($parts[0])][] = isset($parts[1])
70
- ? trim($parts[1])
71
- : null;
72
- }
73
-
74
- return $headers;
75
  }
76
 
77
  /**
@@ -80,16 +37,12 @@ function headers_from_lines($lines)
80
  * @param mixed $value Optional value
81
  *
82
  * @return resource
 
 
83
  */
84
  function debug_resource($value = null)
85
  {
86
- if (is_resource($value)) {
87
- return $value;
88
- } elseif (defined('STDOUT')) {
89
- return STDOUT;
90
- }
91
-
92
- return fopen('php://output', 'w');
93
  }
94
 
95
  /**
@@ -97,50 +50,25 @@ function debug_resource($value = null)
97
  *
98
  * The returned handler is not wrapped by any default middlewares.
99
  *
100
- * @return callable Returns the best handler for the given system.
101
  * @throws \RuntimeException if no viable Handler is available.
 
 
 
 
102
  */
103
- function choose_handler()
104
  {
105
- $handler = null;
106
- if (function_exists('curl_multi_exec') && function_exists('curl_exec')) {
107
- $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler());
108
- } elseif (function_exists('curl_exec')) {
109
- $handler = new CurlHandler();
110
- } elseif (function_exists('curl_multi_exec')) {
111
- $handler = new CurlMultiHandler();
112
- }
113
-
114
- if (ini_get('allow_url_fopen')) {
115
- $handler = $handler
116
- ? Proxy::wrapStreaming($handler, new StreamHandler())
117
- : new StreamHandler();
118
- } elseif (!$handler) {
119
- throw new \RuntimeException('GuzzleHttp requires cURL, the '
120
- . 'allow_url_fopen ini setting, or a custom HTTP handler.');
121
- }
122
-
123
- return $handler;
124
  }
125
 
126
  /**
127
- * Get the default User-Agent string to use with Guzzle
128
  *
129
- * @return string
130
  */
131
- function default_user_agent()
132
  {
133
- static $defaultAgent = '';
134
-
135
- if (!$defaultAgent) {
136
- $defaultAgent = 'GuzzleHttp/' . Client::VERSION;
137
- if (extension_loaded('curl') && function_exists('curl_version')) {
138
- $defaultAgent .= ' curl/' . \curl_version()['version'];
139
- }
140
- $defaultAgent .= ' PHP/' . PHP_VERSION;
141
- }
142
-
143
- return $defaultAgent;
144
  }
145
 
146
  /**
@@ -154,82 +82,24 @@ function default_user_agent()
154
  *
155
  * Note: the result of this function is cached for subsequent calls.
156
  *
157
- * @return string
158
  * @throws \RuntimeException if no bundle can be found.
 
 
159
  */
160
- function default_ca_bundle()
161
  {
162
- static $cached = null;
163
- static $cafiles = [
164
- // Red Hat, CentOS, Fedora (provided by the ca-certificates package)
165
- '/etc/pki/tls/certs/ca-bundle.crt',
166
- // Ubuntu, Debian (provided by the ca-certificates package)
167
- '/etc/ssl/certs/ca-certificates.crt',
168
- // FreeBSD (provided by the ca_root_nss package)
169
- '/usr/local/share/certs/ca-root-nss.crt',
170
- // SLES 12 (provided by the ca-certificates package)
171
- '/var/lib/ca-certificates/ca-bundle.pem',
172
- // OS X provided by homebrew (using the default path)
173
- '/usr/local/etc/openssl/cert.pem',
174
- // Google app engine
175
- '/etc/ca-certificates.crt',
176
- // Windows?
177
- 'C:\\windows\\system32\\curl-ca-bundle.crt',
178
- 'C:\\windows\\curl-ca-bundle.crt',
179
- ];
180
-
181
- if ($cached) {
182
- return $cached;
183
- }
184
-
185
- if ($ca = ini_get('openssl.cafile')) {
186
- return $cached = $ca;
187
- }
188
-
189
- if ($ca = ini_get('curl.cainfo')) {
190
- return $cached = $ca;
191
- }
192
-
193
- foreach ($cafiles as $filename) {
194
- if (file_exists($filename)) {
195
- return $cached = $filename;
196
- }
197
- }
198
-
199
- throw new \RuntimeException(
200
- <<< EOT
201
- No system CA bundle could be found in any of the the common system locations.
202
- PHP versions earlier than 5.6 are not properly configured to use the system's
203
- CA bundle by default. In order to verify peer certificates, you will need to
204
- supply the path on disk to a certificate bundle to the 'verify' request
205
- option: http://docs.guzzlephp.org/en/latest/clients.html#verify. If you do not
206
- need a specific certificate bundle, then Mozilla provides a commonly used CA
207
- bundle which can be downloaded here (provided by the maintainer of cURL):
208
- https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt. Once
209
- you have a CA bundle available on disk, you can set the 'openssl.cafile' PHP
210
- ini setting to point to the path to the file, allowing you to omit the 'verify'
211
- request option. See http://curl.haxx.se/docs/sslcerts.html for more
212
- information.
213
- EOT
214
- );
215
  }
216
 
217
  /**
218
  * Creates an associative array of lowercase header names to the actual
219
  * header casing.
220
  *
221
- * @param array $headers
222
- *
223
- * @return array
224
  */
225
- function normalize_header_keys(array $headers)
226
  {
227
- $result = [];
228
- foreach (array_keys($headers) as $key) {
229
- $result[strtolower($key)] = $key;
230
- }
231
-
232
- return $result;
233
  }
234
 
235
  /**
@@ -246,89 +116,52 @@ function normalize_header_keys(array $headers)
246
  * 3. The area starts with "." and the area is the last part of the host. e.g.
247
  * '.mit.edu' will match any host that ends with '.mit.edu'.
248
  *
249
- * @param string $host Host to check against the patterns.
250
- * @param array $noProxyArray An array of host patterns.
 
 
251
  *
252
- * @return bool
253
  */
254
- function is_host_in_noproxy($host, array $noProxyArray)
255
  {
256
- if (strlen($host) === 0) {
257
- throw new \InvalidArgumentException('Empty host provided');
258
- }
259
-
260
- // Strip port if present.
261
- if (strpos($host, ':')) {
262
- $host = explode($host, ':', 2)[0];
263
- }
264
-
265
- foreach ($noProxyArray as $area) {
266
- // Always match on wildcards.
267
- if ($area === '*') {
268
- return true;
269
- } elseif (empty($area)) {
270
- // Don't match on empty values.
271
- continue;
272
- } elseif ($area === $host) {
273
- // Exact matches.
274
- return true;
275
- } else {
276
- // Special match if the area when prefixed with ".". Remove any
277
- // existing leading "." and add a new leading ".".
278
- $area = '.' . ltrim($area, '.');
279
- if (substr($host, -(strlen($area))) === $area) {
280
- return true;
281
- }
282
- }
283
- }
284
-
285
- return false;
286
  }
287
 
288
  /**
289
  * Wrapper for json_decode that throws when an error occurs.
290
  *
291
  * @param string $json JSON data to parse
292
- * @param bool $assoc When true, returned objects will be converted
293
  * into associative arrays.
294
  * @param int $depth User specified recursion depth.
295
  * @param int $options Bitmask of JSON decode options.
296
  *
297
- * @return mixed
 
298
  * @throws Exception\InvalidArgumentException if the JSON cannot be decoded.
299
- * @link http://www.php.net/manual/en/function.json-decode.php
 
 
300
  */
301
- function json_decode($json, $assoc = false, $depth = 512, $options = 0)
302
  {
303
- $data = \json_decode($json, $assoc, $depth, $options);
304
- if (JSON_ERROR_NONE !== json_last_error()) {
305
- throw new Exception\InvalidArgumentException(
306
- 'json_decode error: ' . json_last_error_msg()
307
- );
308
- }
309
-
310
- return $data;
311
  }
312
 
313
  /**
314
  * Wrapper for JSON encoding that throws when an error occurs.
315
  *
316
  * @param mixed $value The value being encoded
317
- * @param int $options JSON encode option bitmask
318
- * @param int $depth Set the maximum depth. Must be greater than zero.
319
  *
320
- * @return string
321
  * @throws Exception\InvalidArgumentException if the JSON cannot be encoded.
322
- * @link http://www.php.net/manual/en/function.json-encode.php
 
 
323
  */
324
- function json_encode($value, $options = 0, $depth = 512)
325
  {
326
- $json = \json_encode($value, $options, $depth);
327
- if (JSON_ERROR_NONE !== json_last_error()) {
328
- throw new Exception\InvalidArgumentException(
329
- 'json_encode error: ' . json_last_error_msg()
330
- );
331
- }
332
-
333
- return $json;
334
  }
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
+ namespace GuzzleHttp;
 
 
 
 
 
 
4
 
5
  /**
6
  * Debug function used to describe the provided value type and class.
7
  *
8
+ * @param mixed $input Any type of variable to describe the type of. This
9
+ * parameter misses a typehint because of that.
10
  *
11
  * @return string Returns a string containing the type of the variable and
12
  * if a class is provided, the class name.
13
+ *
14
+ * @deprecated describe_type will be removed in guzzlehttp/guzzle:8.0. Use Utils::describeType instead.
15
  */
16
+ function describe_type($input): string
17
  {
18
+ return Utils::describeType($input);
 
 
 
 
 
 
 
 
 
 
19
  }
20
 
21
  /**
22
  * Parses an array of header lines into an associative array of headers.
23
  *
24
  * @param iterable $lines Header lines array of strings in the following
25
+ * format: "Name: Value"
26
+ *
27
+ * @deprecated headers_from_lines will be removed in guzzlehttp/guzzle:8.0. Use Utils::headersFromLines instead.
28
  */
29
+ function headers_from_lines(iterable $lines): array
30
  {
31
+ return Utils::headersFromLines($lines);
 
 
 
 
 
 
 
 
 
32
  }
33
 
34
  /**
37
  * @param mixed $value Optional value
38
  *
39
  * @return resource
40
+ *
41
+ * @deprecated debug_resource will be removed in guzzlehttp/guzzle:8.0. Use Utils::debugResource instead.
42
  */
43
  function debug_resource($value = null)
44
  {
45
+ return Utils::debugResource($value);
 
 
 
 
 
 
46
  }
47
 
48
  /**
50
  *
51
  * The returned handler is not wrapped by any default middlewares.
52
  *
 
53
  * @throws \RuntimeException if no viable Handler is available.
54
+ *
55
+ * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.
56
+ *
57
+ * @deprecated choose_handler will be removed in guzzlehttp/guzzle:8.0. Use Utils::chooseHandler instead.
58
  */
59
+ function choose_handler(): callable
60
  {
61
+ return Utils::chooseHandler();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  }
63
 
64
  /**
65
+ * Get the default User-Agent string to use with Guzzle.
66
  *
67
+ * @deprecated default_user_agent will be removed in guzzlehttp/guzzle:8.0. Use Utils::defaultUserAgent instead.
68
  */
69
+ function default_user_agent(): string
70
  {
71
+ return Utils::defaultUserAgent();
 
 
 
 
 
 
 
 
 
 
72
  }
73
 
74
  /**
82
  *
83
  * Note: the result of this function is cached for subsequent calls.
84
  *
 
85
  * @throws \RuntimeException if no bundle can be found.
86
+ *
87
+ * @deprecated default_ca_bundle will be removed in guzzlehttp/guzzle:8.0. This function is not needed in PHP 5.6+.
88
  */
89
+ function default_ca_bundle(): string
90
  {
91
+ return Utils::defaultCaBundle();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  }
93
 
94
  /**
95
  * Creates an associative array of lowercase header names to the actual
96
  * header casing.
97
  *
98
+ * @deprecated normalize_header_keys will be removed in guzzlehttp/guzzle:8.0. Use Utils::normalizeHeaderKeys instead.
 
 
99
  */
100
+ function normalize_header_keys(array $headers): array
101
  {
102
+ return Utils::normalizeHeaderKeys($headers);
 
 
 
 
 
103
  }
104
 
105
  /**
116
  * 3. The area starts with "." and the area is the last part of the host. e.g.
117
  * '.mit.edu' will match any host that ends with '.mit.edu'.
118
  *
119
+ * @param string $host Host to check against the patterns.
120
+ * @param string[] $noProxyArray An array of host patterns.
121
+ *
122
+ * @throws Exception\InvalidArgumentException
123
  *
124
+ * @deprecated is_host_in_noproxy will be removed in guzzlehttp/guzzle:8.0. Use Utils::isHostInNoProxy instead.
125
  */
126
+ function is_host_in_noproxy(string $host, array $noProxyArray): bool
127
  {
128
+ return Utils::isHostInNoProxy($host, $noProxyArray);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  }
130
 
131
  /**
132
  * Wrapper for json_decode that throws when an error occurs.
133
  *
134
  * @param string $json JSON data to parse
135
+ * @param bool $assoc When true, returned objects will be converted
136
  * into associative arrays.
137
  * @param int $depth User specified recursion depth.
138
  * @param int $options Bitmask of JSON decode options.
139
  *
140
+ * @return object|array|string|int|float|bool|null
141
+ *
142
  * @throws Exception\InvalidArgumentException if the JSON cannot be decoded.
143
+ *
144
+ * @link https://www.php.net/manual/en/function.json-decode.php
145
+ * @deprecated json_decode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonDecode instead.
146
  */
147
+ function json_decode(string $json, bool $assoc = false, int $depth = 512, int $options = 0)
148
  {
149
+ return Utils::jsonDecode($json, $assoc, $depth, $options);
 
 
 
 
 
 
 
150
  }
151
 
152
  /**
153
  * Wrapper for JSON encoding that throws when an error occurs.
154
  *
155
  * @param mixed $value The value being encoded
156
+ * @param int $options JSON encode option bitmask
157
+ * @param int $depth Set the maximum depth. Must be greater than zero.
158
  *
 
159
  * @throws Exception\InvalidArgumentException if the JSON cannot be encoded.
160
+ *
161
+ * @link https://www.php.net/manual/en/function.json-encode.php
162
+ * @deprecated json_encode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonEncode instead.
163
  */
164
+ function json_encode($value, int $options = 0, int $depth = 512): string
165
  {
166
+ return Utils::jsonEncode($value, $options, $depth);
 
 
 
 
 
 
 
167
  }
vendor/guzzlehttp/guzzle/src/functions_include.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
  // Don't redefine the functions if included multiple times.
4
- if (!function_exists('GuzzleHttp\uri_template')) {
5
  require __DIR__ . '/functions.php';
6
  }
1
  <?php
2
 
3
  // Don't redefine the functions if included multiple times.
4
+ if (!\function_exists('GuzzleHttp\describe_type')) {
5
  require __DIR__ . '/functions.php';
6
  }
vendor/guzzlehttp/promises/.php_cs.dist ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $config = PhpCsFixer\Config::create()
4
+ ->setRiskyAllowed(true)
5
+ ->setRules([
6
+ '@PSR2' => true,
7
+ 'array_syntax' => ['syntax' => 'short'],
8
+ 'binary_operator_spaces' => ['operators' => ['=>' => null]],
9
+ 'blank_line_after_opening_tag' => true,
10
+ 'class_attributes_separation' => ['elements' => ['method']],
11
+ 'compact_nullable_typehint' => true,
12
+ 'concat_space' => ['spacing' => 'one'],
13
+ 'declare_equal_normalize' => ['space' => 'none'],
14
+ 'declare_strict_types' => false,
15
+ 'dir_constant' => true,
16
+ 'final_static_access' => true,
17
+ 'fully_qualified_strict_types' => true,
18
+ 'function_to_constant' => true,
19
+ 'function_typehint_space' => true,
20
+ 'header_comment' => false,
21
+ 'is_null' => ['use_yoda_style' => false],
22
+ 'list_syntax' => ['syntax' => 'short'],
23
+ 'lowercase_cast' => true,
24
+ 'magic_method_casing' => true,
25
+ 'modernize_types_casting' => true,
26
+ 'multiline_comment_opening_closing' => true,
27
+ //'native_constant_invocation' => true,
28
+ 'no_alias_functions' => true,
29
+ 'no_alternative_syntax' => true,
30
+ 'no_blank_lines_after_phpdoc' => true,
31
+ 'no_empty_comment' => true,
32
+ 'no_empty_phpdoc' => true,
33
+ 'no_extra_blank_lines' => true,
34
+ 'no_leading_import_slash' => true,
35
+ 'no_leading_namespace_whitespace' => true,
36
+ 'no_spaces_around_offset' => true,
37
+ 'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
38
+ 'no_trailing_comma_in_singleline_array' => true,
39
+ 'no_unneeded_control_parentheses' => true,
40
+ 'no_unset_cast' => true,
41
+ 'no_unused_imports' => true,
42
+ 'no_useless_else' => true,
43
+ 'no_useless_return' => true,
44
+ 'no_whitespace_in_blank_line' => true,
45
+ 'normalize_index_brace' => true,
46
+ 'ordered_imports' => true,
47
+ 'php_unit_construct' => true,
48
+ 'php_unit_dedicate_assert' => ['target' => 'newest'],
49
+ 'php_unit_dedicate_assert_internal_type' => ['target' => 'newest'],
50
+ 'php_unit_expectation' => ['target' => 'newest'],
51
+ 'php_unit_mock' => ['target' => 'newest'],
52
+ 'php_unit_mock_short_will_return' => true,
53
+ 'php_unit_no_expectation_annotation' => ['target' => 'newest'],
54
+ 'php_unit_test_annotation' => ['style' => 'prefix'],
55
+ //'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
56
+ 'phpdoc_align' => ['align' => 'vertical'],
57
+ //'phpdoc_line_span' => ['method' => 'multi', 'property' => 'multi'],
58
+ 'phpdoc_no_package' => true,
59
+ 'phpdoc_no_useless_inheritdoc' => true,
60
+ 'phpdoc_scalar' => true,
61
+ 'phpdoc_separation' => true,
62
+ 'phpdoc_single_line_var_spacing' => true,
63
+ 'phpdoc_trim' => true,
64
+ 'phpdoc_trim_consecutive_blank_line_separation' => true,
65
+ 'phpdoc_types' => true,
66
+ 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
67
+ 'phpdoc_var_without_name' => true,
68
+ 'return_assignment' => true,
69
+ 'short_scalar_cast' => true,
70
+ 'single_trait_insert_per_statement' => true,
71
+ 'standardize_not_equals' => true,
72
+ //'static_lambda' => true,
73
+ 'ternary_to_null_coalescing' => true,
74
+ 'trim_array_spaces' => true,
75
+ 'visibility_required' => true,
76
+ 'yoda_style' => false,
77
+ // 'native_function_invocation' => true,
78
+ 'braces' => ['allow_single_line_closure'=>true],
79
+ ])
80
+ ->setFinder(
81
+ PhpCsFixer\Finder::create()
82
+ ->in(__DIR__.'/src')
83
+ ->in(__DIR__.'/tests')
84
+ ->name('*.php')
85
+ )
86
+ ;
87
+
88
+ return $config;
vendor/guzzlehttp/promises/CHANGELOG.md CHANGED
@@ -1,6 +1,22 @@
1
  # CHANGELOG
2
 
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  ## 1.3.1 - 2016-12-20
5
 
6
  ### Fixed
1
  # CHANGELOG
2
 
3
 
4
+ ## 1.4.0 - 2020-09-30
5
+
6
+ ### Added
7
+
8
+ - Support for PHP 8
9
+ - Optional `$recursive` flag to `all`
10
+ - Replaced functions by static methods
11
+
12
+ ### Fixed
13
+
14
+ - Fix empty `each` processing
15
+ - Fix promise handling for Iterators of non-unique keys
16
+ - Fixed `method_exists` crashes on PHP 8
17
+ - Memory leak on exceptions
18
+
19
+
20
  ## 1.3.1 - 2016-12-20
21
 
22
  ### Fixed
vendor/guzzlehttp/promises/README.md CHANGED
@@ -26,7 +26,7 @@ for a general introduction to promises.
26
  - Promises can be cancelled.
27
  - Works with any object that has a `then` function.
28
  - C# style async/await coroutine promises using
29
- `GuzzleHttp\Promise\coroutine()`.
30
 
31
 
32
  # Quick start
@@ -88,7 +88,7 @@ $promise
88
  });
89
 
90
  // Resolving the promise triggers the $onFulfilled callbacks and outputs
91
- // "Hello, reader".
92
  $promise->resolve('reader.');
93
  ```
94
 
@@ -150,7 +150,7 @@ use GuzzleHttp\Promise\Promise;
150
 
151
  $promise = new Promise();
152
  $promise->then(null, function ($reason) {
153
- throw new \Exception($reason);
154
  })->then(null, function ($reason) {
155
  assert($reason->getMessage() === 'Error!');
156
  });
@@ -182,7 +182,6 @@ invoked using the value returned from the `$onRejected` callback.
182
 
183
  ```php
184
  use GuzzleHttp\Promise\Promise;
185
- use GuzzleHttp\Promise\RejectedPromise;
186
 
187
  $promise = new Promise();
188
  $promise
@@ -220,7 +219,7 @@ the promise is rejected with the exception and the exception is thrown.
220
 
221
  ```php
222
  $promise = new Promise(function () use (&$promise) {
223
- throw new \Exception('foo');
224
  });
225
 
226
  $promise->wait(); // throws the exception.
@@ -397,7 +396,7 @@ $deferred = new React\Promise\Deferred();
397
  $reactPromise = $deferred->promise();
398
 
399
  // Create a Guzzle promise that is fulfilled with a React promise.
400
- $guzzlePromise = new \GuzzleHttp\Promise\Promise();
401
  $guzzlePromise->then(function ($value) use ($reactPromise) {
402
  // Do something something with the value...
403
  // Return the React promise
@@ -424,7 +423,7 @@ instance.
424
 
425
  ```php
426
  // Get the global task queue
427
- $queue = \GuzzleHttp\Promise\queue();
428
  $queue->run();
429
  ```
430
 
@@ -502,3 +501,32 @@ $promise->then(function ($value) { echo $value; });
502
  $promise->resolve('foo');
503
  // prints "foo"
504
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  - Promises can be cancelled.
27
  - Works with any object that has a `then` function.
28
  - C# style async/await coroutine promises using
29
+ `GuzzleHttp\Promise\Coroutine::of()`.
30
 
31
 
32
  # Quick start
88
  });
89
 
90
  // Resolving the promise triggers the $onFulfilled callbacks and outputs
91
+ // "Hello, reader."
92
  $promise->resolve('reader.');
93
  ```
94
 
150
 
151
  $promise = new Promise();
152
  $promise->then(null, function ($reason) {
153
+ throw new Exception($reason);
154
  })->then(null, function ($reason) {
155
  assert($reason->getMessage() === 'Error!');
156
  });
182
 
183
  ```php
184
  use GuzzleHttp\Promise\Promise;
 
185
 
186
  $promise = new Promise();
187
  $promise
219
 
220
  ```php
221
  $promise = new Promise(function () use (&$promise) {
222
+ throw new Exception('foo');
223
  });
224
 
225
  $promise->wait(); // throws the exception.
396
  $reactPromise = $deferred->promise();
397
 
398
  // Create a Guzzle promise that is fulfilled with a React promise.
399
+ $guzzlePromise = new GuzzleHttp\Promise\Promise();
400
  $guzzlePromise->then(function ($value) use ($reactPromise) {
401
  // Do something something with the value...
402
  // Return the React promise
423
 
424
  ```php
425
  // Get the global task queue
426
+ $queue = GuzzleHttp\Promise\Utils::queue();
427
  $queue->run();
428
  ```
429
 
501
  $promise->resolve('foo');
502
  // prints "foo"
503
  ```
504
+
505
+
506
+ ## Upgrading from Function API
507
+
508
+ A static API was first introduced in 1.4.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API will be removed in 2.0.0. A migration table has been provided here for your convenience:
509
+
510
+ | Original Function | Replacement Method |
511
+ |----------------|----------------|
512
+ | `queue` | `Utils::queue` |
513
+ | `task` | `Utils::task` |
514
+ | `promise_for` | `Create::promiseFor` |
515
+ | `rejection_for` | `Create::rejectionFor` |
516
+ | `exception_for` | `Create::exceptionFor` |
517
+ | `iter_for` | `Create::iterFor` |
518
+ | `inspect` | `Utils::inspect` |
519
+ | `inspect_all` | `Utils::inspectAll` |
520
+ | `unwrap` | `Utils::unwrap` |
521
+ | `all` | `Utils::all` |
522
+ | `some` | `Utils::some` |
523
+ | `any` | `Utils::any` |
524
+ | `settle` | `Utils::settle` |
525
+ | `each` | `Each::of` |
526
+ | `each_limit` | `Each::ofLimit` |
527
+ | `each_limit_all` | `Each::ofLimitAll` |
528
+ | `!is_fulfilled` | `Is::pending` |
529
+ | `is_fulfilled` | `Is::fulfilled` |
530
+ | `is_rejected` | `Is::rejected` |
531
+ | `is_settled` | `Is::settled` |
532
+ | `coroutine` | `Coroutine::of` |
vendor/guzzlehttp/promises/composer.json CHANGED
@@ -11,10 +11,10 @@
11
  }
12
  ],
13
  "require": {
14
- "php": ">=5.5.0"
15
  },
16
  "require-dev": {
17
- "phpunit/phpunit": "^4.0"
18
  },
19
  "autoload": {
20
  "psr-4": {
@@ -22,9 +22,14 @@
22
  },
23
  "files": ["src/functions_include.php"]
24
  },
 
 
 
 
 
25
  "scripts": {
26
- "test": "vendor/bin/phpunit",
27
- "test-ci": "vendor/bin/phpunit --coverage-text"
28
  },
29
  "extra": {
30
  "branch-alias": {
11
  }
12
  ],
13
  "require": {
14
+ "php": ">=5.5"
15
  },
16
  "require-dev": {
17
+ "symfony/phpunit-bridge": "^4.4 || ^5.1"
18
  },
19
  "autoload": {
20
  "psr-4": {
22
  },
23
  "files": ["src/functions_include.php"]
24
  },
25
+ "autoload-dev": {
26
+ "psr-4": {
27
+ "GuzzleHttp\\Promise\\Tests\\": "tests/"
28
+ }
29
+ },
30
  "scripts": {
31
+ "test": "vendor/bin/simple-phpunit",
32
+ "test-ci": "vendor/bin/simple-phpunit --coverage-text"
33
  },
34
  "extra": {
35
  "branch-alias": {
vendor/guzzlehttp/promises/phpstan-baseline.neon ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ parameters:
2
+ ignoreErrors:
3
+ -
4
+ message: "#^Parameter \\#1 \\$function of function register_shutdown_function expects callable\\(\\)\\: void, Closure\\(\\)\\: mixed given\\.$#"
5
+ count: 1
6
+ path: src/TaskQueue.php
7
+
vendor/guzzlehttp/promises/phpstan.neon.dist ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ includes:
2
+ - phpstan-baseline.neon
3
+
4
+ parameters:
5
+ level: 5
6
+ paths:
7
+ - src
8
+
9
+ ignoreErrors:
10
+ - "#^Dead catch - Exception is already caught by Throwable above\\.$#"
vendor/guzzlehttp/promises/psalm.xml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <psalm
3
+ errorLevel="4"
4
+ resolveFromConfigFile="true"
5
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6
+ xmlns="https://getpsalm.org/schema/config"
7
+ xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
8
+ >
9
+ <projectFiles>
10
+ <directory name="src" />
11
+ <ignoreFiles>
12
+ <directory name="vendor" />
13
+ </ignoreFiles>
14
+ </projectFiles>
15
+ </psalm>
vendor/guzzlehttp/promises/src/AggregateException.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  /**
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  /**
vendor/guzzlehttp/promises/src/CancellationException.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  /**
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  /**
vendor/guzzlehttp/promises/src/Coroutine.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  use Exception;
@@ -9,7 +10,7 @@ use Throwable;
9
  * Creates a promise that is resolved using a generator that yields values or
10
  * promises (somewhat similar to C#'s async keyword).
11
  *
12
- * When called, the coroutine function will start an instance of the generator
13
  * and returns a promise that is fulfilled with its final yielded value.
14
  *
15
  * Control is returned back to the generator when the yielded promise settles.
@@ -22,7 +23,7 @@ use Throwable;
22
  * return new Promise\FulfilledPromise($value);
23
  * }
24
  *
25
- * $promise = Promise\coroutine(function () {
26
  * $value = (yield createPromise('a'));
27
  * try {
28
  * $value = (yield createPromise($value . 'b'));
@@ -38,6 +39,7 @@ use Throwable;
38
  * @param callable $generatorFn Generator function to wrap into a promise.
39
  *
40
  * @return Promise
 
41
  * @link https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration
42
  */
43
  final class Coroutine implements PromiseInterface
@@ -65,7 +67,23 @@ final class Coroutine implements PromiseInterface
65
  $this->currentPromise->wait();
66
  }
67
  });
68
- $this->nextCoroutine($this->generator->current());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  }
70
 
71
  public function then(
@@ -108,7 +126,7 @@ final class Coroutine implements PromiseInterface
108
 
109
  private function nextCoroutine($yielded)
110
  {
111
- $this->currentPromise = promise_for($yielded)
112
  ->then([$this, '_handleSuccess'], [$this, '_handleFailure']);
113
  }
114
 
@@ -139,7 +157,7 @@ final class Coroutine implements PromiseInterface
139
  {
140
  unset($this->currentPromise);
141
  try {
142
- $nextYield = $this->generator->throw(exception_for($reason));
143
  // The throw was caught, so keep iterating on the coroutine
144
  $this->nextCoroutine($nextYield);
145
  } catch (Exception $exception) {
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  use Exception;
10
  * Creates a promise that is resolved using a generator that yields values or
11
  * promises (somewhat similar to C#'s async keyword).
12
  *
13
+ * When called, the Coroutine::of method will start an instance of the generator
14
  * and returns a promise that is fulfilled with its final yielded value.
15
  *
16
  * Control is returned back to the generator when the yielded promise settles.
23
  * return new Promise\FulfilledPromise($value);
24
  * }
25
  *
26
+ * $promise = Promise\Coroutine::of(function () {
27
  * $value = (yield createPromise('a'));
28
  * try {
29
  * $value = (yield createPromise($value . 'b'));
39
  * @param callable $generatorFn Generator function to wrap into a promise.
40
  *
41
  * @return Promise
42
+ *
43
  * @link https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration
44
  */
45
  final class Coroutine implements PromiseInterface
67
  $this->currentPromise->wait();
68
  }
69
  });
70
+ try {
71
+ $this->nextCoroutine($this->generator->current());
72
+ } catch (\Exception $exception) {
73
+ $this->result->reject($exception);
74
+ } catch (Throwable $throwable) {
75
+ $this->result->reject($throwable);
76
+ }
77
+ }
78
+
79
+ /**
80
+ * Create a new coroutine.
81
+ *
82
+ * @return self
83
+ */
84
+ public static function of(callable $generatorFn)
85
+ {
86
+ return new self($generatorFn);
87
  }
88
 
89
  public function then(
126
 
127
  private function nextCoroutine($yielded)
128
  {
129
+ $this->currentPromise = Create::promiseFor($yielded)
130
  ->then([$this, '_handleSuccess'], [$this, '_handleFailure']);
131
  }
132
 
157
  {
158
  unset($this->currentPromise);
159
  try {
160
+ $nextYield = $this->generator->throw(Create::exceptionFor($reason));
161
  // The throw was caught, so keep iterating on the coroutine
162
  $this->nextCoroutine($nextYield);
163
  } catch (Exception $exception) {
vendor/guzzlehttp/promises/src/Create.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ final class Create
6
+ {
7
+ /**
8
+ * Creates a promise for a value if the value is not a promise.
9
+ *
10
+ * @param mixed $value Promise or value.
11
+ *
12
+ * @return PromiseInterface
13
+ */
14
+ public static function promiseFor($value)
15
+ {
16
+ if ($value instanceof PromiseInterface) {
17
+ return $value;
18
+ }
19
+
20
+ // Return a Guzzle promise that shadows the given promise.
21
+ if (is_object($value) && method_exists($value, 'then')) {
22
+ $wfn = method_exists($value, 'wait') ? [$value, 'wait'] : null;
23
+ $cfn = method_exists($value, 'cancel') ? [$value, 'cancel'] : null;
24
+ $promise = new Promise($wfn, $cfn);
25
+ $value->then([$promise, 'resolve'], [$promise, 'reject']);
26
+ return $promise;
27
+ }
28
+
29
+ return new FulfilledPromise($value);
30
+ }
31
+
32
+ /**
33
+ * Creates a rejected promise for a reason if the reason is not a promise.
34
+ * If the provided reason is a promise, then it is returned as-is.
35
+ *
36
+ * @param mixed $reason Promise or reason.
37
+ *
38
+ * @return PromiseInterface
39
+ */
40
+ public static function rejectionFor($reason)
41
+ {
42
+ if ($reason instanceof PromiseInterface) {
43
+ return $reason;
44
+ }
45
+
46
+ return new RejectedPromise($reason);
47
+ }
48
+
49
+ /**
50
+ * Create an exception for a rejected promise value.
51
+ *
52
+ * @param mixed $reason
53
+ *
54
+ * @return \Exception|\Throwable
55
+ */
56
+ public static function exceptionFor($reason)
57
+ {
58
+ if ($reason instanceof \Exception || $reason instanceof \Throwable) {
59
+ return $reason;
60
+ }
61
+
62
+ return new RejectionException($reason);
63
+ }
64
+
65
+ /**
66
+ * Returns an iterator for the given value.
67
+ *
68
+ * @param mixed $value
69
+ *
70
+ * @return \Iterator
71
+ */
72
+ public static function iterFor($value)
73
+ {
74
+ if ($value instanceof \Iterator) {
75
+ return $value;
76
+ }
77
+
78
+ if (is_array($value)) {
79
+ return new \ArrayIterator($value);
80
+ }
81
+
82
+ return new \ArrayIterator([$value]);
83
+ }
84
+ }
vendor/guzzlehttp/promises/src/Each.php ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ final class Each
6
+ {
7
+ /**
8
+ * Given an iterator that yields promises or values, returns a promise that
9
+ * is fulfilled with a null value when the iterator has been consumed or
10
+ * the aggregate promise has been fulfilled or rejected.
11
+ *
12
+ * $onFulfilled is a function that accepts the fulfilled value, iterator
13
+ * index, and the aggregate promise. The callback can invoke any necessary
14
+ * side effects and choose to resolve or reject the aggregate if needed.
15
+ *
16
+ * $onRejected is a function that accepts the rejection reason, iterator
17
+ * index, and the aggregate promise. The callback can invoke any necessary
18
+ * side effects and choose to resolve or reject the aggregate if needed.
19
+ *
20
+ * @param mixed $iterable Iterator or array to iterate over.
21
+ * @param callable $onFulfilled
22
+ * @param callable $onRejected
23
+ *
24
+ * @return PromiseInterface
25
+ */
26
+ public static function of(
27
+ $iterable,
28
+ callable $onFulfilled = null,
29
+ callable $onRejected = null
30
+ ) {
31
+ return (new EachPromise($iterable, [
32
+ 'fulfilled' => $onFulfilled,
33
+ 'rejected' => $onRejected
34
+ ]))->promise();
35
+ }
36
+
37
+ /**
38
+ * Like of, but only allows a certain number of outstanding promises at any
39
+ * given time.
40
+ *
41
+ * $concurrency may be an integer or a function that accepts the number of
42
+ * pending promises and returns a numeric concurrency limit value to allow
43
+ * for dynamic a concurrency size.
44
+ *
45
+ * @param mixed $iterable
46
+ * @param int|callable $concurrency
47
+ * @param callable $onFulfilled
48
+ * @param callable $onRejected
49
+ *
50
+ * @return PromiseInterface
51
+ */
52
+ public static function ofLimit(
53
+ $iterable,
54
+ $concurrency,
55
+ callable $onFulfilled = null,
56
+ callable $onRejected = null
57
+ ) {
58
+ return (new EachPromise($iterable, [
59
+ 'fulfilled' => $onFulfilled,
60
+ 'rejected' => $onRejected,
61
+ 'concurrency' => $concurrency
62
+ ]))->promise();
63
+ }
64
+
65
+ /**
66
+ * Like limit, but ensures that no promise in the given $iterable argument
67
+ * is rejected. If any promise is rejected, then the aggregate promise is
68
+ * rejected with the encountered rejection.
69
+ *
70
+ * @param mixed $iterable
71
+ * @param int|callable $concurrency
72
+ * @param callable $onFulfilled
73
+ *
74
+ * @return PromiseInterface
75
+ */
76
+ public static function ofLimitAll(
77
+ $iterable,
78
+ $concurrency,
79
+ callable $onFulfilled = null
80
+ ) {
81
+ return each_limit(
82
+ $iterable,
83
+ $concurrency,
84
+ $onFulfilled,
85
+ function ($reason, $idx, PromiseInterface $aggregate) {
86
+ $aggregate->reject($reason);
87
+ }
88
+ );
89
+ }
90
+ }
vendor/guzzlehttp/promises/src/EachPromise.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  /**
@@ -9,22 +10,22 @@ class EachPromise implements PromisorInterface
9
  {
10
  private $pending = [];
11
 
12
- /** @var \Iterator */
13
  private $iterable;
14
 
15
- /** @var callable|int */
16
  private $concurrency;
17
 
18
- /** @var callable */
19
  private $onFulfilled;
20
 
21
- /** @var callable */
22
  private $onRejected;
23
 
24
- /** @var Promise */
25
  private $aggregate;
26
 
27
- /** @var bool */
28
  private $mutex;
29
 
30
  /**
@@ -45,12 +46,12 @@ class EachPromise implements PromisorInterface
45
  * allowed number of outstanding concurrently executing promises,
46
  * creating a capped pool of promises. There is no limit by default.
47
  *
48
- * @param mixed $iterable Promises or values to iterate.
49
- * @param array $config Configuration options
50
  */
51
  public function __construct($iterable, array $config = [])
52
  {
53
- $this->iterable = iter_for($iterable);
54
 
55
  if (isset($config['concurrency'])) {
56
  $this->concurrency = $config['concurrency'];
@@ -65,6 +66,7 @@ class EachPromise implements PromisorInterface
65
  }
66
  }
67
 
 
68
  public function promise()
69
  {
70
  if ($this->aggregate) {
@@ -73,14 +75,29 @@ class EachPromise implements PromisorInterface
73
 
74
  try {
75
  $this->createPromise();
 
76
  $this->iterable->rewind();
77
- $this->refillPending();
 
 
78
  } catch (\Throwable $e) {
 
 
 
 
79
  $this->aggregate->reject($e);
80
  } catch (\Exception $e) {
 
 
 
 
81
  $this->aggregate->reject($e);
82
  }
83
 
 
 
 
 
84
  return $this->aggregate;
85
  }
86
 
@@ -89,17 +106,12 @@ class EachPromise implements PromisorInterface
89
  $this->mutex = false;
90
  $this->aggregate = new Promise(function () {
91
  reset($this->pending);
92
- if (empty($this->pending) && !$this->iterable->valid()) {
93
- $this->aggregate->resolve(null);
94
- return;
95
- }
96
-
97
  // Consume a potentially fluctuating list of promises while
98
  // ensuring that indexes are maintained (precluding array_shift).
99
  while ($promise = current($this->pending)) {
100
  next($this->pending);
101
  $promise->wait();
102
- if ($this->aggregate->getState() !== PromiseInterface::PENDING) {
103
  return;
104
  }
105
  }
@@ -148,22 +160,34 @@ class EachPromise implements PromisorInterface
148
  return false;
149
  }
150
 
151
- $promise = promise_for($this->iterable->current());
152
- $idx = $this->iterable->key();
 
 
 
 
 
 
153
 
154
  $this->pending[$idx] = $promise->then(
155
- function ($value) use ($idx) {
156
  if ($this->onFulfilled) {
157
  call_user_func(
158
- $this->onFulfilled, $value, $idx, $this->aggregate
 
 
 
159
  );
160
  }
161
  $this->step($idx);
162
  },
163
- function ($reason) use ($idx) {
164
  if ($this->onRejected) {
165
  call_user_func(
166
- $this->onRejected, $reason, $idx, $this->aggregate
 
 
 
167
  );
168
  }
169
  $this->step($idx);
@@ -201,7 +225,7 @@ class EachPromise implements PromisorInterface
201
  private function step($idx)
202
  {
203
  // If the promise was already resolved, then ignore this step.
204
- if ($this->aggregate->getState() !== PromiseInterface::PENDING) {
205
  return;
206
  }
207
 
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  /**
10
  {
11
  private $pending = [];
12
 
13
+ /** @var \Iterator|null */
14
  private $iterable;
15
 
16
+ /** @var callable|int|null */
17
  private $concurrency;
18
 
19
+ /** @var callable|null */
20
  private $onFulfilled;
21
 
22
+ /** @var callable|null */
23
  private $onRejected;
24
 
25
+ /** @var Promise|null */
26
  private $aggregate;
27
 
28
+ /** @var bool|null */
29
  private $mutex;
30
 
31
  /**
46
  * allowed number of outstanding concurrently executing promises,
47
  * creating a capped pool of promises. There is no limit by default.
48
  *
49
+ * @param mixed $iterable Promises or values to iterate.
50
+ * @param array $config Configuration options
51
  */
52
  public function __construct($iterable, array $config = [])
53
  {
54
+ $this->iterable = Create::iterFor($iterable);
55
 
56
  if (isset($config['concurrency'])) {
57
  $this->concurrency = $config['concurrency'];
66
  }
67
  }
68
 
69
+ /** @psalm-suppress InvalidNullableReturnType */
70
  public function promise()
71
  {
72
  if ($this->aggregate) {
75
 
76
  try {
77
  $this->createPromise();
78
+ /** @psalm-assert Promise $this->aggregate */
79
  $this->iterable->rewind();
80
+ if (!$this->checkIfFinished()) {
81
+ $this->refillPending();
82
+ }
83
  } catch (\Throwable $e) {
84
+ /**
85
+ * @psalm-suppress NullReference
86
+ * @phpstan-ignore-next-line
87
+ */
88
  $this->aggregate->reject($e);
89
  } catch (\Exception $e) {
90
+ /**
91
+ * @psalm-suppress NullReference
92
+ * @phpstan-ignore-next-line
93
+ */
94
  $this->aggregate->reject($e);
95
  }
96
 
97
+ /**
98
+ * @psalm-suppress NullableReturnStatement
99
+ * @phpstan-ignore-next-line
100
+ */
101
  return $this->aggregate;
102
  }
103
 
106
  $this->mutex = false;
107
  $this->aggregate = new Promise(function () {
108
  reset($this->pending);
 
 
 
 
 
109
  // Consume a potentially fluctuating list of promises while
110
  // ensuring that indexes are maintained (precluding array_shift).
111
  while ($promise = current($this->pending)) {
112
  next($this->pending);
113
  $promise->wait();
114
+ if (Is::settled($this->aggregate)) {
115
  return;
116
  }
117
  }
160
  return false;
161
  }
162
 
163
+ $promise = Create::promiseFor($this->iterable->current());
164
+ $key = $this->iterable->key();
165
+
166
+ // Iterable keys may not be unique, so we add the promises at the end
167
+ // of the pending array and retrieve the array index being used
168
+ $this->pending[] = null;
169
+ end($this->pending);
170
+ $idx = key($this->pending);
171
 
172
  $this->pending[$idx] = $promise->then(
173
+ function ($value) use ($idx, $key) {
174
  if ($this->onFulfilled) {
175
  call_user_func(
176
+ $this->onFulfilled,
177
+ $value,
178
+ $key,
179
+ $this->aggregate
180
  );
181
  }
182
  $this->step($idx);
183
  },
184
+ function ($reason) use ($idx, $key) {
185
  if ($this->onRejected) {
186
  call_user_func(
187
+ $this->onRejected,
188
+ $reason,
189
+ $key,
190
+ $this->aggregate
191
  );
192
  }
193
  $this->step($idx);
225
  private function step($idx)
226
  {
227
  // If the promise was already resolved, then ignore this step.
228
+ if (Is::settled($this->aggregate)) {
229
  return;
230
  }
231
 
vendor/guzzlehttp/promises/src/FulfilledPromise.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  /**
@@ -13,9 +14,10 @@ class FulfilledPromise implements PromiseInterface
13
 
14
  public function __construct($value)
15
  {
16
- if (method_exists($value, 'then')) {
17
  throw new \InvalidArgumentException(
18
- 'You cannot create a FulfilledPromise with a promise.');
 
19
  }
20
 
21
  $this->value = $value;
@@ -30,11 +32,11 @@ class FulfilledPromise implements PromiseInterface
30
  return $this;
31
  }
32
 
33
- $queue = queue();
34
  $p = new Promise([$queue, 'run']);
35
  $value = $this->value;
36
  $queue->add(static function () use ($p, $value, $onFulfilled) {
37
- if ($p->getState() === self::PENDING) {
38
  try {
39
  $p->resolve($onFulfilled($value));
40
  } catch (\Throwable $e) {
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  /**
14
 
15
  public function __construct($value)
16
  {
17
+ if (is_object($value) && method_exists($value, 'then')) {
18
  throw new \InvalidArgumentException(
19
+ 'You cannot create a FulfilledPromise with a promise.'
20
+ );
21
  }
22
 
23
  $this->value = $value;
32
  return $this;
33
  }
34
 
35
+ $queue = Utils::queue();
36
  $p = new Promise([$queue, 'run']);
37
  $value = $this->value;
38
  $queue->add(static function () use ($p, $value, $onFulfilled) {
39
+ if (Is::pending($p)) {
40
  try {
41
  $p->resolve($onFulfilled($value));
42
  } catch (\Throwable $e) {
vendor/guzzlehttp/promises/src/Is.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ final class Is
6
+ {
7
+ /**
8
+ * Returns true if a promise is pending.
9
+ *
10
+ * @return bool
11
+ */
12
+ public static function pending(PromiseInterface $promise)
13
+ {
14
+ return $promise->getState() === PromiseInterface::PENDING;
15
+ }
16
+
17
+ /**
18
+ * Returns true if a promise is fulfilled or rejected.
19
+ *
20
+ * @return bool
21
+ */
22
+ public static function settled(PromiseInterface $promise)
23
+ {
24
+ return $promise->getState() !== PromiseInterface::PENDING;
25
+ }
26
+
27
+ /**
28
+ * Returns true if a promise is fulfilled.
29
+ *
30
+ * @return bool
31
+ */
32
+ public static function fulfilled(PromiseInterface $promise)
33
+ {
34
+ return $promise->getState() === PromiseInterface::FULFILLED;
35
+ }
36
+
37
+ /**
38
+ * Returns true if a promise is rejected.
39
+ *
40
+ * @return bool
41
+ */
42
+ public static function rejected(PromiseInterface $promise)
43
+ {
44
+ return $promise->getState() === PromiseInterface::REJECTED;
45
+ }
46
+ }
vendor/guzzlehttp/promises/src/Promise.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  /**
@@ -41,14 +42,13 @@ class Promise implements PromiseInterface
41
 
42
  // Return a fulfilled promise and immediately invoke any callbacks.
43
  if ($this->state === self::FULFILLED) {
44
- return $onFulfilled
45
- ? promise_for($this->result)->then($onFulfilled)
46
- : promise_for($this->result);
47
  }
48
 
49
  // It's either cancelled or rejected, so return a rejected promise
50
  // and immediately invoke any callbacks.
51
- $rejection = rejection_for($this->result);
52
  return $onRejected ? $rejection->then(null, $onRejected) : $rejection;
53
  }
54
 
@@ -61,19 +61,15 @@ class Promise implements PromiseInterface
61
  {
62
  $this->waitIfPending();
63
 
64
- $inner = $this->result instanceof PromiseInterface
65
- ? $this->result->wait($unwrap)
66
- : $this->result;
67
-
68
  if ($unwrap) {
69
- if ($this->result instanceof PromiseInterface
70
- || $this->state === self::FULFILLED
71
- ) {
72
- return $inner;
73
- } else {
74
- // It's rejected so "unwrap" and throw an exception.
75
- throw exception_for($inner);
76
  }
 
 
77
  }
78
  }
79
 
@@ -103,6 +99,7 @@ class Promise implements PromiseInterface
103
  }
104
 
105
  // Reject the promise only if it wasn't rejected in a then callback.
 
106
  if ($this->state === self::PENDING) {
107
  $this->reject(new CancellationException('Promise has been cancelled'));
108
  }
@@ -148,17 +145,15 @@ class Promise implements PromiseInterface
148
 
149
  // If the value was not a settled promise or a thenable, then resolve
150
  // it in the task queue using the correct ID.
151
- if (!method_exists($value, 'then')) {
152
  $id = $state === self::FULFILLED ? 1 : 2;
153
  // It's a success, so resolve the handlers in the queue.
154
- queue()->add(static function () use ($id, $value, $handlers) {
155
  foreach ($handlers as $handler) {
156
  self::callHandler($id, $value, $handler);
157
  }
158
  });
159
- } elseif ($value instanceof Promise
160
- && $value->getState() === self::PENDING
161
- ) {
162
  // We can just merge our handlers onto the next promise.
163
  $value->handlers = array_merge($value->handlers, $handlers);
164
  } else {
@@ -184,8 +179,6 @@ class Promise implements PromiseInterface
184
  * @param int $index 1 (resolve) or 2 (reject).
185
  * @param mixed $value Value to pass to the callback.
186
  * @param array $handler Array of handler data (promise and callbacks).
187
- *
188
- * @return array Returns the next group to resolve.
189
  */
190
  private static function callHandler($index, $value, array $handler)
191
  {
@@ -194,13 +187,21 @@ class Promise implements PromiseInterface
194
 
195
  // The promise may have been cancelled or resolved before placing
196
  // this thunk in the queue.
197
- if ($promise->getState() !== self::PENDING) {
198
  return;
199
  }
200
 
201
  try {
202
  if (isset($handler[$index])) {
203
- $promise->resolve($handler[$index]($value));
 
 
 
 
 
 
 
 
204
  } elseif ($index === 1) {
205
  // Forward resolution values as-is.
206
  $promise->resolve($value);
@@ -224,15 +225,16 @@ class Promise implements PromiseInterface
224
  } elseif ($this->waitList) {
225
  $this->invokeWaitList();
226
  } else {
227
- // If there's not wait function, then reject the promise.
228
  $this->reject('Cannot wait on a promise that has '
229
  . 'no internal wait function. You must provide a wait '
230
  . 'function when constructing the promise to be able to '
231
  . 'wait on a promise.');
232
  }
233
 
234
- queue()->run();
235
 
 
236
  if ($this->state === self::PENDING) {
237
  $this->reject('Invoking the wait callback did not resolve the promise');
238
  }
@@ -263,17 +265,13 @@ class Promise implements PromiseInterface
263
  $this->waitList = null;
264
 
265
  foreach ($waitList as $result) {
266
- while (true) {
267
  $result->waitIfPending();
 
 
268
 
269
- if ($result->result instanceof Promise) {
270
- $result = $result->result;
271
- } else {
272
- if ($result->result instanceof PromiseInterface) {
273
- $result->result->wait(false);
274
- }
275
- break;
276
- }
277
  }
278
  }
279
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  /**
42
 
43
  // Return a fulfilled promise and immediately invoke any callbacks.
44
  if ($this->state === self::FULFILLED) {
45
+ $promise = Create::promiseFor($this->result);
46
+ return $onFulfilled ? $promise->then($onFulfilled) : $promise;
 
47
  }
48
 
49
  // It's either cancelled or rejected, so return a rejected promise
50
  // and immediately invoke any callbacks.
51
+ $rejection = Create::rejectionFor($this->result);
52
  return $onRejected ? $rejection->then(null, $onRejected) : $rejection;
53
  }
54
 
61
  {
62
  $this->waitIfPending();
63
 
64
+ if ($this->result instanceof PromiseInterface) {
65
+ return $this->result->wait($unwrap);
66
+ }
 
67
  if ($unwrap) {
68
+ if ($this->state === self::FULFILLED) {
69
+ return $this->result;
 
 
 
 
 
70
  }
71
+ // It's rejected so "unwrap" and throw an exception.
72
+ throw Create::exceptionFor($this->result);
73
  }
74
  }
75
 
99
  }
100
 
101
  // Reject the promise only if it wasn't rejected in a then callback.
102
+ /** @psalm-suppress RedundantCondition */
103
  if ($this->state === self::PENDING) {
104
  $this->reject(new CancellationException('Promise has been cancelled'));
105
  }
145
 
146
  // If the value was not a settled promise or a thenable, then resolve
147
  // it in the task queue using the correct ID.
148
+ if (!is_object($value) || !method_exists($value, 'then')) {
149
  $id = $state === self::FULFILLED ? 1 : 2;
150
  // It's a success, so resolve the handlers in the queue.
151
+ Utils::queue()->add(static function () use ($id, $value, $handlers) {
152
  foreach ($handlers as $handler) {
153
  self::callHandler($id, $value, $handler);
154
  }
155
  });
156
+ } elseif ($value instanceof Promise && Is::pending($value)) {
 
 
157
  // We can just merge our handlers onto the next promise.
158
  $value->handlers = array_merge($value->handlers, $handlers);
159
  } else {
179
  * @param int $index 1 (resolve) or 2 (reject).
180
  * @param mixed $value Value to pass to the callback.
181
  * @param array $handler Array of handler data (promise and callbacks).
 
 
182
  */
183
  private static function callHandler($index, $value, array $handler)
184
  {
187
 
188
  // The promise may have been cancelled or resolved before placing
189
  // this thunk in the queue.
190
+ if (Is::settled($promise)) {
191
  return;
192
  }
193
 
194
  try {
195
  if (isset($handler[$index])) {
196
+ /*
197
+ * If $f throws an exception, then $handler will be in the exception
198
+ * stack trace. Since $handler contains a reference to the callable
199
+ * itself we get a circular reference. We clear the $handler
200
+ * here to avoid that memory leak.
201
+ */
202
+ $f = $handler[$index];
203
+ unset($handler);
204
+ $promise->resolve($f($value));
205
  } elseif ($index === 1) {
206
  // Forward resolution values as-is.
207
  $promise->resolve($value);
225
  } elseif ($this->waitList) {
226
  $this->invokeWaitList();
227
  } else {
228
+ // If there's no wait function, then reject the promise.
229
  $this->reject('Cannot wait on a promise that has '
230
  . 'no internal wait function. You must provide a wait '
231
  . 'function when constructing the promise to be able to '
232
  . 'wait on a promise.');
233
  }
234
 
235
+ Utils::queue()->run();
236
 
237
+ /** @psalm-suppress RedundantCondition */
238
  if ($this->state === self::PENDING) {
239
  $this->reject('Invoking the wait callback did not resolve the promise');
240
  }
265
  $this->waitList = null;
266
 
267
  foreach ($waitList as $result) {
268
+ do {
269
  $result->waitIfPending();
270
+ $result = $result->result;
271
+ } while ($result instanceof Promise);
272
 
273
+ if ($result instanceof PromiseInterface) {
274
+ $result->wait(false);
 
 
 
 
 
 
275
  }
276
  }
277
  }
vendor/guzzlehttp/promises/src/PromiseInterface.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  /**
@@ -56,6 +57,7 @@ interface PromiseInterface
56
  * Resolve the promise with the given value.
57
  *
58
  * @param mixed $value
 
59
  * @throws \RuntimeException if the promise is already resolved.
60
  */
61
  public function resolve($value);
@@ -64,6 +66,7 @@ interface PromiseInterface
64
  * Reject the promise with the given reason.
65
  *
66
  * @param mixed $reason
 
67
  * @throws \RuntimeException if the promise is already resolved.
68
  */
69
  public function reject($reason);
@@ -86,6 +89,7 @@ interface PromiseInterface
86
  * @param bool $unwrap
87
  *
88
  * @return mixed
 
89
  * @throws \LogicException if the promise has no wait function or if the
90
  * promise does not settle after waiting.
91
  */
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  /**
57
  * Resolve the promise with the given value.
58
  *
59
  * @param mixed $value
60
+ *
61
  * @throws \RuntimeException if the promise is already resolved.
62
  */
63
  public function resolve($value);
66
  * Reject the promise with the given reason.
67
  *
68
  * @param mixed $reason
69
+ *
70
  * @throws \RuntimeException if the promise is already resolved.
71
  */
72
  public function reject($reason);
89
  * @param bool $unwrap
90
  *
91
  * @return mixed
92
+ *
93
  * @throws \LogicException if the promise has no wait function or if the
94
  * promise does not settle after waiting.
95
  */
vendor/guzzlehttp/promises/src/PromisorInterface.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  /**
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  /**
vendor/guzzlehttp/promises/src/RejectedPromise.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  /**
@@ -13,9 +14,10 @@ class RejectedPromise implements PromiseInterface
13
 
14
  public function __construct($reason)
15
  {
16
- if (method_exists($reason, 'then')) {
17
  throw new \InvalidArgumentException(
18
- 'You cannot create a RejectedPromise with a promise.');
 
19
  }
20
 
21
  $this->reason = $reason;
@@ -30,11 +32,11 @@ class RejectedPromise implements PromiseInterface
30
  return $this;
31
  }
32
 
33
- $queue = queue();
34
  $reason = $this->reason;
35
  $p = new Promise([$queue, 'run']);
36
  $queue->add(static function () use ($p, $reason, $onRejected) {
37
- if ($p->getState() === self::PENDING) {
38
  try {
39
  // Return a resolved promise if onRejected does not throw.
40
  $p->resolve($onRejected($reason));
@@ -59,8 +61,10 @@ class RejectedPromise implements PromiseInterface
59
  public function wait($unwrap = true, $defaultDelivery = null)
60
  {
61
  if ($unwrap) {
62
- throw exception_for($this->reason);
63
  }
 
 
64
  }
65
 
66
  public function getState()
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  /**
14
 
15
  public function __construct($reason)
16
  {
17
+ if (is_object($reason) && method_exists($reason, 'then')) {
18
  throw new \InvalidArgumentException(
19
+ 'You cannot create a RejectedPromise with a promise.'
20
+ );
21
  }
22
 
23
  $this->reason = $reason;
32
  return $this;
33
  }
34
 
35
+ $queue = Utils::queue();
36
  $reason = $this->reason;
37
  $p = new Promise([$queue, 'run']);
38
  $queue->add(static function () use ($p, $reason, $onRejected) {
39
+ if (Is::pending($p)) {
40
  try {
41
  // Return a resolved promise if onRejected does not throw.
42
  $p->resolve($onRejected($reason));
61
  public function wait($unwrap = true, $defaultDelivery = null)
62
  {
63
  if ($unwrap) {
64
+ throw Create::exceptionFor($this->reason);
65
  }
66
+
67
+ return null;
68
  }
69
 
70
  public function getState()
vendor/guzzlehttp/promises/src/RejectionException.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  /**
@@ -12,7 +13,7 @@ class RejectionException extends \RuntimeException
12
  private $reason;
13
 
14
  /**
15
- * @param mixed $reason Rejection reason.
16
  * @param string $description Optional description
17
  */
18
  public function __construct($reason, $description = null)
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  /**
13
  private $reason;
14
 
15
  /**
16
+ * @param mixed $reason Rejection reason.
17
  * @param string $description Optional description
18
  */
19
  public function __construct($reason, $description = null)
vendor/guzzlehttp/promises/src/TaskQueue.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  /**
@@ -8,7 +9,7 @@ namespace GuzzleHttp\Promise;
8
  * maintains a constant stack size. You can use the task queue asynchronously
9
  * by calling the `run()` function of the global task queue in an event loop.
10
  *
11
- * GuzzleHttp\Promise\queue()->run();
12
  */
13
  class TaskQueue implements TaskQueueInterface
14
  {
@@ -42,8 +43,8 @@ class TaskQueue implements TaskQueueInterface
42
 
43
  public function run()
44
  {
45
- /** @var callable $task */
46
  while ($task = array_shift($this->queue)) {
 
47
  $task();
48
  }
49
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  /**
9
  * maintains a constant stack size. You can use the task queue asynchronously
10
  * by calling the `run()` function of the global task queue in an event loop.
11
  *
12
+ * GuzzleHttp\Promise\Utils::queue()->run();
13
  */
14
  class TaskQueue implements TaskQueueInterface
15
  {
43
 
44
  public function run()
45
  {
 
46
  while ($task = array_shift($this->queue)) {
47
+ /** @var callable $task */
48
  $task();
49
  }
50
  }
vendor/guzzlehttp/promises/src/TaskQueueInterface.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  interface TaskQueueInterface
@@ -13,8 +14,6 @@ interface TaskQueueInterface
13
  /**
14
  * Adds a task to the queue that will be executed the next time run is
15
  * called.
16
- *
17
- * @param callable $task
18
  */
19
  public function add(callable $task);
20
 
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  interface TaskQueueInterface
14
  /**
15
  * Adds a task to the queue that will be executed the next time run is
16
  * called.
 
 
17
  */
18
  public function add(callable $task);
19
 
vendor/guzzlehttp/promises/src/Utils.php ADDED
@@ -0,0 +1,274 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ final class Utils
6
+ {
7
+ /**
8
+ * Get the global task queue used for promise resolution.
9
+ *
10
+ * This task queue MUST be run in an event loop in order for promises to be
11
+ * settled asynchronously. It will be automatically run when synchronously
12
+ * waiting on a promise.
13
+ *
14
+ * <code>
15
+ * while ($eventLoop->isRunning()) {
16
+ * GuzzleHttp\Promise\Utils::queue()->run();
17
+ * }
18
+ * </code>
19
+ *
20
+ * @param TaskQueueInterface $assign Optionally specify a new queue instance.
21
+ *
22
+ * @return TaskQueueInterface
23
+ */
24
+ public static function queue(TaskQueueInterface $assign = null)
25
+ {
26
+ static $queue;
27
+
28
+ if ($assign) {
29
+ $queue = $assign;
30
+ } elseif (!$queue) {
31
+ $queue = new TaskQueue();
32
+ }
33
+
34
+ return $queue;
35
+ }
36
+
37
+ /**
38
+ * Adds a function to run in the task queue when it is next `run()` and
39
+ * returns a promise that is fulfilled or rejected with the result.
40
+ *
41
+ * @param callable $task Task function to run.
42
+ *
43
+ * @return PromiseInterface
44
+ */
45
+ public static function task(callable $task)
46
+ {
47
+ $queue = self::queue();
48
+ $promise = new Promise([$queue, 'run']);
49
+ $queue->add(function () use ($task, $promise) {
50
+ try {
51
+ $promise->resolve($task());
52
+ } catch (\Throwable $e) {
53
+ $promise->reject($e);
54
+ } catch (\Exception $e) {
55
+ $promise->reject($e);
56
+ }
57
+ });
58
+
59
+ return $promise;
60
+ }
61
+
62
+ /**
63
+ * Synchronously waits on a promise to resolve and returns an inspection
64
+ * state array.
65
+ *
66
+ * Returns a state associative array containing a "state" key mapping to a
67
+ * valid promise state. If the state of the promise is "fulfilled", the
68
+ * array will contain a "value" key mapping to the fulfilled value of the
69
+ * promise. If the promise is rejected, the array will contain a "reason"
70
+ * key mapping to the rejection reason of the promise.
71
+ *
72
+ * @param PromiseInterface $promise Promise or value.
73
+ *
74
+ * @return array
75
+ */
76
+ public static function inspect(PromiseInterface $promise)
77
+ {
78
+ try {
79
+ return [
80
+ 'state' => PromiseInterface::FULFILLED,
81
+ 'value' => $promise->wait()
82
+ ];
83
+ } catch (RejectionException $e) {
84
+ return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()];
85
+ } catch (\Throwable $e) {
86
+ return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
87
+ } catch (\Exception $e) {
88
+ return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
89
+ }
90
+ }
91
+
92
+ /**
93
+ * Waits on all of the provided promises, but does not unwrap rejected
94
+ * promises as thrown exception.
95
+ *
96
+ * Returns an array of inspection state arrays.
97
+ *
98
+ * @see inspect for the inspection state array format.
99
+ *
100
+ * @param PromiseInterface[] $promises Traversable of promises to wait upon.
101
+ *
102
+ * @return array
103
+ */
104
+ public static function inspectAll($promises)
105
+ {
106
+ $results = [];
107
+ foreach ($promises as $key => $promise) {
108
+ $results[$key] = inspect($promise);
109
+ }
110
+
111
+ return $results;
112
+ }
113
+
114
+ /**
115
+ * Waits on all of the provided promises and returns the fulfilled values.
116
+ *
117
+ * Returns an array that contains the value of each promise (in the same
118
+ * order the promises were provided). An exception is thrown if any of the
119
+ * promises are rejected.
120
+ *
121
+ * @param iterable<PromiseInterface> $promises Iterable of PromiseInterface objects to wait on.
122
+ *
123
+ * @return array
124
+ *
125
+ * @throws \Exception on error
126
+ * @throws \Throwable on error in PHP >=7
127
+ */
128
+ public static function unwrap($promises)
129
+ {
130
+ $results = [];
131
+ foreach ($promises as $key => $promise) {
132
+ $results[$key] = $promise->wait();
133
+ }
134
+
135
+ return $results;
136
+ }
137
+
138
+ /**
139
+ * Given an array of promises, return a promise that is fulfilled when all
140
+ * the items in the array are fulfilled.
141
+ *
142
+ * The promise's fulfillment value is an array with fulfillment values at
143
+ * respective positions to the original array. If any promise in the array
144
+ * rejects, the returned promise is rejected with the rejection reason.
145
+ *
146
+ * @param mixed $promises Promises or values.
147
+ * @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution.
148
+ *
149
+ * @return PromiseInterface
150
+ */
151
+ public static function all($promises, $recursive = false)
152
+ {
153
+ $results = [];
154
+ $promise = Each::of(
155
+ $promises,
156
+ function ($value, $idx) use (&$results) {
157
+ $results[$idx] = $value;
158
+ },
159
+ function ($reason, $idx, Promise $aggregate) {
160
+ $aggregate->reject($reason);
161
+ }
162
+ )->then(function () use (&$results) {
163
+ ksort($results);
164
+ return $results;
165
+ });
166
+
167
+ if (true === $recursive) {
168
+ $promise = $promise->then(function ($results) use ($recursive, &$promises) {
169
+ foreach ($promises as $promise) {
170
+ if (Is::pending($promise)) {
171
+ return self::all($promises, $recursive);
172
+ }
173
+ }
174
+ return $results;
175
+ });
176
+ }
177
+
178
+ return $promise;
179
+ }
180
+
181
+ /**
182
+ * Initiate a competitive race between multiple promises or values (values
183
+ * will become immediately fulfilled promises).
184
+ *
185
+ * When count amount of promises have been fulfilled, the returned promise
186
+ * is fulfilled with an array that contains the fulfillment values of the
187
+ * winners in order of resolution.
188
+ *
189
+ * This promise is rejected with a {@see AggregateException} if the number
190
+ * of fulfilled promises is less than the desired $count.
191
+ *
192
+ * @param int $count Total number of promises.
193
+ * @param mixed $promises Promises or values.
194
+ *
195
+ * @return PromiseInterface
196
+ */
197
+ public static function some($count, $promises)
198
+ {
199
+ $results = [];
200
+ $rejections = [];
201
+
202
+ return Each::of(
203
+ $promises,
204
+ function ($value, $idx, PromiseInterface $p) use (&$results, $count) {
205
+ if (Is::settled($p)) {
206
+ return;
207
+ }
208
+ $results[$idx] = $value;
209
+ if (count($results) >= $count) {
210
+ $p->resolve(null);
211
+ }
212
+ },
213
+ function ($reason) use (&$rejections) {
214
+ $rejections[] = $reason;
215
+ }
216
+ )->then(
217
+ function () use (&$results, &$rejections, $count) {
218
+ if (count($results) !== $count) {
219
+ throw new AggregateException(
220
+ 'Not enough promises to fulfill count',
221
+ $rejections
222
+ );
223
+ }
224
+ ksort($results);
225
+ return array_values($results);
226
+ }
227
+ );
228
+ }
229
+
230
+ /**
231
+ * Like some(), with 1 as count. However, if the promise fulfills, the
232
+ * fulfillment value is not an array of 1 but the value directly.
233
+ *
234
+ * @param mixed $promises Promises or values.
235
+ *
236
+ * @return PromiseInterface
237
+ */
238
+ public static function any($promises)
239
+ {
240
+ return self::some(1, $promises)->then(function ($values) {
241
+ return $values[0];
242
+ });
243
+ }
244
+
245
+ /**
246
+ * Returns a promise that is fulfilled when all of the provided promises have
247
+ * been fulfilled or rejected.
248
+ *
249
+ * The returned promise is fulfilled with an array of inspection state arrays.
250
+ *
251
+ * @see inspect for the inspection state array format.
252
+ *
253
+ * @param mixed $promises Promises or values.
254
+ *
255
+ * @return PromiseInterface
256
+ */
257
+ public static function settle($promises)
258
+ {
259
+ $results = [];
260
+
261
+ return Each::of(
262
+ $promises,
263
+ function ($value, $idx) use (&$results) {
264
+ $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value];
265
+ },
266
+ function ($reason, $idx) use (&$results) {
267
+ $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason];
268
+ }
269
+ )->then(function () use (&$results) {
270
+ ksort($results);
271
+ return $results;
272
+ });
273
+ }
274
+ }
vendor/guzzlehttp/promises/src/functions.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  /**
@@ -17,18 +18,12 @@ namespace GuzzleHttp\Promise;
17
  * @param TaskQueueInterface $assign Optionally specify a new queue instance.
18
  *
19
  * @return TaskQueueInterface
 
 
20
  */
21
  function queue(TaskQueueInterface $assign = null)
22
  {
23
- static $queue;
24
-
25
- if ($assign) {
26
- $queue = $assign;
27
- } elseif (!$queue) {
28
- $queue = new TaskQueue();
29
- }
30
-
31
- return $queue;
32
  }
33
 
34
  /**
@@ -38,22 +33,12 @@ function queue(TaskQueueInterface $assign = null)
38
  * @param callable $task Task function to run.
39
  *
40
  * @return PromiseInterface
 
 
41
  */
42
  function task(callable $task)
43
  {
44
- $queue = queue();
45
- $promise = new Promise([$queue, 'run']);
46
- $queue->add(function () use ($task, $promise) {
47
- try {
48
- $promise->resolve($task());
49
- } catch (\Throwable $e) {
50
- $promise->reject($e);
51
- } catch (\Exception $e) {
52
- $promise->reject($e);
53
- }
54
- });
55
-
56
- return $promise;
57
  }
58
 
59
  /**
@@ -62,23 +47,12 @@ function task(callable $task)
62
  * @param mixed $value Promise or value.
63
  *
64
  * @return PromiseInterface
 
 
65
  */
66
  function promise_for($value)
67
  {
68
- if ($value instanceof PromiseInterface) {
69
- return $value;
70
- }
71
-
72
- // Return a Guzzle promise that shadows the given promise.
73
- if (method_exists($value, 'then')) {
74
- $wfn = method_exists($value, 'wait') ? [$value, 'wait'] : null;
75
- $cfn = method_exists($value, 'cancel') ? [$value, 'cancel'] : null;
76
- $promise = new Promise($wfn, $cfn);
77
- $value->then([$promise, 'resolve'], [$promise, 'reject']);
78
- return $promise;
79
- }
80
-
81
- return new FulfilledPromise($value);
82
  }
83
 
84
  /**
@@ -88,14 +62,12 @@ function promise_for($value)
88
  * @param mixed $reason Promise or reason.
89
  *
90
  * @return PromiseInterface
 
 
91
  */
92
  function rejection_for($reason)
93
  {
94
- if ($reason instanceof PromiseInterface) {
95
- return $reason;
96
- }
97
-
98
- return new RejectedPromise($reason);
99
  }
100
 
101
  /**
@@ -104,12 +76,12 @@ function rejection_for($reason)
104
  * @param mixed $reason
105
  *
106
  * @return \Exception|\Throwable
 
 
107
  */
108
  function exception_for($reason)
109
  {
110
- return $reason instanceof \Exception || $reason instanceof \Throwable
111
- ? $reason
112
- : new RejectionException($reason);
113
  }
114
 
115
  /**
@@ -118,16 +90,12 @@ function exception_for($reason)
118
  * @param mixed $value
119
  *
120
  * @return \Iterator
 
 
121
  */
122
  function iter_for($value)
123
  {
124
- if ($value instanceof \Iterator) {
125
- return $value;
126
- } elseif (is_array($value)) {
127
- return new \ArrayIterator($value);
128
- } else {
129
- return new \ArrayIterator([$value]);
130
- }
131
  }
132
 
133
  /**
@@ -143,21 +111,12 @@ function iter_for($value)
143
  * @param PromiseInterface $promise Promise or value.
144
  *
145
  * @return array
 
 
146
  */
147
  function inspect(PromiseInterface $promise)
148
  {
149
- try {
150
- return [
151
- 'state' => PromiseInterface::FULFILLED,
152
- 'value' => $promise->wait()
153
- ];
154
- } catch (RejectionException $e) {
155
- return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()];
156
- } catch (\Throwable $e) {
157
- return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
158
- } catch (\Exception $e) {
159
- return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
160
- }
161
  }
162
 
163
  /**
@@ -166,19 +125,17 @@ function inspect(PromiseInterface $promise)
166
  *
167
  * Returns an array of inspection state arrays.
168
  *
 
 
169
  * @param PromiseInterface[] $promises Traversable of promises to wait upon.
170
  *
171
  * @return array
172
- * @see GuzzleHttp\Promise\inspect for the inspection state array format.
 
173
  */
174
  function inspect_all($promises)
175
  {
176
- $results = [];
177
- foreach ($promises as $key => $promise) {
178
- $results[$key] = inspect($promise);
179
- }
180
-
181
- return $results;
182
  }
183
 
184
  /**
@@ -188,20 +145,18 @@ function inspect_all($promises)
188
  * the promises were provided). An exception is thrown if any of the promises
189
  * are rejected.
190
  *
191
- * @param mixed $promises Iterable of PromiseInterface objects to wait on.
192
  *
193
  * @return array
 
194
  * @throws \Exception on error
195
  * @throws \Throwable on error in PHP >=7
 
 
196
  */
197
  function unwrap($promises)
198
  {
199
- $results = [];
200
- foreach ($promises as $key => $promise) {
201
- $results[$key] = $promise->wait();
202
- }
203
-
204
- return $results;
205
  }
206
 
207
  /**
@@ -212,25 +167,16 @@ function unwrap($promises)
212
  * respective positions to the original array. If any promise in the array
213
  * rejects, the returned promise is rejected with the rejection reason.
214
  *
215
- * @param mixed $promises Promises or values.
 
216
  *
217
  * @return PromiseInterface
 
 
218
  */
219
- function all($promises)
220
  {
221
- $results = [];
222
- return each(
223
- $promises,
224
- function ($value, $idx) use (&$results) {
225
- $results[$idx] = $value;
226
- },
227
- function ($reason, $idx, Promise $aggregate) {
228
- $aggregate->reject($reason);
229
- }
230
- )->then(function () use (&$results) {
231
- ksort($results);
232
- return $results;
233
- });
234
  }
235
 
236
  /**
@@ -241,45 +187,19 @@ function all($promises)
241
  * fulfilled with an array that contains the fulfillment values of the winners
242
  * in order of resolution.
243
  *
244
- * This prommise is rejected with a {@see GuzzleHttp\Promise\AggregateException}
245
- * if the number of fulfilled promises is less than the desired $count.
246
  *
247
  * @param int $count Total number of promises.
248
  * @param mixed $promises Promises or values.
249
  *
250
  * @return PromiseInterface
 
 
251
  */
252
  function some($count, $promises)
253
  {
254
- $results = [];
255
- $rejections = [];
256
-
257
- return each(
258
- $promises,
259
- function ($value, $idx, PromiseInterface $p) use (&$results, $count) {
260
- if ($p->getState() !== PromiseInterface::PENDING) {
261
- return;
262
- }
263
- $results[$idx] = $value;
264
- if (count($results) >= $count) {
265
- $p->resolve(null);
266
- }
267
- },
268
- function ($reason) use (&$rejections) {
269
- $rejections[] = $reason;
270
- }
271
- )->then(
272
- function () use (&$results, &$rejections, $count) {
273
- if (count($results) !== $count) {
274
- throw new AggregateException(
275
- 'Not enough promises to fulfill count',
276
- $rejections
277
- );
278
- }
279
- ksort($results);
280
- return array_values($results);
281
- }
282
- );
283
  }
284
 
285
  /**
@@ -289,10 +209,12 @@ function some($count, $promises)
289
  * @param mixed $promises Promises or values.
290
  *
291
  * @return PromiseInterface
 
 
292
  */
293
  function any($promises)
294
  {
295
- return some(1, $promises)->then(function ($values) { return $values[0]; });
296
  }
297
 
298
  /**
@@ -301,27 +223,17 @@ function any($promises)
301
  *
302
  * The returned promise is fulfilled with an array of inspection state arrays.
303
  *
 
 
304
  * @param mixed $promises Promises or values.
305
  *
306
  * @return PromiseInterface
307
- * @see GuzzleHttp\Promise\inspect for the inspection state array format.
 
308
  */
309
  function settle($promises)
310
  {
311
- $results = [];
312
-
313
- return each(
314
- $promises,
315
- function ($value, $idx) use (&$results) {
316
- $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value];
317
- },
318
- function ($reason, $idx) use (&$results) {
319
- $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason];
320
- }
321
- )->then(function () use (&$results) {
322
- ksort($results);
323
- return $results;
324
- });
325
  }
326
 
327
  /**
@@ -329,29 +241,28 @@ function settle($promises)
329
  * fulfilled with a null value when the iterator has been consumed or the
330
  * aggregate promise has been fulfilled or rejected.
331
  *
332
- * $onFulfilled is a function that accepts the fulfilled value, iterator
333
- * index, and the aggregate promise. The callback can invoke any necessary side
334
- * effects and choose to resolve or reject the aggregate promise if needed.
335
  *
336
- * $onRejected is a function that accepts the rejection reason, iterator
337
- * index, and the aggregate promise. The callback can invoke any necessary side
338
- * effects and choose to resolve or reject the aggregate promise if needed.
339
  *
340
  * @param mixed $iterable Iterator or array to iterate over.
341
  * @param callable $onFulfilled
342
  * @param callable $onRejected
343
  *
344
  * @return PromiseInterface
 
 
345
  */
346
  function each(
347
  $iterable,
348
  callable $onFulfilled = null,
349
  callable $onRejected = null
350
  ) {
351
- return (new EachPromise($iterable, [
352
- 'fulfilled' => $onFulfilled,
353
- 'rejected' => $onRejected
354
- ]))->promise();
355
  }
356
 
357
  /**
@@ -368,6 +279,8 @@ function each(
368
  * @param callable $onRejected
369
  *
370
  * @return PromiseInterface
 
 
371
  */
372
  function each_limit(
373
  $iterable,
@@ -375,11 +288,7 @@ function each_limit(
375
  callable $onFulfilled = null,
376
  callable $onRejected = null
377
  ) {
378
- return (new EachPromise($iterable, [
379
- 'fulfilled' => $onFulfilled,
380
- 'rejected' => $onRejected,
381
- 'concurrency' => $concurrency
382
- ]))->promise();
383
  }
384
 
385
  /**
@@ -392,66 +301,63 @@ function each_limit(
392
  * @param callable $onFulfilled
393
  *
394
  * @return PromiseInterface
 
 
395
  */
396
  function each_limit_all(
397
  $iterable,
398
  $concurrency,
399
  callable $onFulfilled = null
400
  ) {
401
- return each_limit(
402
- $iterable,
403
- $concurrency,
404
- $onFulfilled,
405
- function ($reason, $idx, PromiseInterface $aggregate) {
406
- $aggregate->reject($reason);
407
- }
408
- );
409
  }
410
 
411
  /**
412
  * Returns true if a promise is fulfilled.
413
  *
414
- * @param PromiseInterface $promise
415
- *
416
  * @return bool
 
 
417
  */
418
  function is_fulfilled(PromiseInterface $promise)
419
  {
420
- return $promise->getState() === PromiseInterface::FULFILLED;
421
  }
422
 
423
  /**
424
  * Returns true if a promise is rejected.
425
  *
426
- * @param PromiseInterface $promise
427
- *
428
  * @return bool
 
 
429
  */
430
  function is_rejected(PromiseInterface $promise)
431
  {
432
- return $promise->getState() === PromiseInterface::REJECTED;
433
  }
434
 
435
  /**
436
  * Returns true if a promise is fulfilled or rejected.
437
  *
438
- * @param PromiseInterface $promise
439
- *
440
  * @return bool
 
 
441
  */
442
  function is_settled(PromiseInterface $promise)
443
  {
444
- return $promise->getState() !== PromiseInterface::PENDING;
445
  }
446
 
447
  /**
448
- * @see Coroutine
449
  *
450
- * @param callable $generatorFn
451
  *
452
  * @return PromiseInterface
 
 
453
  */
454
  function coroutine(callable $generatorFn)
455
  {
456
- return new Coroutine($generatorFn);
457
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  /**
18
  * @param TaskQueueInterface $assign Optionally specify a new queue instance.
19
  *
20
  * @return TaskQueueInterface
21
+ *
22
+ * @deprecated queue will be removed in guzzlehttp/promises:2.0. Use Utils::queue instead.
23
  */
24
  function queue(TaskQueueInterface $assign = null)
25
  {
26
+ return Utils::queue($assign);
 
 
 
 
 
 
 
 
27
  }
28
 
29
  /**
33
  * @param callable $task Task function to run.
34
  *
35
  * @return PromiseInterface
36
+ *
37
+ * @deprecated task will be removed in guzzlehttp/promises:2.0. Use Utils::task instead.
38
  */
39
  function task(callable $task)
40
  {
41
+ return Utils::task($task);
 
 
 
 
 
 
 
 
 
 
 
 
42
  }
43
 
44
  /**
47
  * @param mixed $value Promise or value.
48
  *
49
  * @return PromiseInterface
50
+ *
51
+ * @deprecated promise_for will be removed in guzzlehttp/promises:2.0. Use Create::promiseFor instead.
52
  */
53
  function promise_for($value)
54
  {
55
+ return Create::promiseFor($value);
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  }
57
 
58
  /**
62
  * @param mixed $reason Promise or reason.
63
  *
64
  * @return PromiseInterface
65
+ *
66
+ * @deprecated rejection_for will be removed in guzzlehttp/promises:2.0. Use Create::rejectionFor instead.
67
  */
68
  function rejection_for($reason)
69
  {
70
+ return Create::rejectionFor($reason);
 
 
 
 
71
  }
72
 
73
  /**
76
  * @param mixed $reason
77
  *
78
  * @return \Exception|\Throwable
79
+ *
80
+ * @deprecated exception_for will be removed in guzzlehttp/promises:2.0. Use Create::exceptionFor instead.
81
  */
82
  function exception_for($reason)
83
  {
84
+ return Create::exceptionFor($reason);
 
 
85
  }
86
 
87
  /**
90
  * @param mixed $value
91
  *
92
  * @return \Iterator
93
+ *
94
+ * @deprecated iter_for will be removed in guzzlehttp/promises:2.0. Use Create::iterFor instead.
95
  */
96
  function iter_for($value)
97
  {
98
+ return Create::iterFor($value);
 
 
 
 
 
 
99
  }
100
 
101
  /**
111
  * @param PromiseInterface $promise Promise or value.
112
  *
113
  * @return array
114
+ *
115
+ * @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspect instead.
116
  */
117
  function inspect(PromiseInterface $promise)
118
  {
119
+ return Utils::inspect($promise);
 
 
 
 
 
 
 
 
 
 
 
120
  }
121
 
122
  /**
125
  *
126
  * Returns an array of inspection state arrays.
127
  *
128
+ * @see inspect for the inspection state array format.
129
+ *
130
  * @param PromiseInterface[] $promises Traversable of promises to wait upon.
131
  *
132
  * @return array
133
+ *
134
+ * @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspectAll instead.
135
  */
136
  function inspect_all($promises)
137
  {
138
+ return Utils::inspectAll($promises);
 
 
 
 
 
139
  }
140
 
141
  /**
145
  * the promises were provided). An exception is thrown if any of the promises
146
  * are rejected.
147
  *
148
+ * @param iterable<PromiseInterface> $promises Iterable of PromiseInterface objects to wait on.
149
  *
150
  * @return array
151
+ *
152
  * @throws \Exception on error
153
  * @throws \Throwable on error in PHP >=7
154
+ *
155
+ * @deprecated unwrap will be removed in guzzlehttp/promises:2.0. Use Utils::unwrap instead.
156
  */
157
  function unwrap($promises)
158
  {
159
+ return Utils::unwrap($promises);
 
 
 
 
 
160
  }
161
 
162
  /**
167
  * respective positions to the original array. If any promise in the array
168
  * rejects, the returned promise is rejected with the rejection reason.
169
  *
170
+ * @param mixed $promises Promises or values.
171
+ * @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution.
172
  *
173
  * @return PromiseInterface
174
+ *
175
+ * @deprecated all will be removed in guzzlehttp/promises:2.0. Use Utils::all instead.
176
  */
177
+ function all($promises, $recursive = false)
178
  {
179
+ return Utils::all($promises, $recursive);
 
 
 
 
 
 
 
 
 
 
 
 
180
  }
181
 
182
  /**
187
  * fulfilled with an array that contains the fulfillment values of the winners
188
  * in order of resolution.
189
  *
190
+ * This promise is rejected with a {@see AggregateException} if the number of
191
+ * fulfilled promises is less than the desired $count.
192
  *
193
  * @param int $count Total number of promises.
194
  * @param mixed $promises Promises or values.
195
  *
196
  * @return PromiseInterface
197
+ *
198
+ * @deprecated some will be removed in guzzlehttp/promises:2.0. Use Utils::some instead.
199
  */
200
  function some($count, $promises)
201
  {
202
+ return Utils::some($count, $promises);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
203
  }
204
 
205
  /**
209
  * @param mixed $promises Promises or values.
210
  *
211
  * @return PromiseInterface
212
+ *
213
+ * @deprecated any will be removed in guzzlehttp/promises:2.0. Use Utils::any instead.
214
  */
215
  function any($promises)
216
  {
217
+ return Utils::any($promises);
218
  }
219
 
220
  /**
223
  *
224
  * The returned promise is fulfilled with an array of inspection state arrays.
225
  *
226
+ * @see inspect for the inspection state array format.
227
+ *
228
  * @param mixed $promises Promises or values.
229
  *
230
  * @return PromiseInterface
231
+ *
232
+ * @deprecated settle will be removed in guzzlehttp/promises:2.0. Use Utils::settle instead.
233
  */
234
  function settle($promises)
235
  {
236
+ return Utils::settle($promises);
 
 
 
 
 
 
 
 
 
 
 
 
 
237
  }
238
 
239
  /**
241
  * fulfilled with a null value when the iterator has been consumed or the
242
  * aggregate promise has been fulfilled or rejected.
243
  *
244
+ * $onFulfilled is a function that accepts the fulfilled value, iterator index,
245
+ * and the aggregate promise. The callback can invoke any necessary side
246
+ * effects and choose to resolve or reject the aggregate if needed.
247
  *
248
+ * $onRejected is a function that accepts the rejection reason, iterator index,
249
+ * and the aggregate promise. The callback can invoke any necessary side
250
+ * effects and choose to resolve or reject the aggregate if needed.
251
  *
252
  * @param mixed $iterable Iterator or array to iterate over.
253
  * @param callable $onFulfilled
254
  * @param callable $onRejected
255
  *
256
  * @return PromiseInterface
257
+ *
258
+ * @deprecated each will be removed in guzzlehttp/promises:2.0. Use Each::of instead.
259
  */
260
  function each(
261
  $iterable,
262
  callable $onFulfilled = null,
263
  callable $onRejected = null
264
  ) {
265
+ return Each::of($iterable, $onFulfilled, $onRejected);
 
 
 
266
  }
267
 
268
  /**
279
  * @param callable $onRejected
280
  *
281
  * @return PromiseInterface
282
+ *
283
+ * @deprecated each_limit will be removed in guzzlehttp/promises:2.0. Use Each::ofLimit instead.
284
  */
285
  function each_limit(
286
  $iterable,
288
  callable $onFulfilled = null,
289
  callable $onRejected = null
290
  ) {
291
+ return Each::ofLimit($iterable, $concurrency, $onFulfilled, $onRejected);
 
 
 
 
292
  }
293
 
294
  /**
301
  * @param callable $onFulfilled
302
  *
303
  * @return PromiseInterface
304
+ *
305
+ * @deprecated each_limit_all will be removed in guzzlehttp/promises:2.0. Use Each::ofLimitAll instead.
306
  */
307
  function each_limit_all(
308
  $iterable,
309
  $concurrency,
310
  callable $onFulfilled = null
311
  ) {
312
+ return Each::ofLimitAll($iterable, $concurrency, $onFulfilled);
 
 
 
 
 
 
 
313
  }
314
 
315
  /**
316
  * Returns true if a promise is fulfilled.
317
  *
 
 
318
  * @return bool
319
+ *
320
+ * @deprecated is_fulfilled will be removed in guzzlehttp/promises:2.0. Use Is::fulfilled instead.
321
  */
322
  function is_fulfilled(PromiseInterface $promise)
323
  {
324
+ return Is::fulfilled($promise);
325
  }
326
 
327
  /**
328
  * Returns true if a promise is rejected.
329
  *
 
 
330
  * @return bool
331
+ *
332
+ * @deprecated is_rejected will be removed in guzzlehttp/promises:2.0. Use Is::rejected instead.
333
  */
334
  function is_rejected(PromiseInterface $promise)
335
  {
336
+ return Is::rejected($promise);
337
  }
338
 
339
  /**
340
  * Returns true if a promise is fulfilled or rejected.
341
  *
 
 
342
  * @return bool
343
+ *
344
+ * @deprecated is_settled will be removed in guzzlehttp/promises:2.0. Use Is::settled instead.
345
  */
346
  function is_settled(PromiseInterface $promise)
347
  {
348
+ return Is::settled($promise);
349
  }
350
 
351
  /**
352
+ * Create a new coroutine.
353
  *
354
+ * @see Coroutine
355
  *
356
  * @return PromiseInterface
357
+ *
358
+ * @deprecated coroutine will be removed in guzzlehttp/promises:2.0. Use Coroutine::of instead.
359
  */
360
  function coroutine(callable $generatorFn)
361
  {
362
+ return Coroutine::of($generatorFn);
363
  }
vendor/guzzlehttp/psr7/CHANGELOG.md CHANGED
@@ -9,8 +9,32 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
9
 
10
  ## [Unreleased]
11
 
 
12
 
13
- ## [1.6.0]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
  ### Added
16
 
9
 
10
  ## [Unreleased]
11
 
12
+ ## [1.7.0] - 2020-09-30
13
 
14
+ ### Added
15
+
16
+ - Replaced functions by static methods
17
+
18
+ ### Fixed
19
+
20
+ - Converting a non-seekable stream to a string
21
+ - Handle multiple Set-Cookie correctly
22
+ - Ignore array keys in header values when merging
23
+ - Allow multibyte characters to be parsed in `Message:bodySummary()`
24
+
25
+ ### Changed
26
+
27
+ - Restored partial HHVM 3 support
28
+
29
+
30
+ ## [1.6.1] - 2019-07-02
31
+
32
+ ### Fixed
33
+
34
+ - Accept null and bool header values again
35
+
36
+
37
+ ## [1.6.0] - 2019-06-30
38
 
39
  ### Added
40
 
vendor/guzzlehttp/psr7/README.md CHANGED
@@ -23,11 +23,11 @@ Reads from multiple streams, one after the other.
23
  ```php
24
  use GuzzleHttp\Psr7;
25
 
26
- $a = Psr7\stream_for('abc, ');
27
- $b = Psr7\stream_for('123.');
28
  $composed = new Psr7\AppendStream([$a, $b]);
29
 
30
- $composed->addStream(Psr7\stream_for(' Above all listen to me'));
31
 
32
  echo $composed; // abc, 123. Above all listen to me.
33
  ```
@@ -65,7 +65,7 @@ then on disk.
65
  ```php
66
  use GuzzleHttp\Psr7;
67
 
68
- $original = Psr7\stream_for(fopen('http://www.google.com', 'r'));
69
  $stream = new Psr7\CachingStream($original);
70
 
71
  $stream->read(1024);
@@ -89,7 +89,7 @@ stream becomes too full.
89
  use GuzzleHttp\Psr7;
90
 
91
  // Create an empty stream
92
- $stream = Psr7\stream_for();
93
 
94
  // Start dropping data when the stream has more than 10 bytes
95
  $dropping = new Psr7\DroppingStream($stream, 10);
@@ -112,7 +112,7 @@ to create a concrete class for a simple extension point.
112
 
113
  use GuzzleHttp\Psr7;
114
 
115
- $stream = Psr7\stream_for('hi');
116
  $fnStream = Psr7\FnStream::decorate($stream, [
117
  'rewind' => function () use ($stream) {
118
  echo 'About to rewind - ';
@@ -167,7 +167,7 @@ chunks (e.g. Amazon S3's multipart upload API).
167
  ```php
168
  use GuzzleHttp\Psr7;
169
 
170
- $original = Psr7\stream_for(fopen('/tmp/test.txt', 'r+'));
171
  echo $original->getSize();
172
  // >>> 1048576
173
 
@@ -197,7 +197,7 @@ NoSeekStream wraps a stream and does not allow seeking.
197
  ```php
198
  use GuzzleHttp\Psr7;
199
 
200
- $original = Psr7\stream_for('foo');
201
  $noSeek = new Psr7\NoSeekStream($original);
202
 
203
  echo $noSeek->read(3);
@@ -271,7 +271,7 @@ This decorator could be added to any existing stream and used like so:
271
  ```php
272
  use GuzzleHttp\Psr7;
273
 
274
- $original = Psr7\stream_for('foo');
275
 
276
  $eofStream = new EofCallbackStream($original, function () {
277
  echo 'EOF!';
@@ -297,228 +297,292 @@ stream from a PSR-7 stream.
297
  ```php
298
  use GuzzleHttp\Psr7\StreamWrapper;
299
 
300
- $stream = GuzzleHttp\Psr7\stream_for('hello!');
301
  $resource = StreamWrapper::getResource($stream);
302
  echo fread($resource, 6); // outputs hello!
303
  ```
304
 
305
 
306
- # Function API
307
 
308
- There are various functions available under the `GuzzleHttp\Psr7` namespace.
309
 
310
 
311
- ## `function str`
312
 
313
- `function str(MessageInterface $message)`
314
 
315
  Returns the string representation of an HTTP message.
316
 
317
  ```php
318
  $request = new GuzzleHttp\Psr7\Request('GET', 'http://example.com');
319
- echo GuzzleHttp\Psr7\str($request);
320
  ```
321
 
322
 
323
- ## `function uri_for`
324
 
325
- `function uri_for($uri)`
326
 
327
- This function accepts a string or `Psr\Http\Message\UriInterface` and returns a
328
- UriInterface for the given value. If the value is already a `UriInterface`, it
329
- is returned as-is.
330
 
331
- ```php
332
- $uri = GuzzleHttp\Psr7\uri_for('http://example.com');
333
- assert($uri === GuzzleHttp\Psr7\uri_for($uri));
334
- ```
335
 
336
 
337
- ## `function stream_for`
338
 
339
- `function stream_for($resource = '', array $options = [])`
340
 
341
- Create a new stream based on the input type.
342
 
343
- Options is an associative array that can contain the following keys:
 
344
 
345
- * - metadata: Array of custom metadata.
346
- * - size: Size of the stream.
347
 
348
- This method accepts the following `$resource` types:
349
 
350
- - `Psr\Http\Message\StreamInterface`: Returns the value as-is.
351
- - `string`: Creates a stream object that uses the given string as the contents.
352
- - `resource`: Creates a stream object that wraps the given PHP stream resource.
353
- - `Iterator`: If the provided value implements `Iterator`, then a read-only
354
- stream object will be created that wraps the given iterable. Each time the
355
- stream is read from, data from the iterator will fill a buffer and will be
356
- continuously called until the buffer is equal to the requested read size.
357
- Subsequent read calls will first read from the buffer and then call `next`
358
- on the underlying iterator until it is exhausted.
359
- - `object` with `__toString()`: If the object has the `__toString()` method,
360
- the object will be cast to a string and then a stream will be returned that
361
- uses the string value.
362
- - `NULL`: When `null` is passed, an empty stream object is returned.
363
- - `callable` When a callable is passed, a read-only stream object will be
364
- created that invokes the given callable. The callable is invoked with the
365
- number of suggested bytes to read. The callable can return any number of
366
- bytes, but MUST return `false` when there is no more data to return. The
367
- stream object that wraps the callable will invoke the callable until the
368
- number of requested bytes are available. Any additional bytes will be
369
- buffered and used in subsequent reads.
370
 
371
- ```php
372
- $stream = GuzzleHttp\Psr7\stream_for('foo');
373
- $stream = GuzzleHttp\Psr7\stream_for(fopen('/path/to/file', 'r'));
374
 
375
- $generator = function ($bytes) {
376
- for ($i = 0; $i < $bytes; $i++) {
377
- yield ' ';
378
- }
379
- }
380
 
381
- $stream = GuzzleHttp\Psr7\stream_for($generator(100));
382
- ```
383
 
 
384
 
385
- ## `function parse_header`
386
 
387
- `function parse_header($header)`
388
 
389
- Parse an array of header values containing ";" separated data into an array of
390
- associative arrays representing the header key value pair data of the header.
391
- When a parameter does not contain a value, but just contains a key, this
392
- function will inject a key with a '' string value.
393
 
 
394
 
395
- ## `function normalize_header`
396
 
397
- `function normalize_header($header)`
398
 
399
- Converts an array of header values that may contain comma separated headers
400
- into an array of headers with no comma separated values.
401
 
 
402
 
403
- ## `function modify_request`
404
 
405
- `function modify_request(RequestInterface $request, array $changes)`
406
 
407
- Clone and modify a request with the given changes. This method is useful for
408
- reducing the number of clones needed to mutate a message.
409
 
410
- The changes can be one of:
411
 
412
- - method: (string) Changes the HTTP method.
413
- - set_headers: (array) Sets the given headers.
414
- - remove_headers: (array) Remove the given headers.
415
- - body: (mixed) Sets the given body.
416
- - uri: (UriInterface) Set the URI.
417
- - query: (string) Set the query string value of the URI.
418
- - version: (string) Set the protocol version.
419
 
 
 
 
 
420
 
421
- ## `function rewind_body`
422
 
423
- `function rewind_body(MessageInterface $message)`
424
 
425
- Attempts to rewind a message body and throws an exception on failure. The body
426
- of the message will only be rewound if a call to `tell()` returns a value other
427
- than `0`.
428
 
 
 
429
 
430
- ## `function try_fopen`
431
 
432
- `function try_fopen($filename, $mode)`
433
 
434
- Safely opens a PHP stream resource using a filename.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
435
 
436
- When fopen fails, PHP normally raises a warning. This function adds an error
437
- handler that checks for errors and throws an exception instead.
438
 
439
 
440
- ## `function copy_to_string`
441
 
442
- `function copy_to_string(StreamInterface $stream, $maxLen = -1)`
443
 
444
- Copy the contents of a stream into a string until the given number of bytes
445
- have been read.
446
 
447
 
448
- ## `function copy_to_stream`
449
 
450
- `function copy_to_stream(StreamInterface $source, StreamInterface $dest, $maxLen = -1)`
451
 
452
- Copy the contents of a stream into another stream until the given number of
453
  bytes have been read.
454
 
455
 
456
- ## `function hash`
457
 
458
- `function hash(StreamInterface $stream, $algo, $rawOutput = false)`
459
 
460
- Calculate a hash of a Stream. This method reads the entire stream to calculate
461
- a rolling hash (based on PHP's hash_init functions).
462
 
 
 
463
 
464
- ## `function readline`
465
 
466
- `function readline(StreamInterface $stream, $maxLength = null)`
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
467
 
468
  Read a line from the stream up to the maximum allowed buffer length.
469
 
470
 
471
- ## `function parse_request`
472
 
473
- `function parse_request($message)`
474
 
475
- Parses a request message string into a request object.
476
 
 
477
 
478
- ## `function parse_response`
 
479
 
480
- `function parse_response($message)`
481
 
482
- Parses a response message string into a response object.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
483
 
 
 
 
484
 
485
- ## `function parse_query`
 
 
 
 
486
 
487
- `function parse_query($str, $urlEncoding = true)`
 
488
 
489
- Parse a query string into an associative array.
490
 
491
- If multiple values are found for the same key, the value of that key value pair
492
- will become an array. This function does not parse nested PHP style arrays into
493
- an associative array (e.g., `foo[a]=1&foo[b]=2` will be parsed into
494
- `['foo[a]' => '1', 'foo[b]' => '2']`).
495
 
 
496
 
497
- ## `function build_query`
498
 
499
- `function build_query(array $params, $encoding = PHP_QUERY_RFC3986)`
 
500
 
501
- Build a query string from an array of key value pairs.
502
 
503
- This function can use the return value of parse_query() to build a query string.
504
- This function does not modify the provided keys when an array is encountered
505
- (like http_build_query would).
 
 
506
 
 
 
 
507
 
508
- ## `function mimetype_from_filename`
509
 
510
- `function mimetype_from_filename($filename)`
 
 
511
 
512
  Determines the mimetype of a file by looking at its extension.
513
 
514
 
515
- ## `function mimetype_from_extension`
516
 
517
- `function mimetype_from_extension($extension)`
518
 
519
  Maps a file extensions to a mimetype.
520
 
521
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
522
  # Additional URI Methods
523
 
524
  Aside from the standard `Psr\Http\Message\UriInterface` implementation in form of the `GuzzleHttp\Psr7\Uri` class,
23
  ```php
24
  use GuzzleHttp\Psr7;
25
 
26
+ $a = Psr7\Utils::streamFor('abc, ');
27
+ $b = Psr7\Utils::streamFor('123.');
28
  $composed = new Psr7\AppendStream([$a, $b]);
29
 
30
+ $composed->addStream(Psr7\Utils::streamFor(' Above all listen to me'));
31
 
32
  echo $composed; // abc, 123. Above all listen to me.
33
  ```
65
  ```php
66
  use GuzzleHttp\Psr7;
67
 
68
+ $original = Psr7\Utils::streamFor(fopen('http://www.google.com', 'r'));
69
  $stream = new Psr7\CachingStream($original);
70
 
71
  $stream->read(1024);
89
  use GuzzleHttp\Psr7;
90
 
91
  // Create an empty stream
92
+ $stream = Psr7\Utils::streamFor();
93
 
94
  // Start dropping data when the stream has more than 10 bytes
95
  $dropping = new Psr7\DroppingStream($stream, 10);
112
 
113
  use GuzzleHttp\Psr7;
114
 
115
+ $stream = Psr7\Utils::streamFor('hi');
116
  $fnStream = Psr7\FnStream::decorate($stream, [
117
  'rewind' => function () use ($stream) {
118
  echo 'About to rewind - ';
167
  ```php
168
  use GuzzleHttp\Psr7;
169
 
170
+ $original = Psr7\Utils::streamFor(fopen('/tmp/test.txt', 'r+'));
171
  echo $original->getSize();
172
  // >>> 1048576
173
 
197
  ```php
198
  use GuzzleHttp\Psr7;
199
 
200
+ $original = Psr7\Utils::streamFor('foo');
201
  $noSeek = new Psr7\NoSeekStream($original);
202
 
203
  echo $noSeek->read(3);
271
  ```php
272
  use GuzzleHttp\Psr7;
273
 
274
+ $original = Psr7\Utils::streamFor('foo');
275
 
276
  $eofStream = new EofCallbackStream($original, function () {
277
  echo 'EOF!';
297
  ```php
298
  use GuzzleHttp\Psr7\StreamWrapper;
299
 
300
+ $stream = GuzzleHttp\Psr7\Utils::streamFor('hello!');
301
  $resource = StreamWrapper::getResource($stream);
302
  echo fread($resource, 6); // outputs hello!
303
  ```
304
 
305
 
306
+ # Static API
307
 
308
+ There are various static methods available under the `GuzzleHttp\Psr7` namespace.
309
 
310
 
311
+ ## `GuzzleHttp\Psr7\Message::toString`
312
 
313
+ `public static function toString(MessageInterface $message): string`
314
 
315
  Returns the string representation of an HTTP message.
316
 
317
  ```php
318
  $request = new GuzzleHttp\Psr7\Request('GET', 'http://example.com');
319
+ echo GuzzleHttp\Psr7\Message::toString($request);
320
  ```
321
 
322
 
323
+ ## `GuzzleHttp\Psr7\Message::bodySummary`
324
 
325
+ `public static function bodySummary(MessageInterface $message, int $truncateAt = 120): string|null`
326
 
327
+ Get a short summary of the message body.
 
 
328
 
329
+ Will return `null` if the response is not printable.
 
 
 
330
 
331
 
332
+ ## `GuzzleHttp\Psr7\Message::rewindBody`
333
 
334
+ `public static function rewindBody(MessageInterface $message): void`
335
 
336
+ Attempts to rewind a message body and throws an exception on failure.
337
 
338
+ The body of the message will only be rewound if a call to `tell()`
339
+ returns a value other than `0`.
340
 
 
 
341
 
342
+ ## `GuzzleHttp\Psr7\Message::parseMessage`
343
 
344
+ `public static function parseMessage(string $message): array`
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
345
 
346
+ Parses an HTTP message into an associative array.
 
 
347
 
348
+ The array contains the "start-line" key containing the start line of
349
+ the message, "headers" key containing an associative array of header
350
+ array values, and a "body" key containing the body of the message.
 
 
351
 
 
 
352
 
353
+ ## `GuzzleHttp\Psr7\Message::parseRequestUri`
354
 
355
+ `public static function parseRequestUri(string $path, array $headers): string`
356
 
357
+ Constructs a URI for an HTTP request message.
358
 
 
 
 
 
359
 
360
+ ## `GuzzleHttp\Psr7\Message::parseRequest`
361
 
362
+ `public static function parseRequest(string $message): Request`
363
 
364
+ Parses a request message string into a request object.
365
 
 
 
366
 
367
+ ## `GuzzleHttp\Psr7\Message::parseResponse`
368
 
369
+ `public static function parseResponse(string $message): Response`
370
 
371
+ Parses a response message string into a response object.
372
 
 
 
373
 
374
+ ## `GuzzleHttp\Psr7\Header::parse`
375
 
376
+ `public static function parse(string|array $header): array`
 
 
 
 
 
 
377
 
378
+ Parse an array of header values containing ";" separated data into an
379
+ array of associative arrays representing the header key value pair data
380
+ of the header. When a parameter does not contain a value, but just
381
+ contains a key, this function will inject a key with a '' string value.
382
 
 
383
 
384
+ ## `GuzzleHttp\Psr7\Header::normalize`
385
 
386
+ `public static function normalize(string|array $header): array`
 
 
387
 
388
+ Converts an array of header values that may contain comma separated
389
+ headers into an array of headers with no comma separated values.
390
 
 
391
 
392
+ ## `GuzzleHttp\Psr7\Query::parse`
393
 
394
+ `public static function parse(string $str, int|bool $urlEncoding = true): array`
395
+
396
+ Parse a query string into an associative array.
397
+
398
+ If multiple values are found for the same key, the value of that key
399
+ value pair will become an array. This function does not parse nested
400
+ PHP style arrays into an associative array (e.g., `foo[a]=1&foo[b]=2`
401
+ will be parsed into `['foo[a]' => '1', 'foo[b]' => '2'])`.
402
+
403
+
404
+ ## `GuzzleHttp\Psr7\Query::build`
405
+
406
+ `public static function build(array $params, int|false $encoding = PHP_QUERY_RFC3986): string`
407
+
408
+ Build a query string from an array of key value pairs.
409
+
410
+ This function can use the return value of `parse()` to build a query
411
+ string. This function does not modify the provided keys when an array is
412
+ encountered (like `http_build_query()` would).
413
+
414
+
415
+ ## `GuzzleHttp\Psr7\Utils::caselessRemove`
416
+
417
+ `public static function caselessRemove(iterable<string> $keys, $keys, array $data): array`
418
 
419
+ Remove the items given by the keys, case insensitively from the data.
 
420
 
421
 
422
+ ## `GuzzleHttp\Psr7\Utils::copyToStream`
423
 
424
+ `public static function copyToStream(StreamInterface $source, StreamInterface $dest, int $maxLen = -1): void`
425
 
426
+ Copy the contents of a stream into another stream until the given number
427
+ of bytes have been read.
428
 
429
 
430
+ ## `GuzzleHttp\Psr7\Utils::copyToString`
431
 
432
+ `public static function copyToString(StreamInterface $stream, int $maxLen = -1): string`
433
 
434
+ Copy the contents of a stream into a string until the given number of
435
  bytes have been read.
436
 
437
 
438
+ ## `GuzzleHttp\Psr7\Utils::hash`
439
 
440
+ `public static function hash(StreamInterface $stream, string $algo, bool $rawOutput = false): string`
441
 
442
+ Calculate a hash of a stream.
 
443
 
444
+ This method reads the entire stream to calculate a rolling hash, based on
445
+ PHP's `hash_init` functions.
446
 
 
447
 
448
+ ## `GuzzleHttp\Psr7\Utils::modifyRequest`
449
+
450
+ `public static function modifyRequest(RequestInterface $request, array $changes): RequestInterface`
451
+
452
+ Clone and modify a request with the given changes.
453
+
454
+ This method is useful for reducing the number of clones needed to mutate
455
+ a message.
456
+
457
+ - method: (string) Changes the HTTP method.
458
+ - set_headers: (array) Sets the given headers.
459
+ - remove_headers: (array) Remove the given headers.
460
+ - body: (mixed) Sets the given body.
461
+ - uri: (UriInterface) Set the URI.
462
+ - query: (string) Set the query string value of the URI.
463
+ - version: (string) Set the protocol version.
464
+
465
+
466
+ ## `GuzzleHttp\Psr7\Utils::readLine`
467
+
468
+ `public static function readLine(StreamInterface $stream, int $maxLength = null): string`
469
 
470
  Read a line from the stream up to the maximum allowed buffer length.
471
 
472
 
473
+ ## `GuzzleHttp\Psr7\Utils::streamFor`
474
 
475
+ `public static function streamFor(resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource = '', array $options = []): StreamInterface`
476
 
477
+ Create a new stream based on the input type.
478
 
479
+ Options is an associative array that can contain the following keys:
480
 
481
+ - metadata: Array of custom metadata.
482
+ - size: Size of the stream.
483
 
484
+ This method accepts the following `$resource` types:
485
 
486
+ - `Psr\Http\Message\StreamInterface`: Returns the value as-is.
487
+ - `string`: Creates a stream object that uses the given string as the contents.
488
+ - `resource`: Creates a stream object that wraps the given PHP stream resource.
489
+ - `Iterator`: If the provided value implements `Iterator`, then a read-only
490
+ stream object will be created that wraps the given iterable. Each time the
491
+ stream is read from, data from the iterator will fill a buffer and will be
492
+ continuously called until the buffer is equal to the requested read size.
493
+ Subsequent read calls will first read from the buffer and then call `next`
494
+ on the underlying iterator until it is exhausted.
495
+ - `object` with `__toString()`: If the object has the `__toString()` method,
496
+ the object will be cast to a string and then a stream will be returned that
497
+ uses the string value.
498
+ - `NULL`: When `null` is passed, an empty stream object is returned.
499
+ - `callable` When a callable is passed, a read-only stream object will be
500
+ created that invokes the given callable. The callable is invoked with the
501
+ number of suggested bytes to read. The callable can return any number of
502
+ bytes, but MUST return `false` when there is no more data to return. The
503
+ stream object that wraps the callable will invoke the callable until the
504
+ number of requested bytes are available. Any additional bytes will be
505
+ buffered and used in subsequent reads.
506
 
507
+ ```php
508
+ $stream = GuzzleHttp\Psr7\Utils::streamFor('foo');
509
+ $stream = GuzzleHttp\Psr7\Utils::streamFor(fopen('/path/to/file', 'r'));
510
 
511
+ $generator = function ($bytes) {
512
+ for ($i = 0; $i < $bytes; $i++) {
513
+ yield ' ';
514
+ }
515
+ }
516
 
517
+ $stream = GuzzleHttp\Psr7\Utils::streamFor($generator(100));
518
+ ```
519
 
 
520
 
521
+ ## `GuzzleHttp\Psr7\Utils::tryFopen`
 
 
 
522
 
523
+ `public static function tryFopen(string $filename, string $mode): resource`
524
 
525
+ Safely opens a PHP stream resource using a filename.
526
 
527
+ When fopen fails, PHP normally raises a warning. This function adds an
528
+ error handler that checks for errors and throws an exception instead.
529
 
 
530
 
531
+ ## `GuzzleHttp\Psr7\Utils::uriFor`
532
+
533
+ `public static function uriFor(string|UriInterface $uri): UriInterface`
534
+
535
+ Returns a UriInterface for the given value.
536
 
537
+ This function accepts a string or UriInterface and returns a
538
+ UriInterface for the given value. If the value is already a
539
+ UriInterface, it is returned as-is.
540
 
 
541
 
542
+ ## `GuzzleHttp\Psr7\MimeType::fromFilename`
543
+
544
+ `public static function fromFilename(string $filename): string|null`
545
 
546
  Determines the mimetype of a file by looking at its extension.
547
 
548
 
549
+ ## `GuzzleHttp\Psr7\MimeType::fromExtension`
550
 
551
+ `public static function fromExtension(string $extension): string|null`
552
 
553
  Maps a file extensions to a mimetype.
554
 
555
 
556
+ ## Upgrading from Function API
557
+
558
+ The static API was first introduced in 1.7.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API will be removed in 2.0.0. A migration table has been provided here for your convenience:
559
+
560
+ | Original Function | Replacement Method |
561
+ |----------------|----------------|
562
+ | `str` | `Message::toString` |
563
+ | `uri_for` | `Utils::uriFor` |
564
+ | `stream_for` | `Utils::streamFor` |
565
+ | `parse_header` | `Header::parse` |
566
+ | `normalize_header` | `Header::normalize` |
567
+ | `modify_request` | `Utils::modifyRequest` |
568
+ | `rewind_body` | `Message::rewindBody` |
569
+ | `try_fopen` | `Utils::tryFopen` |
570
+ | `copy_to_string` | `Utils::copyToString` |
571
+ | `copy_to_stream` | `Utils::copyToStream` |
572
+ | `hash` | `Utils::hash` |
573
+ | `readline` | `Utils::readLine` |
574
+ | `parse_request` | `Message::parseRequest` |
575
+ | `parse_response` | `Message::parseResponse` |
576
+ | `parse_query` | `Query::parse` |
577
+ | `build_query` | `Query::build` |
578
+ | `mimetype_from_filename` | `MimeType::fromFilename` |
579
+ | `mimetype_from_extension` | `MimeType::fromExtension` |
580
+ | `_parse_message` | `Message::parseMessage` |
581
+ | `_parse_request_uri` | `Message::parseRequestUri` |
582
+ | `get_message_body_summary` | `Message::bodySummary` |
583
+ | `_caseless_remove` | `Utils::caselessRemove` |
584
+
585
+
586
  # Additional URI Methods
587
 
588
  Aside from the standard `Psr\Http\Message\UriInterface` implementation in form of the `GuzzleHttp\Psr7\Uri` class,
vendor/guzzlehttp/psr7/composer.json CHANGED
@@ -21,14 +21,14 @@
21
  "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
22
  },
23
  "require-dev": {
24
- "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8",
25
  "ext-zlib": "*"
26
  },
27
  "provide": {
28
  "psr/http-message-implementation": "1.0"
29
  },
30
  "suggest": {
31
- "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
32
  },
33
  "autoload": {
34
  "psr-4": {
@@ -43,7 +43,7 @@
43
  },
44
  "extra": {
45
  "branch-alias": {
46
- "dev-master": "1.6-dev"
47
  }
48
  }
49
  }
21
  "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
22
  },
23
  "require-dev": {
24
+ "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10",
25
  "ext-zlib": "*"
26
  },
27
  "provide": {
28
  "psr/http-message-implementation": "1.0"
29
  },
30
  "suggest": {
31
+ "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
32
  },
33
  "autoload": {
34
  "psr-4": {
43
  },
44
  "extra": {
45
  "branch-alias": {
46
+ "dev-master": "1.7-dev"
47
  }
48
  }
49
  }
vendor/guzzlehttp/psr7/src/AppendStream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
@@ -61,7 +62,7 @@ class AppendStream implements StreamInterface
61
 
62
  public function getContents()
63
  {
64
- return copy_to_string($this);
65
  }
66
 
67
  /**
@@ -98,6 +99,8 @@ class AppendStream implements StreamInterface
98
  }
99
 
100
  $this->streams = [];
 
 
101
  }
102
 
103
  public function tell()
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
62
 
63
  public function getContents()
64
  {
65
+ return Utils::copyToString($this);
66
  }
67
 
68
  /**
99
  }
100
 
101
  $this->streams = [];
102
+
103
+ return null;
104
  }
105
 
106
  public function tell()
vendor/guzzlehttp/psr7/src/BufferStream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
@@ -49,6 +50,8 @@ class BufferStream implements StreamInterface
49
  public function detach()
50
  {
51
  $this->close();
 
 
52
  }
53
 
54
  public function getSize()
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
50
  public function detach()
51
  {
52
  $this->close();
53
+
54
+ return null;
55
  }
56
 
57
  public function getSize()
vendor/guzzlehttp/psr7/src/CachingStream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
@@ -131,7 +132,7 @@ class CachingStream implements StreamInterface
131
  private function cacheEntireStream()
132
  {
133
  $target = new FnStream(['write' => 'strlen']);
134
- copy_to_stream($this, $target);
135
 
136
  return $this->tell();
137
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
132
  private function cacheEntireStream()
133
  {
134
  $target = new FnStream(['write' => 'strlen']);
135
+ Utils::copyToStream($this, $target);
136
 
137
  return $this->tell();
138
  }
vendor/guzzlehttp/psr7/src/DroppingStream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
vendor/guzzlehttp/psr7/src/FnStream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
@@ -34,6 +35,7 @@ class FnStream implements StreamInterface
34
 
35
  /**
36
  * Lazily determine which methods are not implemented.
 
37
  * @throws \BadMethodCallException
38
  */
39
  public function __get($name)
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
35
 
36
  /**
37
  * Lazily determine which methods are not implemented.
38
+ *
39
  * @throws \BadMethodCallException
40
  */
41
  public function __get($name)
vendor/guzzlehttp/psr7/src/Header.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ final class Header
6
+ {
7
+ /**
8
+ * Parse an array of header values containing ";" separated data into an
9
+ * array of associative arrays representing the header key value pair data
10
+ * of the header. When a parameter does not contain a value, but just
11
+ * contains a key, this function will inject a key with a '' string value.
12
+ *
13
+ * @param string|array $header Header to parse into components.
14
+ *
15
+ * @return array Returns the parsed header values.
16
+ */
17
+ public static function parse($header)
18
+ {
19
+ static $trimmed = "\"' \n\t\r";
20
+ $params = $matches = [];
21
+
22
+ foreach (self::normalize($header) as $val) {
23
+ $part = [];
24
+ foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) {
25
+ if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {
26
+ $m = $matches[0];
27
+ if (isset($m[1])) {
28
+ $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed);
29
+ } else {
30
+ $part[] = trim($m[0], $trimmed);
31
+ }
32
+ }
33
+ }
34
+ if ($part) {
35
+ $params[] = $part;
36
+ }
37
+ }
38
+
39
+ return $params;
40
+ }
41
+
42
+ /**
43
+ * Converts an array of header values that may contain comma separated
44
+ * headers into an array of headers with no comma separated values.
45
+ *
46
+ * @param string|array $header Header to normalize.
47
+ *
48
+ * @return array Returns the normalized header field values.
49
+ */
50
+ public static function normalize($header)
51
+ {
52
+ if (!is_array($header)) {
53
+ return array_map('trim', explode(',', $header));
54
+ }
55
+
56
+ $result = [];
57
+ foreach ($header as $value) {
58
+ foreach ((array) $value as $v) {
59
+ if (strpos($v, ',') === false) {
60
+ $result[] = $v;
61
+ continue;
62
+ }
63
+ foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) {
64
+ $result[] = trim($vv);
65
+ }
66
+ }
67
+ }
68
+
69
+ return $result;
70
+ }
71
+ }
vendor/guzzlehttp/psr7/src/InflateStream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
vendor/guzzlehttp/psr7/src/LazyOpenStream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
@@ -34,6 +35,6 @@ class LazyOpenStream implements StreamInterface
34
  */
35
  protected function createStream()
36
  {
37
- return stream_for(try_fopen($this->filename, $this->mode));
38
  }
39
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
35
  */
36
  protected function createStream()
37
  {
38
+ return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode));
39
  }
40
  }
vendor/guzzlehttp/psr7/src/LimitStream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
vendor/guzzlehttp/psr7/src/Message.php ADDED
@@ -0,0 +1,252 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\MessageInterface;
6
+ use Psr\Http\Message\RequestInterface;
7
+ use Psr\Http\Message\ResponseInterface;
8
+
9
+ final class Message
10
+ {
11
+ /**
12
+ * Returns the string representation of an HTTP message.
13
+ *
14
+ * @param MessageInterface $message Message to convert to a string.
15
+ *
16
+ * @return string
17
+ */
18
+ public static function toString(MessageInterface $message)
19
+ {
20
+ if ($message instanceof RequestInterface) {
21
+ $msg = trim($message->getMethod() . ' '
22
+ . $message->getRequestTarget())
23
+ . ' HTTP/' . $message->getProtocolVersion();
24
+ if (!$message->hasHeader('host')) {
25
+ $msg .= "\r\nHost: " . $message->getUri()->getHost();
26
+ }
27
+ } elseif ($message instanceof ResponseInterface) {
28
+ $msg = 'HTTP/' . $message->getProtocolVersion() . ' '
29
+ . $message->getStatusCode() . ' '
30
+ . $message->getReasonPhrase();
31
+ } else {
32
+ throw new \InvalidArgumentException('Unknown message type');
33
+ }
34
+
35
+ foreach ($message->getHeaders() as $name => $values) {
36
+ if (strtolower($name) === 'set-cookie') {
37
+ foreach ($values as $value) {
38
+ $msg .= "\r\n{$name}: " . $value;
39
+ }
40
+ } else {
41
+ $msg .= "\r\n{$name}: " . implode(', ', $values);
42
+ }
43
+ }
44
+
45
+ return "{$msg}\r\n\r\n" . $message->getBody();
46
+ }
47
+
48
+ /**
49
+ * Get a short summary of the message body.
50
+ *
51
+ * Will return `null` if the response is not printable.
52
+ *
53
+ * @param MessageInterface $message The message to get the body summary
54
+ * @param int $truncateAt The maximum allowed size of the summary
55
+ *
56
+ * @return string|null
57
+ */
58
+ public static function bodySummary(MessageInterface $message, $truncateAt = 120)
59
+ {
60
+ $body = $message->getBody();
61
+
62
+ if (!$body->isSeekable() || !$body->isReadable()) {
63
+ return null;
64
+ }
65
+
66
+ $size = $body->getSize();
67
+
68
+ if ($size === 0) {
69
+ return null;
70
+ }
71
+
72
+ $summary = $body->read($truncateAt);
73
+ $body->rewind();
74
+
75
+ if ($size > $truncateAt) {
76
+ $summary .= ' (truncated...)';
77
+ }
78
+
79
+ // Matches any printable character, including unicode characters:
80
+ // letters, marks, numbers, punctuation, spacing, and separators.
81
+ if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/u', $summary)) {
82
+ return null;
83
+ }
84
+
85
+ return $summary;
86
+ }
87
+
88
+ /**
89
+ * Attempts to rewind a message body and throws an exception on failure.
90
+ *
91
+ * The body of the message will only be rewound if a call to `tell()`
92
+ * returns a value other than `0`.
93
+ *
94
+ * @param MessageInterface $message Message to rewind
95
+ *
96
+ * @throws \RuntimeException
97
+ */
98
+ public static function rewindBody(MessageInterface $message)
99
+ {
100
+ $body = $message->getBody();
101
+
102
+ if ($body->tell()) {
103
+ $body->rewind();
104
+ }
105
+ }
106
+
107
+ /**
108
+ * Parses an HTTP message into an associative array.
109
+ *
110
+ * The array contains the "start-line" key containing the start line of
111
+ * the message, "headers" key containing an associative array of header
112
+ * array values, and a "body" key containing the body of the message.
113
+ *
114
+ * @param string $message HTTP request or response to parse.
115
+ *
116
+ * @return array
117
+ */
118
+ public static function parseMessage($message)
119
+ {
120
+ if (!$message) {
121
+ throw new \InvalidArgumentException('Invalid message');
122
+ }
123
+
124
+ $message = ltrim($message, "\r\n");
125
+
126
+ $messageParts = preg_split("/\r?\n\r?\n/", $message, 2);
127
+
128
+ if ($messageParts === false || count($messageParts) !== 2) {
129
+ throw new \InvalidArgumentException('Invalid message: Missing header delimiter');
130
+ }
131
+
132
+ list($rawHeaders, $body) = $messageParts;
133
+ $rawHeaders .= "\r\n"; // Put back the delimiter we split previously
134
+ $headerParts = preg_split("/\r?\n/", $rawHeaders, 2);
135
+
136
+ if ($headerParts === false || count($headerParts) !== 2) {
137
+ throw new \InvalidArgumentException('Invalid message: Missing status line');
138
+ }
139
+
140
+ list($startLine, $rawHeaders) = $headerParts;
141
+
142
+ if (preg_match("/(?:^HTTP\/|^[A-Z]+ \S+ HTTP\/)(\d+(?:\.\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') {
143
+ // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0
144
+ $rawHeaders = preg_replace(Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders);
145
+ }
146
+
147
+ /** @var array[] $headerLines */
148
+ $count = preg_match_all(Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, PREG_SET_ORDER);
149
+
150
+ // If these aren't the same, then one line didn't match and there's an invalid header.
151
+ if ($count !== substr_count($rawHeaders, "\n")) {
152
+ // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4
153
+ if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) {
154
+ throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding');
155
+ }
156
+
157
+ throw new \InvalidArgumentException('Invalid header syntax');
158
+ }
159
+
160
+ $headers = [];
161
+
162
+ foreach ($headerLines as $headerLine) {
163
+ $headers[$headerLine[1]][] = $headerLine[2];
164
+ }
165
+
166
+ return [
167
+ 'start-line' => $startLine,
168
+ 'headers' => $headers,
169
+ 'body' => $body,
170
+ ];
171
+ }
172
+
173
+ /**
174
+ * Constructs a URI for an HTTP request message.
175
+ *
176
+ * @param string $path Path from the start-line
177
+ * @param array $headers Array of headers (each value an array).
178
+ *
179
+ * @return string
180
+ */
181
+ public static function parseRequestUri($path, array $headers)
182
+ {
183
+ $hostKey = array_filter(array_keys($headers), function ($k) {
184
+ return strtolower($k) === 'host';
185
+ });
186
+
187
+ // If no host is found, then a full URI cannot be constructed.
188
+ if (!$hostKey) {
189
+ return $path;
190
+ }
191
+
192
+ $host = $headers[reset($hostKey)][0];
193
+ $scheme = substr($host, -4) === ':443' ? 'https' : 'http';
194
+
195
+ return $scheme . '://' . $host . '/' . ltrim($path, '/');
196
+ }
197
+
198
+ /**
199
+ * Parses a request message string into a request object.
200
+ *
201
+ * @param string $message Request message string.
202
+ *
203
+ * @return Request
204
+ */
205
+ public static function parseRequest($message)
206
+ {
207
+ $data = self::parseMessage($message);
208
+ $matches = [];
209
+ if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) {
210
+ throw new \InvalidArgumentException('Invalid request string');
211
+ }
212
+ $parts = explode(' ', $data['start-line'], 3);
213
+ $version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1';
214
+
215
+ $request = new Request(
216
+ $parts[0],
217
+ $matches[1] === '/' ? self::parseRequestUri($parts[1], $data['headers']) : $parts[1],
218
+ $data['headers'],
219
+ $data['body'],
220
+ $version
221
+ );
222
+
223
+ return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]);
224
+ }
225
+
226
+ /**
227
+ * Parses a response message string into a response object.
228
+ *
229
+ * @param string $message Response message string.
230
+ *
231
+ * @return Response
232
+ */
233
+ public static function parseResponse($message)
234
+ {
235
+ $data = self::parseMessage($message);
236
+ // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space
237
+ // between status-code and reason-phrase is required. But browsers accept
238
+ // responses without space and reason as well.
239
+ if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) {
240
+ throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']);
241
+ }
242
+ $parts = explode(' ', $data['start-line'], 3);
243
+
244
+ return new Response(
245
+ (int) $parts[1],
246
+ $data['headers'],
247
+ $data['body'],
248
+ explode('/', $parts[0])[1],
249
+ isset($parts[2]) ? $parts[2] : null
250
+ );
251
+ }
252
+ }
vendor/guzzlehttp/psr7/src/MessageTrait.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
@@ -17,7 +18,7 @@ trait MessageTrait
17
  /** @var string */
18
  private $protocol = '1.1';
19
 
20
- /** @var StreamInterface */
21
  private $stream;
22
 
23
  public function getProtocolVersion()
@@ -117,7 +118,7 @@ trait MessageTrait
117
  public function getBody()
118
  {
119
  if (!$this->stream) {
120
- $this->stream = stream_for('');
121
  }
122
 
123
  return $this->stream;
@@ -194,7 +195,7 @@ trait MessageTrait
194
  }
195
 
196
  return trim((string) $value, " \t");
197
- }, $values);
198
  }
199
 
200
  private function assertHeader($header)
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
18
  /** @var string */
19
  private $protocol = '1.1';
20
 
21
+ /** @var StreamInterface|null */
22
  private $stream;
23
 
24
  public function getProtocolVersion()
118
  public function getBody()
119
  {
120
  if (!$this->stream) {
121
+ $this->stream = Utils::streamFor('');
122
  }
123
 
124
  return $this->stream;
195
  }
196
 
197
  return trim((string) $value, " \t");
198
+ }, array_values($values));
199
  }
200
 
201
  private function assertHeader($header)
vendor/guzzlehttp/psr7/src/MimeType.php ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ final class MimeType
6
+ {
7
+ /**
8
+ * Determines the mimetype of a file by looking at its extension.
9
+ *
10
+ * @param string $filename
11
+ *
12
+ * @return string|null
13
+ */
14
+ public static function fromFilename($filename)
15
+ {
16
+ return self::fromExtension(pathinfo($filename, PATHINFO_EXTENSION));
17
+ }
18
+
19
+ /**
20
+ * Maps a file extensions to a mimetype.
21
+ *
22
+ * @param string $extension string The file extension.
23
+ *
24
+ * @return string|null
25
+ *
26
+ * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types
27
+ */
28
+ public static function fromExtension($extension)
29
+ {
30
+ static $mimetypes = [
31
+ '3gp' => 'video/3gpp',
32
+ '7z' => 'application/x-7z-compressed',
33
+ 'aac' => 'audio/x-aac',
34
+ 'ai' => 'application/postscript',
35
+ 'aif' => 'audio/x-aiff',
36
+ 'asc' => 'text/plain',
37
+ 'asf' => 'video/x-ms-asf',
38
+ 'atom' => 'application/atom+xml',
39
+ 'avi' => 'video/x-msvideo',
40
+ 'bmp' => 'image/bmp',
41
+ 'bz2' => 'application/x-bzip2',
42
+ 'cer' => 'application/pkix-cert',
43
+ 'crl' => 'application/pkix-crl',
44
+ 'crt' => 'application/x-x509-ca-cert',
45
+ 'css' => 'text/css',
46
+ 'csv' => 'text/csv',
47
+ 'cu' => 'application/cu-seeme',
48
+ 'deb' => 'application/x-debian-package',
49
+ 'doc' => 'application/msword',
50
+ 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
51
+ 'dvi' => 'application/x-dvi',
52
+ 'eot' => 'application/vnd.ms-fontobject',
53
+ 'eps' => 'application/postscript',
54
+ 'epub' => 'application/epub+zip',
55
+ 'etx' => 'text/x-setext',
56
+ 'flac' => 'audio/flac',
57
+ 'flv' => 'video/x-flv',
58
+ 'gif' => 'image/gif',
59
+ 'gz' => 'application/gzip',
60
+ 'htm' => 'text/html',
61
+ 'html' => 'text/html',
62
+ 'ico' => 'image/x-icon',
63
+ 'ics' => 'text/calendar',
64
+ 'ini' => 'text/plain',
65
+ 'iso' => 'application/x-iso9660-image',
66
+ 'jar' => 'application/java-archive',
67
+ 'jpe' => 'image/jpeg',
68
+ 'jpeg' => 'image/jpeg',
69
+ 'jpg' => 'image/jpeg',
70
+ 'js' => 'text/javascript',
71
+ 'json' => 'application/json',
72
+ 'latex' => 'application/x-latex',
73
+ 'log' => 'text/plain',
74
+ 'm4a' => 'audio/mp4',
75
+ 'm4v' => 'video/mp4',
76
+ 'mid' => 'audio/midi',
77
+ 'midi' => 'audio/midi',
78
+ 'mov' => 'video/quicktime',
79
+ 'mkv' => 'video/x-matroska',
80
+ 'mp3' => 'audio/mpeg',
81
+ 'mp4' => 'video/mp4',
82
+ 'mp4a' => 'audio/mp4',
83
+ 'mp4v' => 'video/mp4',
84
+ 'mpe' => 'video/mpeg',
85
+ 'mpeg' => 'video/mpeg',
86
+ 'mpg' => 'video/mpeg',
87
+ 'mpg4' => 'video/mp4',
88
+ 'oga' => 'audio/ogg',
89
+ 'ogg' => 'audio/ogg',
90
+ 'ogv' => 'video/ogg',
91
+ 'ogx' => 'application/ogg',
92
+ 'pbm' => 'image/x-portable-bitmap',
93
+ 'pdf' => 'application/pdf',
94
+ 'pgm' => 'image/x-portable-graymap',
95
+ 'png' => 'image/png',
96
+ 'pnm' => 'image/x-portable-anymap',
97
+ 'ppm' => 'image/x-portable-pixmap',
98
+ 'ppt' => 'application/vnd.ms-powerpoint',
99
+ 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
100
+ 'ps' => 'application/postscript',
101
+ 'qt' => 'video/quicktime',
102
+ 'rar' => 'application/x-rar-compressed',
103
+ 'ras' => 'image/x-cmu-raster',
104
+ 'rss' => 'application/rss+xml',
105
+ 'rtf' => 'application/rtf',
106
+ 'sgm' => 'text/sgml',
107
+ 'sgml' => 'text/sgml',
108
+ 'svg' => 'image/svg+xml',
109
+ 'swf' => 'application/x-shockwave-flash',
110
+ 'tar' => 'application/x-tar',
111
+ 'tif' => 'image/tiff',
112
+ 'tiff' => 'image/tiff',
113
+ 'torrent' => 'application/x-bittorrent',
114
+ 'ttf' => 'application/x-font-ttf',
115
+ 'txt' => 'text/plain',
116
+ 'wav' => 'audio/x-wav',
117
+ 'webm' => 'video/webm',
118
+ 'webp' => 'image/webp',
119
+ 'wma' => 'audio/x-ms-wma',
120
+ 'wmv' => 'video/x-ms-wmv',
121
+ 'woff' => 'application/x-font-woff',
122
+ 'wsdl' => 'application/wsdl+xml',
123
+ 'xbm' => 'image/x-xbitmap',
124
+ 'xls' => 'application/vnd.ms-excel',
125
+ 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
126
+ 'xml' => 'application/xml',
127
+ 'xpm' => 'image/x-xpixmap',
128
+ 'xwd' => 'image/x-xwindowdump',
129
+ 'yaml' => 'text/yaml',
130
+ 'yml' => 'text/yaml',
131
+ 'zip' => 'application/zip',
132
+ ];
133
+
134
+ $extension = strtolower($extension);
135
+
136
+ return isset($mimetypes[$extension])
137
+ ? $mimetypes[$extension]
138
+ : null;
139
+ }
140
+ }
vendor/guzzlehttp/psr7/src/MultipartStream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
@@ -71,7 +72,7 @@ class MultipartStream implements StreamInterface
71
  }
72
 
73
  // Add the trailing boundary with CRLF
74
- $stream->addStream(stream_for("--{$this->boundary}--\r\n"));
75
 
76
  return $stream;
77
  }
@@ -84,7 +85,7 @@ class MultipartStream implements StreamInterface
84
  }
85
  }
86
 
87
- $element['contents'] = stream_for($element['contents']);
88
 
89
  if (empty($element['filename'])) {
90
  $uri = $element['contents']->getMetadata('uri');
@@ -100,9 +101,9 @@ class MultipartStream implements StreamInterface
100
  isset($element['headers']) ? $element['headers'] : []
101
  );
102
 
103
- $stream->addStream(stream_for($this->getHeaders($headers)));
104
  $stream->addStream($body);
105
- $stream->addStream(stream_for("\r\n"));
106
  }
107
 
108
  /**
@@ -131,7 +132,7 @@ class MultipartStream implements StreamInterface
131
  // Set a default Content-Type if one was not supplied
132
  $type = $this->getHeader($headers, 'content-type');
133
  if (!$type && ($filename === '0' || $filename)) {
134
- if ($type = mimetype_from_filename($filename)) {
135
  $headers['Content-Type'] = $type;
136
  }
137
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
72
  }
73
 
74
  // Add the trailing boundary with CRLF
75
+ $stream->addStream(Utils::streamFor("--{$this->boundary}--\r\n"));
76
 
77
  return $stream;
78
  }
85
  }
86
  }
87
 
88
+ $element['contents'] = Utils::streamFor($element['contents']);
89
 
90
  if (empty($element['filename'])) {
91
  $uri = $element['contents']->getMetadata('uri');
101
  isset($element['headers']) ? $element['headers'] : []
102
  );
103
 
104
+ $stream->addStream(Utils::streamFor($this->getHeaders($headers)));
105
  $stream->addStream($body);
106
+ $stream->addStream(Utils::streamFor("\r\n"));
107
  }
108
 
109
  /**
132
  // Set a default Content-Type if one was not supplied
133
  $type = $this->getHeader($headers, 'content-type');
134
  if (!$type && ($filename === '0' || $filename)) {
135
+ if ($type = MimeType::fromFilename($filename)) {
136
  $headers['Content-Type'] = $type;
137
  }
138
  }
vendor/guzzlehttp/psr7/src/NoSeekStream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
vendor/guzzlehttp/psr7/src/PumpStream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
@@ -51,7 +52,7 @@ class PumpStream implements StreamInterface
51
  public function __toString()
52
  {
53
  try {
54
- return copy_to_string($this);
55
  } catch (\Exception $e) {
56
  return '';
57
  }
@@ -66,6 +67,8 @@ class PumpStream implements StreamInterface
66
  {
67
  $this->tellPos = false;
68
  $this->source = null;
 
 
69
  }
70
 
71
  public function getSize()
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
52
  public function __toString()
53
  {
54
  try {
55
+ return Utils::copyToString($this);
56
  } catch (\Exception $e) {
57
  return '';
58
  }
67
  {
68
  $this->tellPos = false;
69
  $this->source = null;
70
+
71
+ return null;
72
  }
73
 
74
  public function getSize()
vendor/guzzlehttp/psr7/src/Query.php ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ final class Query
6
+ {
7
+ /**
8
+ * Parse a query string into an associative array.
9
+ *
10
+ * If multiple values are found for the same key, the value of that key
11
+ * value pair will become an array. This function does not parse nested
12
+ * PHP style arrays into an associative array (e.g., `foo[a]=1&foo[b]=2`
13
+ * will be parsed into `['foo[a]' => '1', 'foo[b]' => '2'])`.
14
+ *
15
+ * @param string $str Query string to parse
16
+ * @param int|bool $urlEncoding How the query string is encoded
17
+ *
18
+ * @return array
19
+ */
20
+ public static function parse($str, $urlEncoding = true)
21
+ {
22
+ $result = [];
23
+
24
+ if ($str === '') {
25
+ return $result;
26
+ }
27
+
28
+ if ($urlEncoding === true) {
29
+ $decoder = function ($value) {
30
+ return rawurldecode(str_replace('+', ' ', $value));
31
+ };
32
+ } elseif ($urlEncoding === PHP_QUERY_RFC3986) {
33
+ $decoder = 'rawurldecode';
34
+ } elseif ($urlEncoding === PHP_QUERY_RFC1738) {
35
+ $decoder = 'urldecode';
36
+ } else {
37
+ $decoder = function ($str) { return $str; };
38
+ }
39
+
40
+ foreach (explode('&', $str) as $kvp) {
41
+ $parts = explode('=', $kvp, 2);
42
+ $key = $decoder($parts[0]);
43
+ $value = isset($parts[1]) ? $decoder($parts[1]) : null;
44
+ if (!isset($result[$key])) {
45
+ $result[$key] = $value;
46
+ } else {
47
+ if (!is_array($result[$key])) {
48
+ $result[$key] = [$result[$key]];
49
+ }
50
+ $result[$key][] = $value;
51
+ }
52
+ }
53
+
54
+ return $result;
55
+ }
56
+
57
+ /**
58
+ * Build a query string from an array of key value pairs.
59
+ *
60
+ * This function can use the return value of `parse()` to build a query
61
+ * string. This function does not modify the provided keys when an array is
62
+ * encountered (like `http_build_query()` would).
63
+ *
64
+ * @param array $params Query string parameters.
65
+ * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
66
+ * to encode using RFC3986, or PHP_QUERY_RFC1738
67
+ * to encode using RFC1738.
68
+ * @return string
69
+ */
70
+ public static function build(array $params, $encoding = PHP_QUERY_RFC3986)
71
+ {
72
+ if (!$params) {
73
+ return '';
74
+ }
75
+
76
+ if ($encoding === false) {
77
+ $encoder = function ($str) { return $str; };
78
+ } elseif ($encoding === PHP_QUERY_RFC3986) {
79
+ $encoder = 'rawurlencode';
80
+ } elseif ($encoding === PHP_QUERY_RFC1738) {
81
+ $encoder = 'urlencode';
82
+ } else {
83
+ throw new \InvalidArgumentException('Invalid type');
84
+ }
85
+
86
+ $qs = '';
87
+ foreach ($params as $k => $v) {
88
+ $k = $encoder($k);
89
+ if (!is_array($v)) {
90
+ $qs .= $k;
91
+ if ($v !== null) {
92
+ $qs .= '=' . $encoder($v);
93
+ }
94
+ $qs .= '&';
95
+ } else {
96
+ foreach ($v as $vv) {
97
+ $qs .= $k;
98
+ if ($vv !== null) {
99
+ $qs .= '=' . $encoder($vv);
100
+ }
101
+ $qs .= '&';
102
+ }
103
+ }
104
+ }
105
+
106
+ return $qs ? (string) substr($qs, 0, -1) : '';
107
+ }
108
+ }
vendor/guzzlehttp/psr7/src/Request.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use InvalidArgumentException;
@@ -51,7 +52,7 @@ class Request implements RequestInterface
51
  }
52
 
53
  if ($body !== '' && $body !== null) {
54
- $this->stream = stream_for($body);
55
  }
56
  }
57
 
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use InvalidArgumentException;
52
  }
53
 
54
  if ($body !== '' && $body !== null) {
55
+ $this->stream = Utils::streamFor($body);
56
  }
57
  }
58
 
vendor/guzzlehttp/psr7/src/Response.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\ResponseInterface;
@@ -100,7 +101,7 @@ class Response implements ResponseInterface
100
  $this->statusCode = $status;
101
 
102
  if ($body !== '' && $body !== null) {
103
- $this->stream = stream_for($body);
104
  }
105
 
106
  $this->setHeaders($headers);
@@ -134,7 +135,7 @@ class Response implements ResponseInterface
134
  if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) {
135
  $reasonPhrase = self::$phrases[$new->statusCode];
136
  }
137
- $new->reasonPhrase = $reasonPhrase;
138
  return $new;
139
  }
140
 
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\ResponseInterface;
101
  $this->statusCode = $status;
102
 
103
  if ($body !== '' && $body !== null) {
104
+ $this->stream = Utils::streamFor($body);
105
  }
106
 
107
  $this->setHeaders($headers);
135
  if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) {
136
  $reasonPhrase = self::$phrases[$new->statusCode];
137
  }
138
+ $new->reasonPhrase = (string) $reasonPhrase;
139
  return $new;
140
  }
141
 
vendor/guzzlehttp/psr7/src/ServerRequest.php CHANGED
@@ -79,8 +79,10 @@ class ServerRequest extends Request implements ServerRequestInterface
79
  * Return an UploadedFile instance array.
80
  *
81
  * @param array $files A array which respect $_FILES structure
82
- * @throws InvalidArgumentException for unrecognized values
83
  * @return array
 
 
84
  */
85
  public static function normalizeFiles(array $files)
86
  {
79
  * Return an UploadedFile instance array.
80
  *
81
  * @param array $files A array which respect $_FILES structure
82
+ *
83
  * @return array
84
+ *
85
+ * @throws InvalidArgumentException for unrecognized values
86
  */
87
  public static function normalizeFiles(array $files)
88
  {
vendor/guzzlehttp/psr7/src/Stream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
@@ -76,8 +77,10 @@ class Stream implements StreamInterface
76
  public function __toString()
77
  {
78
  try {
79
- $this->seek(0);
80
- return (string) stream_get_contents($this->stream);
 
 
81
  } catch (\Exception $e) {
82
  return '';
83
  }
@@ -193,7 +196,7 @@ class Stream implements StreamInterface
193
  public function seek($offset, $whence = SEEK_SET)
194
  {
195
  $whence = (int) $whence;
196
-
197
  if (!isset($this->stream)) {
198
  throw new \RuntimeException('Stream is detached');
199
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
77
  public function __toString()
78
  {
79
  try {
80
+ if ($this->isSeekable()) {
81
+ $this->seek(0);
82
+ }
83
+ return $this->getContents();
84
  } catch (\Exception $e) {
85
  return '';
86
  }
196
  public function seek($offset, $whence = SEEK_SET)
197
  {
198
  $whence = (int) $whence;
199
+
200
  if (!isset($this->stream)) {
201
  throw new \RuntimeException('Stream is detached');
202
  }
vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
@@ -52,7 +53,7 @@ trait StreamDecoratorTrait
52
 
53
  public function getContents()
54
  {
55
- return copy_to_string($this);
56
  }
57
 
58
  /**
@@ -140,6 +141,7 @@ trait StreamDecoratorTrait
140
  * Implement in subclasses to dynamically create streams when requested.
141
  *
142
  * @return StreamInterface
 
143
  * @throws \BadMethodCallException
144
  */
145
  protected function createStream()
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
53
 
54
  public function getContents()
55
  {
56
+ return Utils::copyToString($this);
57
  }
58
 
59
  /**
141
  * Implement in subclasses to dynamically create streams when requested.
142
  *
143
  * @return StreamInterface
144
+ *
145
  * @throws \BadMethodCallException
146
  */
147
  protected function createStream()
vendor/guzzlehttp/psr7/src/StreamWrapper.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
@@ -23,6 +24,7 @@ class StreamWrapper
23
  * @param StreamInterface $stream The stream to get a resource for
24
  *
25
  * @return resource
 
26
  * @throws \InvalidArgumentException if stream is not readable or writable
27
  */
28
  public static function getResource(StreamInterface $stream)
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
24
  * @param StreamInterface $stream The stream to get a resource for
25
  *
26
  * @return resource
27
+ *
28
  * @throws \InvalidArgumentException if stream is not readable or writable
29
  */
30
  public static function getResource(StreamInterface $stream)
vendor/guzzlehttp/psr7/src/UploadedFile.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use InvalidArgumentException;
@@ -85,6 +86,7 @@ class UploadedFile implements UploadedFileInterface
85
  * Depending on the value set file or stream variable
86
  *
87
  * @param mixed $streamOrFile
 
88
  * @throws InvalidArgumentException
89
  */
90
  private function setStreamOrFile($streamOrFile)
@@ -104,6 +106,7 @@ class UploadedFile implements UploadedFileInterface
104
 
105
  /**
106
  * @param int $error
 
107
  * @throws InvalidArgumentException
108
  */
109
  private function setError($error)
@@ -125,6 +128,7 @@ class UploadedFile implements UploadedFileInterface
125
 
126
  /**
127
  * @param int $size
 
128
  * @throws InvalidArgumentException
129
  */
130
  private function setSize($size)
@@ -158,6 +162,7 @@ class UploadedFile implements UploadedFileInterface
158
 
159
  /**
160
  * @param string|null $clientFilename
 
161
  * @throws InvalidArgumentException
162
  */
163
  private function setClientFilename($clientFilename)
@@ -173,6 +178,7 @@ class UploadedFile implements UploadedFileInterface
173
 
174
  /**
175
  * @param string|null $clientMediaType
 
176
  * @throws InvalidArgumentException
177
  */
178
  private function setClientMediaType($clientMediaType)
@@ -220,6 +226,7 @@ class UploadedFile implements UploadedFileInterface
220
 
221
  /**
222
  * {@inheritdoc}
 
223
  * @throws RuntimeException if the upload was not successful.
224
  */
225
  public function getStream()
@@ -238,7 +245,9 @@ class UploadedFile implements UploadedFileInterface
238
  *
239
  * @see http://php.net/is_uploaded_file
240
  * @see http://php.net/move_uploaded_file
 
241
  * @param string $targetPath Path to which to move the uploaded file.
 
242
  * @throws RuntimeException if the upload was not successful.
243
  * @throws InvalidArgumentException if the $path specified is invalid.
244
  * @throws RuntimeException on any error during the move operation, or on
@@ -259,7 +268,7 @@ class UploadedFile implements UploadedFileInterface
259
  ? rename($this->file, $targetPath)
260
  : move_uploaded_file($this->file, $targetPath);
261
  } else {
262
- copy_to_stream(
263
  $this->getStream(),
264
  new LazyOpenStream($targetPath, 'w')
265
  );
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use InvalidArgumentException;
86
  * Depending on the value set file or stream variable
87
  *
88
  * @param mixed $streamOrFile
89
+ *
90
  * @throws InvalidArgumentException
91
  */
92
  private function setStreamOrFile($streamOrFile)
106
 
107
  /**
108
  * @param int $error
109
+ *
110
  * @throws InvalidArgumentException
111
  */
112
  private function setError($error)
128
 
129
  /**
130
  * @param int $size
131
+ *
132
  * @throws InvalidArgumentException
133
  */
134
  private function setSize($size)
162
 
163
  /**
164
  * @param string|null $clientFilename
165
+ *
166
  * @throws InvalidArgumentException
167
  */
168
  private function setClientFilename($clientFilename)
178
 
179
  /**
180
  * @param string|null $clientMediaType
181
+ *
182
  * @throws InvalidArgumentException
183
  */
184
  private function setClientMediaType($clientMediaType)
226
 
227
  /**
228
  * {@inheritdoc}
229
+ *
230
  * @throws RuntimeException if the upload was not successful.
231
  */
232
  public function getStream()
245
  *
246
  * @see http://php.net/is_uploaded_file
247
  * @see http://php.net/move_uploaded_file
248
+ *
249
  * @param string $targetPath Path to which to move the uploaded file.
250
+ *
251
  * @throws RuntimeException if the upload was not successful.
252
  * @throws InvalidArgumentException if the $path specified is invalid.
253
  * @throws RuntimeException on any error during the move operation, or on
268
  ? rename($this->file, $targetPath)
269
  : move_uploaded_file($this->file, $targetPath);
270
  } else {
271
+ Utils::copyToStream(
272
  $this->getStream(),
273
  new LazyOpenStream($targetPath, 'w')
274
  );
vendor/guzzlehttp/psr7/src/Uri.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\UriInterface;
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\UriInterface;
vendor/guzzlehttp/psr7/src/UriNormalizer.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\UriInterface;
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\UriInterface;
vendor/guzzlehttp/psr7/src/UriResolver.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\UriInterface;
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\UriInterface;
vendor/guzzlehttp/psr7/src/Utils.php ADDED
@@ -0,0 +1,398 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\RequestInterface;
6
+ use Psr\Http\Message\ServerRequestInterface;
7
+ use Psr\Http\Message\StreamInterface;
8
+ use Psr\Http\Message\UriInterface;
9
+
10
+ final class Utils
11
+ {
12
+ /**
13
+ * Remove the items given by the keys, case insensitively from the data.
14
+ *
15
+ * @param iterable<string> $keys
16
+ *
17
+ * @return array
18
+ */
19
+ public static function caselessRemove($keys, array $data)
20
+ {
21
+ $result = [];
22
+
23
+ foreach ($keys as &$key) {
24
+ $key = strtolower($key);
25
+ }
26
+
27
+ foreach ($data as $k => $v) {
28
+ if (!in_array(strtolower($k), $keys)) {
29
+ $result[$k] = $v;
30
+ }
31
+ }
32
+
33
+ return $result;
34
+ }
35
+
36
+ /**
37
+ * Copy the contents of a stream into another stream until the given number
38
+ * of bytes have been read.
39
+ *
40
+ * @param StreamInterface $source Stream to read from
41
+ * @param StreamInterface $dest Stream to write to
42
+ * @param int $maxLen Maximum number of bytes to read. Pass -1
43
+ * to read the entire stream.
44
+ *
45
+ * @throws \RuntimeException on error.
46
+ */
47
+ public static function copyToStream(StreamInterface $source, StreamInterface $dest, $maxLen = -1)
48
+ {
49
+ $bufferSize = 8192;
50
+
51
+ if ($maxLen === -1) {
52
+ while (!$source->eof()) {
53
+ if (!$dest->write($source->read($bufferSize))) {
54
+ break;
55
+ }
56
+ }
57
+ } else {
58
+ $remaining = $maxLen;
59
+ while ($remaining > 0 && !$source->eof()) {
60
+ $buf = $source->read(min($bufferSize, $remaining));
61
+ $len = strlen($buf);
62
+ if (!$len) {
63
+ break;
64
+ }
65
+ $remaining -= $len;
66
+ $dest->write($buf);
67
+ }
68
+ }
69
+ }
70
+
71
+ /**
72
+ * Copy the contents of a stream into a string until the given number of
73
+ * bytes have been read.
74
+ *
75
+ * @param StreamInterface $stream Stream to read
76
+ * @param int $maxLen Maximum number of bytes to read. Pass -1
77
+ * to read the entire stream.
78
+ * @return string
79
+ *
80
+ * @throws \RuntimeException on error.
81
+ */
82
+ public static function copyToString(StreamInterface $stream, $maxLen = -1)
83
+ {
84
+ $buffer = '';
85
+
86
+ if ($maxLen === -1) {
87
+ while (!$stream->eof()) {
88
+ $buf = $stream->read(1048576);
89
+ // Using a loose equality here to match on '' and false.
90
+ if ($buf == null) {
91
+ break;
92
+ }
93
+ $buffer .= $buf;
94
+ }
95
+ return $buffer;
96
+ }
97
+
98
+ $len = 0;
99
+ while (!$stream->eof() && $len < $maxLen) {
100
+ $buf = $stream->read($maxLen - $len);
101
+ // Using a loose equality here to match on '' and false.
102
+ if ($buf == null) {
103
+ break;
104
+ }
105
+ $buffer .= $buf;
106
+ $len = strlen($buffer);
107
+ }
108
+
109
+ return $buffer;
110
+ }
111
+
112
+ /**
113
+ * Calculate a hash of a stream.
114
+ *
115
+ * This method reads the entire stream to calculate a rolling hash, based
116
+ * on PHP's `hash_init` functions.
117
+ *
118
+ * @param StreamInterface $stream Stream to calculate the hash for
119
+ * @param string $algo Hash algorithm (e.g. md5, crc32, etc)
120
+ * @param bool $rawOutput Whether or not to use raw output
121
+ *
122
+ * @return string Returns the hash of the stream
123
+ *
124
+ * @throws \RuntimeException on error.
125
+ */
126
+ public static function hash(StreamInterface $stream, $algo, $rawOutput = false)
127
+ {
128
+ $pos = $stream->tell();
129
+
130
+ if ($pos > 0) {
131
+ $stream->rewind();
132
+ }
133
+
134
+ $ctx = hash_init($algo);
135
+ while (!$stream->eof()) {
136
+ hash_update($ctx, $stream->read(1048576));
137
+ }
138
+
139
+ $out = hash_final($ctx, (bool) $rawOutput);
140
+ $stream->seek($pos);
141
+
142
+ return $out;
143
+ }
144
+
145
+ /**
146
+ * Clone and modify a request with the given changes.
147
+ *
148
+ * This method is useful for reducing the number of clones needed to mutate
149
+ * a message.
150
+ *
151
+ * The changes can be one of:
152
+ * - method: (string) Changes the HTTP method.
153
+ * - set_headers: (array) Sets the given headers.
154
+ * - remove_headers: (array) Remove the given headers.
155
+ * - body: (mixed) Sets the given body.
156
+ * - uri: (UriInterface) Set the URI.
157
+ * - query: (string) Set the query string value of the URI.
158
+ * - version: (string) Set the protocol version.
159
+ *
160
+ * @param RequestInterface $request Request to clone and modify.
161
+ * @param array $changes Changes to apply.
162
+ *
163
+ * @return RequestInterface
164
+ */
165
+ public static function modifyRequest(RequestInterface $request, array $changes)
166
+ {
167
+ if (!$changes) {
168
+ return $request;
169
+ }
170
+
171
+ $headers = $request->getHeaders();
172
+
173
+ if (!isset($changes['uri'])) {
174
+ $uri = $request->getUri();
175
+ } else {
176
+ // Remove the host header if one is on the URI
177
+ if ($host = $changes['uri']->getHost()) {
178
+ $changes['set_headers']['Host'] = $host;
179
+
180
+ if ($port = $changes['uri']->getPort()) {
181
+ $standardPorts = ['http' => 80, 'https' => 443];
182
+ $scheme = $changes['uri']->getScheme();
183
+ if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) {
184
+ $changes['set_headers']['Host'] .= ':'.$port;
185
+ }
186
+ }
187
+ }
188
+ $uri = $changes['uri'];
189
+ }
190
+
191
+ if (!empty($changes['remove_headers'])) {
192
+ $headers = self::caselessRemove($changes['remove_headers'], $headers);
193
+ }
194
+
195
+ if (!empty($changes['set_headers'])) {
196
+ $headers = self::caselessRemove(array_keys($changes['set_headers']), $headers);
197
+ $headers = $changes['set_headers'] + $headers;
198
+ }
199
+
200
+ if (isset($changes['query'])) {
201
+ $uri = $uri->withQuery($changes['query']);
202
+ }
203
+
204
+ if ($request instanceof ServerRequestInterface) {
205
+ return (new ServerRequest(
206
+ isset($changes['method']) ? $changes['method'] : $request->getMethod(),
207
+ $uri,
208
+ $headers,
209
+ isset($changes['body']) ? $changes['body'] : $request->getBody(),
210
+ isset($changes['version'])
211
+ ? $changes['version']
212
+ : $request->getProtocolVersion(),
213
+ $request->getServerParams()
214
+ ))
215
+ ->withParsedBody($request->getParsedBody())
216
+ ->withQueryParams($request->getQueryParams())
217
+ ->withCookieParams($request->getCookieParams())
218
+ ->withUploadedFiles($request->getUploadedFiles());
219
+ }
220
+
221
+ return new Request(
222
+ isset($changes['method']) ? $changes['method'] : $request->getMethod(),
223
+ $uri,
224
+ $headers,
225
+ isset($changes['body']) ? $changes['body'] : $request->getBody(),
226
+ isset($changes['version'])
227
+ ? $changes['version']
228
+ : $request->getProtocolVersion()
229
+ );
230
+ }
231
+
232
+ /**
233
+ * Read a line from the stream up to the maximum allowed buffer length.
234
+ *
235
+ * @param StreamInterface $stream Stream to read from
236
+ * @param int|null $maxLength Maximum buffer length
237
+ *
238
+ * @return string
239
+ */
240
+ public static function readLine(StreamInterface $stream, $maxLength = null)
241
+ {
242
+ $buffer = '';
243
+ $size = 0;
244
+
245
+ while (!$stream->eof()) {
246
+ // Using a loose equality here to match on '' and false.
247
+ if (null == ($byte = $stream->read(1))) {
248
+ return $buffer;
249
+ }
250
+ $buffer .= $byte;
251
+ // Break when a new line is found or the max length - 1 is reached
252
+ if ($byte === "\n" || ++$size === $maxLength - 1) {
253
+ break;
254
+ }
255
+ }
256
+
257
+ return $buffer;
258
+ }
259
+
260
+ /**
261
+ * Create a new stream based on the input type.
262
+ *
263
+ * Options is an associative array that can contain the following keys:
264
+ * - metadata: Array of custom metadata.
265
+ * - size: Size of the stream.
266
+ *
267
+ * This method accepts the following `$resource` types:
268
+ * - `Psr\Http\Message\StreamInterface`: Returns the value as-is.
269
+ * - `string`: Creates a stream object that uses the given string as the contents.
270
+ * - `resource`: Creates a stream object that wraps the given PHP stream resource.
271
+ * - `Iterator`: If the provided value implements `Iterator`, then a read-only
272
+ * stream object will be created that wraps the given iterable. Each time the
273
+ * stream is read from, data from the iterator will fill a buffer and will be
274
+ * continuously called until the buffer is equal to the requested read size.
275
+ * Subsequent read calls will first read from the buffer and then call `next`
276
+ * on the underlying iterator until it is exhausted.
277
+ * - `object` with `__toString()`: If the object has the `__toString()` method,
278
+ * the object will be cast to a string and then a stream will be returned that
279
+ * uses the string value.
280
+ * - `NULL`: When `null` is passed, an empty stream object is returned.
281
+ * - `callable` When a callable is passed, a read-only stream object will be
282
+ * created that invokes the given callable. The callable is invoked with the
283
+ * number of suggested bytes to read. The callable can return any number of
284
+ * bytes, but MUST return `false` when there is no more data to return. The
285
+ * stream object that wraps the callable will invoke the callable until the
286
+ * number of requested bytes are available. Any additional bytes will be
287
+ * buffered and used in subsequent reads.
288
+ *
289
+ * @param resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource Entity body data
290
+ * @param array $options Additional options
291
+ *
292
+ * @return StreamInterface
293
+ *
294
+ * @throws \InvalidArgumentException if the $resource arg is not valid.
295
+ */
296
+ public static function streamFor($resource = '', array $options = [])
297
+ {
298
+ if (is_scalar($resource)) {
299
+ $stream = fopen('php://temp', 'r+');
300
+ if ($resource !== '') {
301
+ fwrite($stream, $resource);
302
+ fseek($stream, 0);
303
+ }
304
+ return new Stream($stream, $options);
305
+ }
306
+
307
+ switch (gettype($resource)) {
308
+ case 'resource':
309
+ return new Stream($resource, $options);
310
+ case 'object':
311
+ if ($resource instanceof StreamInterface) {
312
+ return $resource;
313
+ } elseif ($resource instanceof \Iterator) {
314
+ return new PumpStream(function () use ($resource) {
315
+ if (!$resource->valid()) {
316
+ return false;
317
+ }
318
+ $result = $resource->current();
319
+ $resource->next();
320
+ return $result;
321
+ }, $options);
322
+ } elseif (method_exists($resource, '__toString')) {
323
+ return Utils::streamFor((string) $resource, $options);
324
+ }
325
+ break;
326
+ case 'NULL':
327
+ return new Stream(fopen('php://temp', 'r+'), $options);
328
+ }
329
+
330
+ if (is_callable($resource)) {
331
+ return new PumpStream($resource, $options);
332
+ }
333
+
334
+ throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource));
335
+ }
336
+
337
+ /**
338
+ * Safely opens a PHP stream resource using a filename.
339
+ *
340
+ * When fopen fails, PHP normally raises a warning. This function adds an
341
+ * error handler that checks for errors and throws an exception instead.
342
+ *
343
+ * @param string $filename File to open
344
+ * @param string $mode Mode used to open the file
345
+ *
346
+ * @return resource
347
+ *
348
+ * @throws \RuntimeException if the file cannot be opened
349
+ */
350
+ public static function tryFopen($filename, $mode)
351
+ {
352
+ $ex = null;
353
+ set_error_handler(function () use ($filename, $mode, &$ex) {
354
+ $ex = new \RuntimeException(sprintf(
355
+ 'Unable to open %s using mode %s: %s',
356
+ $filename,
357
+ $mode,
358
+ func_get_args()[1]
359
+ ));
360
+ });
361
+
362
+ $handle = fopen($filename, $mode);
363
+ restore_error_handler();
364
+
365
+ if ($ex) {
366
+ /** @var $ex \RuntimeException */
367
+ throw $ex;
368
+ }
369
+
370
+ return $handle;
371
+ }
372
+
373
+ /**
374
+ * Returns a UriInterface for the given value.
375
+ *
376
+ * This function accepts a string or UriInterface and returns a
377
+ * UriInterface for the given value. If the value is already a
378
+ * UriInterface, it is returned as-is.
379
+ *
380
+ * @param string|UriInterface $uri
381
+ *
382
+ * @return UriInterface
383
+ *
384
+ * @throws \InvalidArgumentException
385
+ */
386
+ public static function uriFor($uri)
387
+ {
388
+ if ($uri instanceof UriInterface) {
389
+ return $uri;
390
+ }
391
+
392
+ if (is_string($uri)) {
393
+ return new Uri($uri);
394
+ }
395
+
396
+ throw new \InvalidArgumentException('URI must be a string or UriInterface');
397
+ }
398
+ }
vendor/guzzlehttp/psr7/src/functions.php CHANGED
@@ -1,10 +1,9 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\MessageInterface;
5
  use Psr\Http\Message\RequestInterface;
6
- use Psr\Http\Message\ResponseInterface;
7
- use Psr\Http\Message\ServerRequestInterface;
8
  use Psr\Http\Message\StreamInterface;
9
  use Psr\Http\Message\UriInterface;
10
 
@@ -14,52 +13,32 @@ use Psr\Http\Message\UriInterface;
14
  * @param MessageInterface $message Message to convert to a string.
15
  *
16
  * @return string
 
 
17
  */
18
  function str(MessageInterface $message)
19
  {
20
- if ($message instanceof RequestInterface) {
21
- $msg = trim($message->getMethod() . ' '
22
- . $message->getRequestTarget())
23
- . ' HTTP/' . $message->getProtocolVersion();
24
- if (!$message->hasHeader('host')) {
25
- $msg .= "\r\nHost: " . $message->getUri()->getHost();
26
- }
27
- } elseif ($message instanceof ResponseInterface) {
28
- $msg = 'HTTP/' . $message->getProtocolVersion() . ' '
29
- . $message->getStatusCode() . ' '
30
- . $message->getReasonPhrase();
31
- } else {
32
- throw new \InvalidArgumentException('Unknown message type');
33
- }
34
-
35
- foreach ($message->getHeaders() as $name => $values) {
36
- $msg .= "\r\n{$name}: " . implode(', ', $values);
37
- }
38
-
39
- return "{$msg}\r\n\r\n" . $message->getBody();
40
  }
41
 
42
  /**
43
  * Returns a UriInterface for the given value.
44
  *
45
- * This function accepts a string or {@see Psr\Http\Message\UriInterface} and
46
- * returns a UriInterface for the given value. If the value is already a
47
- * `UriInterface`, it is returned as-is.
48
  *
49
  * @param string|UriInterface $uri
50
  *
51
  * @return UriInterface
 
52
  * @throws \InvalidArgumentException
 
 
53
  */
54
  function uri_for($uri)
55
  {
56
- if ($uri instanceof UriInterface) {
57
- return $uri;
58
- } elseif (is_string($uri)) {
59
- return new Uri($uri);
60
- }
61
-
62
- throw new \InvalidArgumentException('URI must be a string or UriInterface');
63
  }
64
 
65
  /**
@@ -69,86 +48,57 @@ function uri_for($uri)
69
  * - metadata: Array of custom metadata.
70
  * - size: Size of the stream.
71
  *
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  * @param resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource Entity body data
73
  * @param array $options Additional options
74
  *
75
  * @return StreamInterface
 
76
  * @throws \InvalidArgumentException if the $resource arg is not valid.
 
 
77
  */
78
  function stream_for($resource = '', array $options = [])
79
  {
80
- if (is_scalar($resource)) {
81
- $stream = fopen('php://temp', 'r+');
82
- if ($resource !== '') {
83
- fwrite($stream, $resource);
84
- fseek($stream, 0);
85
- }
86
- return new Stream($stream, $options);
87
- }
88
-
89
- switch (gettype($resource)) {
90
- case 'resource':
91
- return new Stream($resource, $options);
92
- case 'object':
93
- if ($resource instanceof StreamInterface) {
94
- return $resource;
95
- } elseif ($resource instanceof \Iterator) {
96
- return new PumpStream(function () use ($resource) {
97
- if (!$resource->valid()) {
98
- return false;
99
- }
100
- $result = $resource->current();
101
- $resource->next();
102
- return $result;
103
- }, $options);
104
- } elseif (method_exists($resource, '__toString')) {
105
- return stream_for((string) $resource, $options);
106
- }
107
- break;
108
- case 'NULL':
109
- return new Stream(fopen('php://temp', 'r+'), $options);
110
- }
111
-
112
- if (is_callable($resource)) {
113
- return new PumpStream($resource, $options);
114
- }
115
-
116
- throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource));
117
  }
118
 
119
  /**
120
  * Parse an array of header values containing ";" separated data into an
121
- * array of associative arrays representing the header key value pair
122
- * data of the header. When a parameter does not contain a value, but just
123
  * contains a key, this function will inject a key with a '' string value.
124
  *
125
  * @param string|array $header Header to parse into components.
126
  *
127
  * @return array Returns the parsed header values.
 
 
128
  */
129
  function parse_header($header)
130
  {
131
- static $trimmed = "\"' \n\t\r";
132
- $params = $matches = [];
133
-
134
- foreach (normalize_header($header) as $val) {
135
- $part = [];
136
- foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) {
137
- if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {
138
- $m = $matches[0];
139
- if (isset($m[1])) {
140
- $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed);
141
- } else {
142
- $part[] = trim($m[0], $trimmed);
143
- }
144
- }
145
- }
146
- if ($part) {
147
- $params[] = $part;
148
- }
149
- }
150
-
151
- return $params;
152
  }
153
 
154
  /**
@@ -158,32 +108,20 @@ function parse_header($header)
158
  * @param string|array $header Header to normalize.
159
  *
160
  * @return array Returns the normalized header field values.
 
 
161
  */
162
  function normalize_header($header)
163
  {
164
- if (!is_array($header)) {
165
- return array_map('trim', explode(',', $header));
166
- }
167
-
168
- $result = [];
169
- foreach ($header as $value) {
170
- foreach ((array) $value as $v) {
171
- if (strpos($v, ',') === false) {
172
- $result[] = $v;
173
- continue;
174
- }
175
- foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) {
176
- $result[] = trim($vv);
177
- }
178
- }
179
- }
180
-
181
- return $result;
182
  }
183
 
184
  /**
185
  * Clone and modify a request with the given changes.
186
  *
 
 
 
187
  * The changes can be one of:
188
  * - method: (string) Changes the HTTP method.
189
  * - set_headers: (array) Sets the given headers.
@@ -197,72 +135,12 @@ function normalize_header($header)
197
  * @param array $changes Changes to apply.
198
  *
199
  * @return RequestInterface
 
 
200
  */
201
  function modify_request(RequestInterface $request, array $changes)
202
  {
203
- if (!$changes) {
204
- return $request;
205
- }
206
-
207
- $headers = $request->getHeaders();
208
-
209
- if (!isset($changes['uri'])) {
210
- $uri = $request->getUri();
211
- } else {
212
- // Remove the host header if one is on the URI
213
- if ($host = $changes['uri']->getHost()) {
214
- $changes['set_headers']['Host'] = $host;
215
-
216
- if ($port = $changes['uri']->getPort()) {
217
- $standardPorts = ['http' => 80, 'https' => 443];
218
- $scheme = $changes['uri']->getScheme();
219
- if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) {
220
- $changes['set_headers']['Host'] .= ':'.$port;
221
- }
222
- }
223
- }
224
- $uri = $changes['uri'];
225
- }
226
-
227
- if (!empty($changes['remove_headers'])) {
228
- $headers = _caseless_remove($changes['remove_headers'], $headers);
229
- }
230
-
231
- if (!empty($changes['set_headers'])) {
232
- $headers = _caseless_remove(array_keys($changes['set_headers']), $headers);
233
- $headers = $changes['set_headers'] + $headers;
234
- }
235
-
236
- if (isset($changes['query'])) {
237
- $uri = $uri->withQuery($changes['query']);
238
- }
239
-
240
- if ($request instanceof ServerRequestInterface) {
241
- return (new ServerRequest(
242
- isset($changes['method']) ? $changes['method'] : $request->getMethod(),
243
- $uri,
244
- $headers,
245
- isset($changes['body']) ? $changes['body'] : $request->getBody(),
246
- isset($changes['version'])
247
- ? $changes['version']
248
- : $request->getProtocolVersion(),
249
- $request->getServerParams()
250
- ))
251
- ->withParsedBody($request->getParsedBody())
252
- ->withQueryParams($request->getQueryParams())
253
- ->withCookieParams($request->getCookieParams())
254
- ->withUploadedFiles($request->getUploadedFiles());
255
- }
256
-
257
- return new Request(
258
- isset($changes['method']) ? $changes['method'] : $request->getMethod(),
259
- $uri,
260
- $headers,
261
- isset($changes['body']) ? $changes['body'] : $request->getBody(),
262
- isset($changes['version'])
263
- ? $changes['version']
264
- : $request->getProtocolVersion()
265
- );
266
  }
267
 
268
  /**
@@ -274,14 +152,12 @@ function modify_request(RequestInterface $request, array $changes)
274
  * @param MessageInterface $message Message to rewind
275
  *
276
  * @throws \RuntimeException
 
 
277
  */
278
  function rewind_body(MessageInterface $message)
279
  {
280
- $body = $message->getBody();
281
-
282
- if ($body->tell()) {
283
- $body->rewind();
284
- }
285
  }
286
 
287
  /**
@@ -294,29 +170,14 @@ function rewind_body(MessageInterface $message)
294
  * @param string $mode Mode used to open the file
295
  *
296
  * @return resource
 
297
  * @throws \RuntimeException if the file cannot be opened
 
 
298
  */
299
  function try_fopen($filename, $mode)
300
  {
301
- $ex = null;
302
- set_error_handler(function () use ($filename, $mode, &$ex) {
303
- $ex = new \RuntimeException(sprintf(
304
- 'Unable to open %s using mode %s: %s',
305
- $filename,
306
- $mode,
307
- func_get_args()[1]
308
- ));
309
- });
310
-
311
- $handle = fopen($filename, $mode);
312
- restore_error_handler();
313
-
314
- if ($ex) {
315
- /** @var $ex \RuntimeException */
316
- throw $ex;
317
- }
318
-
319
- return $handle;
320
  }
321
 
322
  /**
@@ -327,36 +188,14 @@ function try_fopen($filename, $mode)
327
  * @param int $maxLen Maximum number of bytes to read. Pass -1
328
  * to read the entire stream.
329
  * @return string
 
330
  * @throws \RuntimeException on error.
 
 
331
  */
332
  function copy_to_string(StreamInterface $stream, $maxLen = -1)
333
  {
334
- $buffer = '';
335
-
336
- if ($maxLen === -1) {
337
- while (!$stream->eof()) {
338
- $buf = $stream->read(1048576);
339
- // Using a loose equality here to match on '' and false.
340
- if ($buf == null) {
341
- break;
342
- }
343
- $buffer .= $buf;
344
- }
345
- return $buffer;
346
- }
347
-
348
- $len = 0;
349
- while (!$stream->eof() && $len < $maxLen) {
350
- $buf = $stream->read($maxLen - $len);
351
- // Using a loose equality here to match on '' and false.
352
- if ($buf == null) {
353
- break;
354
- }
355
- $buffer .= $buf;
356
- $len = strlen($buffer);
357
- }
358
-
359
- return $buffer;
360
  }
361
 
362
  /**
@@ -369,92 +208,48 @@ function copy_to_string(StreamInterface $stream, $maxLen = -1)
369
  * to read the entire stream.
370
  *
371
  * @throws \RuntimeException on error.
 
 
372
  */
373
- function copy_to_stream(
374
- StreamInterface $source,
375
- StreamInterface $dest,
376
- $maxLen = -1
377
- ) {
378
- $bufferSize = 8192;
379
-
380
- if ($maxLen === -1) {
381
- while (!$source->eof()) {
382
- if (!$dest->write($source->read($bufferSize))) {
383
- break;
384
- }
385
- }
386
- } else {
387
- $remaining = $maxLen;
388
- while ($remaining > 0 && !$source->eof()) {
389
- $buf = $source->read(min($bufferSize, $remaining));
390
- $len = strlen($buf);
391
- if (!$len) {
392
- break;
393
- }
394
- $remaining -= $len;
395
- $dest->write($buf);
396
- }
397
- }
398
  }
399
 
400
  /**
401
- * Calculate a hash of a Stream
 
 
 
402
  *
403
  * @param StreamInterface $stream Stream to calculate the hash for
404
  * @param string $algo Hash algorithm (e.g. md5, crc32, etc)
405
  * @param bool $rawOutput Whether or not to use raw output
406
  *
407
  * @return string Returns the hash of the stream
 
408
  * @throws \RuntimeException on error.
 
 
409
  */
410
- function hash(
411
- StreamInterface $stream,
412
- $algo,
413
- $rawOutput = false
414
- ) {
415
- $pos = $stream->tell();
416
-
417
- if ($pos > 0) {
418
- $stream->rewind();
419
- }
420
-
421
- $ctx = hash_init($algo);
422
- while (!$stream->eof()) {
423
- hash_update($ctx, $stream->read(1048576));
424
- }
425
-
426
- $out = hash_final($ctx, (bool) $rawOutput);
427
- $stream->seek($pos);
428
-
429
- return $out;
430
  }
431
 
432
  /**
433
- * Read a line from the stream up to the maximum allowed buffer length
434
  *
435
  * @param StreamInterface $stream Stream to read from
436
- * @param int $maxLength Maximum buffer length
437
  *
438
  * @return string
 
 
439
  */
440
  function readline(StreamInterface $stream, $maxLength = null)
441
  {
442
- $buffer = '';
443
- $size = 0;
444
-
445
- while (!$stream->eof()) {
446
- // Using a loose equality here to match on '' and false.
447
- if (null == ($byte = $stream->read(1))) {
448
- return $buffer;
449
- }
450
- $buffer .= $byte;
451
- // Break when a new line is found or the max length - 1 is reached
452
- if ($byte === "\n" || ++$size === $maxLength - 1) {
453
- break;
454
- }
455
- }
456
-
457
- return $buffer;
458
  }
459
 
460
  /**
@@ -463,26 +258,12 @@ function readline(StreamInterface $stream, $maxLength = null)
463
  * @param string $message Request message string.
464
  *
465
  * @return Request
 
 
466
  */
467
  function parse_request($message)
468
  {
469
- $data = _parse_message($message);
470
- $matches = [];
471
- if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) {
472
- throw new \InvalidArgumentException('Invalid request string');
473
- }
474
- $parts = explode(' ', $data['start-line'], 3);
475
- $version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1';
476
-
477
- $request = new Request(
478
- $parts[0],
479
- $matches[1] === '/' ? _parse_request_uri($parts[1], $data['headers']) : $parts[1],
480
- $data['headers'],
481
- $data['body'],
482
- $version
483
- );
484
-
485
- return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]);
486
  }
487
 
488
  /**
@@ -491,139 +272,66 @@ function parse_request($message)
491
  * @param string $message Response message string.
492
  *
493
  * @return Response
 
 
494
  */
495
  function parse_response($message)
496
  {
497
- $data = _parse_message($message);
498
- // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space
499
- // between status-code and reason-phrase is required. But browsers accept
500
- // responses without space and reason as well.
501
- if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) {
502
- throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']);
503
- }
504
- $parts = explode(' ', $data['start-line'], 3);
505
-
506
- return new Response(
507
- $parts[1],
508
- $data['headers'],
509
- $data['body'],
510
- explode('/', $parts[0])[1],
511
- isset($parts[2]) ? $parts[2] : null
512
- );
513
  }
514
 
515
  /**
516
  * Parse a query string into an associative array.
517
  *
518
- * If multiple values are found for the same key, the value of that key
519
- * value pair will become an array. This function does not parse nested
520
- * PHP style arrays into an associative array (e.g., foo[a]=1&foo[b]=2 will
521
- * be parsed into ['foo[a]' => '1', 'foo[b]' => '2']).
522
  *
523
  * @param string $str Query string to parse
524
  * @param int|bool $urlEncoding How the query string is encoded
525
  *
526
  * @return array
 
 
527
  */
528
  function parse_query($str, $urlEncoding = true)
529
  {
530
- $result = [];
531
-
532
- if ($str === '') {
533
- return $result;
534
- }
535
-
536
- if ($urlEncoding === true) {
537
- $decoder = function ($value) {
538
- return rawurldecode(str_replace('+', ' ', $value));
539
- };
540
- } elseif ($urlEncoding === PHP_QUERY_RFC3986) {
541
- $decoder = 'rawurldecode';
542
- } elseif ($urlEncoding === PHP_QUERY_RFC1738) {
543
- $decoder = 'urldecode';
544
- } else {
545
- $decoder = function ($str) { return $str; };
546
- }
547
-
548
- foreach (explode('&', $str) as $kvp) {
549
- $parts = explode('=', $kvp, 2);
550
- $key = $decoder($parts[0]);
551
- $value = isset($parts[1]) ? $decoder($parts[1]) : null;
552
- if (!isset($result[$key])) {
553
- $result[$key] = $value;
554
- } else {
555
- if (!is_array($result[$key])) {
556
- $result[$key] = [$result[$key]];
557
- }
558
- $result[$key][] = $value;
559
- }
560
- }
561
-
562
- return $result;
563
  }
564
 
565
  /**
566
  * Build a query string from an array of key value pairs.
567
  *
568
- * This function can use the return value of parse_query() to build a query
569
  * string. This function does not modify the provided keys when an array is
570
- * encountered (like http_build_query would).
571
  *
572
  * @param array $params Query string parameters.
573
  * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
574
  * to encode using RFC3986, or PHP_QUERY_RFC1738
575
  * to encode using RFC1738.
576
  * @return string
 
 
577
  */
578
  function build_query(array $params, $encoding = PHP_QUERY_RFC3986)
579
  {
580
- if (!$params) {
581
- return '';
582
- }
583
-
584
- if ($encoding === false) {
585
- $encoder = function ($str) { return $str; };
586
- } elseif ($encoding === PHP_QUERY_RFC3986) {
587
- $encoder = 'rawurlencode';
588
- } elseif ($encoding === PHP_QUERY_RFC1738) {
589
- $encoder = 'urlencode';
590
- } else {
591
- throw new \InvalidArgumentException('Invalid type');
592
- }
593
-
594
- $qs = '';
595
- foreach ($params as $k => $v) {
596
- $k = $encoder($k);
597
- if (!is_array($v)) {
598
- $qs .= $k;
599
- if ($v !== null) {
600
- $qs .= '=' . $encoder($v);
601
- }
602
- $qs .= '&';
603
- } else {
604
- foreach ($v as $vv) {
605
- $qs .= $k;
606
- if ($vv !== null) {
607
- $qs .= '=' . $encoder($vv);
608
- }
609
- $qs .= '&';
610
- }
611
- }
612
- }
613
-
614
- return $qs ? (string) substr($qs, 0, -1) : '';
615
  }
616
 
617
  /**
618
  * Determines the mimetype of a file by looking at its extension.
619
  *
620
- * @param $filename
 
 
621
  *
622
- * @return null|string
623
  */
624
  function mimetype_from_filename($filename)
625
  {
626
- return mimetype_from_extension(pathinfo($filename, PATHINFO_EXTENSION));
627
  }
628
 
629
  /**
@@ -632,119 +340,13 @@ function mimetype_from_filename($filename)
632
  * @param $extension string The file extension.
633
  *
634
  * @return string|null
 
635
  * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types
 
636
  */
637
  function mimetype_from_extension($extension)
638
  {
639
- static $mimetypes = [
640
- '3gp' => 'video/3gpp',
641
- '7z' => 'application/x-7z-compressed',
642
- 'aac' => 'audio/x-aac',
643
- 'ai' => 'application/postscript',
644
- 'aif' => 'audio/x-aiff',
645
- 'asc' => 'text/plain',
646
- 'asf' => 'video/x-ms-asf',
647
- 'atom' => 'application/atom+xml',
648
- 'avi' => 'video/x-msvideo',
649
- 'bmp' => 'image/bmp',
650
- 'bz2' => 'application/x-bzip2',
651
- 'cer' => 'application/pkix-cert',
652
- 'crl' => 'application/pkix-crl',
653
- 'crt' => 'application/x-x509-ca-cert',
654
- 'css' => 'text/css',
655
- 'csv' => 'text/csv',
656
- 'cu' => 'application/cu-seeme',
657
- 'deb' => 'application/x-debian-package',
658
- 'doc' => 'application/msword',
659
- 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
660
- 'dvi' => 'application/x-dvi',
661
- 'eot' => 'application/vnd.ms-fontobject',
662
- 'eps' => 'application/postscript',
663
- 'epub' => 'application/epub+zip',
664
- 'etx' => 'text/x-setext',
665
- 'flac' => 'audio/flac',
666
- 'flv' => 'video/x-flv',
667
- 'gif' => 'image/gif',
668
- 'gz' => 'application/gzip',
669
- 'htm' => 'text/html',
670
- 'html' => 'text/html',
671
- 'ico' => 'image/x-icon',
672
- 'ics' => 'text/calendar',
673
- 'ini' => 'text/plain',
674
- 'iso' => 'application/x-iso9660-image',
675
- 'jar' => 'application/java-archive',
676
- 'jpe' => 'image/jpeg',
677
- 'jpeg' => 'image/jpeg',
678
- 'jpg' => 'image/jpeg',
679
- 'js' => 'text/javascript',
680
- 'json' => 'application/json',
681
- 'latex' => 'application/x-latex',
682
- 'log' => 'text/plain',
683
- 'm4a' => 'audio/mp4',
684
- 'm4v' => 'video/mp4',
685
- 'mid' => 'audio/midi',
686
- 'midi' => 'audio/midi',
687
- 'mov' => 'video/quicktime',
688
- 'mkv' => 'video/x-matroska',
689
- 'mp3' => 'audio/mpeg',
690
- 'mp4' => 'video/mp4',
691
- 'mp4a' => 'audio/mp4',
692
- 'mp4v' => 'video/mp4',
693
- 'mpe' => 'video/mpeg',
694
- 'mpeg' => 'video/mpeg',
695
- 'mpg' => 'video/mpeg',
696
- 'mpg4' => 'video/mp4',
697
- 'oga' => 'audio/ogg',
698
- 'ogg' => 'audio/ogg',
699
- 'ogv' => 'video/ogg',
700
- 'ogx' => 'application/ogg',
701
- 'pbm' => 'image/x-portable-bitmap',
702
- 'pdf' => 'application/pdf',
703
- 'pgm' => 'image/x-portable-graymap',
704
- 'png' => 'image/png',
705
- 'pnm' => 'image/x-portable-anymap',
706
- 'ppm' => 'image/x-portable-pixmap',
707
- 'ppt' => 'application/vnd.ms-powerpoint',
708
- 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
709
- 'ps' => 'application/postscript',
710
- 'qt' => 'video/quicktime',
711
- 'rar' => 'application/x-rar-compressed',
712
- 'ras' => 'image/x-cmu-raster',
713
- 'rss' => 'application/rss+xml',
714
- 'rtf' => 'application/rtf',
715
- 'sgm' => 'text/sgml',
716
- 'sgml' => 'text/sgml',
717
- 'svg' => 'image/svg+xml',
718
- 'swf' => 'application/x-shockwave-flash',
719
- 'tar' => 'application/x-tar',
720
- 'tif' => 'image/tiff',
721
- 'tiff' => 'image/tiff',
722
- 'torrent' => 'application/x-bittorrent',
723
- 'ttf' => 'application/x-font-ttf',
724
- 'txt' => 'text/plain',
725
- 'wav' => 'audio/x-wav',
726
- 'webm' => 'video/webm',
727
- 'webp' => 'image/webp',
728
- 'wma' => 'audio/x-ms-wma',
729
- 'wmv' => 'video/x-ms-wmv',
730
- 'woff' => 'application/x-font-woff',
731
- 'wsdl' => 'application/wsdl+xml',
732
- 'xbm' => 'image/x-xbitmap',
733
- 'xls' => 'application/vnd.ms-excel',
734
- 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
735
- 'xml' => 'application/xml',
736
- 'xpm' => 'image/x-xpixmap',
737
- 'xwd' => 'image/x-xwindowdump',
738
- 'yaml' => 'text/yaml',
739
- 'yml' => 'text/yaml',
740
- 'zip' => 'application/zip',
741
- ];
742
-
743
- $extension = strtolower($extension);
744
-
745
- return isset($mimetypes[$extension])
746
- ? $mimetypes[$extension]
747
- : null;
748
  }
749
 
750
  /**
@@ -757,61 +359,13 @@ function mimetype_from_extension($extension)
757
  * @param string $message HTTP request or response to parse.
758
  *
759
  * @return array
 
760
  * @internal
 
761
  */
762
  function _parse_message($message)
763
  {
764
- if (!$message) {
765
- throw new \InvalidArgumentException('Invalid message');
766
- }
767
-
768
- $message = ltrim($message, "\r\n");
769
-
770
- $messageParts = preg_split("/\r?\n\r?\n/", $message, 2);
771
-
772
- if ($messageParts === false || count($messageParts) !== 2) {
773
- throw new \InvalidArgumentException('Invalid message: Missing header delimiter');
774
- }
775
-
776
- list($rawHeaders, $body) = $messageParts;
777
- $rawHeaders .= "\r\n"; // Put back the delimiter we split previously
778
- $headerParts = preg_split("/\r?\n/", $rawHeaders, 2);
779
-
780
- if ($headerParts === false || count($headerParts) !== 2) {
781
- throw new \InvalidArgumentException('Invalid message: Missing status line');
782
- }
783
-
784
- list($startLine, $rawHeaders) = $headerParts;
785
-
786
- if (preg_match("/(?:^HTTP\/|^[A-Z]+ \S+ HTTP\/)(\d+(?:\.\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') {
787
- // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0
788
- $rawHeaders = preg_replace(Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders);
789
- }
790
-
791
- /** @var array[] $headerLines */
792
- $count = preg_match_all(Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, PREG_SET_ORDER);
793
-
794
- // If these aren't the same, then one line didn't match and there's an invalid header.
795
- if ($count !== substr_count($rawHeaders, "\n")) {
796
- // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4
797
- if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) {
798
- throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding');
799
- }
800
-
801
- throw new \InvalidArgumentException('Invalid header syntax');
802
- }
803
-
804
- $headers = [];
805
-
806
- foreach ($headerLines as $headerLine) {
807
- $headers[$headerLine[1]][] = $headerLine[2];
808
- }
809
-
810
- return [
811
- 'start-line' => $startLine,
812
- 'headers' => $headers,
813
- 'body' => $body,
814
- ];
815
  }
816
 
817
  /**
@@ -821,79 +375,43 @@ function _parse_message($message)
821
  * @param array $headers Array of headers (each value an array).
822
  *
823
  * @return string
 
824
  * @internal
 
825
  */
826
  function _parse_request_uri($path, array $headers)
827
  {
828
- $hostKey = array_filter(array_keys($headers), function ($k) {
829
- return strtolower($k) === 'host';
830
- });
831
-
832
- // If no host is found, then a full URI cannot be constructed.
833
- if (!$hostKey) {
834
- return $path;
835
- }
836
-
837
- $host = $headers[reset($hostKey)][0];
838
- $scheme = substr($host, -4) === ':443' ? 'https' : 'http';
839
-
840
- return $scheme . '://' . $host . '/' . ltrim($path, '/');
841
  }
842
 
843
  /**
844
- * Get a short summary of the message body
845
  *
846
  * Will return `null` if the response is not printable.
847
  *
848
  * @param MessageInterface $message The message to get the body summary
849
  * @param int $truncateAt The maximum allowed size of the summary
850
  *
851
- * @return null|string
 
 
852
  */
853
  function get_message_body_summary(MessageInterface $message, $truncateAt = 120)
854
  {
855
- $body = $message->getBody();
856
-
857
- if (!$body->isSeekable() || !$body->isReadable()) {
858
- return null;
859
- }
860
-
861
- $size = $body->getSize();
862
-
863
- if ($size === 0) {
864
- return null;
865
- }
866
-
867
- $summary = $body->read($truncateAt);
868
- $body->rewind();
869
-
870
- if ($size > $truncateAt) {
871
- $summary .= ' (truncated...)';
872
- }
873
-
874
- // Matches any printable character, including unicode characters:
875
- // letters, marks, numbers, punctuation, spacing, and separators.
876
- if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/', $summary)) {
877
- return null;
878
- }
879
-
880
- return $summary;
881
  }
882
 
883
- /** @internal */
 
 
 
 
 
 
 
 
 
884
  function _caseless_remove($keys, array $data)
885
  {
886
- $result = [];
887
-
888
- foreach ($keys as &$key) {
889
- $key = strtolower($key);
890
- }
891
-
892
- foreach ($data as $k => $v) {
893
- if (!in_array(strtolower($k), $keys)) {
894
- $result[$k] = $v;
895
- }
896
- }
897
-
898
- return $result;
899
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\MessageInterface;
6
  use Psr\Http\Message\RequestInterface;
 
 
7
  use Psr\Http\Message\StreamInterface;
8
  use Psr\Http\Message\UriInterface;
9
 
13
  * @param MessageInterface $message Message to convert to a string.
14
  *
15
  * @return string
16
+ *
17
+ * @deprecated str will be removed in guzzlehttp/psr7:2.0. Use Message::toString instead.
18
  */
19
  function str(MessageInterface $message)
20
  {
21
+ return Message::toString($message);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  }
23
 
24
  /**
25
  * Returns a UriInterface for the given value.
26
  *
27
+ * This function accepts a string or UriInterface and returns a
28
+ * UriInterface for the given value. If the value is already a
29
+ * UriInterface, it is returned as-is.
30
  *
31
  * @param string|UriInterface $uri
32
  *
33
  * @return UriInterface
34
+ *
35
  * @throws \InvalidArgumentException
36
+ *
37
+ * @deprecated uri_for will be removed in guzzlehttp/psr7:2.0. Use Utils::uriFor instead.
38
  */
39
  function uri_for($uri)
40
  {
41
+ return Utils::uriFor($uri);
 
 
 
 
 
 
42
  }
43
 
44
  /**
48
  * - metadata: Array of custom metadata.
49
  * - size: Size of the stream.
50
  *
51
+ * This method accepts the following `$resource` types:
52
+ * - `Psr\Http\Message\StreamInterface`: Returns the value as-is.
53
+ * - `string`: Creates a stream object that uses the given string as the contents.
54
+ * - `resource`: Creates a stream object that wraps the given PHP stream resource.
55
+ * - `Iterator`: If the provided value implements `Iterator`, then a read-only
56
+ * stream object will be created that wraps the given iterable. Each time the
57
+ * stream is read from, data from the iterator will fill a buffer and will be
58
+ * continuously called until the buffer is equal to the requested read size.
59
+ * Subsequent read calls will first read from the buffer and then call `next`
60
+ * on the underlying iterator until it is exhausted.
61
+ * - `object` with `__toString()`: If the object has the `__toString()` method,
62
+ * the object will be cast to a string and then a stream will be returned that
63
+ * uses the string value.
64
+ * - `NULL`: When `null` is passed, an empty stream object is returned.
65
+ * - `callable` When a callable is passed, a read-only stream object will be
66
+ * created that invokes the given callable. The callable is invoked with the
67
+ * number of suggested bytes to read. The callable can return any number of
68
+ * bytes, but MUST return `false` when there is no more data to return. The
69
+ * stream object that wraps the callable will invoke the callable until the
70
+ * number of requested bytes are available. Any additional bytes will be
71
+ * buffered and used in subsequent reads.
72
+ *
73
  * @param resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource Entity body data
74
  * @param array $options Additional options
75
  *
76
  * @return StreamInterface
77
+ *
78
  * @throws \InvalidArgumentException if the $resource arg is not valid.
79
+ *
80
+ * @deprecated stream_for will be removed in guzzlehttp/psr7:2.0. Use Utils::streamFor instead.
81
  */
82
  function stream_for($resource = '', array $options = [])
83
  {
84
+ return Utils::streamFor($resource, $options);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  }
86
 
87
  /**
88
  * Parse an array of header values containing ";" separated data into an
89
+ * array of associative arrays representing the header key value pair data
90
+ * of the header. When a parameter does not contain a value, but just
91
  * contains a key, this function will inject a key with a '' string value.
92
  *
93
  * @param string|array $header Header to parse into components.
94
  *
95
  * @return array Returns the parsed header values.
96
+ *
97
+ * @deprecated parse_header will be removed in guzzlehttp/psr7:2.0. Use Header::parse instead.
98
  */
99
  function parse_header($header)
100
  {
101
+ return Header::parse($header);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  }
103
 
104
  /**
108
  * @param string|array $header Header to normalize.
109
  *
110
  * @return array Returns the normalized header field values.
111
+ *
112
+ * @deprecated normalize_header will be removed in guzzlehttp/psr7:2.0. Use Header::normalize instead.
113
  */
114
  function normalize_header($header)
115
  {
116
+ return Header::normalize($header);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  }
118
 
119
  /**
120
  * Clone and modify a request with the given changes.
121
  *
122
+ * This method is useful for reducing the number of clones needed to mutate a
123
+ * message.
124
+ *
125
  * The changes can be one of:
126
  * - method: (string) Changes the HTTP method.
127
  * - set_headers: (array) Sets the given headers.
135
  * @param array $changes Changes to apply.
136
  *
137
  * @return RequestInterface
138
+ *
139
+ * @deprecated modify_request will be removed in guzzlehttp/psr7:2.0. Use Utils::modifyRequest instead.
140
  */
141
  function modify_request(RequestInterface $request, array $changes)
142
  {
143
+ return Utils::modifyRequest($request, $changes);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  }
145
 
146
  /**
152
  * @param MessageInterface $message Message to rewind
153
  *
154
  * @throws \RuntimeException
155
+ *
156
+ * @deprecated rewind_body will be removed in guzzlehttp/psr7:2.0. Use Message::rewindBody instead.
157
  */
158
  function rewind_body(MessageInterface $message)
159
  {
160
+ Message::rewindBody($message);
 
 
 
 
161
  }
162
 
163
  /**
170
  * @param string $mode Mode used to open the file
171
  *
172
  * @return resource
173
+ *
174
  * @throws \RuntimeException if the file cannot be opened
175
+ *
176
+ * @deprecated try_fopen will be removed in guzzlehttp/psr7:2.0. Use Utils::tryFopen instead.
177
  */
178
  function try_fopen($filename, $mode)
179
  {
180
+ return Utils::tryFopen($filename, $mode);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  }
182
 
183
  /**
188
  * @param int $maxLen Maximum number of bytes to read. Pass -1
189
  * to read the entire stream.
190
  * @return string
191
+ *
192
  * @throws \RuntimeException on error.
193
+ *
194
+ * @deprecated copy_to_string will be removed in guzzlehttp/psr7:2.0. Use Utils::copyToString instead.
195
  */
196
  function copy_to_string(StreamInterface $stream, $maxLen = -1)
197
  {
198
+ return Utils::copyToString($stream, $maxLen);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
  }
200
 
201
  /**
208
  * to read the entire stream.
209
  *
210
  * @throws \RuntimeException on error.
211
+ *
212
+ * @deprecated copy_to_stream will be removed in guzzlehttp/psr7:2.0. Use Utils::copyToStream instead.
213
  */
214
+ function copy_to_stream(StreamInterface $source, StreamInterface $dest, $maxLen = -1)
215
+ {
216
+ return Utils::copyToStream($source, $dest, $maxLen);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  }
218
 
219
  /**
220
+ * Calculate a hash of a stream.
221
+ *
222
+ * This method reads the entire stream to calculate a rolling hash, based on
223
+ * PHP's `hash_init` functions.
224
  *
225
  * @param StreamInterface $stream Stream to calculate the hash for
226
  * @param string $algo Hash algorithm (e.g. md5, crc32, etc)
227
  * @param bool $rawOutput Whether or not to use raw output
228
  *
229
  * @return string Returns the hash of the stream
230
+ *
231
  * @throws \RuntimeException on error.
232
+ *
233
+ * @deprecated hash will be removed in guzzlehttp/psr7:2.0. Use Utils::hash instead.
234
  */
235
+ function hash(StreamInterface $stream, $algo, $rawOutput = false)
236
+ {
237
+ return Utils::hash($stream, $algo, $rawOutput);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  }
239
 
240
  /**
241
+ * Read a line from the stream up to the maximum allowed buffer length.
242
  *
243
  * @param StreamInterface $stream Stream to read from
244
+ * @param int|null $maxLength Maximum buffer length
245
  *
246
  * @return string
247
+ *
248
+ * @deprecated readline will be removed in guzzlehttp/psr7:2.0. Use Utils::readLine instead.
249
  */
250
  function readline(StreamInterface $stream, $maxLength = null)
251
  {
252
+ return Utils::readLine($stream, $maxLength);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
253
  }
254
 
255
  /**
258
  * @param string $message Request message string.
259
  *
260
  * @return Request
261
+ *
262
+ * @deprecated parse_request will be removed in guzzlehttp/psr7:2.0. Use Message::parseRequest instead.
263
  */
264
  function parse_request($message)
265
  {
266
+ return Message::parseRequest($message);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
267
  }
268
 
269
  /**
272
  * @param string $message Response message string.
273
  *
274
  * @return Response
275
+ *
276
+ * @deprecated parse_response will be removed in guzzlehttp/psr7:2.0. Use Message::parseResponse instead.
277
  */
278
  function parse_response($message)
279
  {
280
+ return Message::parseResponse($message);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
281
  }
282
 
283
  /**
284
  * Parse a query string into an associative array.
285
  *
286
+ * If multiple values are found for the same key, the value of that key value
287
+ * pair will become an array. This function does not parse nested PHP style
288
+ * arrays into an associative array (e.g., `foo[a]=1&foo[b]=2` will be parsed
289
+ * into `['foo[a]' => '1', 'foo[b]' => '2'])`.
290
  *
291
  * @param string $str Query string to parse
292
  * @param int|bool $urlEncoding How the query string is encoded
293
  *
294
  * @return array
295
+ *
296
+ * @deprecated parse_query will be removed in guzzlehttp/psr7:2.0. Use Query::parse instead.
297
  */
298
  function parse_query($str, $urlEncoding = true)
299
  {
300
+ return Query::parse($str, $urlEncoding);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
301
  }
302
 
303
  /**
304
  * Build a query string from an array of key value pairs.
305
  *
306
+ * This function can use the return value of `parse_query()` to build a query
307
  * string. This function does not modify the provided keys when an array is
308
+ * encountered (like `http_build_query()` would).
309
  *
310
  * @param array $params Query string parameters.
311
  * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
312
  * to encode using RFC3986, or PHP_QUERY_RFC1738
313
  * to encode using RFC1738.
314
  * @return string
315
+ *
316
+ * @deprecated build_query will be removed in guzzlehttp/psr7:2.0. Use Query::build instead.
317
  */
318
  function build_query(array $params, $encoding = PHP_QUERY_RFC3986)
319
  {
320
+ return Query::build($params, $encoding);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
321
  }
322
 
323
  /**
324
  * Determines the mimetype of a file by looking at its extension.
325
  *
326
+ * @param string $filename
327
+ *
328
+ * @return string|null
329
  *
330
+ * @deprecated mimetype_from_filename will be removed in guzzlehttp/psr7:2.0. Use MimeType::fromFilename instead.
331
  */
332
  function mimetype_from_filename($filename)
333
  {
334
+ return MimeType::fromFilename($filename);
335
  }
336
 
337
  /**
340
  * @param $extension string The file extension.
341
  *
342
  * @return string|null
343
+ *
344
  * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types
345
+ * @deprecated mimetype_from_extension will be removed in guzzlehttp/psr7:2.0. Use MimeType::fromExtension instead.
346
  */
347
  function mimetype_from_extension($extension)
348
  {
349
+ return MimeType::fromExtension($extension);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
350
  }
351
 
352
  /**
359
  * @param string $message HTTP request or response to parse.
360
  *
361
  * @return array
362
+ *
363
  * @internal
364
+ * @deprecated _parse_message will be removed in guzzlehttp/psr7:2.0. Use Message::parseMessage instead.
365
  */
366
  function _parse_message($message)
367
  {
368
+ return Message::parseMessage($message);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
369
  }
370
 
371
  /**
375
  * @param array $headers Array of headers (each value an array).
376
  *
377
  * @return string
378
+ *
379
  * @internal
380
+ * @deprecated _parse_request_uri will be removed in guzzlehttp/psr7:2.0. Use Message::parseRequestUri instead.
381
  */
382
  function _parse_request_uri($path, array $headers)
383
  {
384
+ return Message::parseRequestUri($path, $headers);
 
 
 
 
 
 
 
 
 
 
 
 
385
  }
386
 
387
  /**
388
+ * Get a short summary of the message body.
389
  *
390
  * Will return `null` if the response is not printable.
391
  *
392
  * @param MessageInterface $message The message to get the body summary
393
  * @param int $truncateAt The maximum allowed size of the summary
394
  *
395
+ * @return string|null
396
+ *
397
+ * @deprecated get_message_body_summary will be removed in guzzlehttp/psr7:2.0. Use Message::bodySummary instead.
398
  */
399
  function get_message_body_summary(MessageInterface $message, $truncateAt = 120)
400
  {
401
+ return Message::bodySummary($message, $truncateAt);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
402
  }
403
 
404
+ /**
405
+ * Remove the items given by the keys, case insensitively from the data.
406
+ *
407
+ * @param iterable<string> $keys
408
+ *
409
+ * @return array
410
+ *
411
+ * @internal
412
+ * @deprecated _caseless_remove will be removed in guzzlehttp/psr7:2.0. Use Utils::caselessRemove instead.
413
+ */
414
  function _caseless_remove($keys, array $data)
415
  {
416
+ return Utils::caselessRemove($keys, $data);
 
 
 
 
 
 
 
 
 
 
 
 
417
  }
vendor/paragonie/random_compat/build-phar.sh DELETED
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- basedir=$( dirname $( readlink -f ${BASH_SOURCE[0]} ) )
4
-
5
- php -dphar.readonly=0 "$basedir/other/build_phar.php" $*
 
 
 
 
 
vendor/paragonie/random_compat/composer.json DELETED
@@ -1,34 +0,0 @@
1
- {
2
- "name": "paragonie/random_compat",
3
- "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
4
- "keywords": [
5
- "csprng",
6
- "random",
7
- "polyfill",
8
- "pseudorandom"
9
- ],
10
- "license": "MIT",
11
- "type": "library",
12
- "authors": [
13
- {
14
- "name": "Paragon Initiative Enterprises",
15
- "email": "security@paragonie.com",
16
- "homepage": "https://paragonie.com"
17
- }
18
- ],
19
- "support": {
20
- "issues": "https://github.com/paragonie/random_compat/issues",
21
- "email": "info@paragonie.com",
22
- "source": "https://github.com/paragonie/random_compat"
23
- },
24
- "require": {
25
- "php": "^7"
26
- },
27
- "require-dev": {
28
- "vimeo/psalm": "^1",
29
- "phpunit/phpunit": "4.*|5.*"
30
- },
31
- "suggest": {
32
- "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
33
- }
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/paragonie/random_compat/dist/random_compat.phar.pubkey DELETED
@@ -1,5 +0,0 @@
1
- -----BEGIN PUBLIC KEY-----
2
- MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEEd+wCqJDrx5B4OldM0dQE0ZMX+lx1ZWm
3
- pui0SUqD4G29L3NGsz9UhJ/0HjBdbnkhIK5xviT0X5vtjacF6ajgcCArbTB+ds+p
4
- +h7Q084NuSuIpNb6YPfoUFgC/CL9kAoc
5
- -----END PUBLIC KEY-----
 
 
 
 
 
vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc DELETED
@@ -1,11 +0,0 @@
1
- -----BEGIN PGP SIGNATURE-----
2
- Version: GnuPG v2.0.22 (MingW32)
3
-
4
- iQEcBAABAgAGBQJWtW1hAAoJEGuXocKCZATaJf0H+wbZGgskK1dcRTsuVJl9IWip
5
- QwGw/qIKI280SD6/ckoUMxKDCJiFuPR14zmqnS36k7N5UNPnpdTJTS8T11jttSpg
6
- 1LCmgpbEIpgaTah+cELDqFCav99fS+bEiAL5lWDAHBTE/XPjGVCqeehyPYref4IW
7
- NDBIEsvnHPHPLsn6X5jq4+Yj5oUixgxaMPiR+bcO4Sh+RzOVB6i2D0upWfRXBFXA
8
- NNnsg9/zjvoC7ZW73y9uSH+dPJTt/Vgfeiv52/v41XliyzbUyLalf02GNPY+9goV
9
- JHG1ulEEBJOCiUD9cE1PUIJwHA/HqyhHIvV350YoEFiHl8iSwm7SiZu5kPjaq74=
10
- =B6+8
11
- -----END PGP SIGNATURE-----
 
 
 
 
 
 
 
 
 
 
 
vendor/paragonie/random_compat/lib/random.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
- /**
3
- * Random_* Compatibility Library
4
- * for using the new PHP 7 random_* API in PHP 5 projects
5
- *
6
- * @version 2.99.99
7
- * @released 2018-06-06
8
- *
9
- * The MIT License (MIT)
10
- *
11
- * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
12
- *
13
- * Permission is hereby granted, free of charge, to any person obtaining a copy
14
- * of this software and associated documentation files (the "Software"), to deal
15
- * in the Software without restriction, including without limitation the rights
16
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
- * copies of the Software, and to permit persons to whom the Software is
18
- * furnished to do so, subject to the following conditions:
19
- *
20
- * The above copyright notice and this permission notice shall be included in
21
- * all copies or substantial portions of the Software.
22
- *
23
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
- * SOFTWARE.
30
- */
31
-
32
- // NOP
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/paragonie/random_compat/other/build_phar.php DELETED
@@ -1,57 +0,0 @@
1
- <?php
2
- $dist = dirname(__DIR__).'/dist';
3
- if (!is_dir($dist)) {
4
- mkdir($dist, 0755);
5
- }
6
- if (file_exists($dist.'/random_compat.phar')) {
7
- unlink($dist.'/random_compat.phar');
8
- }
9
- $phar = new Phar(
10
- $dist.'/random_compat.phar',
11
- FilesystemIterator::CURRENT_AS_FILEINFO | \FilesystemIterator::KEY_AS_FILENAME,
12
- 'random_compat.phar'
13
- );
14
- rename(
15
- dirname(__DIR__).'/lib/random.php',
16
- dirname(__DIR__).'/lib/index.php'
17
- );
18
- $phar->buildFromDirectory(dirname(__DIR__).'/lib');
19
- rename(
20
- dirname(__DIR__).'/lib/index.php',
21
- dirname(__DIR__).'/lib/random.php'
22
- );
23
-
24
- /**
25
- * If we pass an (optional) path to a private key as a second argument, we will
26
- * sign the Phar with OpenSSL.
27
- *
28
- * If you leave this out, it will produce an unsigned .phar!
29
- */
30
- if ($argc > 1) {
31
- if (!@is_readable($argv[1])) {
32
- echo 'Could not read the private key file:', $argv[1], "\n";
33
- exit(255);
34
- }
35
- $pkeyFile = file_get_contents($argv[1]);
36
-
37
- $private = openssl_get_privatekey($pkeyFile);
38
- if ($private !== false) {
39
- $pkey = '';
40
- openssl_pkey_export($private, $pkey);
41
- $phar->setSignatureAlgorithm(Phar::OPENSSL, $pkey);
42
-
43
- /**
44
- * Save the corresponding public key to the file
45
- */
46
- if (!@is_readable($dist.'/random_compat.phar.pubkey')) {
47
- $details = openssl_pkey_get_details($private);
48
- file_put_contents(
49
- $dist.'/random_compat.phar.pubkey',
50
- $details['key']
51
- );
52
- }
53
- } else {
54
- echo 'An error occurred reading the private key from OpenSSL.', "\n";
55
- exit(255);
56
- }
57
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/paragonie/random_compat/psalm-autoload.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
-
3
- require_once 'lib/byte_safe_strings.php';
4
- require_once 'lib/cast_to_int.php';
5
- require_once 'lib/error_polyfill.php';
6
- require_once 'other/ide_stubs/libsodium.php';
7
- require_once 'lib/random.php';
8
-
9
- $int = random_int(0, 65536);
 
 
 
 
 
 
 
 
 
vendor/paragonie/random_compat/psalm.xml DELETED
@@ -1,19 +0,0 @@
1
- <?xml version="1.0"?>
2
- <psalm
3
- autoloader="psalm-autoload.php"
4
- stopOnFirstError="false"
5
- useDocblockTypes="true"
6
- >
7
- <projectFiles>
8
- <directory name="lib" />
9
- </projectFiles>
10
- <issueHandlers>
11
- <RedundantConditionGivenDocblockType errorLevel="info" />
12
- <UnresolvableInclude errorLevel="info" />
13
- <DuplicateClass errorLevel="info" />
14
- <InvalidOperand errorLevel="info" />
15
- <UndefinedConstant errorLevel="info" />
16
- <MissingReturnType errorLevel="info" />
17
- <InvalidReturnType errorLevel="info" />
18
- </issueHandlers>
19
- </psalm>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/psr/http-client/CHANGELOG.md ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file, in reverse chronological order by release.
4
+
5
+ ## 1.0.1
6
+
7
+ Allow installation with PHP 8. No code changes.
8
+
9
+ ## 1.0.0
10
+
11
+ First stable release. No changes since 0.3.0.
12
+
13
+ ## 0.3.0
14
+
15
+ Added Interface suffix on exceptions
16
+
17
+ ## 0.2.0
18
+
19
+ All exceptions are in `Psr\Http\Client` namespace
20
+
21
+ ## 0.1.0
22
+
23
+ First release
vendor/{paragonie/random_compat → psr/http-client}/LICENSE RENAMED
@@ -1,22 +1,19 @@
1
- The MIT License (MIT)
2
 
3
- Copyright (c) 2015 Paragon Initiative Enterprises
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
  of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
  furnished to do so, subject to the following conditions:
11
 
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
 
15
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
1
+ Copyright (c) 2017 PHP Framework Interoperability Group
2
 
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
 
 
4
  of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
  furnished to do so, subject to the following conditions:
9
 
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
 
13
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
 
vendor/psr/http-client/README.md ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ HTTP Client
2
+ ===========
3
+
4
+ This repository holds all the common code related to [PSR-18 (HTTP Client)][psr-url].
5
+
6
+ Note that this is not a HTTP Client implementation of its own. It is merely abstractions that describe the components of a HTTP Client.
7
+
8
+ The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist.
9
+
10
+ [psr-url]: http://www.php-fig.org/psr/psr-18
11
+ [package-url]: https://packagist.org/packages/psr/http-client
12
+ [implementation-url]: https://packagist.org/providers/psr/http-client-implementation
vendor/psr/http-client/composer.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "psr/http-client",
3
+ "description": "Common interface for HTTP clients",
4
+ "keywords": ["psr", "psr-18", "http", "http-client"],
5
+ "homepage": "https://github.com/php-fig/http-client",
6
+ "license": "MIT",
7
+ "authors": [
8
+ {
9
+ "name": "PHP-FIG",
10
+ "homepage": "http://www.php-fig.org/"
11
+ }
12
+ ],
13
+ "require": {
14
+ "php": "^7.0 || ^8.0",
15
+ "psr/http-message": "^1.0"
16
+ },
17
+ "autoload": {
18
+ "psr-4": {
19
+ "Psr\\Http\\Client\\": "src/"
20
+ }
21
+ },
22
+ "extra": {
23
+ "branch-alias": {
24
+ "dev-master": "1.0.x-dev"
25
+ }
26
+ }
27
+ }
vendor/psr/http-client/src/ClientExceptionInterface.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Psr\Http\Client;
4
+
5
+ /**
6
+ * Every HTTP client related exception MUST implement this interface.
7
+ */
8
+ interface ClientExceptionInterface extends \Throwable
9
+ {
10
+ }
vendor/psr/http-client/src/ClientInterface.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Psr\Http\Client;
4
+
5
+ use Psr\Http\Message\RequestInterface;
6
+ use Psr\Http\Message\ResponseInterface;
7
+
8
+ interface ClientInterface
9
+ {
10
+ /**
11
+ * Sends a PSR-7 request and returns a PSR-7 response.
12
+ *
13
+ * @param RequestInterface $request
14
+ *
15
+ * @return ResponseInterface
16
+ *
17
+ * @throws \Psr\Http\Client\ClientExceptionInterface If an error happens while processing the request.
18
+ */
19
+ public function sendRequest(RequestInterface $request): ResponseInterface;
20
+ }
vendor/psr/http-client/src/NetworkExceptionInterface.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Psr\Http\Client;
4
+
5
+ use Psr\Http\Message\RequestInterface;
6
+
7
+ /**
8
+ * Thrown when the request cannot be completed because of network issues.
9
+ *
10
+ * There is no response object as this exception is thrown when no response has been received.
11
+ *
12
+ * Example: the target host name can not be resolved or the connection failed.
13
+ */
14
+ interface NetworkExceptionInterface extends ClientExceptionInterface
15
+ {
16
+ /**
17
+ * Returns the request.
18
+ *
19
+ * The request object MAY be a different object from the one passed to ClientInterface::sendRequest()
20
+ *
21
+ * @return RequestInterface
22
+ */
23
+ public function getRequest(): RequestInterface;
24
+ }
vendor/psr/http-client/src/RequestExceptionInterface.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Psr\Http\Client;
4
+
5
+ use Psr\Http\Message\RequestInterface;
6
+
7
+ /**
8
+ * Exception for when a request failed.
9
+ *
10
+ * Examples:
11
+ * - Request is invalid (e.g. method is missing)
12
+ * - Runtime request errors (e.g. the body stream is not seekable)
13
+ */
14
+ interface RequestExceptionInterface extends ClientExceptionInterface
15
+ {
16
+ /**
17
+ * Returns the request.
18
+ *
19
+ * The request object MAY be a different object from the one passed to ClientInterface::sendRequest()
20
+ *
21
+ * @return RequestInterface
22
+ */
23
+ public function getRequest(): RequestInterface;
24
+ }
vendor/symfony/polyfill-intl-idn/Idn.php DELETED
@@ -1,915 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com> and Trevor Rowbotham <trevor.rowbotham@pm.me>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Polyfill\Intl\Idn;
13
-
14
- use Exception;
15
- use Normalizer;
16
- use Symfony\Polyfill\Intl\Idn\Resources\unidata\DisallowedRanges;
17
- use Symfony\Polyfill\Intl\Idn\Resources\unidata\Regex;
18
-
19
- /**
20
- * @see https://www.unicode.org/reports/tr46/
21
- *
22
- * @internal
23
- */
24
- final class Idn
25
- {
26
- const ERROR_EMPTY_LABEL = 1;
27
- const ERROR_LABEL_TOO_LONG = 2;
28
- const ERROR_DOMAIN_NAME_TOO_LONG = 4;
29
- const ERROR_LEADING_HYPHEN = 8;
30
- const ERROR_TRAILING_HYPHEN = 0x10;
31
- const ERROR_HYPHEN_3_4 = 0x20;
32
- const ERROR_LEADING_COMBINING_MARK = 0x40;
33
- const ERROR_DISALLOWED = 0x80;
34
- const ERROR_PUNYCODE = 0x100;
35
- const ERROR_LABEL_HAS_DOT = 0x200;
36
- const ERROR_INVALID_ACE_LABEL = 0x400;
37
- const ERROR_BIDI = 0x800;
38
- const ERROR_CONTEXTJ = 0x1000;
39
- const ERROR_CONTEXTO_PUNCTUATION = 0x2000;
40
- const ERROR_CONTEXTO_DIGITS = 0x4000;
41
-
42
- const INTL_IDNA_VARIANT_2003 = 0;
43
- const INTL_IDNA_VARIANT_UTS46 = 1;
44
-
45
- const MAX_DOMAIN_SIZE = 253;
46
- const MAX_LABEL_SIZE = 63;
47
-
48
- const BASE = 36;
49
- const TMIN = 1;
50
- const TMAX = 26;
51
- const SKEW = 38;
52
- const DAMP = 700;
53
- const INITIAL_BIAS = 72;
54
- const INITIAL_N = 128;
55
- const DELIMITER = '-';
56
- const MAX_INT = 2147483647;
57
-
58
- /**
59
- * Contains the numeric value of a basic code point (for use in representing integers) in the
60
- * range 0 to BASE-1, or -1 if b is does not represent a value.
61
- *
62
- * @var array<int, int>
63
- */
64
- private static $basicToDigit = array(
65
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
66
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
67
-
68
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
69
- 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1,
70
-
71
- -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
72
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
73
-
74
- -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
75
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
76
-
77
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
78
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
79
-
80
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
81
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
82
-
83
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
84
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
85
-
86
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
87
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
88
- );
89
-
90
- /**
91
- * @var array<int, int>
92
- */
93
- private static $virama;
94
-
95
- /**
96
- * @var array<int, string>
97
- */
98
- private static $mapped;
99
-
100
- /**
101
- * @var array<int, bool>
102
- */
103
- private static $ignored;
104
-
105
- /**
106
- * @var array<int, string>
107
- */
108
- private static $deviation;
109
-
110
- /**
111
- * @var array<int, bool>
112
- */
113
- private static $disallowed;
114
-
115
- /**
116
- * @var array<int, string>
117
- */
118
- private static $disallowed_STD3_mapped;
119
-
120
- /**
121
- * @var array<int, bool>
122
- */
123
- private static $disallowed_STD3_valid;
124
-
125
- /**
126
- * @var bool
127
- */
128
- private static $mappingTableLoaded = false;
129
-
130
- /**
131
- * @see https://www.unicode.org/reports/tr46/#ToASCII
132
- *
133
- * @param string $domainName
134
- * @param int $options
135
- * @param int $variant
136
- * @param array $idna_info
137
- *
138
- * @return string|false
139
- */
140
- public static function idn_to_ascii($domainName, $options = IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = array())
141
- {
142
- if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) {
143
- @trigger_error('idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated', E_USER_DEPRECATED);
144
- }
145
-
146
- $options = array(
147
- 'CheckHyphens' => true,
148
- 'CheckBidi' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 !== ($options & \IDNA_CHECK_BIDI),
149
- 'CheckJoiners' => self::INTL_IDNA_VARIANT_UTS46 === $variant && 0 !== ($options & \IDNA_CHECK_CONTEXTJ),
150
- 'UseSTD3ASCIIRules' => 0 !== ($options & \IDNA_USE_STD3_RULES),
151
- 'Transitional_Processing' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 === ($options & \IDNA_NONTRANSITIONAL_TO_ASCII),
152
- 'VerifyDnsLength' => true,
153
- );
154
- $info = new Info();
155
- $labels = self::process((string) $domainName, $options, $info);
156
-
157
- foreach ($labels as $i => $label) {
158
- // Only convert labels to punycode that contain non-ASCII code points
159
- if (1 === preg_match('/[^\x00-\x7F]/', $label)) {
160
- try {
161
- $label = 'xn--'.self::punycodeEncode($label);
162
- } catch (Exception $e) {
163
- $info->errors |= self::ERROR_PUNYCODE;
164
- }
165
-
166
- $labels[$i] = $label;
167
- }
168
- }
169
-
170
- if ($options['VerifyDnsLength']) {
171
- self::validateDomainAndLabelLength($labels, $info);
172
- }
173
-
174
- $idna_info = array(
175
- 'result' => implode('.', $labels),
176
- 'isTransitionalDifferent' => $info->transitionalDifferent,
177
- 'errors' => $info->errors,
178
- );
179
-
180
- return 0 === $info->errors ? $idna_info['result'] : false;
181
- }
182
-
183
- /**
184
- * @see https://www.unicode.org/reports/tr46/#ToUnicode
185
- *
186
- * @param string $domainName
187
- * @param int $options
188
- * @param int $variant
189
- * @param array $idna_info
190
- *
191
- * @return string|false
192
- */
193
- public static function idn_to_utf8($domainName, $options = IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = array())
194
- {
195
- if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) {
196
- @trigger_error('idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated', E_USER_DEPRECATED);
197
- }
198
-
199
- $info = new Info();
200
- $labels = self::process((string) $domainName, array(
201
- 'CheckHyphens' => true,
202
- 'CheckBidi' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 !== ($options & \IDNA_CHECK_BIDI),
203
- 'CheckJoiners' => self::INTL_IDNA_VARIANT_UTS46 === $variant && 0 !== ($options & \IDNA_CHECK_CONTEXTJ),
204
- 'UseSTD3ASCIIRules' => 0 !== ($options & \IDNA_USE_STD3_RULES),
205
- 'Transitional_Processing' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 === ($options & \IDNA_NONTRANSITIONAL_TO_UNICODE),
206
- ), $info);
207
- $idna_info = array(
208
- 'result' => implode('.', $labels),
209
- 'isTransitionalDifferent' => $info->transitionalDifferent,
210
- 'errors' => $info->errors,
211
- );
212
-
213
- return 0 === $info->errors ? $idna_info['result'] : false;
214
- }
215
-
216
- /**
217
- * @param string $label
218
- *
219
- * @return bool
220
- */
221
- private static function isValidContextJ(array $codePoints, $label)
222
- {
223
- if (!isset(self::$virama)) {
224
- self::$virama = require __DIR__.\DIRECTORY_SEPARATOR.'Resources'.\DIRECTORY_SEPARATOR.'unidata'.\DIRECTORY_SEPARATOR.'virama.php';
225
- }
226
-
227
- $offset = 0;
228
-
229
- foreach ($codePoints as $i => $codePoint) {
230
- if (0x200C !== $codePoint && 0x200D !== $codePoint) {
231
- continue;
232
- }
233
-
234
- if (!isset($codePoints[$i - 1])) {
235
- return false;
236
- }
237
-
238
- // If Canonical_Combining_Class(Before(cp)) .eq. Virama Then True;
239
- if (isset(self::$virama[$codePoints[$i - 1]])) {
240
- continue;
241
- }
242
-
243
- // If RegExpMatch((Joining_Type:{L,D})(Joining_Type:T)*\u200C(Joining_Type:T)*(Joining_Type:{R,D})) Then
244
- // True;
245
- // Generated RegExp = ([Joining_Type:{L,D}][Joining_Type:T]*\u200C[Joining_Type:T]*)[Joining_Type:{R,D}]
246
- if (0x200C === $codePoint && 1 === preg_match(Regex::ZWNJ, $label, $matches, PREG_OFFSET_CAPTURE, $offset)) {
247
- $offset += \strlen($matches[1][0]);
248
-
249
- continue;
250
- }
251
-
252
- return false;
253
- }
254
-
255
- return true;
256
- }
257
-
258
- /**
259
- * @see https://www.unicode.org/reports/tr46/#ProcessingStepMap
260
- *
261
- * @param string $input
262
- * @param array<string, bool> $options
263
- *
264
- * @return string
265
- */
266
- private static function mapCodePoints($input, array $options, Info $info)
267
- {
268
- $str = '';
269
- $useSTD3ASCIIRules = $options['UseSTD3ASCIIRules'];
270
- $transitional = $options['Transitional_Processing'];
271
-
272
- foreach (self::utf8Decode($input) as $codePoint) {
273
- $data = self::lookupCodePointStatus($codePoint, $useSTD3ASCIIRules);
274
-
275
- switch ($data['status']) {
276
- case 'disallowed':
277
- $info->errors |= self::ERROR_DISALLOWED;
278
-
279
- // no break.
280
-
281
- case 'valid':
282
- $str .= mb_chr($codePoint, 'utf-8');
283
-
284
- break;
285
-
286
- case 'ignored':
287
- // Do nothing.
288
- break;
289
-
290
- case 'mapped':
291
- $str .= $data['mapping'];
292
-
293
- break;
294
-
295
- case 'deviation':
296
- $info->transitionalDifferent = true;
297
- $str .= ($transitional ? $data['mapping'] : mb_chr($codePoint, 'utf-8'));
298
-
299
- break;
300
- }
301
- }
302
-
303
- return $str;
304
- }
305
-
306
- /**
307
- * @see https://www.unicode.org/reports/tr46/#Processing
308
- *
309
- * @param string $domain
310
- * @param array<string, bool> $options
311
- *
312
- * @return array<int, string>
313
- */
314
- private static function process($domain, array $options, Info $info)
315
- {
316
- // If VerifyDnsLength is not set, we are doing ToUnicode otherwise we are doing ToASCII and
317
- // we need to respect the VerifyDnsLength option.
318
- $checkForEmptyLabels = !isset($options['VerifyDnsLength']) || $options['VerifyDnsLength'];
319
-
320
- if ($checkForEmptyLabels && '' === $domain) {
321
- $info->errors |= self::ERROR_EMPTY_LABEL;
322
-
323
- return array($domain);
324
- }
325
-
326
- // Step 1. Map each code point in the domain name string
327
- $domain = self::mapCodePoints($domain, $options, $info);
328
-
329
- // Step 2. Normalize the domain name string to Unicode Normalization Form C.
330
- if (!Normalizer::isNormalized($domain, Normalizer::FORM_C)) {
331
- $domain = Normalizer::normalize($domain, Normalizer::FORM_C);
332
- }
333
-
334
- // Step 3. Break the string into labels at U+002E (.) FULL STOP.
335
- $labels = explode('.', $domain);
336
- $lastLabelIndex = \count($labels) - 1;
337
-
338
- // Step 4. Convert and validate each label in the domain name string.
339
- foreach ($labels as $i => $label) {
340
- $validationOptions = $options;
341
-
342
- if ('xn--' === substr($label, 0, 4)) {
343
- try {
344
- $label = self::punycodeDecode(substr($label, 4));
345
- } catch (Exception $e) {
346
- $info->errors |= self::ERROR_PUNYCODE;
347
-
348
- continue;
349
- }
350
-
351
- $validationOptions['Transitional_Processing'] = false;
352
- $labels[$i] = $label;
353
- }
354
-
355
- self::validateLabel($label, $info, $validationOptions, $i > 0 && $i === $lastLabelIndex);
356
- }
357
-
358
- if ($info->bidiDomain && !$info->validBidiDomain) {
359
- $info->errors |= self::ERROR_BIDI;
360
- }
361
-
362
- // Any input domain name string that does not record an error has been successfully
363
- // processed according to this specification. Conversely, if an input domain_name string
364
- // causes an error, then the processing of the input domain_name string fails. Determining
365
- // what to do with error input is up to the caller, and not in the scope of this document.
366
- return $labels;
367
- }
368
-
369
- /**
370
- * @see https://tools.ietf.org/html/rfc5893#section-2
371
- *
372
- * @param string $label
373
- */
374
- private static function validateBidiLabel($label, Info $info)
375
- {
376
- if (1 === preg_match(Regex::RTL_LABEL, $label)) {
377
- $info->bidiDomain = true;
378
-
379
- // Step 1. The first character must be a character with Bidi property L, R, or AL.
380
- // If it has the R or AL property, it is an RTL label
381
- if (1 !== preg_match(Regex::BIDI_STEP_1_RTL, $label)) {
382
- $info->validBidiDomain = false;
383
-
384
- return;
385
- }
386
-
387
- // Step 2. In an RTL label, only characters with the Bidi properties R, AL, AN, EN, ES,
388
- // CS, ET, ON, BN, or NSM are allowed.
389
- if (1 === preg_match(Regex::BIDI_STEP_2, $label)) {
390
- $info->validBidiDomain = false;
391
-
392
- return;
393
- }
394
-
395
- // Step 3. In an RTL label, the end of the label must be a character with Bidi property
396
- // R, AL, EN, or AN, followed by zero or more characters with Bidi property NSM.
397
- if (1 !== preg_match(Regex::BIDI_STEP_3, $label)) {
398
- $info->validBidiDomain = false;
399
-
400
- return;
401
- }
402
-
403
- // Step 4. In an RTL label, if an EN is present, no AN may be present, and vice versa.
404
- if (1 === preg_match(Regex::BIDI_STEP_4_AN, $label) && 1 === preg_match(Regex::BIDI_STEP_4_EN, $label)) {
405
- $info->validBidiDomain = false;
406
-
407
- return;
408
- }
409
-
410
- return;
411
- }
412
-
413
- // We are a LTR label
414
- // Step 1. The first character must be a character with Bidi property L, R, or AL.
415
- // If it has the L property, it is an LTR label.
416
- if (1 !== preg_match(Regex::BIDI_STEP_1_LTR, $label)) {
417
- $info->validBidiDomain = false;
418
-
419
- return;
420
- }
421
-
422
- // Step 5. In an LTR label, only characters with the Bidi properties L, EN,
423
- // ES, CS, ET, ON, BN, or NSM are allowed.
424
- if (1 === preg_match(Regex::BIDI_STEP_5, $label)) {
425
- $info->validBidiDomain = false;
426
-
427
- return;
428
- }
429
-
430
- // Step 6.In an LTR label, the end of the label must be a character with Bidi property L or
431
- // EN, followed by zero or more characters with Bidi property NSM.
432
- if (1 !== preg_match(Regex::BIDI_STEP_6, $label)) {
433
- $info->validBidiDomain = false;
434
-
435
- return;
436
- }
437
- }
438
-
439
- /**
440
- * @param array<int, string> $labels
441
- */
442
- private static function validateDomainAndLabelLength(array $labels, Info $info)
443
- {
444
- $maxDomainSize = self::MAX_DOMAIN_SIZE;
445
- $length = \count($labels);
446
-
447
- // Number of "." delimiters.
448
- $domainLength = $length - 1;
449
-
450
- // If the last label is empty and it is not the first label, then it is the root label.
451
- // Increase the max size by 1, making it 254, to account for the root label's "."
452
- // delimiter. This also means we don't need to check the last label's length for being too
453
- // long.
454
- if ($length > 1 && '' === $labels[$length - 1]) {
455
- ++$maxDomainSize;
456
- --$length;
457
- }
458
-
459
- for ($i = 0; $i < $length; ++$i) {
460
- $bytes = \strlen($labels[$i]);
461
- $domainLength += $bytes;
462
-
463
- if ($bytes > self::MAX_LABEL_SIZE) {
464
- $info->errors |= self::ERROR_LABEL_TOO_LONG;
465
- }
466
- }
467
-
468
- if ($domainLength > $maxDomainSize) {
469
- $info->errors |= self::ERROR_DOMAIN_NAME_TOO_LONG;
470
- }
471
- }
472
-
473
- /**
474
- * @see https://www.unicode.org/reports/tr46/#Validity_Criteria
475
- *
476
- * @param string $label
477
- * @param array<string, bool> $options
478
- * @param bool $canBeEmpty
479
- */
480
- private static function validateLabel($label, Info $info, array $options, $canBeEmpty)
481
- {
482
- if ('' === $label) {
483
- if (!$canBeEmpty && (!isset($options['VerifyDnsLength']) || $options['VerifyDnsLength'])) {
484
- $info->errors |= self::ERROR_EMPTY_LABEL;
485
- }
486
-
487
- return;
488
- }
489
-
490
- // Step 1. The label must be in Unicode Normalization Form C.
491
- if (!Normalizer::isNormalized($label, Normalizer::FORM_C)) {
492
- $info->errors |= self::ERROR_INVALID_ACE_LABEL;
493
- }
494
-
495
- $codePoints = self::utf8Decode($label);
496
-
497
- if ($options['CheckHyphens']) {
498
- // Step 2. If CheckHyphens, the label must not contain a U+002D HYPHEN-MINUS character
499
- // in both the thrid and fourth positions.
500
- if (isset($codePoints[2], $codePoints[3]) && 0x002D === $codePoints[2] && 0x002D === $codePoints[3]) {
501
- $info->errors |= self::ERROR_HYPHEN_3_4;
502
- }
503
-
504
- // Step 3. If CheckHyphens, the label must neither begin nor end with a U+002D
505
- // HYPHEN-MINUS character.
506
- if ('-' === substr($label, 0, 1)) {
507
- $info->errors |= self::ERROR_LEADING_HYPHEN;
508
- }
509
-
510
- if ('-' === substr($label, -1, 1)) {
511
- $info->errors |= self::ERROR_TRAILING_HYPHEN;
512
- }
513
- }
514
-
515
- // Step 4. The label must not contain a U+002E (.) FULL STOP.
516
- if (false !== strpos($label, '.')) {
517
- $info->errors |= self::ERROR_LABEL_HAS_DOT;
518
- }
519
-
520
- // Step 5. The label must not begin with a combining mark, that is: General_Category=Mark.
521
- if (1 === preg_match(Regex::COMBINING_MARK, $label)) {
522
- $info->errors |= self::ERROR_LEADING_COMBINING_MARK;
523
- }
524
-
525
- // Step 6. Each code point in the label must only have certain status values according to
526
- // Section 5, IDNA Mapping Table:
527
- $transitional = $options['Transitional_Processing'];
528
- $useSTD3ASCIIRules = $options['UseSTD3ASCIIRules'];
529
-
530
- foreach ($codePoints as $codePoint) {
531
- $data = self::lookupCodePointStatus($codePoint, $useSTD3ASCIIRules);
532
- $status = $data['status'];
533
-
534
- if ('valid' === $status || (!$transitional && 'deviation' === $status)) {
535
- continue;
536
- }
537
-
538
- $info->errors |= self::ERROR_DISALLOWED;
539
-
540
- break;
541
- }
542
-
543
- // Step 7. If CheckJoiners, the label must satisify the ContextJ rules from Appendix A, in
544
- // The Unicode Code Points and Internationalized Domain Names for Applications (IDNA)
545
- // [IDNA2008].
546
- if ($options['CheckJoiners'] && !self::isValidContextJ($codePoints, $label)) {
547
- $info->errors |= self::ERROR_CONTEXTJ;
548
- }
549
-
550
- // Step 8. If CheckBidi, and if the domain name is a Bidi domain name, then the label must
551
- // satisfy all six of the numbered conditions in [IDNA2008] RFC 5893, Section 2.
552
- if ($options['CheckBidi'] && (!$info->bidiDomain || $info->validBidiDomain)) {
553
- self::validateBidiLabel($label, $info);
554
- }
555
- }
556
-
557
- /**
558
- * @see https://tools.ietf.org/html/rfc3492#section-6.2
559
- *
560
- * @param string $input
561
- *
562
- * @return string
563
- */
564
- private static function punycodeDecode($input)
565
- {
566
- $n = self::INITIAL_N;
567
- $out = 0;
568
- $i = 0;
569
- $bias = self::INITIAL_BIAS;
570
- $lastDelimIndex = strrpos($input, self::DELIMITER);
571
- $b = false === $lastDelimIndex ? 0 : $lastDelimIndex;
572
- $inputLength = \strlen($input);
573
- $output = array();
574
- $bytes = array_map('ord', str_split($input));
575
-
576
- for ($j = 0; $j < $b; ++$j) {
577
- if ($bytes[$j] > 0x7F) {
578
- throw new Exception('Invalid input');
579
- }
580
-
581
- $output[$out++] = $input[$j];
582
- }
583
-
584
- if ($b > 0) {
585
- ++$b;
586
- }
587
-
588
- for ($in = $b; $in < $inputLength; ++$out) {
589
- $oldi = $i;
590
- $w = 1;
591
-
592
- for ($k = self::BASE; /* no condition */; $k += self::BASE) {
593
- if ($in >= $inputLength) {
594
- throw new Exception('Invalid input');
595
- }
596
-
597
- $digit = self::$basicToDigit[$bytes[$in++] & 0xFF];
598
-
599
- if ($digit < 0) {
600
- throw new Exception('Invalid input');
601
- }
602
-
603
- if ($digit > intdiv(self::MAX_INT - $i, $w)) {
604
- throw new Exception('Integer overflow');
605
- }
606
-
607
- $i += $digit * $w;
608
-
609
- if ($k <= $bias) {
610
- $t = self::TMIN;
611
- } elseif ($k >= $bias + self::TMAX) {
612
- $t = self::TMAX;
613
- } else {
614
- $t = $k - $bias;
615
- }
616
-
617
- if ($digit < $t) {
618
- break;
619
- }
620
-
621
- $baseMinusT = self::BASE - $t;
622
-
623
- if ($w > intdiv(self::MAX_INT, $baseMinusT)) {
624
- throw new Exception('Integer overflow');
625
- }
626
-
627
- $w *= $baseMinusT;
628
- }
629
-
630
- $outPlusOne = $out + 1;
631
- $bias = self::adaptBias($i - $oldi, $outPlusOne, 0 === $oldi);
632
-
633
- if (intdiv($i, $outPlusOne) > self::MAX_INT - $n) {
634
- throw new Exception('Integer overflow');
635
- }
636
-
637
- $n += intdiv($i, $outPlusOne);
638
- $i %= $outPlusOne;
639
- array_splice($output, $i++, 0, array(mb_chr($n, 'utf-8')));
640
- }
641
-
642
- return implode('', $output);
643
- }
644
-
645
- /**
646
- * @see https://tools.ietf.org/html/rfc3492#section-6.3
647
- *
648
- * @param string $input
649
- *
650
- * @return string
651
- */
652
- private static function punycodeEncode($input)
653
- {
654
- $n = self::INITIAL_N;
655
- $delta = 0;
656
- $out = 0;
657
- $bias = self::INITIAL_BIAS;
658
- $inputLength = 0;
659
- $output = '';
660
- $iter = self::utf8Decode($input);
661
-
662
- foreach ($iter as $codePoint) {
663
- ++$inputLength;
664
-
665
- if ($codePoint < 0x80) {
666
- $output .= \chr($codePoint);
667
- ++$out;
668
- }
669
- }
670
-
671
- $h = $out;
672
- $b = $out;
673
-
674
- if ($b > 0) {
675
- $output .= self::DELIMITER;
676
- ++$out;
677
- }
678
-
679
- while ($h < $inputLength) {
680
- $m = self::MAX_INT;
681
-
682
- foreach ($iter as $codePoint) {
683
- if ($codePoint >= $n && $codePoint < $m) {
684
- $m = $codePoint;
685
- }
686
- }
687
-
688
- if ($m - $n > intdiv(self::MAX_INT - $delta, $h + 1)) {
689
- throw new Exception('Integer overflow');
690
- }
691
-
692
- $delta += ($m - $n) * ($h + 1);
693
- $n = $m;
694
-
695
- foreach ($iter as $codePoint) {
696
- if ($codePoint < $n && 0 === ++$delta) {
697
- throw new Exception('Integer overflow');
698
- } elseif ($codePoint === $n) {
699
- $q = $delta;
700
-
701
- for ($k = self::BASE; /* no condition */; $k += self::BASE) {
702
- if ($k <= $bias) {
703
- $t = self::TMIN;
704
- } elseif ($k >= $bias + self::TMAX) {
705
- $t = self::TMAX;
706
- } else {
707
- $t = $k - $bias;
708
- }
709
-
710
- if ($q < $t) {
711
- break;
712
- }
713
-
714
- $qMinusT = $q - $t;
715
- $baseMinusT = self::BASE - $t;
716
- $output .= self::encodeDigit($t + ($qMinusT) % ($baseMinusT), false);
717
- ++$out;
718
- $q = intdiv($qMinusT, $baseMinusT);
719
- }
720
-
721
- $output .= self::encodeDigit($q, false);
722
- ++$out;
723
- $bias = self::adaptBias($delta, $h + 1, $h === $b);
724
- $delta = 0;
725
- ++$h;
726
- }
727
- }
728
-
729
- ++$delta;
730
- ++$n;
731
- }
732
-
733
- return $output;
734
- }
735
-
736
- /**
737
- * @see https://tools.ietf.org/html/rfc3492#section-6.1
738
- *
739
- * @param int $delta
740
- * @param int $numPoints
741
- * @param bool $firstTime
742
- *
743
- * @return int
744
- */
745
- private static function adaptBias($delta, $numPoints, $firstTime)
746
- {
747
- // xxx >> 1 is a faster way of doing intdiv(xxx, 2)
748
- $delta = $firstTime ? intdiv($delta, self::DAMP) : $delta >> 1;
749
- $delta += intdiv($delta, $numPoints);
750
- $k = 0;
751
-
752
- while ($delta > ((self::BASE - self::TMIN) * self::TMAX) >> 1) {
753
- $delta = intdiv($delta, self::BASE - self::TMIN);
754
- $k += self::BASE;
755
- }
756
-
757
- return $k + intdiv((self::BASE - self::TMIN + 1) * $delta, $delta + self::SKEW);
758
- }
759
-
760
- /**
761
- * @param int $d
762
- * @param bool $flag
763
- *
764
- * @return string
765
- */
766
- private static function encodeDigit($d, $flag)
767
- {
768
- return \chr($d + 22 + 75 * ($d < 26 ? 1 : 0) - (($flag ? 1 : 0) << 5));
769
- }
770
-
771
- /**
772
- * Takes a UTF-8 encoded string and converts it into a series of integer code points. Any
773
- * invalid byte sequences will be replaced by a U+FFFD replacement code point.
774
- *
775
- * @see https://encoding.spec.whatwg.org/#utf-8-decoder
776
- *
777
- * @param string $input
778
- *
779
- * @return array<int, int>
780
- */
781
- private static function utf8Decode($input)
782
- {
783
- $bytesSeen = 0;
784
- $bytesNeeded = 0;
785
- $lowerBoundary = 0x80;
786
- $upperBoundary = 0xBF;
787
- $codePoint = 0;
788
- $codePoints = array();
789
- $length = \strlen($input);
790
-
791
- for ($i = 0; $i < $length; ++$i) {
792
- $byte = \ord($input[$i]);
793
-
794
- if (0 === $bytesNeeded) {
795
- if ($byte >= 0x00 && $byte <= 0x7F) {
796
- $codePoints[] = $byte;
797
-
798
- continue;
799
- }
800
-
801
- if ($byte >= 0xC2 && $byte <= 0xDF) {
802
- $bytesNeeded = 1;
803
- $codePoint = $byte & 0x1F;
804
- } elseif ($byte >= 0xE0 && $byte <= 0xEF) {
805
- if (0xE0 === $byte) {
806
- $lowerBoundary = 0xA0;
807
- } elseif (0xED === $byte) {
808
- $upperBoundary = 0x9F;
809
- }
810
-
811
- $bytesNeeded = 2;
812
- $codePoint = $byte & 0xF;
813
- } elseif ($byte >= 0xF0 && $byte <= 0xF4) {
814
- if (0xF0 === $byte) {
815
- $lowerBoundary = 0x90;
816
- } elseif (0xF4 === $byte) {
817
- $upperBoundary = 0x8F;
818
- }
819
-
820
- $bytesNeeded = 3;
821
- $codePoint = $byte & 0x7;
822
- } else {
823
- $codePoints[] = 0xFFFD;
824
- }
825
-
826
- continue;
827
- }
828
-
829
- if ($byte < $lowerBoundary || $byte > $upperBoundary) {
830
- $codePoint = 0;
831
- $bytesNeeded = 0;
832
- $bytesSeen = 0;
833
- $lowerBoundary = 0x80;
834
- $upperBoundary = 0xBF;
835
- --$i;
836
- $codePoints[] = 0xFFFD;
837
-
838
- continue;
839
- }
840
-
841
- $lowerBoundary = 0x80;
842
- $upperBoundary = 0xBF;
843
- $codePoint = ($codePoint << 6) | ($byte & 0x3F);
844
-
845
- if (++$bytesSeen !== $bytesNeeded) {
846
- continue;
847
- }
848
-
849
- $codePoints[] = $codePoint;
850
- $codePoint = 0;
851
- $bytesNeeded = 0;
852
- $bytesSeen = 0;
853
- }
854
-
855
- // String unexpectedly ended, so append a U+FFFD code point.
856
- if (0 !== $bytesNeeded) {
857
- $codePoints[] = 0xFFFD;
858
- }
859
-
860
- return $codePoints;
861
- }
862
-
863
- /**
864
- * @param int $codePoint
865
- * @param bool $useSTD3ASCIIRules
866
- *
867
- * @return array{status: string, mapping?: string}
868
- */
869
- private static function lookupCodePointStatus($codePoint, $useSTD3ASCIIRules)
870
- {
871
- if (!self::$mappingTableLoaded) {
872
- self::$mappingTableLoaded = true;
873
- self::$mapped = require __DIR__.'/Resources/unidata/mapped.php';
874
- self::$ignored = require __DIR__.'/Resources/unidata/ignored.php';
875
- self::$deviation = require __DIR__.'/Resources/unidata/deviation.php';
876
- self::$disallowed = require __DIR__.'/Resources/unidata/disallowed.php';
877
- self::$disallowed_STD3_mapped = require __DIR__.'/Resources/unidata/disallowed_STD3_mapped.php';
878
- self::$disallowed_STD3_valid = require __DIR__.'/Resources/unidata/disallowed_STD3_valid.php';
879
- }
880
-
881
- if (isset(self::$mapped[$codePoint])) {
882
- return array('status' => 'mapped', 'mapping' => self::$mapped[$codePoint]);
883
- }
884
-
885
- if (isset(self::$ignored[$codePoint])) {
886
- return array('status' => 'ignored');
887
- }
888
-
889
- if (isset(self::$deviation[$codePoint])) {
890
- return array('status' => 'deviation', 'mapping' => self::$deviation[$codePoint]);
891
- }
892
-
893
- if (isset(self::$disallowed[$codePoint]) || DisallowedRanges::inRange($codePoint)) {
894
- return array('status' => 'disallowed');
895
- }
896
-
897
- $isDisallowedMapped = isset(self::$disallowed_STD3_mapped[$codePoint]);
898
-
899
- if ($isDisallowedMapped || isset(self::$disallowed_STD3_valid[$codePoint])) {
900
- $status = 'disallowed';
901
-
902
- if (!$useSTD3ASCIIRules) {
903
- $status = $isDisallowedMapped ? 'mapped' : 'valid';
904
- }
905
-
906
- if ($isDisallowedMapped) {
907
- return array('status' => $status, 'mapping' => self::$disallowed_STD3_mapped[$codePoint]);
908
- }
909
-
910
- return array('status' => $status);
911
- }
912
-
913
- return array('status' => 'valid');
914
- }
915
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/polyfill-intl-idn/Info.php DELETED
@@ -1,23 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com> and Trevor Rowbotham <trevor.rowbotham@pm.me>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Polyfill\Intl\Idn;
13
-
14
- /**
15
- * @internal
16
- */
17
- class Info
18
- {
19
- public $bidiDomain = false;
20
- public $errors = 0;
21
- public $validBidiDomain = true;
22
- public $transitionalDifferent = false;
23
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/polyfill-intl-idn/LICENSE DELETED
@@ -1,19 +0,0 @@
1
- Copyright (c) 2018-2019 Fabien Potencier and Trevor Rowbotham <trevor.rowbotham@pm.me>
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to deal
5
- in the Software without restriction, including without limitation the rights
6
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- copies of the Software, and to permit persons to whom the Software is furnished
8
- to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in all
11
- copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- THE SOFTWARE.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/polyfill-intl-idn/README.md DELETED
@@ -1,12 +0,0 @@
1
- Symfony Polyfill / Intl: Idn
2
- ============================
3
-
4
- This component provides [`idn_to_ascii`](https://php.net/idn-to-ascii) and [`idn_to_utf8`](https://php.net/idn-to-utf8) functions to users who run php versions without the [Intl](https://php.net/intl) extension.
5
-
6
- More information can be found in the
7
- [main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
8
-
9
- License
10
- =======
11
-
12
- This library is released under the [MIT license](LICENSE).
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php DELETED
@@ -1,375 +0,0 @@
1
- <?php
2
-
3
- namespace Symfony\Polyfill\Intl\Idn\Resources\unidata;
4
-
5
- /**
6
- * @internal
7
- */
8
- final class DisallowedRanges
9
- {
10
- /**
11
- * @param int $codePoint
12
- *
13
- * @return bool
14
- */
15
- public static function inRange($codePoint)
16
- {
17
- if ($codePoint >= 128 && $codePoint <= 159) {
18
- return true;
19
- }
20
-
21
- if ($codePoint >= 2155 && $codePoint <= 2207) {
22
- return true;
23
- }
24
-
25
- if ($codePoint >= 3676 && $codePoint <= 3712) {
26
- return true;
27
- }
28
-
29
- if ($codePoint >= 3808 && $codePoint <= 3839) {
30
- return true;
31
- }
32
-
33
- if ($codePoint >= 4059 && $codePoint <= 4095) {
34
- return true;
35
- }
36
-
37
- if ($codePoint >= 4256 && $codePoint <= 4293) {
38
- return true;
39
- }
40
-
41
- if ($codePoint >= 6849 && $codePoint <= 6911) {
42
- return true;
43
- }
44
-
45
- if ($codePoint >= 11859 && $codePoint <= 11903) {
46
- return true;
47
- }
48
-
49
- if ($codePoint >= 42955 && $codePoint <= 42996) {
50
- return true;
51
- }
52
-
53
- if ($codePoint >= 55296 && $codePoint <= 57343) {
54
- return true;
55
- }
56
-
57
- if ($codePoint >= 57344 && $codePoint <= 63743) {
58
- return true;
59
- }
60
-
61
- if ($codePoint >= 64218 && $codePoint <= 64255) {
62
- return true;
63
- }
64
-
65
- if ($codePoint >= 64976 && $codePoint <= 65007) {
66
- return true;
67
- }
68
-
69
- if ($codePoint >= 65630 && $codePoint <= 65663) {
70
- return true;
71
- }
72
-
73
- if ($codePoint >= 65953 && $codePoint <= 65999) {
74
- return true;
75
- }
76
-
77
- if ($codePoint >= 66046 && $codePoint <= 66175) {
78
- return true;
79
- }
80
-
81
- if ($codePoint >= 66518 && $codePoint <= 66559) {
82
- return true;
83
- }
84
-
85
- if ($codePoint >= 66928 && $codePoint <= 67071) {
86
- return true;
87
- }
88
-
89
- if ($codePoint >= 67432 && $codePoint <= 67583) {
90
- return true;
91
- }
92
-
93
- if ($codePoint >= 67760 && $codePoint <= 67807) {
94
- return true;
95
- }
96
-
97
- if ($codePoint >= 67904 && $codePoint <= 67967) {
98
- return true;
99
- }
100
-
101
- if ($codePoint >= 68256 && $codePoint <= 68287) {
102
- return true;
103
- }
104
-
105
- if ($codePoint >= 68528 && $codePoint <= 68607) {
106
- return true;
107
- }
108
-
109
- if ($codePoint >= 68681 && $codePoint <= 68735) {
110
- return true;
111
- }
112
-
113
- if ($codePoint >= 68922 && $codePoint <= 69215) {
114
- return true;
115
- }
116
-
117
- if ($codePoint >= 69298 && $codePoint <= 69375) {
118
- return true;
119
- }
120
-
121
- if ($codePoint >= 69466 && $codePoint <= 69551) {
122
- return true;
123
- }
124
-
125
- if ($codePoint >= 70207 && $codePoint <= 70271) {
126
- return true;
127
- }
128
-
129
- if ($codePoint >= 70517 && $codePoint <= 70655) {
130
- return true;
131
- }
132
-
133
- if ($codePoint >= 70874 && $codePoint <= 71039) {
134
- return true;
135
- }
136
-
137
- if ($codePoint >= 71134 && $codePoint <= 71167) {
138
- return true;
139
- }
140
-
141
- if ($codePoint >= 71370 && $codePoint <= 71423) {
142
- return true;
143
- }
144
-
145
- if ($codePoint >= 71488 && $codePoint <= 71679) {
146
- return true;
147
- }
148
-
149
- if ($codePoint >= 71740 && $codePoint <= 71839) {
150
- return true;
151
- }
152
-
153
- if ($codePoint >= 72026 && $codePoint <= 72095) {
154
- return true;
155
- }
156
-
157
- if ($codePoint >= 72441 && $codePoint <= 72703) {
158
- return true;
159
- }
160
-
161
- if ($codePoint >= 72887 && $codePoint <= 72959) {
162
- return true;
163
- }
164
-
165
- if ($codePoint >= 73130 && $codePoint <= 73439) {
166
- return true;
167
- }
168
-
169
- if ($codePoint >= 73465 && $codePoint <= 73647) {
170
- return true;
171
- }
172
-
173
- if ($codePoint >= 74650 && $codePoint <= 74751) {
174
- return true;
175
- }
176
-
177
- if ($codePoint >= 75076 && $codePoint <= 77823) {
178
- return true;
179
- }
180
-
181
- if ($codePoint >= 78905 && $codePoint <= 82943) {
182
- return true;
183
- }
184
-
185
- if ($codePoint >= 83527 && $codePoint <= 92159) {
186
- return true;
187
- }
188
-
189
- if ($codePoint >= 92784 && $codePoint <= 92879) {
190
- return true;
191
- }
192
-
193
- if ($codePoint >= 93072 && $codePoint <= 93759) {
194
- return true;
195
- }
196
-
197
- if ($codePoint >= 93851 && $codePoint <= 93951) {
198
- return true;
199
- }
200
-
201
- if ($codePoint >= 94112 && $codePoint <= 94175) {
202
- return true;
203
- }
204
-
205
- if ($codePoint >= 101590 && $codePoint <= 101631) {
206
- return true;
207
- }
208
-
209
- if ($codePoint >= 101641 && $codePoint <= 110591) {
210
- return true;
211
- }
212
-
213
- if ($codePoint >= 110879 && $codePoint <= 110927) {
214
- return true;
215
- }
216
-
217
- if ($codePoint >= 111356 && $codePoint <= 113663) {
218
- return true;
219
- }
220
-
221
- if ($codePoint >= 113828 && $codePoint <= 118783) {
222
- return true;
223
- }
224
-
225
- if ($codePoint >= 119366 && $codePoint <= 119519) {
226
- return true;
227
- }
228
-
229
- if ($codePoint >= 119673 && $codePoint <= 119807) {
230
- return true;
231
- }
232
-
233
- if ($codePoint >= 121520 && $codePoint <= 122879) {
234
- return true;
235
- }
236
-
237
- if ($codePoint >= 122923 && $codePoint <= 123135) {
238
- return true;
239
- }
240
-
241
- if ($codePoint >= 123216 && $codePoint <= 123583) {
242
- return true;
243
- }
244
-
245
- if ($codePoint >= 123648 && $codePoint <= 124927) {
246
- return true;
247
- }
248
-
249
- if ($codePoint >= 125143 && $codePoint <= 125183) {
250
- return true;
251
- }
252
-
253
- if ($codePoint >= 125280 && $codePoint <= 126064) {
254
- return true;
255
- }
256
-
257
- if ($codePoint >= 126133 && $codePoint <= 126208) {
258
- return true;
259
- }
260
-
261
- if ($codePoint >= 126270 && $codePoint <= 126463) {
262
- return true;
263
- }
264
-
265
- if ($codePoint >= 126652 && $codePoint <= 126703) {
266
- return true;
267
- }
268
-
269
- if ($codePoint >= 126706 && $codePoint <= 126975) {
270
- return true;
271
- }
272
-
273
- if ($codePoint >= 127406 && $codePoint <= 127461) {
274
- return true;
275
- }
276
-
277
- if ($codePoint >= 127590 && $codePoint <= 127743) {
278
- return true;
279
- }
280
-
281
- if ($codePoint >= 129202 && $codePoint <= 129279) {
282
- return true;
283
- }
284
-
285
- if ($codePoint >= 129751 && $codePoint <= 129791) {
286
- return true;
287
- }
288
-
289
- if ($codePoint >= 129995 && $codePoint <= 130031) {
290
- return true;
291
- }
292
-
293
- if ($codePoint >= 130042 && $codePoint <= 131069) {
294
- return true;
295
- }
296
-
297
- if ($codePoint >= 173790 && $codePoint <= 173823) {
298
- return true;
299
- }
300
-
301
- if ($codePoint >= 191457 && $codePoint <= 194559) {
302
- return true;
303
- }
304
-
305
- if ($codePoint >= 195102 && $codePoint <= 196605) {
306
- return true;
307
- }
308
-
309
- if ($codePoint >= 201547 && $codePoint <= 262141) {
310
- return true;
311
- }
312
-
313
- if ($codePoint >= 262144 && $codePoint <= 327677) {
314
- return true;
315
- }
316
-
317
- if ($codePoint >= 327680 && $codePoint <= 393213) {
318
- return true;
319
- }
320
-
321
- if ($codePoint >= 393216 && $codePoint <= 458749) {
322
- return true;
323
- }
324
-
325
- if ($codePoint >= 458752 && $codePoint <= 524285) {
326
- return true;
327
- }
328
-
329
- if ($codePoint >= 524288 && $codePoint <= 589821) {
330
- return true;
331
- }
332
-
333
- if ($codePoint >= 589824 && $codePoint <= 655357) {
334
- return true;
335
- }
336
-
337
- if ($codePoint >= 655360 && $codePoint <= 720893) {
338
- return true;
339
- }
340
-
341
- if ($codePoint >= 720896 && $codePoint <= 786429) {
342
- return true;
343
- }
344
-
345
- if ($codePoint >= 786432 && $codePoint <= 851965) {
346
- return true;
347
- }
348
-
349
- if ($codePoint >= 851968 && $codePoint <= 917501) {
350
- return true;
351
- }
352
-
353
- if ($codePoint >= 917536 && $codePoint <= 917631) {
354
- return true;
355
- }
356
-
357
- if ($codePoint >= 917632 && $codePoint <= 917759) {
358
- return true;
359
- }
360
-
361
- if ($codePoint >= 918000 && $codePoint <= 983037) {
362
- return true;
363
- }
364
-
365
- if ($codePoint >= 983040 && $codePoint <= 1048573) {
366
- return true;
367
- }
368
-
369
- if ($codePoint >= 1048576 && $codePoint <= 1114109) {
370
- return true;
371
- }
372
-
373
- return false;
374
- }
375
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php DELETED
@@ -1,24 +0,0 @@
1
- <?php
2
-
3
- namespace Symfony\Polyfill\Intl\Idn\Resources\unidata;
4
-
5
- /**
6
- * @internal
7
- */
8
- final class Regex
9
- {
10
- const COMBINING_MARK = '/^[\x{0300}-\x{036F}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{0610}-\x{061A}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DF}-\x{06E4}\x{06E7}-\x{06E8}\x{06EA}-\x{06ED}\x{0711}\x{0730}-\x{074A}\x{07A6}-\x{07B0}\x{07EB}-\x{07F3}\x{07FD}\x{0816}-\x{0819}\x{081B}-\x{0823}\x{0825}-\x{0827}\x{0829}-\x{082D}\x{0859}-\x{085B}\x{08D3}-\x{08E1}\x{08E3}-\x{0902}\x{0903}\x{093A}\x{093B}\x{093C}\x{093E}-\x{0940}\x{0941}-\x{0948}\x{0949}-\x{094C}\x{094D}\x{094E}-\x{094F}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{0982}-\x{0983}\x{09BC}\x{09BE}-\x{09C0}\x{09C1}-\x{09C4}\x{09C7}-\x{09C8}\x{09CB}-\x{09CC}\x{09CD}\x{09D7}\x{09E2}-\x{09E3}\x{09FE}\x{0A01}-\x{0A02}\x{0A03}\x{0A3C}\x{0A3E}-\x{0A40}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0A83}\x{0ABC}\x{0ABE}-\x{0AC0}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0AC9}\x{0ACB}-\x{0ACC}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B02}-\x{0B03}\x{0B3C}\x{0B3E}\x{0B3F}\x{0B40}\x{0B41}-\x{0B44}\x{0B47}-\x{0B48}\x{0B4B}-\x{0B4C}\x{0B4D}\x{0B55}-\x{0B56}\x{0B57}\x{0B62}-\x{0B63}\x{0B82}\x{0BBE}-\x{0BBF}\x{0BC0}\x{0BC1}-\x{0BC2}\x{0BC6}-\x{0BC8}\x{0BCA}-\x{0BCC}\x{0BCD}\x{0BD7}\x{0C00}\x{0C01}-\x{0C03}\x{0C04}\x{0C3E}-\x{0C40}\x{0C41}-\x{0C44}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C81}\x{0C82}-\x{0C83}\x{0CBC}\x{0CBE}\x{0CBF}\x{0CC0}-\x{0CC4}\x{0CC6}\x{0CC7}-\x{0CC8}\x{0CCA}-\x{0CCB}\x{0CCC}-\x{0CCD}\x{0CD5}-\x{0CD6}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D02}-\x{0D03}\x{0D3B}-\x{0D3C}\x{0D3E}-\x{0D40}\x{0D41}-\x{0D44}\x{0D46}-\x{0D48}\x{0D4A}-\x{0D4C}\x{0D4D}\x{0D57}\x{0D62}-\x{0D63}\x{0D81}\x{0D82}-\x{0D83}\x{0DCA}\x{0DCF}-\x{0DD1}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0DD8}-\x{0DDF}\x{0DF2}-\x{0DF3}\x{0E31}\x{0E34}-\x{0E3A}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F3E}-\x{0F3F}\x{0F71}-\x{0F7E}\x{0F7F}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102B}-\x{102C}\x{102D}-\x{1030}\x{1031}\x{1032}-\x{1037}\x{1038}\x{1039}-\x{103A}\x{103B}-\x{103C}\x{103D}-\x{103E}\x{1056}-\x{1057}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1062}-\x{1064}\x{1067}-\x{106D}\x{1071}-\x{1074}\x{1082}\x{1083}-\x{1084}\x{1085}-\x{1086}\x{1087}-\x{108C}\x{108D}\x{108F}\x{109A}-\x{109C}\x{109D}\x{135D}-\x{135F}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B6}\x{17B7}-\x{17BD}\x{17BE}-\x{17C5}\x{17C6}\x{17C7}-\x{17C8}\x{17C9}-\x{17D3}\x{17DD}\x{180B}-\x{180D}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1923}-\x{1926}\x{1927}-\x{1928}\x{1929}-\x{192B}\x{1930}-\x{1931}\x{1932}\x{1933}-\x{1938}\x{1939}-\x{193B}\x{1A17}-\x{1A18}\x{1A19}-\x{1A1A}\x{1A1B}\x{1A55}\x{1A56}\x{1A57}\x{1A58}-\x{1A5E}\x{1A60}\x{1A61}\x{1A62}\x{1A63}-\x{1A64}\x{1A65}-\x{1A6C}\x{1A6D}-\x{1A72}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B04}\x{1B34}\x{1B35}\x{1B36}-\x{1B3A}\x{1B3B}\x{1B3C}\x{1B3D}-\x{1B41}\x{1B42}\x{1B43}-\x{1B44}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1B82}\x{1BA1}\x{1BA2}-\x{1BA5}\x{1BA6}-\x{1BA7}\x{1BA8}-\x{1BA9}\x{1BAA}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE7}\x{1BE8}-\x{1BE9}\x{1BEA}-\x{1BEC}\x{1BED}\x{1BEE}\x{1BEF}-\x{1BF1}\x{1BF2}-\x{1BF3}\x{1C24}-\x{1C2B}\x{1C2C}-\x{1C33}\x{1C34}-\x{1C35}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE1}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF7}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2CEF}-\x{2CF1}\x{2D7F}\x{2DE0}-\x{2DFF}\x{302A}-\x{302D}\x{302E}-\x{302F}\x{3099}-\x{309A}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A802}\x{A806}\x{A80B}\x{A823}-\x{A824}\x{A825}-\x{A826}\x{A827}\x{A82C}\x{A880}-\x{A881}\x{A8B4}-\x{A8C3}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A952}-\x{A953}\x{A980}-\x{A982}\x{A983}\x{A9B3}\x{A9B4}-\x{A9B5}\x{A9B6}-\x{A9B9}\x{A9BA}-\x{A9BB}\x{A9BC}-\x{A9BD}\x{A9BE}-\x{A9C0}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA2F}-\x{AA30}\x{AA31}-\x{AA32}\x{AA33}-\x{AA34}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA4D}\x{AA7B}\x{AA7C}\x{AA7D}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEB}\x{AAEC}-\x{AAED}\x{AAEE}-\x{AAEF}\x{AAF5}\x{AAF6}\x{ABE3}-\x{ABE4}\x{ABE5}\x{ABE6}-\x{ABE7}\x{ABE8}\x{ABE9}-\x{ABEA}\x{ABEC}\x{ABED}\x{FB1E}\x{FE00}-\x{FE0F}\x{FE20}-\x{FE2F}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10A01}-\x{10A03}\x{10A05}-\x{10A06}\x{10A0C}-\x{10A0F}\x{10A38}-\x{10A3A}\x{10A3F}\x{10AE5}-\x{10AE6}\x{10D24}-\x{10D27}\x{10EAB}-\x{10EAC}\x{10F46}-\x{10F50}\x{11000}\x{11001}\x{11002}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{11082}\x{110B0}-\x{110B2}\x{110B3}-\x{110B6}\x{110B7}-\x{110B8}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112C}\x{1112D}-\x{11134}\x{11145}-\x{11146}\x{11173}\x{11180}-\x{11181}\x{11182}\x{111B3}-\x{111B5}\x{111B6}-\x{111BE}\x{111BF}-\x{111C0}\x{111C9}-\x{111CC}\x{111CE}\x{111CF}\x{1122C}-\x{1122E}\x{1122F}-\x{11231}\x{11232}-\x{11233}\x{11234}\x{11235}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E0}-\x{112E2}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{11302}-\x{11303}\x{1133B}-\x{1133C}\x{1133E}-\x{1133F}\x{11340}\x{11341}-\x{11344}\x{11347}-\x{11348}\x{1134B}-\x{1134D}\x{11357}\x{11362}-\x{11363}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11435}-\x{11437}\x{11438}-\x{1143F}\x{11440}-\x{11441}\x{11442}-\x{11444}\x{11445}\x{11446}\x{1145E}\x{114B0}-\x{114B2}\x{114B3}-\x{114B8}\x{114B9}\x{114BA}\x{114BB}-\x{114BE}\x{114BF}-\x{114C0}\x{114C1}\x{114C2}-\x{114C3}\x{115AF}-\x{115B1}\x{115B2}-\x{115B5}\x{115B8}-\x{115BB}\x{115BC}-\x{115BD}\x{115BE}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11630}-\x{11632}\x{11633}-\x{1163A}\x{1163B}-\x{1163C}\x{1163D}\x{1163E}\x{1163F}-\x{11640}\x{116AB}\x{116AC}\x{116AD}\x{116AE}-\x{116AF}\x{116B0}-\x{116B5}\x{116B6}\x{116B7}\x{1171D}-\x{1171F}\x{11720}-\x{11721}\x{11722}-\x{11725}\x{11726}\x{11727}-\x{1172B}\x{1182C}-\x{1182E}\x{1182F}-\x{11837}\x{11838}\x{11839}-\x{1183A}\x{11930}-\x{11935}\x{11937}-\x{11938}\x{1193B}-\x{1193C}\x{1193D}\x{1193E}\x{11940}\x{11942}\x{11943}\x{119D1}-\x{119D3}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119DC}-\x{119DF}\x{119E0}\x{119E4}\x{11A01}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A39}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A57}-\x{11A58}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A97}\x{11A98}-\x{11A99}\x{11C2F}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C3E}\x{11C3F}\x{11C92}-\x{11CA7}\x{11CA9}\x{11CAA}-\x{11CB0}\x{11CB1}\x{11CB2}-\x{11CB3}\x{11CB4}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D8A}-\x{11D8E}\x{11D90}-\x{11D91}\x{11D93}-\x{11D94}\x{11D95}\x{11D96}\x{11D97}\x{11EF3}-\x{11EF4}\x{11EF5}-\x{11EF6}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F51}-\x{16F87}\x{16F8F}-\x{16F92}\x{16FE4}\x{16FF0}-\x{16FF1}\x{1BC9D}-\x{1BC9E}\x{1D165}-\x{1D166}\x{1D167}-\x{1D169}\x{1D16D}-\x{1D172}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D242}-\x{1D244}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{E0100}-\x{E01EF}]/u';
11
-
12
- const RTL_LABEL = '/[\x{0590}\x{05BE}\x{05C0}\x{05C3}\x{05C6}\x{05C8}-\x{05CF}\x{05D0}-\x{05EA}\x{05EB}-\x{05EE}\x{05EF}-\x{05F2}\x{05F3}-\x{05F4}\x{05F5}-\x{05FF}\x{0600}-\x{0605}\x{0608}\x{060B}\x{060D}\x{061B}\x{061C}\x{061D}\x{061E}-\x{061F}\x{0620}-\x{063F}\x{0640}\x{0641}-\x{064A}\x{0660}-\x{0669}\x{066B}-\x{066C}\x{066D}\x{066E}-\x{066F}\x{0671}-\x{06D3}\x{06D4}\x{06D5}\x{06DD}\x{06E5}-\x{06E6}\x{06EE}-\x{06EF}\x{06FA}-\x{06FC}\x{06FD}-\x{06FE}\x{06FF}\x{0700}-\x{070D}\x{070E}\x{070F}\x{0710}\x{0712}-\x{072F}\x{074B}-\x{074C}\x{074D}-\x{07A5}\x{07B1}\x{07B2}-\x{07BF}\x{07C0}-\x{07C9}\x{07CA}-\x{07EA}\x{07F4}-\x{07F5}\x{07FA}\x{07FB}-\x{07FC}\x{07FE}-\x{07FF}\x{0800}-\x{0815}\x{081A}\x{0824}\x{0828}\x{082E}-\x{082F}\x{0830}-\x{083E}\x{083F}\x{0840}-\x{0858}\x{085C}-\x{085D}\x{085E}\x{085F}\x{0860}-\x{086A}\x{086B}-\x{086F}\x{0870}-\x{089F}\x{08A0}-\x{08B4}\x{08B5}\x{08B6}-\x{08C7}\x{08C8}-\x{08D2}\x{08E2}\x{200F}\x{FB1D}\x{FB1F}-\x{FB28}\x{FB2A}-\x{FB36}\x{FB37}\x{FB38}-\x{FB3C}\x{FB3D}\x{FB3E}\x{FB3F}\x{FB40}-\x{FB41}\x{FB42}\x{FB43}-\x{FB44}\x{FB45}\x{FB46}-\x{FB4F}\x{FB50}-\x{FBB1}\x{FBB2}-\x{FBC1}\x{FBC2}-\x{FBD2}\x{FBD3}-\x{FD3D}\x{FD40}-\x{FD4F}\x{FD50}-\x{FD8F}\x{FD90}-\x{FD91}\x{FD92}-\x{FDC7}\x{FDC8}-\x{FDCF}\x{FDF0}-\x{FDFB}\x{FDFC}\x{FDFE}-\x{FDFF}\x{FE70}-\x{FE74}\x{FE75}\x{FE76}-\x{FEFC}\x{FEFD}-\x{FEFE}\x{10800}-\x{10805}\x{10806}-\x{10807}\x{10808}\x{10809}\x{1080A}-\x{10835}\x{10836}\x{10837}-\x{10838}\x{10839}-\x{1083B}\x{1083C}\x{1083D}-\x{1083E}\x{1083F}-\x{10855}\x{10856}\x{10857}\x{10858}-\x{1085F}\x{10860}-\x{10876}\x{10877}-\x{10878}\x{10879}-\x{1087F}\x{10880}-\x{1089E}\x{1089F}-\x{108A6}\x{108A7}-\x{108AF}\x{108B0}-\x{108DF}\x{108E0}-\x{108F2}\x{108F3}\x{108F4}-\x{108F5}\x{108F6}-\x{108FA}\x{108FB}-\x{108FF}\x{10900}-\x{10915}\x{10916}-\x{1091B}\x{1091C}-\x{1091E}\x{10920}-\x{10939}\x{1093A}-\x{1093E}\x{1093F}\x{10940}-\x{1097F}\x{10980}-\x{109B7}\x{109B8}-\x{109BB}\x{109BC}-\x{109BD}\x{109BE}-\x{109BF}\x{109C0}-\x{109CF}\x{109D0}-\x{109D1}\x{109D2}-\x{109FF}\x{10A00}\x{10A04}\x{10A07}-\x{10A0B}\x{10A10}-\x{10A13}\x{10A14}\x{10A15}-\x{10A17}\x{10A18}\x{10A19}-\x{10A35}\x{10A36}-\x{10A37}\x{10A3B}-\x{10A3E}\x{10A40}-\x{10A48}\x{10A49}-\x{10A4F}\x{10A50}-\x{10A58}\x{10A59}-\x{10A5F}\x{10A60}-\x{10A7C}\x{10A7D}-\x{10A7E}\x{10A7F}\x{10A80}-\x{10A9C}\x{10A9D}-\x{10A9F}\x{10AA0}-\x{10ABF}\x{10AC0}-\x{10AC7}\x{10AC8}\x{10AC9}-\x{10AE4}\x{10AE7}-\x{10AEA}\x{10AEB}-\x{10AEF}\x{10AF0}-\x{10AF6}\x{10AF7}-\x{10AFF}\x{10B00}-\x{10B35}\x{10B36}-\x{10B38}\x{10B40}-\x{10B55}\x{10B56}-\x{10B57}\x{10B58}-\x{10B5F}\x{10B60}-\x{10B72}\x{10B73}-\x{10B77}\x{10B78}-\x{10B7F}\x{10B80}-\x{10B91}\x{10B92}-\x{10B98}\x{10B99}-\x{10B9C}\x{10B9D}-\x{10BA8}\x{10BA9}-\x{10BAF}\x{10BB0}-\x{10BFF}\x{10C00}-\x{10C48}\x{10C49}-\x{10C7F}\x{10C80}-\x{10CB2}\x{10CB3}-\x{10CBF}\x{10CC0}-\x{10CF2}\x{10CF3}-\x{10CF9}\x{10CFA}-\x{10CFF}\x{10D00}-\x{10D23}\x{10D28}-\x{10D2F}\x{10D30}-\x{10D39}\x{10D3A}-\x{10D3F}\x{10D40}-\x{10E5F}\x{10E60}-\x{10E7E}\x{10E7F}\x{10E80}-\x{10EA9}\x{10EAA}\x{10EAD}\x{10EAE}-\x{10EAF}\x{10EB0}-\x{10EB1}\x{10EB2}-\x{10EFF}\x{10F00}-\x{10F1C}\x{10F1D}-\x{10F26}\x{10F27}\x{10F28}-\x{10F2F}\x{10F30}-\x{10F45}\x{10F51}-\x{10F54}\x{10F55}-\x{10F59}\x{10F5A}-\x{10F6F}\x{10F70}-\x{10FAF}\x{10FB0}-\x{10FC4}\x{10FC5}-\x{10FCB}\x{10FCC}-\x{10FDF}\x{10FE0}-\x{10FF6}\x{10FF7}-\x{10FFF}\x{1E800}-\x{1E8C4}\x{1E8C5}-\x{1E8C6}\x{1E8C7}-\x{1E8CF}\x{1E8D7}-\x{1E8FF}\x{1E900}-\x{1E943}\x{1E94B}\x{1E94C}-\x{1E94F}\x{1E950}-\x{1E959}\x{1E95A}-\x{1E95D}\x{1E95E}-\x{1E95F}\x{1E960}-\x{1EC6F}\x{1EC70}\x{1EC71}-\x{1ECAB}\x{1ECAC}\x{1ECAD}-\x{1ECAF}\x{1ECB0}\x{1ECB1}-\x{1ECB4}\x{1ECB5}-\x{1ECBF}\x{1ECC0}-\x{1ECFF}\x{1ED00}\x{1ED01}-\x{1ED2D}\x{1ED2E}\x{1ED2F}-\x{1ED3D}\x{1ED3E}-\x{1ED4F}\x{1ED50}-\x{1EDFF}\x{1EE00}-\x{1EE03}\x{1EE04}\x{1EE05}-\x{1EE1F}\x{1EE20}\x{1EE21}-\x{1EE22}\x{1EE23}\x{1EE24}\x{1EE25}-\x{1EE26}\x{1EE27}\x{1EE28}\x{1EE29}-\x{1EE32}\x{1EE33}\x{1EE34}-\x{1EE37}\x{1EE38}\x{1EE39}\x{1EE3A}\x{1EE3B}\x{1EE3C}-\x{1EE41}\x{1EE42}\x{1EE43}-\x{1EE46}\x{1EE47}\x{1EE48}\x{1EE49}\x{1EE4A}\x{1EE4B}\x{1EE4C}\x{1EE4D}-\x{1EE4F}\x{1EE50}\x{1EE51}-\x{1EE52}\x{1EE53}\x{1EE54}\x{1EE55}-\x{1EE56}\x{1EE57}\x{1EE58}\x{1EE59}\x{1EE5A}\x{1EE5B}\x{1EE5C}\x{1EE5D}\x{1EE5E}\x{1EE5F}\x{1EE60}\x{1EE61}-\x{1EE62}\x{1EE63}\x{1EE64}\x{1EE65}-\x{1EE66}\x{1EE67}-\x{1EE6A}\x{1EE6B}\x{1EE6C}-\x{1EE72}\x{1EE73}\x{1EE74}-\x{1EE77}\x{1EE78}\x{1EE79}-\x{1EE7C}\x{1EE7D}\x{1EE7E}\x{1EE7F}\x{1EE80}-\x{1EE89}\x{1EE8A}\x{1EE8B}-\x{1EE9B}\x{1EE9C}-\x{1EEA0}\x{1EEA1}-\x{1EEA3}\x{1EEA4}\x{1EEA5}-\x{1EEA9}\x{1EEAA}\x{1EEAB}-\x{1EEBB}\x{1EEBC}-\x{1EEEF}\x{1EEF2}-\x{1EEFF}\x{1EF00}-\x{1EFFF}]/u';
13
-
14
- const BIDI_STEP_1_LTR = '/^[^\x{0000}-\x{0008}\x{0009}\x{000A}\x{000B}\x{000C}\x{000D}\x{000E}-\x{001B}\x{001C}-\x{001E}\x{001F}\x{0020}\x{0021}-\x{0022}\x{0023}\x{0024}\x{0025}\x{0026}-\x{0027}\x{0028}\x{0029}\x{002A}\x{002B}\x{002C}\x{002D}\x{002E}-\x{002F}\x{0030}-\x{0039}\x{003A}\x{003B}\x{003C}-\x{003E}\x{003F}-\x{0040}\x{005B}\x{005C}\x{005D}\x{005E}\x{005F}\x{0060}\x{007B}\x{007C}\x{007D}\x{007E}\x{007F}-\x{0084}\x{0085}\x{0086}-\x{009F}\x{00A0}\x{00A1}\x{00A2}-\x{00A5}\x{00A6}\x{00A7}\x{00A8}\x{00A9}\x{00AB}\x{00AC}\x{00AD}\x{00AE}\x{00AF}\x{00B0}\x{00B1}\x{00B2}-\x{00B3}\x{00B4}\x{00B6}-\x{00B7}\x{00B8}\x{00B9}\x{00BB}\x{00BC}-\x{00BE}\x{00BF}\x{00D7}\x{00F7}\x{02B9}-\x{02BA}\x{02C2}-\x{02C5}\x{02C6}-\x{02CF}\x{02D2}-\x{02DF}\x{02E5}-\x{02EB}\x{02EC}\x{02ED}\x{02EF}-\x{02FF}\x{0300}-\x{036F}\x{0374}\x{0375}\x{037E}\x{0384}-\x{0385}\x{0387}\x{03F6}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{058A}\x{058D}-\x{058E}\x{058F}\x{0590}\x{0591}-\x{05BD}\x{05BE}\x{05BF}\x{05C0}\x{05C1}-\x{05C2}\x{05C3}\x{05C4}-\x{05C5}\x{05C6}\x{05C7}\x{05C8}-\x{05CF}\x{05D0}-\x{05EA}\x{05EB}-\x{05EE}\x{05EF}-\x{05F2}\x{05F3}-\x{05F4}\x{05F5}-\x{05FF}\x{0600}-\x{0605}\x{0606}-\x{0607}\x{0608}\x{0609}-\x{060A}\x{060B}\x{060C}\x{060D}\x{060E}-\x{060F}\x{0610}-\x{061A}\x{061B}\x{061C}\x{061D}\x{061E}-\x{061F}\x{0620}-\x{063F}\x{0640}\x{0641}-\x{064A}\x{064B}-\x{065F}\x{0660}-\x{0669}\x{066A}\x{066B}-\x{066C}\x{066D}\x{066E}-\x{066F}\x{0670}\x{0671}-\x{06D3}\x{06D4}\x{06D5}\x{06D6}-\x{06DC}\x{06DD}\x{06DE}\x{06DF}-\x{06E4}\x{06E5}-\x{06E6}\x{06E7}-\x{06E8}\x{06E9}\x{06EA}-\x{06ED}\x{06EE}-\x{06EF}\x{06F0}-\x{06F9}\x{06FA}-\x{06FC}\x{06FD}-\x{06FE}\x{06FF}\x{0700}-\x{070D}\x{070E}\x{070F}\x{0710}\x{0711}\x{0712}-\x{072F}\x{0730}-\x{074A}\x{074B}-\x{074C}\x{074D}-\x{07A5}\x{07A6}-\x{07B0}\x{07B1}\x{07B2}-\x{07BF}\x{07C0}-\x{07C9}\x{07CA}-\x{07EA}\x{07EB}-\x{07F3}\x{07F4}-\x{07F5}\x{07F6}\x{07F7}-\x{07F9}\x{07FA}\x{07FB}-\x{07FC}\x{07FD}\x{07FE}-\x{07FF}\x{0800}-\x{0815}\x{0816}-\x{0819}\x{081A}\x{081B}-\x{0823}\x{0824}\x{0825}-\x{0827}\x{0828}\x{0829}-\x{082D}\x{082E}-\x{082F}\x{0830}-\x{083E}\x{083F}\x{0840}-\x{0858}\x{0859}-\x{085B}\x{085C}-\x{085D}\x{085E}\x{085F}\x{0860}-\x{086A}\x{086B}-\x{086F}\x{0870}-\x{089F}\x{08A0}-\x{08B4}\x{08B5}\x{08B6}-\x{08C7}\x{08C8}-\x{08D2}\x{08D3}-\x{08E1}\x{08E2}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09F2}-\x{09F3}\x{09FB}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AF1}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B55}-\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0BF3}-\x{0BF8}\x{0BF9}\x{0BFA}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C78}-\x{0C7E}\x{0C81}\x{0CBC}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0D81}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E3F}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F3A}\x{0F3B}\x{0F3C}\x{0F3D}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{135D}-\x{135F}\x{1390}-\x{1399}\x{1400}\x{1680}\x{169B}\x{169C}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17DB}\x{17DD}\x{17F0}-\x{17F9}\x{1800}-\x{1805}\x{1806}\x{1807}-\x{180A}\x{180B}-\x{180D}\x{180E}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1940}\x{1944}-\x{1945}\x{19DE}-\x{19FF}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{1FBD}\x{1FBF}-\x{1FC1}\x{1FCD}-\x{1FCF}\x{1FDD}-\x{1FDF}\x{1FED}-\x{1FEF}\x{1FFD}-\x{1FFE}\x{2000}-\x{200A}\x{200B}-\x{200D}\x{200F}\x{2010}-\x{2015}\x{2016}-\x{2017}\x{2018}\x{2019}\x{201A}\x{201B}-\x{201C}\x{201D}\x{201E}\x{201F}\x{2020}-\x{2027}\x{2028}\x{2029}\x{202A}\x{202B}\x{202C}\x{202D}\x{202E}\x{202F}\x{2030}-\x{2034}\x{2035}-\x{2038}\x{2039}\x{203A}\x{203B}-\x{203E}\x{203F}-\x{2040}\x{2041}-\x{2043}\x{2044}\x{2045}\x{2046}\x{2047}-\x{2051}\x{2052}\x{2053}\x{2054}\x{2055}-\x{205E}\x{205F}\x{2060}-\x{2064}\x{2065}\x{2066}\x{2067}\x{2068}\x{2069}\x{206A}-\x{206F}\x{2070}\x{2074}-\x{2079}\x{207A}-\x{207B}\x{207C}\x{207D}\x{207E}\x{2080}-\x{2089}\x{208A}-\x{208B}\x{208C}\x{208D}\x{208E}\x{20A0}-\x{20BF}\x{20C0}-\x{20CF}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2100}-\x{2101}\x{2103}-\x{2106}\x{2108}-\x{2109}\x{2114}\x{2116}-\x{2117}\x{2118}\x{211E}-\x{2123}\x{2125}\x{2127}\x{2129}\x{212E}\x{213A}-\x{213B}\x{2140}-\x{2144}\x{214A}\x{214B}\x{214C}-\x{214D}\x{2150}-\x{215F}\x{2189}\x{218A}-\x{218B}\x{2190}-\x{2194}\x{2195}-\x{2199}\x{219A}-\x{219B}\x{219C}-\x{219F}\x{21A0}\x{21A1}-\x{21A2}\x{21A3}\x{21A4}-\x{21A5}\x{21A6}\x{21A7}-\x{21AD}\x{21AE}\x{21AF}-\x{21CD}\x{21CE}-\x{21CF}\x{21D0}-\x{21D1}\x{21D2}\x{21D3}\x{21D4}\x{21D5}-\x{21F3}\x{21F4}-\x{2211}\x{2212}\x{2213}\x{2214}-\x{22FF}\x{2300}-\x{2307}\x{2308}\x{2309}\x{230A}\x{230B}\x{230C}-\x{231F}\x{2320}-\x{2321}\x{2322}-\x{2328}\x{2329}\x{232A}\x{232B}-\x{2335}\x{237B}\x{237C}\x{237D}-\x{2394}\x{2396}-\x{239A}\x{239B}-\x{23B3}\x{23B4}-\x{23DB}\x{23DC}-\x{23E1}\x{23E2}-\x{2426}\x{2440}-\x{244A}\x{2460}-\x{2487}\x{2488}-\x{249B}\x{24EA}-\x{24FF}\x{2500}-\x{25B6}\x{25B7}\x{25B8}-\x{25C0}\x{25C1}\x{25C2}-\x{25F7}\x{25F8}-\x{25FF}\x{2600}-\x{266E}\x{266F}\x{2670}-\x{26AB}\x{26AD}-\x{2767}\x{2768}\x{2769}\x{276A}\x{276B}\x{276C}\x{276D}\x{276E}\x{276F}\x{2770}\x{2771}\x{2772}\x{2773}\x{2774}\x{2775}\x{2776}-\x{2793}\x{2794}-\x{27BF}\x{27C0}-\x{27C4}\x{27C5}\x{27C6}\x{27C7}-\x{27E5}\x{27E6}\x{27E7}\x{27E8}\x{27E9}\x{27EA}\x{27EB}\x{27EC}\x{27ED}\x{27EE}\x{27EF}\x{27F0}-\x{27FF}\x{2900}-\x{2982}\x{2983}\x{2984}\x{2985}\x{2986}\x{2987}\x{2988}\x{2989}\x{298A}\x{298B}\x{298C}\x{298D}\x{298E}\x{298F}\x{2990}\x{2991}\x{2992}\x{2993}\x{2994}\x{2995}\x{2996}\x{2997}\x{2998}\x{2999}-\x{29D7}\x{29D8}\x{29D9}\x{29DA}\x{29DB}\x{29DC}-\x{29FB}\x{29FC}\x{29FD}\x{29FE}-\x{2AFF}\x{2B00}-\x{2B2F}\x{2B30}-\x{2B44}\x{2B45}-\x{2B46}\x{2B47}-\x{2B4C}\x{2B4D}-\x{2B73}\x{2B76}-\x{2B95}\x{2B97}-\x{2BFF}\x{2CE5}-\x{2CEA}\x{2CEF}-\x{2CF1}\x{2CF9}-\x{2CFC}\x{2CFD}\x{2CFE}-\x{2CFF}\x{2D7F}\x{2DE0}-\x{2DFF}\x{2E00}-\x{2E01}\x{2E02}\x{2E03}\x{2E04}\x{2E05}\x{2E06}-\x{2E08}\x{2E09}\x{2E0A}\x{2E0B}\x{2E0C}\x{2E0D}\x{2E0E}-\x{2E16}\x{2E17}\x{2E18}-\x{2E19}\x{2E1A}\x{2E1B}\x{2E1C}\x{2E1D}\x{2E1E}-\x{2E1F}\x{2E20}\x{2E21}\x{2E22}\x{2E23}\x{2E24}\x{2E25}\x{2E26}\x{2E27}\x{2E28}\x{2E29}\x{2E2A}-\x{2E2E}\x{2E2F}\x{2E30}-\x{2E39}\x{2E3A}-\x{2E3B}\x{2E3C}-\x{2E3F}\x{2E40}\x{2E41}\x{2E42}\x{2E43}-\x{2E4F}\x{2E50}-\x{2E51}\x{2E52}\x{2E80}-\x{2E99}\x{2E9B}-\x{2EF3}\x{2F00}-\x{2FD5}\x{2FF0}-\x{2FFB}\x{3000}\x{3001}-\x{3003}\x{3004}\x{3008}\x{3009}\x{300A}\x{300B}\x{300C}\x{300D}\x{300E}\x{300F}\x{3010}\x{3011}\x{3012}-\x{3013}\x{3014}\x{3015}\x{3016}\x{3017}\x{3018}\x{3019}\x{301A}\x{301B}\x{301C}\x{301D}\x{301E}-\x{301F}\x{3020}\x{302A}-\x{302D}\x{3030}\x{3036}-\x{3037}\x{303D}\x{303E}-\x{303F}\x{3099}-\x{309A}\x{309B}-\x{309C}\x{30A0}\x{30FB}\x{31C0}-\x{31E3}\x{321D}-\x{321E}\x{3250}\x{3251}-\x{325F}\x{327C}-\x{327E}\x{32B1}-\x{32BF}\x{32CC}-\x{32CF}\x{3377}-\x{337A}\x{33DE}-\x{33DF}\x{33FF}\x{4DC0}-\x{4DFF}\x{A490}-\x{A4C6}\x{A60D}-\x{A60F}\x{A66F}\x{A670}-\x{A672}\x{A673}\x{A674}-\x{A67D}\x{A67E}\x{A67F}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A700}-\x{A716}\x{A717}-\x{A71F}\x{A720}-\x{A721}\x{A788}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A828}-\x{A82B}\x{A82C}\x{A838}\x{A839}\x{A874}-\x{A877}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}-\x{A9BD}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEC}-\x{AAED}\x{AAF6}\x{AB6A}-\x{AB6B}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1D}\x{FB1E}\x{FB1F}-\x{FB28}\x{FB29}\x{FB2A}-\x{FB36}\x{FB37}\x{FB38}-\x{FB3C}\x{FB3D}\x{FB3E}\x{FB3F}\x{FB40}-\x{FB41}\x{FB42}\x{FB43}-\x{FB44}\x{FB45}\x{FB46}-\x{FB4F}\x{FB50}-\x{FBB1}\x{FBB2}-\x{FBC1}\x{FBC2}-\x{FBD2}\x{FBD3}-\x{FD3D}\x{FD3E}\x{FD3F}\x{FD40}-\x{FD4F}\x{FD50}-\x{FD8F}\x{FD90}-\x{FD91}\x{FD92}-\x{FDC7}\x{FDC8}-\x{FDCF}\x{FDD0}-\x{FDEF}\x{FDF0}-\x{FDFB}\x{FDFC}\x{FDFD}\x{FDFE}-\x{FDFF}\x{FE00}-\x{FE0F}\x{FE10}-\x{FE16}\x{FE17}\x{FE18}\x{FE19}\x{FE20}-\x{FE2F}\x{FE30}\x{FE31}-\x{FE32}\x{FE33}-\x{FE34}\x{FE35}\x{FE36}\x{FE37}\x{FE38}\x{FE39}\x{FE3A}\x{FE3B}\x{FE3C}\x{FE3D}\x{FE3E}\x{FE3F}\x{FE40}\x{FE41}\x{FE42}\x{FE43}\x{FE44}\x{FE45}-\x{FE46}\x{FE47}\x{FE48}\x{FE49}-\x{FE4C}\x{FE4D}-\x{FE4F}\x{FE50}\x{FE51}\x{FE52}\x{FE54}\x{FE55}\x{FE56}-\x{FE57}\x{FE58}\x{FE59}\x{FE5A}\x{FE5B}\x{FE5C}\x{FE5D}\x{FE5E}\x{FE5F}\x{FE60}-\x{FE61}\x{FE62}\x{FE63}\x{FE64}-\x{FE66}\x{FE68}\x{FE69}\x{FE6A}\x{FE6B}\x{FE70}-\x{FE74}\x{FE75}\x{FE76}-\x{FEFC}\x{FEFD}-\x{FEFE}\x{FEFF}\x{FF01}-\x{FF02}\x{FF03}\x{FF04}\x{FF05}\x{FF06}-\x{FF07}\x{FF08}\x{FF09}\x{FF0A}\x{FF0B}\x{FF0C}\x{FF0D}\x{FF0E}-\x{FF0F}\x{FF10}-\x{FF19}\x{FF1A}\x{FF1B}\x{FF1C}-\x{FF1E}\x{FF1F}-\x{FF20}\x{FF3B}\x{FF3C}\x{FF3D}\x{FF3E}\x{FF3F}\x{FF40}\x{FF5B}\x{FF5C}\x{FF5D}\x{FF5E}\x{FF5F}\x{FF60}\x{FF61}\x{FF62}\x{FF63}\x{FF64}-\x{FF65}\x{FFE0}-\x{FFE1}\x{FFE2}\x{FFE3}\x{FFE4}\x{FFE5}-\x{FFE6}\x{FFE8}\x{FFE9}-\x{FFEC}\x{FFED}-\x{FFEE}\x{FFF0}-\x{FFF8}\x{FFF9}-\x{FFFB}\x{FFFC}-\x{FFFD}\x{FFFE}-\x{FFFF}\x{10101}\x{10140}-\x{10174}\x{10175}-\x{10178}\x{10179}-\x{10189}\x{1018A}-\x{1018B}\x{1018C}\x{10190}-\x{1019C}\x{101A0}\x{101FD}\x{102E0}\x{102E1}-\x{102FB}\x{10376}-\x{1037A}\x{10800}-\x{10805}\x{10806}-\x{10807}\x{10808}\x{10809}\x{1080A}-\x{10835}\x{10836}\x{10837}-\x{10838}\x{10839}-\x{1083B}\x{1083C}\x{1083D}-\x{1083E}\x{1083F}-\x{10855}\x{10856}\x{10857}\x{10858}-\x{1085F}\x{10860}-\x{10876}\x{10877}-\x{10878}\x{10879}-\x{1087F}\x{10880}-\x{1089E}\x{1089F}-\x{108A6}\x{108A7}-\x{108AF}\x{108B0}-\x{108DF}\x{108E0}-\x{108F2}\x{108F3}\x{108F4}-\x{108F5}\x{108F6}-\x{108FA}\x{108FB}-\x{108FF}\x{10900}-\x{10915}\x{10916}-\x{1091B}\x{1091C}-\x{1091E}\x{1091F}\x{10920}-\x{10939}\x{1093A}-\x{1093E}\x{1093F}\x{10940}-\x{1097F}\x{10980}-\x{109B7}\x{109B8}-\x{109BB}\x{109BC}-\x{109BD}\x{109BE}-\x{109BF}\x{109C0}-\x{109CF}\x{109D0}-\x{109D1}\x{109D2}-\x{109FF}\x{10A00}\x{10A01}-\x{10A03}\x{10A04}\x{10A05}-\x{10A06}\x{10A07}-\x{10A0B}\x{10A0C}-\x{10A0F}\x{10A10}-\x{10A13}\x{10A14}\x{10A15}-\x{10A17}\x{10A18}\x{10A19}-\x{10A35}\x{10A36}-\x{10A37}\x{10A38}-\x{10A3A}\x{10A3B}-\x{10A3E}\x{10A3F}\x{10A40}-\x{10A48}\x{10A49}-\x{10A4F}\x{10A50}-\x{10A58}\x{10A59}-\x{10A5F}\x{10A60}-\x{10A7C}\x{10A7D}-\x{10A7E}\x{10A7F}\x{10A80}-\x{10A9C}\x{10A9D}-\x{10A9F}\x{10AA0}-\x{10ABF}\x{10AC0}-\x{10AC7}\x{10AC8}\x{10AC9}-\x{10AE4}\x{10AE5}-\x{10AE6}\x{10AE7}-\x{10AEA}\x{10AEB}-\x{10AEF}\x{10AF0}-\x{10AF6}\x{10AF7}-\x{10AFF}\x{10B00}-\x{10B35}\x{10B36}-\x{10B38}\x{10B39}-\x{10B3F}\x{10B40}-\x{10B55}\x{10B56}-\x{10B57}\x{10B58}-\x{10B5F}\x{10B60}-\x{10B72}\x{10B73}-\x{10B77}\x{10B78}-\x{10B7F}\x{10B80}-\x{10B91}\x{10B92}-\x{10B98}\x{10B99}-\x{10B9C}\x{10B9D}-\x{10BA8}\x{10BA9}-\x{10BAF}\x{10BB0}-\x{10BFF}\x{10C00}-\x{10C48}\x{10C49}-\x{10C7F}\x{10C80}-\x{10CB2}\x{10CB3}-\x{10CBF}\x{10CC0}-\x{10CF2}\x{10CF3}-\x{10CF9}\x{10CFA}-\x{10CFF}\x{10D00}-\x{10D23}\x{10D24}-\x{10D27}\x{10D28}-\x{10D2F}\x{10D30}-\x{10D39}\x{10D3A}-\x{10D3F}\x{10D40}-\x{10E5F}\x{10E60}-\x{10E7E}\x{10E7F}\x{10E80}-\x{10EA9}\x{10EAA}\x{10EAB}-\x{10EAC}\x{10EAD}\x{10EAE}-\x{10EAF}\x{10EB0}-\x{10EB1}\x{10EB2}-\x{10EFF}\x{10F00}-\x{10F1C}\x{10F1D}-\x{10F26}\x{10F27}\x{10F28}-\x{10F2F}\x{10F30}-\x{10F45}\x{10F46}-\x{10F50}\x{10F51}-\x{10F54}\x{10F55}-\x{10F59}\x{10F5A}-\x{10F6F}\x{10F70}-\x{10FAF}\x{10FB0}-\x{10FC4}\x{10FC5}-\x{10FCB}\x{10FCC}-\x{10FDF}\x{10FE0}-\x{10FF6}\x{10FF7}-\x{10FFF}\x{11001}\x{11038}-\x{11046}\x{11052}-\x{11065}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{111CF}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{11660}-\x{1166C}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{1193B}-\x{1193C}\x{1193E}\x{11943}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119E0}\x{11A01}-\x{11A06}\x{11A09}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{11FD5}-\x{11FDC}\x{11FDD}-\x{11FE0}\x{11FE1}-\x{11FF1}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F8F}-\x{16F92}\x{16FE2}\x{16FE4}\x{1BC9D}-\x{1BC9E}\x{1BCA0}-\x{1BCA3}\x{1D167}-\x{1D169}\x{1D173}-\x{1D17A}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D200}-\x{1D241}\x{1D242}-\x{1D244}\x{1D245}\x{1D300}-\x{1D356}\x{1D6DB}\x{1D715}\x{1D74F}\x{1D789}\x{1D7C3}\x{1D7CE}-\x{1D7FF}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E2FF}\x{1E800}-\x{1E8C4}\x{1E8C5}-\x{1E8C6}\x{1E8C7}-\x{1E8CF}\x{1E8D0}-\x{1E8D6}\x{1E8D7}-\x{1E8FF}\x{1E900}-\x{1E943}\x{1E944}-\x{1E94A}\x{1E94B}\x{1E94C}-\x{1E94F}\x{1E950}-\x{1E959}\x{1E95A}-\x{1E95D}\x{1E95E}-\x{1E95F}\x{1E960}-\x{1EC6F}\x{1EC70}\x{1EC71}-\x{1ECAB}\x{1ECAC}\x{1ECAD}-\x{1ECAF}\x{1ECB0}\x{1ECB1}-\x{1ECB4}\x{1ECB5}-\x{1ECBF}\x{1ECC0}-\x{1ECFF}\x{1ED00}\x{1ED01}-\x{1ED2D}\x{1ED2E}\x{1ED2F}-\x{1ED3D}\x{1ED3E}-\x{1ED4F}\x{1ED50}-\x{1EDFF}\x{1EE00}-\x{1EE03}\x{1EE04}\x{1EE05}-\x{1EE1F}\x{1EE20}\x{1EE21}-\x{1EE22}\x{1EE23}\x{1EE24}\x{1EE25}-\x{1EE26}\x{1EE27}\x{1EE28}\x{1EE29}-\x{1EE32}\x{1EE33}\x{1EE34}-\x{1EE37}\x{1EE38}\x{1EE39}\x{1EE3A}\x{1EE3B}\x{1EE3C}-\x{1EE41}\x{1EE42}\x{1EE43}-\x{1EE46}\x{1EE47}\x{1EE48}\x{1EE49}\x{1EE4A}\x{1EE4B}\x{1EE4C}\x{1EE4D}-\x{1EE4F}\x{1EE50}\x{1EE51}-\x{1EE52}\x{1EE53}\x{1EE54}\x{1EE55}-\x{1EE56}\x{1EE57}\x{1EE58}\x{1EE59}\x{1EE5A}\x{1EE5B}\x{1EE5C}\x{1EE5D}\x{1EE5E}\x{1EE5F}\x{1EE60}\x{1EE61}-\x{1EE62}\x{1EE63}\x{1EE64}\x{1EE65}-\x{1EE66}\x{1EE67}-\x{1EE6A}\x{1EE6B}\x{1EE6C}-\x{1EE72}\x{1EE73}\x{1EE74}-\x{1EE77}\x{1EE78}\x{1EE79}-\x{1EE7C}\x{1EE7D}\x{1EE7E}\x{1EE7F}\x{1EE80}-\x{1EE89}\x{1EE8A}\x{1EE8B}-\x{1EE9B}\x{1EE9C}-\x{1EEA0}\x{1EEA1}-\x{1EEA3}\x{1EEA4}\x{1EEA5}-\x{1EEA9}\x{1EEAA}\x{1EEAB}-\x{1EEBB}\x{1EEBC}-\x{1EEEF}\x{1EEF0}-\x{1EEF1}\x{1EEF2}-\x{1EEFF}\x{1EF00}-\x{1EFFF}\x{1F000}-\x{1F02B}\x{1F030}-\x{1F093}\x{1F0A0}-\x{1F0AE}\x{1F0B1}-\x{1F0BF}\x{1F0C1}-\x{1F0CF}\x{1F0D1}-\x{1F0F5}\x{1F100}-\x{1F10A}\x{1F10B}-\x{1F10C}\x{1F10D}-\x{1F10F}\x{1F12F}\x{1F16A}-\x{1F16F}\x{1F1AD}\x{1F260}-\x{1F265}\x{1F300}-\x{1F3FA}\x{1F3FB}-\x{1F3FF}\x{1F400}-\x{1F6D7}\x{1F6E0}-\x{1F6EC}\x{1F6F0}-\x{1F6FC}\x{1F700}-\x{1F773}\x{1F780}-\x{1F7D8}\x{1F7E0}-\x{1F7EB}\x{1F800}-\x{1F80B}\x{1F810}-\x{1F847}\x{1F850}-\x{1F859}\x{1F860}-\x{1F887}\x{1F890}-\x{1F8AD}\x{1F8B0}-\x{1F8B1}\x{1F900}-\x{1F978}\x{1F97A}-\x{1F9CB}\x{1F9CD}-\x{1FA53}\x{1FA60}-\x{1FA6D}\x{1FA70}-\x{1FA74}\x{1FA78}-\x{1FA7A}\x{1FA80}-\x{1FA86}\x{1FA90}-\x{1FAA8}\x{1FAB0}-\x{1FAB6}\x{1FAC0}-\x{1FAC2}\x{1FAD0}-\x{1FAD6}\x{1FB00}-\x{1FB92}\x{1FB94}-\x{1FBCA}\x{1FBF0}-\x{1FBF9}\x{1FFFE}-\x{1FFFF}\x{2FFFE}-\x{2FFFF}\x{3FFFE}-\x{3FFFF}\x{4FFFE}-\x{4FFFF}\x{5FFFE}-\x{5FFFF}\x{6FFFE}-\x{6FFFF}\x{7FFFE}-\x{7FFFF}\x{8FFFE}-\x{8FFFF}\x{9FFFE}-\x{9FFFF}\x{AFFFE}-\x{AFFFF}\x{BFFFE}-\x{BFFFF}\x{CFFFE}-\x{CFFFF}\x{DFFFE}-\x{E0000}\x{E0001}\x{E0002}-\x{E001F}\x{E0020}-\x{E007F}\x{E0080}-\x{E00FF}\x{E0100}-\x{E01EF}\x{E01F0}-\x{E0FFF}\x{EFFFE}-\x{EFFFF}\x{FFFFE}-\x{FFFFF}\x{10FFFE}-\x{10FFFF}]/u';
15
- const BIDI_STEP_1_RTL = '/^[\x{0590}\x{05BE}\x{05C0}\x{05C3}\x{05C6}\x{05C8}-\x{05CF}\x{05D0}-\x{05EA}\x{05EB}-\x{05EE}\x{05EF}-\x{05F2}\x{05F3}-\x{05F4}\x{05F5}-\x{05FF}\x{0608}\x{060B}\x{060D}\x{061B}\x{061C}\x{061D}\x{061E}-\x{061F}\x{0620}-\x{063F}\x{0640}\x{0641}-\x{064A}\x{066D}\x{066E}-\x{066F}\x{0671}-\x{06D3}\x{06D4}\x{06D5}\x{06E5}-\x{06E6}\x{06EE}-\x{06EF}\x{06FA}-\x{06FC}\x{06FD}-\x{06FE}\x{06FF}\x{0700}-\x{070D}\x{070E}\x{070F}\x{0710}\x{0712}-\x{072F}\x{074B}-\x{074C}\x{074D}-\x{07A5}\x{07B1}\x{07B2}-\x{07BF}\x{07C0}-\x{07C9}\x{07CA}-\x{07EA}\x{07F4}-\x{07F5}\x{07FA}\x{07FB}-\x{07FC}\x{07FE}-\x{07FF}\x{0800}-\x{0815}\x{081A}\x{0824}\x{0828}\x{082E}-\x{082F}\x{0830}-\x{083E}\x{083F}\x{0840}-\x{0858}\x{085C}-\x{085D}\x{085E}\x{085F}\x{0860}-\x{086A}\x{086B}-\x{086F}\x{0870}-\x{089F}\x{08A0}-\x{08B4}\x{08B5}\x{08B6}-\x{08C7}\x{08C8}-\x{08D2}\x{200F}\x{FB1D}\x{FB1F}-\x{FB28}\x{FB2A}-\x{FB36}\x{FB37}\x{FB38}-\x{FB3C}\x{FB3D}\x{FB3E}\x{FB3F}\x{FB40}-\x{FB41}\x{FB42}\x{FB43}-\x{FB44}\x{FB45}\x{FB46}-\x{FB4F}\x{FB50}-\x{FBB1}\x{FBB2}-\x{FBC1}\x{FBC2}-\x{FBD2}\x{FBD3}-\x{FD3D}\x{FD40}-\x{FD4F}\x{FD50}-\x{FD8F}\x{FD90}-\x{FD91}\x{FD92}-\x{FDC7}\x{FDC8}-\x{FDCF}\x{FDF0}-\x{FDFB}\x{FDFC}\x{FDFE}-\x{FDFF}\x{FE70}-\x{FE74}\x{FE75}\x{FE76}-\x{FEFC}\x{FEFD}-\x{FEFE}\x{10800}-\x{10805}\x{10806}-\x{10807}\x{10808}\x{10809}\x{1080A}-\x{10835}\x{10836}\x{10837}-\x{10838}\x{10839}-\x{1083B}\x{1083C}\x{1083D}-\x{1083E}\x{1083F}-\x{10855}\x{10856}\x{10857}\x{10858}-\x{1085F}\x{10860}-\x{10876}\x{10877}-\x{10878}\x{10879}-\x{1087F}\x{10880}-\x{1089E}\x{1089F}-\x{108A6}\x{108A7}-\x{108AF}\x{108B0}-\x{108DF}\x{108E0}-\x{108F2}\x{108F3}\x{108F4}-\x{108F5}\x{108F6}-\x{108FA}\x{108FB}-\x{108FF}\x{10900}-\x{10915}\x{10916}-\x{1091B}\x{1091C}-\x{1091E}\x{10920}-\x{10939}\x{1093A}-\x{1093E}\x{1093F}\x{10940}-\x{1097F}\x{10980}-\x{109B7}\x{109B8}-\x{109BB}\x{109BC}-\x{109BD}\x{109BE}-\x{109BF}\x{109C0}-\x{109CF}\x{109D0}-\x{109D1}\x{109D2}-\x{109FF}\x{10A00}\x{10A04}\x{10A07}-\x{10A0B}\x{10A10}-\x{10A13}\x{10A14}\x{10A15}-\x{10A17}\x{10A18}\x{10A19}-\x{10A35}\x{10A36}-\x{10A37}\x{10A3B}-\x{10A3E}\x{10A40}-\x{10A48}\x{10A49}-\x{10A4F}\x{10A50}-\x{10A58}\x{10A59}-\x{10A5F}\x{10A60}-\x{10A7C}\x{10A7D}-\x{10A7E}\x{10A7F}\x{10A80}-\x{10A9C}\x{10A9D}-\x{10A9F}\x{10AA0}-\x{10ABF}\x{10AC0}-\x{10AC7}\x{10AC8}\x{10AC9}-\x{10AE4}\x{10AE7}-\x{10AEA}\x{10AEB}-\x{10AEF}\x{10AF0}-\x{10AF6}\x{10AF7}-\x{10AFF}\x{10B00}-\x{10B35}\x{10B36}-\x{10B38}\x{10B40}-\x{10B55}\x{10B56}-\x{10B57}\x{10B58}-\x{10B5F}\x{10B60}-\x{10B72}\x{10B73}-\x{10B77}\x{10B78}-\x{10B7F}\x{10B80}-\x{10B91}\x{10B92}-\x{10B98}\x{10B99}-\x{10B9C}\x{10B9D}-\x{10BA8}\x{10BA9}-\x{10BAF}\x{10BB0}-\x{10BFF}\x{10C00}-\x{10C48}\x{10C49}-\x{10C7F}\x{10C80}-\x{10CB2}\x{10CB3}-\x{10CBF}\x{10CC0}-\x{10CF2}\x{10CF3}-\x{10CF9}\x{10CFA}-\x{10CFF}\x{10D00}-\x{10D23}\x{10D28}-\x{10D2F}\x{10D3A}-\x{10D3F}\x{10D40}-\x{10E5F}\x{10E7F}\x{10E80}-\x{10EA9}\x{10EAA}\x{10EAD}\x{10EAE}-\x{10EAF}\x{10EB0}-\x{10EB1}\x{10EB2}-\x{10EFF}\x{10F00}-\x{10F1C}\x{10F1D}-\x{10F26}\x{10F27}\x{10F28}-\x{10F2F}\x{10F30}-\x{10F45}\x{10F51}-\x{10F54}\x{10F55}-\x{10F59}\x{10F5A}-\x{10F6F}\x{10F70}-\x{10FAF}\x{10FB0}-\x{10FC4}\x{10FC5}-\x{10FCB}\x{10FCC}-\x{10FDF}\x{10FE0}-\x{10FF6}\x{10FF7}-\x{10FFF}\x{1E800}-\x{1E8C4}\x{1E8C5}-\x{1E8C6}\x{1E8C7}-\x{1E8CF}\x{1E8D7}-\x{1E8FF}\x{1E900}-\x{1E943}\x{1E94B}\x{1E94C}-\x{1E94F}\x{1E950}-\x{1E959}\x{1E95A}-\x{1E95D}\x{1E95E}-\x{1E95F}\x{1E960}-\x{1EC6F}\x{1EC70}\x{1EC71}-\x{1ECAB}\x{1ECAC}\x{1ECAD}-\x{1ECAF}\x{1ECB0}\x{1ECB1}-\x{1ECB4}\x{1ECB5}-\x{1ECBF}\x{1ECC0}-\x{1ECFF}\x{1ED00}\x{1ED01}-\x{1ED2D}\x{1ED2E}\x{1ED2F}-\x{1ED3D}\x{1ED3E}-\x{1ED4F}\x{1ED50}-\x{1EDFF}\x{1EE00}-\x{1EE03}\x{1EE04}\x{1EE05}-\x{1EE1F}\x{1EE20}\x{1EE21}-\x{1EE22}\x{1EE23}\x{1EE24}\x{1EE25}-\x{1EE26}\x{1EE27}\x{1EE28}\x{1EE29}-\x{1EE32}\x{1EE33}\x{1EE34}-\x{1EE37}\x{1EE38}\x{1EE39}\x{1EE3A}\x{1EE3B}\x{1EE3C}-\x{1EE41}\x{1EE42}\x{1EE43}-\x{1EE46}\x{1EE47}\x{1EE48}\x{1EE49}\x{1EE4A}\x{1EE4B}\x{1EE4C}\x{1EE4D}-\x{1EE4F}\x{1EE50}\x{1EE51}-\x{1EE52}\x{1EE53}\x{1EE54}\x{1EE55}-\x{1EE56}\x{1EE57}\x{1EE58}\x{1EE59}\x{1EE5A}\x{1EE5B}\x{1EE5C}\x{1EE5D}\x{1EE5E}\x{1EE5F}\x{1EE60}\x{1EE61}-\x{1EE62}\x{1EE63}\x{1EE64}\x{1EE65}-\x{1EE66}\x{1EE67}-\x{1EE6A}\x{1EE6B}\x{1EE6C}-\x{1EE72}\x{1EE73}\x{1EE74}-\x{1EE77}\x{1EE78}\x{1EE79}-\x{1EE7C}\x{1EE7D}\x{1EE7E}\x{1EE7F}\x{1EE80}-\x{1EE89}\x{1EE8A}\x{1EE8B}-\x{1EE9B}\x{1EE9C}-\x{1EEA0}\x{1EEA1}-\x{1EEA3}\x{1EEA4}\x{1EEA5}-\x{1EEA9}\x{1EEAA}\x{1EEAB}-\x{1EEBB}\x{1EEBC}-\x{1EEEF}\x{1EEF2}-\x{1EEFF}\x{1EF00}-\x{1EFFF}]/u';
16
- const BIDI_STEP_2 = '/[^\x{0000}-\x{0008}\x{000E}-\x{001B}\x{0021}-\x{0022}\x{0023}\x{0024}\x{0025}\x{0026}-\x{0027}\x{0028}\x{0029}\x{002A}\x{002B}\x{002C}\x{002D}\x{002E}-\x{002F}\x{0030}-\x{0039}\x{003A}\x{003B}\x{003C}-\x{003E}\x{003F}-\x{0040}\x{005B}\x{005C}\x{005D}\x{005E}\x{005F}\x{0060}\x{007B}\x{007C}\x{007D}\x{007E}\x{007F}-\x{0084}\x{0086}-\x{009F}\x{00A0}\x{00A1}\x{00A2}-\x{00A5}\x{00A6}\x{00A7}\x{00A8}\x{00A9}\x{00AB}\x{00AC}\x{00AD}\x{00AE}\x{00AF}\x{00B0}\x{00B1}\x{00B2}-\x{00B3}\x{00B4}\x{00B6}-\x{00B7}\x{00B8}\x{00B9}\x{00BB}\x{00BC}-\x{00BE}\x{00BF}\x{00D7}\x{00F7}\x{02B9}-\x{02BA}\x{02C2}-\x{02C5}\x{02C6}-\x{02CF}\x{02D2}-\x{02DF}\x{02E5}-\x{02EB}\x{02EC}\x{02ED}\x{02EF}-\x{02FF}\x{0300}-\x{036F}\x{0374}\x{0375}\x{037E}\x{0384}-\x{0385}\x{0387}\x{03F6}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{058A}\x{058D}-\x{058E}\x{058F}\x{0590}\x{0591}-\x{05BD}\x{05BE}\x{05BF}\x{05C0}\x{05C1}-\x{05C2}\x{05C3}\x{05C4}-\x{05C5}\x{05C6}\x{05C7}\x{05C8}-\x{05CF}\x{05D0}-\x{05EA}\x{05EB}-\x{05EE}\x{05EF}-\x{05F2}\x{05F3}-\x{05F4}\x{05F5}-\x{05FF}\x{0600}-\x{0605}\x{0606}-\x{0607}\x{0608}\x{0609}-\x{060A}\x{060B}\x{060C}\x{060D}\x{060E}-\x{060F}\x{0610}-\x{061A}\x{061B}\x{061C}\x{061D}\x{061E}-\x{061F}\x{0620}-\x{063F}\x{0640}\x{0641}-\x{064A}\x{064B}-\x{065F}\x{0660}-\x{0669}\x{066A}\x{066B}-\x{066C}\x{066D}\x{066E}-\x{066F}\x{0670}\x{0671}-\x{06D3}\x{06D4}\x{06D5}\x{06D6}-\x{06DC}\x{06DD}\x{06DE}\x{06DF}-\x{06E4}\x{06E5}-\x{06E6}\x{06E7}-\x{06E8}\x{06E9}\x{06EA}-\x{06ED}\x{06EE}-\x{06EF}\x{06F0}-\x{06F9}\x{06FA}-\x{06FC}\x{06FD}-\x{06FE}\x{06FF}\x{0700}-\x{070D}\x{070E}\x{070F}\x{0710}\x{0711}\x{0712}-\x{072F}\x{0730}-\x{074A}\x{074B}-\x{074C}\x{074D}-\x{07A5}\x{07A6}-\x{07B0}\x{07B1}\x{07B2}-\x{07BF}\x{07C0}-\x{07C9}\x{07CA}-\x{07EA}\x{07EB}-\x{07F3}\x{07F4}-\x{07F5}\x{07F6}\x{07F7}-\x{07F9}\x{07FA}\x{07FB}-\x{07FC}\x{07FD}\x{07FE}-\x{07FF}\x{0800}-\x{0815}\x{0816}-\x{0819}\x{081A}\x{081B}-\x{0823}\x{0824}\x{0825}-\x{0827}\x{0828}\x{0829}-\x{082D}\x{082E}-\x{082F}\x{0830}-\x{083E}\x{083F}\x{0840}-\x{0858}\x{0859}-\x{085B}\x{085C}-\x{085D}\x{085E}\x{085F}\x{0860}-\x{086A}\x{086B}-\x{086F}\x{0870}-\x{089F}\x{08A0}-\x{08B4}\x{08B5}\x{08B6}-\x{08C7}\x{08C8}-\x{08D2}\x{08D3}-\x{08E1}\x{08E2}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09F2}-\x{09F3}\x{09FB}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AF1}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B55}-\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0BF3}-\x{0BF8}\x{0BF9}\x{0BFA}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C78}-\x{0C7E}\x{0C81}\x{0CBC}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0D81}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E3F}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F3A}\x{0F3B}\x{0F3C}\x{0F3D}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{135D}-\x{135F}\x{1390}-\x{1399}\x{1400}\x{169B}\x{169C}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17DB}\x{17DD}\x{17F0}-\x{17F9}\x{1800}-\x{1805}\x{1806}\x{1807}-\x{180A}\x{180B}-\x{180D}\x{180E}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1940}\x{1944}-\x{1945}\x{19DE}-\x{19FF}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{1FBD}\x{1FBF}-\x{1FC1}\x{1FCD}-\x{1FCF}\x{1FDD}-\x{1FDF}\x{1FED}-\x{1FEF}\x{1FFD}-\x{1FFE}\x{200B}-\x{200D}\x{200F}\x{2010}-\x{2015}\x{2016}-\x{2017}\x{2018}\x{2019}\x{201A}\x{201B}-\x{201C}\x{201D}\x{201E}\x{201F}\x{2020}-\x{2027}\x{202F}\x{2030}-\x{2034}\x{2035}-\x{2038}\x{2039}\x{203A}\x{203B}-\x{203E}\x{203F}-\x{2040}\x{2041}-\x{2043}\x{2044}\x{2045}\x{2046}\x{2047}-\x{2051}\x{2052}\x{2053}\x{2054}\x{2055}-\x{205E}\x{2060}-\x{2064}\x{2065}\x{206A}-\x{206F}\x{2070}\x{2074}-\x{2079}\x{207A}-\x{207B}\x{207C}\x{207D}\x{207E}\x{2080}-\x{2089}\x{208A}-\x{208B}\x{208C}\x{208D}\x{208E}\x{20A0}-\x{20BF}\x{20C0}-\x{20CF}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2100}-\x{2101}\x{2103}-\x{2106}\x{2108}-\x{2109}\x{2114}\x{2116}-\x{2117}\x{2118}\x{211E}-\x{2123}\x{2125}\x{2127}\x{2129}\x{212E}\x{213A}-\x{213B}\x{2140}-\x{2144}\x{214A}\x{214B}\x{214C}-\x{214D}\x{2150}-\x{215F}\x{2189}\x{218A}-\x{218B}\x{2190}-\x{2194}\x{2195}-\x{2199}\x{219A}-\x{219B}\x{219C}-\x{219F}\x{21A0}\x{21A1}-\x{21A2}\x{21A3}\x{21A4}-\x{21A5}\x{21A6}\x{21A7}-\x{21AD}\x{21AE}\x{21AF}-\x{21CD}\x{21CE}-\x{21CF}\x{21D0}-\x{21D1}\x{21D2}\x{21D3}\x{21D4}\x{21D5}-\x{21F3}\x{21F4}-\x{2211}\x{2212}\x{2213}\x{2214}-\x{22FF}\x{2300}-\x{2307}\x{2308}\x{2309}\x{230A}\x{230B}\x{230C}-\x{231F}\x{2320}-\x{2321}\x{2322}-\x{2328}\x{2329}\x{232A}\x{232B}-\x{2335}\x{237B}\x{237C}\x{237D}-\x{2394}\x{2396}-\x{239A}\x{239B}-\x{23B3}\x{23B4}-\x{23DB}\x{23DC}-\x{23E1}\x{23E2}-\x{2426}\x{2440}-\x{244A}\x{2460}-\x{2487}\x{2488}-\x{249B}\x{24EA}-\x{24FF}\x{2500}-\x{25B6}\x{25B7}\x{25B8}-\x{25C0}\x{25C1}\x{25C2}-\x{25F7}\x{25F8}-\x{25FF}\x{2600}-\x{266E}\x{266F}\x{2670}-\x{26AB}\x{26AD}-\x{2767}\x{2768}\x{2769}\x{276A}\x{276B}\x{276C}\x{276D}\x{276E}\x{276F}\x{2770}\x{2771}\x{2772}\x{2773}\x{2774}\x{2775}\x{2776}-\x{2793}\x{2794}-\x{27BF}\x{27C0}-\x{27C4}\x{27C5}\x{27C6}\x{27C7}-\x{27E5}\x{27E6}\x{27E7}\x{27E8}\x{27E9}\x{27EA}\x{27EB}\x{27EC}\x{27ED}\x{27EE}\x{27EF}\x{27F0}-\x{27FF}\x{2900}-\x{2982}\x{2983}\x{2984}\x{2985}\x{2986}\x{2987}\x{2988}\x{2989}\x{298A}\x{298B}\x{298C}\x{298D}\x{298E}\x{298F}\x{2990}\x{2991}\x{2992}\x{2993}\x{2994}\x{2995}\x{2996}\x{2997}\x{2998}\x{2999}-\x{29D7}\x{29D8}\x{29D9}\x{29DA}\x{29DB}\x{29DC}-\x{29FB}\x{29FC}\x{29FD}\x{29FE}-\x{2AFF}\x{2B00}-\x{2B2F}\x{2B30}-\x{2B44}\x{2B45}-\x{2B46}\x{2B47}-\x{2B4C}\x{2B4D}-\x{2B73}\x{2B76}-\x{2B95}\x{2B97}-\x{2BFF}\x{2CE5}-\x{2CEA}\x{2CEF}-\x{2CF1}\x{2CF9}-\x{2CFC}\x{2CFD}\x{2CFE}-\x{2CFF}\x{2D7F}\x{2DE0}-\x{2DFF}\x{2E00}-\x{2E01}\x{2E02}\x{2E03}\x{2E04}\x{2E05}\x{2E06}-\x{2E08}\x{2E09}\x{2E0A}\x{2E0B}\x{2E0C}\x{2E0D}\x{2E0E}-\x{2E16}\x{2E17}\x{2E18}-\x{2E19}\x{2E1A}\x{2E1B}\x{2E1C}\x{2E1D}\x{2E1E}-\x{2E1F}\x{2E20}\x{2E21}\x{2E22}\x{2E23}\x{2E24}\x{2E25}\x{2E26}\x{2E27}\x{2E28}\x{2E29}\x{2E2A}-\x{2E2E}\x{2E2F}\x{2E30}-\x{2E39}\x{2E3A}-\x{2E3B}\x{2E3C}-\x{2E3F}\x{2E40}\x{2E41}\x{2E42}\x{2E43}-\x{2E4F}\x{2E50}-\x{2E51}\x{2E52}\x{2E80}-\x{2E99}\x{2E9B}-\x{2EF3}\x{2F00}-\x{2FD5}\x{2FF0}-\x{2FFB}\x{3001}-\x{3003}\x{3004}\x{3008}\x{3009}\x{300A}\x{300B}\x{300C}\x{300D}\x{300E}\x{300F}\x{3010}\x{3011}\x{3012}-\x{3013}\x{3014}\x{3015}\x{3016}\x{3017}\x{3018}\x{3019}\x{301A}\x{301B}\x{301C}\x{301D}\x{301E}-\x{301F}\x{3020}\x{302A}-\x{302D}\x{3030}\x{3036}-\x{3037}\x{303D}\x{303E}-\x{303F}\x{3099}-\x{309A}\x{309B}-\x{309C}\x{30A0}\x{30FB}\x{31C0}-\x{31E3}\x{321D}-\x{321E}\x{3250}\x{3251}-\x{325F}\x{327C}-\x{327E}\x{32B1}-\x{32BF}\x{32CC}-\x{32CF}\x{3377}-\x{337A}\x{33DE}-\x{33DF}\x{33FF}\x{4DC0}-\x{4DFF}\x{A490}-\x{A4C6}\x{A60D}-\x{A60F}\x{A66F}\x{A670}-\x{A672}\x{A673}\x{A674}-\x{A67D}\x{A67E}\x{A67F}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A700}-\x{A716}\x{A717}-\x{A71F}\x{A720}-\x{A721}\x{A788}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A828}-\x{A82B}\x{A82C}\x{A838}\x{A839}\x{A874}-\x{A877}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}-\x{A9BD}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEC}-\x{AAED}\x{AAF6}\x{AB6A}-\x{AB6B}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1D}\x{FB1E}\x{FB1F}-\x{FB28}\x{FB29}\x{FB2A}-\x{FB36}\x{FB37}\x{FB38}-\x{FB3C}\x{FB3D}\x{FB3E}\x{FB3F}\x{FB40}-\x{FB41}\x{FB42}\x{FB43}-\x{FB44}\x{FB45}\x{FB46}-\x{FB4F}\x{FB50}-\x{FBB1}\x{FBB2}-\x{FBC1}\x{FBC2}-\x{FBD2}\x{FBD3}-\x{FD3D}\x{FD3E}\x{FD3F}\x{FD40}-\x{FD4F}\x{FD50}-\x{FD8F}\x{FD90}-\x{FD91}\x{FD92}-\x{FDC7}\x{FDC8}-\x{FDCF}\x{FDD0}-\x{FDEF}\x{FDF0}-\x{FDFB}\x{FDFC}\x{FDFD}\x{FDFE}-\x{FDFF}\x{FE00}-\x{FE0F}\x{FE10}-\x{FE16}\x{FE17}\x{FE18}\x{FE19}\x{FE20}-\x{FE2F}\x{FE30}\x{FE31}-\x{FE32}\x{FE33}-\x{FE34}\x{FE35}\x{FE36}\x{FE37}\x{FE38}\x{FE39}\x{FE3A}\x{FE3B}\x{FE3C}\x{FE3D}\x{FE3E}\x{FE3F}\x{FE40}\x{FE41}\x{FE42}\x{FE43}\x{FE44}\x{FE45}-\x{FE46}\x{FE47}\x{FE48}\x{FE49}-\x{FE4C}\x{FE4D}-\x{FE4F}\x{FE50}\x{FE51}\x{FE52}\x{FE54}\x{FE55}\x{FE56}-\x{FE57}\x{FE58}\x{FE59}\x{FE5A}\x{FE5B}\x{FE5C}\x{FE5D}\x{FE5E}\x{FE5F}\x{FE60}-\x{FE61}\x{FE62}\x{FE63}\x{FE64}-\x{FE66}\x{FE68}\x{FE69}\x{FE6A}\x{FE6B}\x{FE70}-\x{FE74}\x{FE75}\x{FE76}-\x{FEFC}\x{FEFD}-\x{FEFE}\x{FEFF}\x{FF01}-\x{FF02}\x{FF03}\x{FF04}\x{FF05}\x{FF06}-\x{FF07}\x{FF08}\x{FF09}\x{FF0A}\x{FF0B}\x{FF0C}\x{FF0D}\x{FF0E}-\x{FF0F}\x{FF10}-\x{FF19}\x{FF1A}\x{FF1B}\x{FF1C}-\x{FF1E}\x{FF1F}-\x{FF20}\x{FF3B}\x{FF3C}\x{FF3D}\x{FF3E}\x{FF3F}\x{FF40}\x{FF5B}\x{FF5C}\x{FF5D}\x{FF5E}\x{FF5F}\x{FF60}\x{FF61}\x{FF62}\x{FF63}\x{FF64}-\x{FF65}\x{FFE0}-\x{FFE1}\x{FFE2}\x{FFE3}\x{FFE4}\x{FFE5}-\x{FFE6}\x{FFE8}\x{FFE9}-\x{FFEC}\x{FFED}-\x{FFEE}\x{FFF0}-\x{FFF8}\x{FFF9}-\x{FFFB}\x{FFFC}-\x{FFFD}\x{FFFE}-\x{FFFF}\x{10101}\x{10140}-\x{10174}\x{10175}-\x{10178}\x{10179}-\x{10189}\x{1018A}-\x{1018B}\x{1018C}\x{10190}-\x{1019C}\x{101A0}\x{101FD}\x{102E0}\x{102E1}-\x{102FB}\x{10376}-\x{1037A}\x{10800}-\x{10805}\x{10806}-\x{10807}\x{10808}\x{10809}\x{1080A}-\x{10835}\x{10836}\x{10837}-\x{10838}\x{10839}-\x{1083B}\x{1083C}\x{1083D}-\x{1083E}\x{1083F}-\x{10855}\x{10856}\x{10857}\x{10858}-\x{1085F}\x{10860}-\x{10876}\x{10877}-\x{10878}\x{10879}-\x{1087F}\x{10880}-\x{1089E}\x{1089F}-\x{108A6}\x{108A7}-\x{108AF}\x{108B0}-\x{108DF}\x{108E0}-\x{108F2}\x{108F3}\x{108F4}-\x{108F5}\x{108F6}-\x{108FA}\x{108FB}-\x{108FF}\x{10900}-\x{10915}\x{10916}-\x{1091B}\x{1091C}-\x{1091E}\x{1091F}\x{10920}-\x{10939}\x{1093A}-\x{1093E}\x{1093F}\x{10940}-\x{1097F}\x{10980}-\x{109B7}\x{109B8}-\x{109BB}\x{109BC}-\x{109BD}\x{109BE}-\x{109BF}\x{109C0}-\x{109CF}\x{109D0}-\x{109D1}\x{109D2}-\x{109FF}\x{10A00}\x{10A01}-\x{10A03}\x{10A04}\x{10A05}-\x{10A06}\x{10A07}-\x{10A0B}\x{10A0C}-\x{10A0F}\x{10A10}-\x{10A13}\x{10A14}\x{10A15}-\x{10A17}\x{10A18}\x{10A19}-\x{10A35}\x{10A36}-\x{10A37}\x{10A38}-\x{10A3A}\x{10A3B}-\x{10A3E}\x{10A3F}\x{10A40}-\x{10A48}\x{10A49}-\x{10A4F}\x{10A50}-\x{10A58}\x{10A59}-\x{10A5F}\x{10A60}-\x{10A7C}\x{10A7D}-\x{10A7E}\x{10A7F}\x{10A80}-\x{10A9C}\x{10A9D}-\x{10A9F}\x{10AA0}-\x{10ABF}\x{10AC0}-\x{10AC7}\x{10AC8}\x{10AC9}-\x{10AE4}\x{10AE5}-\x{10AE6}\x{10AE7}-\x{10AEA}\x{10AEB}-\x{10AEF}\x{10AF0}-\x{10AF6}\x{10AF7}-\x{10AFF}\x{10B00}-\x{10B35}\x{10B36}-\x{10B38}\x{10B39}-\x{10B3F}\x{10B40}-\x{10B55}\x{10B56}-\x{10B57}\x{10B58}-\x{10B5F}\x{10B60}-\x{10B72}\x{10B73}-\x{10B77}\x{10B78}-\x{10B7F}\x{10B80}-\x{10B91}\x{10B92}-\x{10B98}\x{10B99}-\x{10B9C}\x{10B9D}-\x{10BA8}\x{10BA9}-\x{10BAF}\x{10BB0}-\x{10BFF}\x{10C00}-\x{10C48}\x{10C49}-\x{10C7F}\x{10C80}-\x{10CB2}\x{10CB3}-\x{10CBF}\x{10CC0}-\x{10CF2}\x{10CF3}-\x{10CF9}\x{10CFA}-\x{10CFF}\x{10D00}-\x{10D23}\x{10D24}-\x{10D27}\x{10D28}-\x{10D2F}\x{10D30}-\x{10D39}\x{10D3A}-\x{10D3F}\x{10D40}-\x{10E5F}\x{10E60}-\x{10E7E}\x{10E7F}\x{10E80}-\x{10EA9}\x{10EAA}\x{10EAB}-\x{10EAC}\x{10EAD}\x{10EAE}-\x{10EAF}\x{10EB0}-\x{10EB1}\x{10EB2}-\x{10EFF}\x{10F00}-\x{10F1C}\x{10F1D}-\x{10F26}\x{10F27}\x{10F28}-\x{10F2F}\x{10F30}-\x{10F45}\x{10F46}-\x{10F50}\x{10F51}-\x{10F54}\x{10F55}-\x{10F59}\x{10F5A}-\x{10F6F}\x{10F70}-\x{10FAF}\x{10FB0}-\x{10FC4}\x{10FC5}-\x{10FCB}\x{10FCC}-\x{10FDF}\x{10FE0}-\x{10FF6}\x{10FF7}-\x{10FFF}\x{11001}\x{11038}-\x{11046}\x{11052}-\x{11065}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{111CF}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{11660}-\x{1166C}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{1193B}-\x{1193C}\x{1193E}\x{11943}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119E0}\x{11A01}-\x{11A06}\x{11A09}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{11FD5}-\x{11FDC}\x{11FDD}-\x{11FE0}\x{11FE1}-\x{11FF1}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F8F}-\x{16F92}\x{16FE2}\x{16FE4}\x{1BC9D}-\x{1BC9E}\x{1BCA0}-\x{1BCA3}\x{1D167}-\x{1D169}\x{1D173}-\x{1D17A}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D200}-\x{1D241}\x{1D242}-\x{1D244}\x{1D245}\x{1D300}-\x{1D356}\x{1D6DB}\x{1D715}\x{1D74F}\x{1D789}\x{1D7C3}\x{1D7CE}-\x{1D7FF}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E2FF}\x{1E800}-\x{1E8C4}\x{1E8C5}-\x{1E8C6}\x{1E8C7}-\x{1E8CF}\x{1E8D0}-\x{1E8D6}\x{1E8D7}-\x{1E8FF}\x{1E900}-\x{1E943}\x{1E944}-\x{1E94A}\x{1E94B}\x{1E94C}-\x{1E94F}\x{1E950}-\x{1E959}\x{1E95A}-\x{1E95D}\x{1E95E}-\x{1E95F}\x{1E960}-\x{1EC6F}\x{1EC70}\x{1EC71}-\x{1ECAB}\x{1ECAC}\x{1ECAD}-\x{1ECAF}\x{1ECB0}\x{1ECB1}-\x{1ECB4}\x{1ECB5}-\x{1ECBF}\x{1ECC0}-\x{1ECFF}\x{1ED00}\x{1ED01}-\x{1ED2D}\x{1ED2E}\x{1ED2F}-\x{1ED3D}\x{1ED3E}-\x{1ED4F}\x{1ED50}-\x{1EDFF}\x{1EE00}-\x{1EE03}\x{1EE04}\x{1EE05}-\x{1EE1F}\x{1EE20}\x{1EE21}-\x{1EE22}\x{1EE23}\x{1EE24}\x{1EE25}-\x{1EE26}\x{1EE27}\x{1EE28}\x{1EE29}-\x{1EE32}\x{1EE33}\x{1EE34}-\x{1EE37}\x{1EE38}\x{1EE39}\x{1EE3A}\x{1EE3B}\x{1EE3C}-\x{1EE41}\x{1EE42}\x{1EE43}-\x{1EE46}\x{1EE47}\x{1EE48}\x{1EE49}\x{1EE4A}\x{1EE4B}\x{1EE4C}\x{1EE4D}-\x{1EE4F}\x{1EE50}\x{1EE51}-\x{1EE52}\x{1EE53}\x{1EE54}\x{1EE55}-\x{1EE56}\x{1EE57}\x{1EE58}\x{1EE59}\x{1EE5A}\x{1EE5B}\x{1EE5C}\x{1EE5D}\x{1EE5E}\x{1EE5F}\x{1EE60}\x{1EE61}-\x{1EE62}\x{1EE63}\x{1EE64}\x{1EE65}-\x{1EE66}\x{1EE67}-\x{1EE6A}\x{1EE6B}\x{1EE6C}-\x{1EE72}\x{1EE73}\x{1EE74}-\x{1EE77}\x{1EE78}\x{1EE79}-\x{1EE7C}\x{1EE7D}\x{1EE7E}\x{1EE7F}\x{1EE80}-\x{1EE89}\x{1EE8A}\x{1EE8B}-\x{1EE9B}\x{1EE9C}-\x{1EEA0}\x{1EEA1}-\x{1EEA3}\x{1EEA4}\x{1EEA5}-\x{1EEA9}\x{1EEAA}\x{1EEAB}-\x{1EEBB}\x{1EEBC}-\x{1EEEF}\x{1EEF0}-\x{1EEF1}\x{1EEF2}-\x{1EEFF}\x{1EF00}-\x{1EFFF}\x{1F000}-\x{1F02B}\x{1F030}-\x{1F093}\x{1F0A0}-\x{1F0AE}\x{1F0B1}-\x{1F0BF}\x{1F0C1}-\x{1F0CF}\x{1F0D1}-\x{1F0F5}\x{1F100}-\x{1F10A}\x{1F10B}-\x{1F10C}\x{1F10D}-\x{1F10F}\x{1F12F}\x{1F16A}-\x{1F16F}\x{1F1AD}\x{1F260}-\x{1F265}\x{1F300}-\x{1F3FA}\x{1F3FB}-\x{1F3FF}\x{1F400}-\x{1F6D7}\x{1F6E0}-\x{1F6EC}\x{1F6F0}-\x{1F6FC}\x{1F700}-\x{1F773}\x{1F780}-\x{1F7D8}\x{1F7E0}-\x{1F7EB}\x{1F800}-\x{1F80B}\x{1F810}-\x{1F847}\x{1F850}-\x{1F859}\x{1F860}-\x{1F887}\x{1F890}-\x{1F8AD}\x{1F8B0}-\x{1F8B1}\x{1F900}-\x{1F978}\x{1F97A}-\x{1F9CB}\x{1F9CD}-\x{1FA53}\x{1FA60}-\x{1FA6D}\x{1FA70}-\x{1FA74}\x{1FA78}-\x{1FA7A}\x{1FA80}-\x{1FA86}\x{1FA90}-\x{1FAA8}\x{1FAB0}-\x{1FAB6}\x{1FAC0}-\x{1FAC2}\x{1FAD0}-\x{1FAD6}\x{1FB00}-\x{1FB92}\x{1FB94}-\x{1FBCA}\x{1FBF0}-\x{1FBF9}\x{1FFFE}-\x{1FFFF}\x{2FFFE}-\x{2FFFF}\x{3FFFE}-\x{3FFFF}\x{4FFFE}-\x{4FFFF}\x{5FFFE}-\x{5FFFF}\x{6FFFE}-\x{6FFFF}\x{7FFFE}-\x{7FFFF}\x{8FFFE}-\x{8FFFF}\x{9FFFE}-\x{9FFFF}\x{AFFFE}-\x{AFFFF}\x{BFFFE}-\x{BFFFF}\x{CFFFE}-\x{CFFFF}\x{DFFFE}-\x{E0000}\x{E0001}\x{E0002}-\x{E001F}\x{E0020}-\x{E007F}\x{E0080}-\x{E00FF}\x{E0100}-\x{E01EF}\x{E01F0}-\x{E0FFF}\x{EFFFE}-\x{EFFFF}\x{FFFFE}-\x{FFFFF}\x{10FFFE}-\x{10FFFF}]/u';
17
- const BIDI_STEP_3 = '/[\x{0030}-\x{0039}\x{00B2}-\x{00B3}\x{00B9}\x{0590}\x{05BE}\x{05C0}\x{05C3}\x{05C6}\x{05C8}-\x{05CF}\x{05D0}-\x{05EA}\x{05EB}-\x{05EE}\x{05EF}-\x{05F2}\x{05F3}-\x{05F4}\x{05F5}-\x{05FF}\x{0600}-\x{0605}\x{0608}\x{060B}\x{060D}\x{061B}\x{061C}\x{061D}\x{061E}-\x{061F}\x{0620}-\x{063F}\x{0640}\x{0641}-\x{064A}\x{0660}-\x{0669}\x{066B}-\x{066C}\x{066D}\x{066E}-\x{066F}\x{0671}-\x{06D3}\x{06D4}\x{06D5}\x{06DD}\x{06E5}-\x{06E6}\x{06EE}-\x{06EF}\x{06F0}-\x{06F9}\x{06FA}-\x{06FC}\x{06FD}-\x{06FE}\x{06FF}\x{0700}-\x{070D}\x{070E}\x{070F}\x{0710}\x{0712}-\x{072F}\x{074B}-\x{074C}\x{074D}-\x{07A5}\x{07B1}\x{07B2}-\x{07BF}\x{07C0}-\x{07C9}\x{07CA}-\x{07EA}\x{07F4}-\x{07F5}\x{07FA}\x{07FB}-\x{07FC}\x{07FE}-\x{07FF}\x{0800}-\x{0815}\x{081A}\x{0824}\x{0828}\x{082E}-\x{082F}\x{0830}-\x{083E}\x{083F}\x{0840}-\x{0858}\x{085C}-\x{085D}\x{085E}\x{085F}\x{0860}-\x{086A}\x{086B}-\x{086F}\x{0870}-\x{089F}\x{08A0}-\x{08B4}\x{08B5}\x{08B6}-\x{08C7}\x{08C8}-\x{08D2}\x{08E2}\x{200F}\x{2070}\x{2074}-\x{2079}\x{2080}-\x{2089}\x{2488}-\x{249B}\x{FB1D}\x{FB1F}-\x{FB28}\x{FB2A}-\x{FB36}\x{FB37}\x{FB38}-\x{FB3C}\x{FB3D}\x{FB3E}\x{FB3F}\x{FB40}-\x{FB41}\x{FB42}\x{FB43}-\x{FB44}\x{FB45}\x{FB46}-\x{FB4F}\x{FB50}-\x{FBB1}\x{FBB2}-\x{FBC1}\x{FBC2}-\x{FBD2}\x{FBD3}-\x{FD3D}\x{FD40}-\x{FD4F}\x{FD50}-\x{FD8F}\x{FD90}-\x{FD91}\x{FD92}-\x{FDC7}\x{FDC8}-\x{FDCF}\x{FDF0}-\x{FDFB}\x{FDFC}\x{FDFE}-\x{FDFF}\x{FE70}-\x{FE74}\x{FE75}\x{FE76}-\x{FEFC}\x{FEFD}-\x{FEFE}\x{FF10}-\x{FF19}\x{102E1}-\x{102FB}\x{10800}-\x{10805}\x{10806}-\x{10807}\x{10808}\x{10809}\x{1080A}-\x{10835}\x{10836}\x{10837}-\x{10838}\x{10839}-\x{1083B}\x{1083C}\x{1083D}-\x{1083E}\x{1083F}-\x{10855}\x{10856}\x{10857}\x{10858}-\x{1085F}\x{10860}-\x{10876}\x{10877}-\x{10878}\x{10879}-\x{1087F}\x{10880}-\x{1089E}\x{1089F}-\x{108A6}\x{108A7}-\x{108AF}\x{108B0}-\x{108DF}\x{108E0}-\x{108F2}\x{108F3}\x{108F4}-\x{108F5}\x{108F6}-\x{108FA}\x{108FB}-\x{108FF}\x{10900}-\x{10915}\x{10916}-\x{1091B}\x{1091C}-\x{1091E}\x{10920}-\x{10939}\x{1093A}-\x{1093E}\x{1093F}\x{10940}-\x{1097F}\x{10980}-\x{109B7}\x{109B8}-\x{109BB}\x{109BC}-\x{109BD}\x{109BE}-\x{109BF}\x{109C0}-\x{109CF}\x{109D0}-\x{109D1}\x{109D2}-\x{109FF}\x{10A00}\x{10A04}\x{10A07}-\x{10A0B}\x{10A10}-\x{10A13}\x{10A14}\x{10A15}-\x{10A17}\x{10A18}\x{10A19}-\x{10A35}\x{10A36}-\x{10A37}\x{10A3B}-\x{10A3E}\x{10A40}-\x{10A48}\x{10A49}-\x{10A4F}\x{10A50}-\x{10A58}\x{10A59}-\x{10A5F}\x{10A60}-\x{10A7C}\x{10A7D}-\x{10A7E}\x{10A7F}\x{10A80}-\x{10A9C}\x{10A9D}-\x{10A9F}\x{10AA0}-\x{10ABF}\x{10AC0}-\x{10AC7}\x{10AC8}\x{10AC9}-\x{10AE4}\x{10AE7}-\x{10AEA}\x{10AEB}-\x{10AEF}\x{10AF0}-\x{10AF6}\x{10AF7}-\x{10AFF}\x{10B00}-\x{10B35}\x{10B36}-\x{10B38}\x{10B40}-\x{10B55}\x{10B56}-\x{10B57}\x{10B58}-\x{10B5F}\x{10B60}-\x{10B72}\x{10B73}-\x{10B77}\x{10B78}-\x{10B7F}\x{10B80}-\x{10B91}\x{10B92}-\x{10B98}\x{10B99}-\x{10B9C}\x{10B9D}-\x{10BA8}\x{10BA9}-\x{10BAF}\x{10BB0}-\x{10BFF}\x{10C00}-\x{10C48}\x{10C49}-\x{10C7F}\x{10C80}-\x{10CB2}\x{10CB3}-\x{10CBF}\x{10CC0}-\x{10CF2}\x{10CF3}-\x{10CF9}\x{10CFA}-\x{10CFF}\x{10D00}-\x{10D23}\x{10D28}-\x{10D2F}\x{10D30}-\x{10D39}\x{10D3A}-\x{10D3F}\x{10D40}-\x{10E5F}\x{10E60}-\x{10E7E}\x{10E7F}\x{10E80}-\x{10EA9}\x{10EAA}\x{10EAD}\x{10EAE}-\x{10EAF}\x{10EB0}-\x{10EB1}\x{10EB2}-\x{10EFF}\x{10F00}-\x{10F1C}\x{10F1D}-\x{10F26}\x{10F27}\x{10F28}-\x{10F2F}\x{10F30}-\x{10F45}\x{10F51}-\x{10F54}\x{10F55}-\x{10F59}\x{10F5A}-\x{10F6F}\x{10F70}-\x{10FAF}\x{10FB0}-\x{10FC4}\x{10FC5}-\x{10FCB}\x{10FCC}-\x{10FDF}\x{10FE0}-\x{10FF6}\x{10FF7}-\x{10FFF}\x{1D7CE}-\x{1D7FF}\x{1E800}-\x{1E8C4}\x{1E8C5}-\x{1E8C6}\x{1E8C7}-\x{1E8CF}\x{1E8D7}-\x{1E8FF}\x{1E900}-\x{1E943}\x{1E94B}\x{1E94C}-\x{1E94F}\x{1E950}-\x{1E959}\x{1E95A}-\x{1E95D}\x{1E95E}-\x{1E95F}\x{1E960}-\x{1EC6F}\x{1EC70}\x{1EC71}-\x{1ECAB}\x{1ECAC}\x{1ECAD}-\x{1ECAF}\x{1ECB0}\x{1ECB1}-\x{1ECB4}\x{1ECB5}-\x{1ECBF}\x{1ECC0}-\x{1ECFF}\x{1ED00}\x{1ED01}-\x{1ED2D}\x{1ED2E}\x{1ED2F}-\x{1ED3D}\x{1ED3E}-\x{1ED4F}\x{1ED50}-\x{1EDFF}\x{1EE00}-\x{1EE03}\x{1EE04}\x{1EE05}-\x{1EE1F}\x{1EE20}\x{1EE21}-\x{1EE22}\x{1EE23}\x{1EE24}\x{1EE25}-\x{1EE26}\x{1EE27}\x{1EE28}\x{1EE29}-\x{1EE32}\x{1EE33}\x{1EE34}-\x{1EE37}\x{1EE38}\x{1EE39}\x{1EE3A}\x{1EE3B}\x{1EE3C}-\x{1EE41}\x{1EE42}\x{1EE43}-\x{1EE46}\x{1EE47}\x{1EE48}\x{1EE49}\x{1EE4A}\x{1EE4B}\x{1EE4C}\x{1EE4D}-\x{1EE4F}\x{1EE50}\x{1EE51}-\x{1EE52}\x{1EE53}\x{1EE54}\x{1EE55}-\x{1EE56}\x{1EE57}\x{1EE58}\x{1EE59}\x{1EE5A}\x{1EE5B}\x{1EE5C}\x{1EE5D}\x{1EE5E}\x{1EE5F}\x{1EE60}\x{1EE61}-\x{1EE62}\x{1EE63}\x{1EE64}\x{1EE65}-\x{1EE66}\x{1EE67}-\x{1EE6A}\x{1EE6B}\x{1EE6C}-\x{1EE72}\x{1EE73}\x{1EE74}-\x{1EE77}\x{1EE78}\x{1EE79}-\x{1EE7C}\x{1EE7D}\x{1EE7E}\x{1EE7F}\x{1EE80}-\x{1EE89}\x{1EE8A}\x{1EE8B}-\x{1EE9B}\x{1EE9C}-\x{1EEA0}\x{1EEA1}-\x{1EEA3}\x{1EEA4}\x{1EEA5}-\x{1EEA9}\x{1EEAA}\x{1EEAB}-\x{1EEBB}\x{1EEBC}-\x{1EEEF}\x{1EEF2}-\x{1EEFF}\x{1EF00}-\x{1EFFF}\x{1F100}-\x{1F10A}\x{1FBF0}-\x{1FBF9}][\x{0300}-\x{036F}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{0610}-\x{061A}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DF}-\x{06E4}\x{06E7}-\x{06E8}\x{06EA}-\x{06ED}\x{0711}\x{0730}-\x{074A}\x{07A6}-\x{07B0}\x{07EB}-\x{07F3}\x{07FD}\x{0816}-\x{0819}\x{081B}-\x{0823}\x{0825}-\x{0827}\x{0829}-\x{082D}\x{0859}-\x{085B}\x{08D3}-\x{08E1}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B55}-\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C81}\x{0CBC}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0D81}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{135D}-\x{135F}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17DD}\x{180B}-\x{180D}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2CEF}-\x{2CF1}\x{2D7F}\x{2DE0}-\x{2DFF}\x{302A}-\x{302D}\x{3099}-\x{309A}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A82C}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}-\x{A9BD}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEC}-\x{AAED}\x{AAF6}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1E}\x{FE00}-\x{FE0F}\x{FE20}-\x{FE2F}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10A01}-\x{10A03}\x{10A05}-\x{10A06}\x{10A0C}-\x{10A0F}\x{10A38}-\x{10A3A}\x{10A3F}\x{10AE5}-\x{10AE6}\x{10D24}-\x{10D27}\x{10EAB}-\x{10EAC}\x{10F46}-\x{10F50}\x{11001}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{111CF}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{1193B}-\x{1193C}\x{1193E}\x{11943}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119E0}\x{11A01}-\x{11A06}\x{11A09}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F8F}-\x{16F92}\x{16FE4}\x{1BC9D}-\x{1BC9E}\x{1D167}-\x{1D169}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D242}-\x{1D244}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{E0100}-\x{E01EF}]*$/u';
18
- const BIDI_STEP_4_AN = '/[\x{0600}-\x{0605}\x{0660}-\x{0669}\x{066B}-\x{066C}\x{06DD}\x{08E2}\x{10D30}-\x{10D39}\x{10E60}-\x{10E7E}]/u';
19
- const BIDI_STEP_4_EN = '/[\x{0030}-\x{0039}\x{00B2}-\x{00B3}\x{00B9}\x{06F0}-\x{06F9}\x{2070}\x{2074}-\x{2079}\x{2080}-\x{2089}\x{2488}-\x{249B}\x{FF10}-\x{FF19}\x{102E1}-\x{102FB}\x{1D7CE}-\x{1D7FF}\x{1F100}-\x{1F10A}\x{1FBF0}-\x{1FBF9}]/u';
20
- const BIDI_STEP_5 = '/[\x{0009}\x{000A}\x{000B}\x{000C}\x{000D}\x{001C}-\x{001E}\x{001F}\x{0020}\x{0085}\x{0590}\x{05BE}\x{05C0}\x{05C3}\x{05C6}\x{05C8}-\x{05CF}\x{05D0}-\x{05EA}\x{05EB}-\x{05EE}\x{05EF}-\x{05F2}\x{05F3}-\x{05F4}\x{05F5}-\x{05FF}\x{0600}-\x{0605}\x{0608}\x{060B}\x{060D}\x{061B}\x{061C}\x{061D}\x{061E}-\x{061F}\x{0620}-\x{063F}\x{0640}\x{0641}-\x{064A}\x{0660}-\x{0669}\x{066B}-\x{066C}\x{066D}\x{066E}-\x{066F}\x{0671}-\x{06D3}\x{06D4}\x{06D5}\x{06DD}\x{06E5}-\x{06E6}\x{06EE}-\x{06EF}\x{06FA}-\x{06FC}\x{06FD}-\x{06FE}\x{06FF}\x{0700}-\x{070D}\x{070E}\x{070F}\x{0710}\x{0712}-\x{072F}\x{074B}-\x{074C}\x{074D}-\x{07A5}\x{07B1}\x{07B2}-\x{07BF}\x{07C0}-\x{07C9}\x{07CA}-\x{07EA}\x{07F4}-\x{07F5}\x{07FA}\x{07FB}-\x{07FC}\x{07FE}-\x{07FF}\x{0800}-\x{0815}\x{081A}\x{0824}\x{0828}\x{082E}-\x{082F}\x{0830}-\x{083E}\x{083F}\x{0840}-\x{0858}\x{085C}-\x{085D}\x{085E}\x{085F}\x{0860}-\x{086A}\x{086B}-\x{086F}\x{0870}-\x{089F}\x{08A0}-\x{08B4}\x{08B5}\x{08B6}-\x{08C7}\x{08C8}-\x{08D2}\x{08E2}\x{1680}\x{2000}-\x{200A}\x{200F}\x{2028}\x{2029}\x{202A}\x{202B}\x{202C}\x{202D}\x{202E}\x{205F}\x{2066}\x{2067}\x{2068}\x{2069}\x{3000}\x{FB1D}\x{FB1F}-\x{FB28}\x{FB2A}-\x{FB36}\x{FB37}\x{FB38}-\x{FB3C}\x{FB3D}\x{FB3E}\x{FB3F}\x{FB40}-\x{FB41}\x{FB42}\x{FB43}-\x{FB44}\x{FB45}\x{FB46}-\x{FB4F}\x{FB50}-\x{FBB1}\x{FBB2}-\x{FBC1}\x{FBC2}-\x{FBD2}\x{FBD3}-\x{FD3D}\x{FD40}-\x{FD4F}\x{FD50}-\x{FD8F}\x{FD90}-\x{FD91}\x{FD92}-\x{FDC7}\x{FDC8}-\x{FDCF}\x{FDF0}-\x{FDFB}\x{FDFC}\x{FDFE}-\x{FDFF}\x{FE70}-\x{FE74}\x{FE75}\x{FE76}-\x{FEFC}\x{FEFD}-\x{FEFE}\x{10800}-\x{10805}\x{10806}-\x{10807}\x{10808}\x{10809}\x{1080A}-\x{10835}\x{10836}\x{10837}-\x{10838}\x{10839}-\x{1083B}\x{1083C}\x{1083D}-\x{1083E}\x{1083F}-\x{10855}\x{10856}\x{10857}\x{10858}-\x{1085F}\x{10860}-\x{10876}\x{10877}-\x{10878}\x{10879}-\x{1087F}\x{10880}-\x{1089E}\x{1089F}-\x{108A6}\x{108A7}-\x{108AF}\x{108B0}-\x{108DF}\x{108E0}-\x{108F2}\x{108F3}\x{108F4}-\x{108F5}\x{108F6}-\x{108FA}\x{108FB}-\x{108FF}\x{10900}-\x{10915}\x{10916}-\x{1091B}\x{1091C}-\x{1091E}\x{10920}-\x{10939}\x{1093A}-\x{1093E}\x{1093F}\x{10940}-\x{1097F}\x{10980}-\x{109B7}\x{109B8}-\x{109BB}\x{109BC}-\x{109BD}\x{109BE}-\x{109BF}\x{109C0}-\x{109CF}\x{109D0}-\x{109D1}\x{109D2}-\x{109FF}\x{10A00}\x{10A04}\x{10A07}-\x{10A0B}\x{10A10}-\x{10A13}\x{10A14}\x{10A15}-\x{10A17}\x{10A18}\x{10A19}-\x{10A35}\x{10A36}-\x{10A37}\x{10A3B}-\x{10A3E}\x{10A40}-\x{10A48}\x{10A49}-\x{10A4F}\x{10A50}-\x{10A58}\x{10A59}-\x{10A5F}\x{10A60}-\x{10A7C}\x{10A7D}-\x{10A7E}\x{10A7F}\x{10A80}-\x{10A9C}\x{10A9D}-\x{10A9F}\x{10AA0}-\x{10ABF}\x{10AC0}-\x{10AC7}\x{10AC8}\x{10AC9}-\x{10AE4}\x{10AE7}-\x{10AEA}\x{10AEB}-\x{10AEF}\x{10AF0}-\x{10AF6}\x{10AF7}-\x{10AFF}\x{10B00}-\x{10B35}\x{10B36}-\x{10B38}\x{10B40}-\x{10B55}\x{10B56}-\x{10B57}\x{10B58}-\x{10B5F}\x{10B60}-\x{10B72}\x{10B73}-\x{10B77}\x{10B78}-\x{10B7F}\x{10B80}-\x{10B91}\x{10B92}-\x{10B98}\x{10B99}-\x{10B9C}\x{10B9D}-\x{10BA8}\x{10BA9}-\x{10BAF}\x{10BB0}-\x{10BFF}\x{10C00}-\x{10C48}\x{10C49}-\x{10C7F}\x{10C80}-\x{10CB2}\x{10CB3}-\x{10CBF}\x{10CC0}-\x{10CF2}\x{10CF3}-\x{10CF9}\x{10CFA}-\x{10CFF}\x{10D00}-\x{10D23}\x{10D28}-\x{10D2F}\x{10D30}-\x{10D39}\x{10D3A}-\x{10D3F}\x{10D40}-\x{10E5F}\x{10E60}-\x{10E7E}\x{10E7F}\x{10E80}-\x{10EA9}\x{10EAA}\x{10EAD}\x{10EAE}-\x{10EAF}\x{10EB0}-\x{10EB1}\x{10EB2}-\x{10EFF}\x{10F00}-\x{10F1C}\x{10F1D}-\x{10F26}\x{10F27}\x{10F28}-\x{10F2F}\x{10F30}-\x{10F45}\x{10F51}-\x{10F54}\x{10F55}-\x{10F59}\x{10F5A}-\x{10F6F}\x{10F70}-\x{10FAF}\x{10FB0}-\x{10FC4}\x{10FC5}-\x{10FCB}\x{10FCC}-\x{10FDF}\x{10FE0}-\x{10FF6}\x{10FF7}-\x{10FFF}\x{1E800}-\x{1E8C4}\x{1E8C5}-\x{1E8C6}\x{1E8C7}-\x{1E8CF}\x{1E8D7}-\x{1E8FF}\x{1E900}-\x{1E943}\x{1E94B}\x{1E94C}-\x{1E94F}\x{1E950}-\x{1E959}\x{1E95A}-\x{1E95D}\x{1E95E}-\x{1E95F}\x{1E960}-\x{1EC6F}\x{1EC70}\x{1EC71}-\x{1ECAB}\x{1ECAC}\x{1ECAD}-\x{1ECAF}\x{1ECB0}\x{1ECB1}-\x{1ECB4}\x{1ECB5}-\x{1ECBF}\x{1ECC0}-\x{1ECFF}\x{1ED00}\x{1ED01}-\x{1ED2D}\x{1ED2E}\x{1ED2F}-\x{1ED3D}\x{1ED3E}-\x{1ED4F}\x{1ED50}-\x{1EDFF}\x{1EE00}-\x{1EE03}\x{1EE04}\x{1EE05}-\x{1EE1F}\x{1EE20}\x{1EE21}-\x{1EE22}\x{1EE23}\x{1EE24}\x{1EE25}-\x{1EE26}\x{1EE27}\x{1EE28}\x{1EE29}-\x{1EE32}\x{1EE33}\x{1EE34}-\x{1EE37}\x{1EE38}\x{1EE39}\x{1EE3A}\x{1EE3B}\x{1EE3C}-\x{1EE41}\x{1EE42}\x{1EE43}-\x{1EE46}\x{1EE47}\x{1EE48}\x{1EE49}\x{1EE4A}\x{1EE4B}\x{1EE4C}\x{1EE4D}-\x{1EE4F}\x{1EE50}\x{1EE51}-\x{1EE52}\x{1EE53}\x{1EE54}\x{1EE55}-\x{1EE56}\x{1EE57}\x{1EE58}\x{1EE59}\x{1EE5A}\x{1EE5B}\x{1EE5C}\x{1EE5D}\x{1EE5E}\x{1EE5F}\x{1EE60}\x{1EE61}-\x{1EE62}\x{1EE63}\x{1EE64}\x{1EE65}-\x{1EE66}\x{1EE67}-\x{1EE6A}\x{1EE6B}\x{1EE6C}-\x{1EE72}\x{1EE73}\x{1EE74}-\x{1EE77}\x{1EE78}\x{1EE79}-\x{1EE7C}\x{1EE7D}\x{1EE7E}\x{1EE7F}\x{1EE80}-\x{1EE89}\x{1EE8A}\x{1EE8B}-\x{1EE9B}\x{1EE9C}-\x{1EEA0}\x{1EEA1}-\x{1EEA3}\x{1EEA4}\x{1EEA5}-\x{1EEA9}\x{1EEAA}\x{1EEAB}-\x{1EEBB}\x{1EEBC}-\x{1EEEF}\x{1EEF2}-\x{1EEFF}\x{1EF00}-\x{1EFFF}]/u';
21
- const BIDI_STEP_6 = '/[^\x{0000}-\x{0008}\x{0009}\x{000A}\x{000B}\x{000C}\x{000D}\x{000E}-\x{001B}\x{001C}-\x{001E}\x{001F}\x{0020}\x{0021}-\x{0022}\x{0023}\x{0024}\x{0025}\x{0026}-\x{0027}\x{0028}\x{0029}\x{002A}\x{002B}\x{002C}\x{002D}\x{002E}-\x{002F}\x{003A}\x{003B}\x{003C}-\x{003E}\x{003F}-\x{0040}\x{005B}\x{005C}\x{005D}\x{005E}\x{005F}\x{0060}\x{007B}\x{007C}\x{007D}\x{007E}\x{007F}-\x{0084}\x{0085}\x{0086}-\x{009F}\x{00A0}\x{00A1}\x{00A2}-\x{00A5}\x{00A6}\x{00A7}\x{00A8}\x{00A9}\x{00AB}\x{00AC}\x{00AD}\x{00AE}\x{00AF}\x{00B0}\x{00B1}\x{00B4}\x{00B6}-\x{00B7}\x{00B8}\x{00BB}\x{00BC}-\x{00BE}\x{00BF}\x{00D7}\x{00F7}\x{02B9}-\x{02BA}\x{02C2}-\x{02C5}\x{02C6}-\x{02CF}\x{02D2}-\x{02DF}\x{02E5}-\x{02EB}\x{02EC}\x{02ED}\x{02EF}-\x{02FF}\x{0300}-\x{036F}\x{0374}\x{0375}\x{037E}\x{0384}-\x{0385}\x{0387}\x{03F6}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{058A}\x{058D}-\x{058E}\x{058F}\x{0590}\x{0591}-\x{05BD}\x{05BE}\x{05BF}\x{05C0}\x{05C1}-\x{05C2}\x{05C3}\x{05C4}-\x{05C5}\x{05C6}\x{05C7}\x{05C8}-\x{05CF}\x{05D0}-\x{05EA}\x{05EB}-\x{05EE}\x{05EF}-\x{05F2}\x{05F3}-\x{05F4}\x{05F5}-\x{05FF}\x{0600}-\x{0605}\x{0606}-\x{0607}\x{0608}\x{0609}-\x{060A}\x{060B}\x{060C}\x{060D}\x{060E}-\x{060F}\x{0610}-\x{061A}\x{061B}\x{061C}\x{061D}\x{061E}-\x{061F}\x{0620}-\x{063F}\x{0640}\x{0641}-\x{064A}\x{064B}-\x{065F}\x{0660}-\x{0669}\x{066A}\x{066B}-\x{066C}\x{066D}\x{066E}-\x{066F}\x{0670}\x{0671}-\x{06D3}\x{06D4}\x{06D5}\x{06D6}-\x{06DC}\x{06DD}\x{06DE}\x{06DF}-\x{06E4}\x{06E5}-\x{06E6}\x{06E7}-\x{06E8}\x{06E9}\x{06EA}-\x{06ED}\x{06EE}-\x{06EF}\x{06FA}-\x{06FC}\x{06FD}-\x{06FE}\x{06FF}\x{0700}-\x{070D}\x{070E}\x{070F}\x{0710}\x{0711}\x{0712}-\x{072F}\x{0730}-\x{074A}\x{074B}-\x{074C}\x{074D}-\x{07A5}\x{07A6}-\x{07B0}\x{07B1}\x{07B2}-\x{07BF}\x{07C0}-\x{07C9}\x{07CA}-\x{07EA}\x{07EB}-\x{07F3}\x{07F4}-\x{07F5}\x{07F6}\x{07F7}-\x{07F9}\x{07FA}\x{07FB}-\x{07FC}\x{07FD}\x{07FE}-\x{07FF}\x{0800}-\x{0815}\x{0816}-\x{0819}\x{081A}\x{081B}-\x{0823}\x{0824}\x{0825}-\x{0827}\x{0828}\x{0829}-\x{082D}\x{082E}-\x{082F}\x{0830}-\x{083E}\x{083F}\x{0840}-\x{0858}\x{0859}-\x{085B}\x{085C}-\x{085D}\x{085E}\x{085F}\x{0860}-\x{086A}\x{086B}-\x{086F}\x{0870}-\x{089F}\x{08A0}-\x{08B4}\x{08B5}\x{08B6}-\x{08C7}\x{08C8}-\x{08D2}\x{08D3}-\x{08E1}\x{08E2}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09F2}-\x{09F3}\x{09FB}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AF1}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B55}-\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0BF3}-\x{0BF8}\x{0BF9}\x{0BFA}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C78}-\x{0C7E}\x{0C81}\x{0CBC}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0D81}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E3F}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F3A}\x{0F3B}\x{0F3C}\x{0F3D}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{135D}-\x{135F}\x{1390}-\x{1399}\x{1400}\x{1680}\x{169B}\x{169C}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17DB}\x{17DD}\x{17F0}-\x{17F9}\x{1800}-\x{1805}\x{1806}\x{1807}-\x{180A}\x{180B}-\x{180D}\x{180E}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1940}\x{1944}-\x{1945}\x{19DE}-\x{19FF}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{1FBD}\x{1FBF}-\x{1FC1}\x{1FCD}-\x{1FCF}\x{1FDD}-\x{1FDF}\x{1FED}-\x{1FEF}\x{1FFD}-\x{1FFE}\x{2000}-\x{200A}\x{200B}-\x{200D}\x{200F}\x{2010}-\x{2015}\x{2016}-\x{2017}\x{2018}\x{2019}\x{201A}\x{201B}-\x{201C}\x{201D}\x{201E}\x{201F}\x{2020}-\x{2027}\x{2028}\x{2029}\x{202A}\x{202B}\x{202C}\x{202D}\x{202E}\x{202F}\x{2030}-\x{2034}\x{2035}-\x{2038}\x{2039}\x{203A}\x{203B}-\x{203E}\x{203F}-\x{2040}\x{2041}-\x{2043}\x{2044}\x{2045}\x{2046}\x{2047}-\x{2051}\x{2052}\x{2053}\x{2054}\x{2055}-\x{205E}\x{205F}\x{2060}-\x{2064}\x{2065}\x{2066}\x{2067}\x{2068}\x{2069}\x{206A}-\x{206F}\x{207A}-\x{207B}\x{207C}\x{207D}\x{207E}\x{208A}-\x{208B}\x{208C}\x{208D}\x{208E}\x{20A0}-\x{20BF}\x{20C0}-\x{20CF}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2100}-\x{2101}\x{2103}-\x{2106}\x{2108}-\x{2109}\x{2114}\x{2116}-\x{2117}\x{2118}\x{211E}-\x{2123}\x{2125}\x{2127}\x{2129}\x{212E}\x{213A}-\x{213B}\x{2140}-\x{2144}\x{214A}\x{214B}\x{214C}-\x{214D}\x{2150}-\x{215F}\x{2189}\x{218A}-\x{218B}\x{2190}-\x{2194}\x{2195}-\x{2199}\x{219A}-\x{219B}\x{219C}-\x{219F}\x{21A0}\x{21A1}-\x{21A2}\x{21A3}\x{21A4}-\x{21A5}\x{21A6}\x{21A7}-\x{21AD}\x{21AE}\x{21AF}-\x{21CD}\x{21CE}-\x{21CF}\x{21D0}-\x{21D1}\x{21D2}\x{21D3}\x{21D4}\x{21D5}-\x{21F3}\x{21F4}-\x{2211}\x{2212}\x{2213}\x{2214}-\x{22FF}\x{2300}-\x{2307}\x{2308}\x{2309}\x{230A}\x{230B}\x{230C}-\x{231F}\x{2320}-\x{2321}\x{2322}-\x{2328}\x{2329}\x{232A}\x{232B}-\x{2335}\x{237B}\x{237C}\x{237D}-\x{2394}\x{2396}-\x{239A}\x{239B}-\x{23B3}\x{23B4}-\x{23DB}\x{23DC}-\x{23E1}\x{23E2}-\x{2426}\x{2440}-\x{244A}\x{2460}-\x{2487}\x{24EA}-\x{24FF}\x{2500}-\x{25B6}\x{25B7}\x{25B8}-\x{25C0}\x{25C1}\x{25C2}-\x{25F7}\x{25F8}-\x{25FF}\x{2600}-\x{266E}\x{266F}\x{2670}-\x{26AB}\x{26AD}-\x{2767}\x{2768}\x{2769}\x{276A}\x{276B}\x{276C}\x{276D}\x{276E}\x{276F}\x{2770}\x{2771}\x{2772}\x{2773}\x{2774}\x{2775}\x{2776}-\x{2793}\x{2794}-\x{27BF}\x{27C0}-\x{27C4}\x{27C5}\x{27C6}\x{27C7}-\x{27E5}\x{27E6}\x{27E7}\x{27E8}\x{27E9}\x{27EA}\x{27EB}\x{27EC}\x{27ED}\x{27EE}\x{27EF}\x{27F0}-\x{27FF}\x{2900}-\x{2982}\x{2983}\x{2984}\x{2985}\x{2986}\x{2987}\x{2988}\x{2989}\x{298A}\x{298B}\x{298C}\x{298D}\x{298E}\x{298F}\x{2990}\x{2991}\x{2992}\x{2993}\x{2994}\x{2995}\x{2996}\x{2997}\x{2998}\x{2999}-\x{29D7}\x{29D8}\x{29D9}\x{29DA}\x{29DB}\x{29DC}-\x{29FB}\x{29FC}\x{29FD}\x{29FE}-\x{2AFF}\x{2B00}-\x{2B2F}\x{2B30}-\x{2B44}\x{2B45}-\x{2B46}\x{2B47}-\x{2B4C}\x{2B4D}-\x{2B73}\x{2B76}-\x{2B95}\x{2B97}-\x{2BFF}\x{2CE5}-\x{2CEA}\x{2CEF}-\x{2CF1}\x{2CF9}-\x{2CFC}\x{2CFD}\x{2CFE}-\x{2CFF}\x{2D7F}\x{2DE0}-\x{2DFF}\x{2E00}-\x{2E01}\x{2E02}\x{2E03}\x{2E04}\x{2E05}\x{2E06}-\x{2E08}\x{2E09}\x{2E0A}\x{2E0B}\x{2E0C}\x{2E0D}\x{2E0E}-\x{2E16}\x{2E17}\x{2E18}-\x{2E19}\x{2E1A}\x{2E1B}\x{2E1C}\x{2E1D}\x{2E1E}-\x{2E1F}\x{2E20}\x{2E21}\x{2E22}\x{2E23}\x{2E24}\x{2E25}\x{2E26}\x{2E27}\x{2E28}\x{2E29}\x{2E2A}-\x{2E2E}\x{2E2F}\x{2E30}-\x{2E39}\x{2E3A}-\x{2E3B}\x{2E3C}-\x{2E3F}\x{2E40}\x{2E41}\x{2E42}\x{2E43}-\x{2E4F}\x{2E50}-\x{2E51}\x{2E52}\x{2E80}-\x{2E99}\x{2E9B}-\x{2EF3}\x{2F00}-\x{2FD5}\x{2FF0}-\x{2FFB}\x{3000}\x{3001}-\x{3003}\x{3004}\x{3008}\x{3009}\x{300A}\x{300B}\x{300C}\x{300D}\x{300E}\x{300F}\x{3010}\x{3011}\x{3012}-\x{3013}\x{3014}\x{3015}\x{3016}\x{3017}\x{3018}\x{3019}\x{301A}\x{301B}\x{301C}\x{301D}\x{301E}-\x{301F}\x{3020}\x{302A}-\x{302D}\x{3030}\x{3036}-\x{3037}\x{303D}\x{303E}-\x{303F}\x{3099}-\x{309A}\x{309B}-\x{309C}\x{30A0}\x{30FB}\x{31C0}-\x{31E3}\x{321D}-\x{321E}\x{3250}\x{3251}-\x{325F}\x{327C}-\x{327E}\x{32B1}-\x{32BF}\x{32CC}-\x{32CF}\x{3377}-\x{337A}\x{33DE}-\x{33DF}\x{33FF}\x{4DC0}-\x{4DFF}\x{A490}-\x{A4C6}\x{A60D}-\x{A60F}\x{A66F}\x{A670}-\x{A672}\x{A673}\x{A674}-\x{A67D}\x{A67E}\x{A67F}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A700}-\x{A716}\x{A717}-\x{A71F}\x{A720}-\x{A721}\x{A788}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A828}-\x{A82B}\x{A82C}\x{A838}\x{A839}\x{A874}-\x{A877}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}-\x{A9BD}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEC}-\x{AAED}\x{AAF6}\x{AB6A}-\x{AB6B}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1D}\x{FB1E}\x{FB1F}-\x{FB28}\x{FB29}\x{FB2A}-\x{FB36}\x{FB37}\x{FB38}-\x{FB3C}\x{FB3D}\x{FB3E}\x{FB3F}\x{FB40}-\x{FB41}\x{FB42}\x{FB43}-\x{FB44}\x{FB45}\x{FB46}-\x{FB4F}\x{FB50}-\x{FBB1}\x{FBB2}-\x{FBC1}\x{FBC2}-\x{FBD2}\x{FBD3}-\x{FD3D}\x{FD3E}\x{FD3F}\x{FD40}-\x{FD4F}\x{FD50}-\x{FD8F}\x{FD90}-\x{FD91}\x{FD92}-\x{FDC7}\x{FDC8}-\x{FDCF}\x{FDD0}-\x{FDEF}\x{FDF0}-\x{FDFB}\x{FDFC}\x{FDFD}\x{FDFE}-\x{FDFF}\x{FE00}-\x{FE0F}\x{FE10}-\x{FE16}\x{FE17}\x{FE18}\x{FE19}\x{FE20}-\x{FE2F}\x{FE30}\x{FE31}-\x{FE32}\x{FE33}-\x{FE34}\x{FE35}\x{FE36}\x{FE37}\x{FE38}\x{FE39}\x{FE3A}\x{FE3B}\x{FE3C}\x{FE3D}\x{FE3E}\x{FE3F}\x{FE40}\x{FE41}\x{FE42}\x{FE43}\x{FE44}\x{FE45}-\x{FE46}\x{FE47}\x{FE48}\x{FE49}-\x{FE4C}\x{FE4D}-\x{FE4F}\x{FE50}\x{FE51}\x{FE52}\x{FE54}\x{FE55}\x{FE56}-\x{FE57}\x{FE58}\x{FE59}\x{FE5A}\x{FE5B}\x{FE5C}\x{FE5D}\x{FE5E}\x{FE5F}\x{FE60}-\x{FE61}\x{FE62}\x{FE63}\x{FE64}-\x{FE66}\x{FE68}\x{FE69}\x{FE6A}\x{FE6B}\x{FE70}-\x{FE74}\x{FE75}\x{FE76}-\x{FEFC}\x{FEFD}-\x{FEFE}\x{FEFF}\x{FF01}-\x{FF02}\x{FF03}\x{FF04}\x{FF05}\x{FF06}-\x{FF07}\x{FF08}\x{FF09}\x{FF0A}\x{FF0B}\x{FF0C}\x{FF0D}\x{FF0E}-\x{FF0F}\x{FF1A}\x{FF1B}\x{FF1C}-\x{FF1E}\x{FF1F}-\x{FF20}\x{FF3B}\x{FF3C}\x{FF3D}\x{FF3E}\x{FF3F}\x{FF40}\x{FF5B}\x{FF5C}\x{FF5D}\x{FF5E}\x{FF5F}\x{FF60}\x{FF61}\x{FF62}\x{FF63}\x{FF64}-\x{FF65}\x{FFE0}-\x{FFE1}\x{FFE2}\x{FFE3}\x{FFE4}\x{FFE5}-\x{FFE6}\x{FFE8}\x{FFE9}-\x{FFEC}\x{FFED}-\x{FFEE}\x{FFF0}-\x{FFF8}\x{FFF9}-\x{FFFB}\x{FFFC}-\x{FFFD}\x{FFFE}-\x{FFFF}\x{10101}\x{10140}-\x{10174}\x{10175}-\x{10178}\x{10179}-\x{10189}\x{1018A}-\x{1018B}\x{1018C}\x{10190}-\x{1019C}\x{101A0}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10800}-\x{10805}\x{10806}-\x{10807}\x{10808}\x{10809}\x{1080A}-\x{10835}\x{10836}\x{10837}-\x{10838}\x{10839}-\x{1083B}\x{1083C}\x{1083D}-\x{1083E}\x{1083F}-\x{10855}\x{10856}\x{10857}\x{10858}-\x{1085F}\x{10860}-\x{10876}\x{10877}-\x{10878}\x{10879}-\x{1087F}\x{10880}-\x{1089E}\x{1089F}-\x{108A6}\x{108A7}-\x{108AF}\x{108B0}-\x{108DF}\x{108E0}-\x{108F2}\x{108F3}\x{108F4}-\x{108F5}\x{108F6}-\x{108FA}\x{108FB}-\x{108FF}\x{10900}-\x{10915}\x{10916}-\x{1091B}\x{1091C}-\x{1091E}\x{1091F}\x{10920}-\x{10939}\x{1093A}-\x{1093E}\x{1093F}\x{10940}-\x{1097F}\x{10980}-\x{109B7}\x{109B8}-\x{109BB}\x{109BC}-\x{109BD}\x{109BE}-\x{109BF}\x{109C0}-\x{109CF}\x{109D0}-\x{109D1}\x{109D2}-\x{109FF}\x{10A00}\x{10A01}-\x{10A03}\x{10A04}\x{10A05}-\x{10A06}\x{10A07}-\x{10A0B}\x{10A0C}-\x{10A0F}\x{10A10}-\x{10A13}\x{10A14}\x{10A15}-\x{10A17}\x{10A18}\x{10A19}-\x{10A35}\x{10A36}-\x{10A37}\x{10A38}-\x{10A3A}\x{10A3B}-\x{10A3E}\x{10A3F}\x{10A40}-\x{10A48}\x{10A49}-\x{10A4F}\x{10A50}-\x{10A58}\x{10A59}-\x{10A5F}\x{10A60}-\x{10A7C}\x{10A7D}-\x{10A7E}\x{10A7F}\x{10A80}-\x{10A9C}\x{10A9D}-\x{10A9F}\x{10AA0}-\x{10ABF}\x{10AC0}-\x{10AC7}\x{10AC8}\x{10AC9}-\x{10AE4}\x{10AE5}-\x{10AE6}\x{10AE7}-\x{10AEA}\x{10AEB}-\x{10AEF}\x{10AF0}-\x{10AF6}\x{10AF7}-\x{10AFF}\x{10B00}-\x{10B35}\x{10B36}-\x{10B38}\x{10B39}-\x{10B3F}\x{10B40}-\x{10B55}\x{10B56}-\x{10B57}\x{10B58}-\x{10B5F}\x{10B60}-\x{10B72}\x{10B73}-\x{10B77}\x{10B78}-\x{10B7F}\x{10B80}-\x{10B91}\x{10B92}-\x{10B98}\x{10B99}-\x{10B9C}\x{10B9D}-\x{10BA8}\x{10BA9}-\x{10BAF}\x{10BB0}-\x{10BFF}\x{10C00}-\x{10C48}\x{10C49}-\x{10C7F}\x{10C80}-\x{10CB2}\x{10CB3}-\x{10CBF}\x{10CC0}-\x{10CF2}\x{10CF3}-\x{10CF9}\x{10CFA}-\x{10CFF}\x{10D00}-\x{10D23}\x{10D24}-\x{10D27}\x{10D28}-\x{10D2F}\x{10D30}-\x{10D39}\x{10D3A}-\x{10D3F}\x{10D40}-\x{10E5F}\x{10E60}-\x{10E7E}\x{10E7F}\x{10E80}-\x{10EA9}\x{10EAA}\x{10EAB}-\x{10EAC}\x{10EAD}\x{10EAE}-\x{10EAF}\x{10EB0}-\x{10EB1}\x{10EB2}-\x{10EFF}\x{10F00}-\x{10F1C}\x{10F1D}-\x{10F26}\x{10F27}\x{10F28}-\x{10F2F}\x{10F30}-\x{10F45}\x{10F46}-\x{10F50}\x{10F51}-\x{10F54}\x{10F55}-\x{10F59}\x{10F5A}-\x{10F6F}\x{10F70}-\x{10FAF}\x{10FB0}-\x{10FC4}\x{10FC5}-\x{10FCB}\x{10FCC}-\x{10FDF}\x{10FE0}-\x{10FF6}\x{10FF7}-\x{10FFF}\x{11001}\x{11038}-\x{11046}\x{11052}-\x{11065}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{111CF}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{11660}-\x{1166C}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{1193B}-\x{1193C}\x{1193E}\x{11943}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119E0}\x{11A01}-\x{11A06}\x{11A09}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{11FD5}-\x{11FDC}\x{11FDD}-\x{11FE0}\x{11FE1}-\x{11FF1}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F8F}-\x{16F92}\x{16FE2}\x{16FE4}\x{1BC9D}-\x{1BC9E}\x{1BCA0}-\x{1BCA3}\x{1D167}-\x{1D169}\x{1D173}-\x{1D17A}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D200}-\x{1D241}\x{1D242}-\x{1D244}\x{1D245}\x{1D300}-\x{1D356}\x{1D6DB}\x{1D715}\x{1D74F}\x{1D789}\x{1D7C3}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E2FF}\x{1E800}-\x{1E8C4}\x{1E8C5}-\x{1E8C6}\x{1E8C7}-\x{1E8CF}\x{1E8D0}-\x{1E8D6}\x{1E8D7}-\x{1E8FF}\x{1E900}-\x{1E943}\x{1E944}-\x{1E94A}\x{1E94B}\x{1E94C}-\x{1E94F}\x{1E950}-\x{1E959}\x{1E95A}-\x{1E95D}\x{1E95E}-\x{1E95F}\x{1E960}-\x{1EC6F}\x{1EC70}\x{1EC71}-\x{1ECAB}\x{1ECAC}\x{1ECAD}-\x{1ECAF}\x{1ECB0}\x{1ECB1}-\x{1ECB4}\x{1ECB5}-\x{1ECBF}\x{1ECC0}-\x{1ECFF}\x{1ED00}\x{1ED01}-\x{1ED2D}\x{1ED2E}\x{1ED2F}-\x{1ED3D}\x{1ED3E}-\x{1ED4F}\x{1ED50}-\x{1EDFF}\x{1EE00}-\x{1EE03}\x{1EE04}\x{1EE05}-\x{1EE1F}\x{1EE20}\x{1EE21}-\x{1EE22}\x{1EE23}\x{1EE24}\x{1EE25}-\x{1EE26}\x{1EE27}\x{1EE28}\x{1EE29}-\x{1EE32}\x{1EE33}\x{1EE34}-\x{1EE37}\x{1EE38}\x{1EE39}\x{1EE3A}\x{1EE3B}\x{1EE3C}-\x{1EE41}\x{1EE42}\x{1EE43}-\x{1EE46}\x{1EE47}\x{1EE48}\x{1EE49}\x{1EE4A}\x{1EE4B}\x{1EE4C}\x{1EE4D}-\x{1EE4F}\x{1EE50}\x{1EE51}-\x{1EE52}\x{1EE53}\x{1EE54}\x{1EE55}-\x{1EE56}\x{1EE57}\x{1EE58}\x{1EE59}\x{1EE5A}\x{1EE5B}\x{1EE5C}\x{1EE5D}\x{1EE5E}\x{1EE5F}\x{1EE60}\x{1EE61}-\x{1EE62}\x{1EE63}\x{1EE64}\x{1EE65}-\x{1EE66}\x{1EE67}-\x{1EE6A}\x{1EE6B}\x{1EE6C}-\x{1EE72}\x{1EE73}\x{1EE74}-\x{1EE77}\x{1EE78}\x{1EE79}-\x{1EE7C}\x{1EE7D}\x{1EE7E}\x{1EE7F}\x{1EE80}-\x{1EE89}\x{1EE8A}\x{1EE8B}-\x{1EE9B}\x{1EE9C}-\x{1EEA0}\x{1EEA1}-\x{1EEA3}\x{1EEA4}\x{1EEA5}-\x{1EEA9}\x{1EEAA}\x{1EEAB}-\x{1EEBB}\x{1EEBC}-\x{1EEEF}\x{1EEF0}-\x{1EEF1}\x{1EEF2}-\x{1EEFF}\x{1EF00}-\x{1EFFF}\x{1F000}-\x{1F02B}\x{1F030}-\x{1F093}\x{1F0A0}-\x{1F0AE}\x{1F0B1}-\x{1F0BF}\x{1F0C1}-\x{1F0CF}\x{1F0D1}-\x{1F0F5}\x{1F10B}-\x{1F10C}\x{1F10D}-\x{1F10F}\x{1F12F}\x{1F16A}-\x{1F16F}\x{1F1AD}\x{1F260}-\x{1F265}\x{1F300}-\x{1F3FA}\x{1F3FB}-\x{1F3FF}\x{1F400}-\x{1F6D7}\x{1F6E0}-\x{1F6EC}\x{1F6F0}-\x{1F6FC}\x{1F700}-\x{1F773}\x{1F780}-\x{1F7D8}\x{1F7E0}-\x{1F7EB}\x{1F800}-\x{1F80B}\x{1F810}-\x{1F847}\x{1F850}-\x{1F859}\x{1F860}-\x{1F887}\x{1F890}-\x{1F8AD}\x{1F8B0}-\x{1F8B1}\x{1F900}-\x{1F978}\x{1F97A}-\x{1F9CB}\x{1F9CD}-\x{1FA53}\x{1FA60}-\x{1FA6D}\x{1FA70}-\x{1FA74}\x{1FA78}-\x{1FA7A}\x{1FA80}-\x{1FA86}\x{1FA90}-\x{1FAA8}\x{1FAB0}-\x{1FAB6}\x{1FAC0}-\x{1FAC2}\x{1FAD0}-\x{1FAD6}\x{1FB00}-\x{1FB92}\x{1FB94}-\x{1FBCA}\x{1FFFE}-\x{1FFFF}\x{2FFFE}-\x{2FFFF}\x{3FFFE}-\x{3FFFF}\x{4FFFE}-\x{4FFFF}\x{5FFFE}-\x{5FFFF}\x{6FFFE}-\x{6FFFF}\x{7FFFE}-\x{7FFFF}\x{8FFFE}-\x{8FFFF}\x{9FFFE}-\x{9FFFF}\x{AFFFE}-\x{AFFFF}\x{BFFFE}-\x{BFFFF}\x{CFFFE}-\x{CFFFF}\x{DFFFE}-\x{E0000}\x{E0001}\x{E0002}-\x{E001F}\x{E0020}-\x{E007F}\x{E0080}-\x{E00FF}\x{E0100}-\x{E01EF}\x{E01F0}-\x{E0FFF}\x{EFFFE}-\x{EFFFF}\x{FFFFE}-\x{FFFFF}\x{10FFFE}-\x{10FFFF}][\x{0300}-\x{036F}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{0610}-\x{061A}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DF}-\x{06E4}\x{06E7}-\x{06E8}\x{06EA}-\x{06ED}\x{0711}\x{0730}-\x{074A}\x{07A6}-\x{07B0}\x{07EB}-\x{07F3}\x{07FD}\x{0816}-\x{0819}\x{081B}-\x{0823}\x{0825}-\x{0827}\x{0829}-\x{082D}\x{0859}-\x{085B}\x{08D3}-\x{08E1}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B55}-\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C81}\x{0CBC}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0D81}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{135D}-\x{135F}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17DD}\x{180B}-\x{180D}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2CEF}-\x{2CF1}\x{2D7F}\x{2DE0}-\x{2DFF}\x{302A}-\x{302D}\x{3099}-\x{309A}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A82C}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}-\x{A9BD}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEC}-\x{AAED}\x{AAF6}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1E}\x{FE00}-\x{FE0F}\x{FE20}-\x{FE2F}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10A01}-\x{10A03}\x{10A05}-\x{10A06}\x{10A0C}-\x{10A0F}\x{10A38}-\x{10A3A}\x{10A3F}\x{10AE5}-\x{10AE6}\x{10D24}-\x{10D27}\x{10EAB}-\x{10EAC}\x{10F46}-\x{10F50}\x{11001}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{111CF}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{1193B}-\x{1193C}\x{1193E}\x{11943}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119E0}\x{11A01}-\x{11A06}\x{11A09}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F8F}-\x{16F92}\x{16FE4}\x{1BC9D}-\x{1BC9E}\x{1D167}-\x{1D169}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D242}-\x{1D244}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{E0100}-\x{E01EF}]*$/u';
22
-
23
- const ZWNJ = '/([\x{A872}\x{10ACD}\x{10AD7}\x{10D00}\x{10FCB}\x{0620}\x{0626}\x{0628}\x{062A}-\x{062E}\x{0633}-\x{063F}\x{0641}-\x{0647}\x{0649}-\x{064A}\x{066E}-\x{066F}\x{0678}-\x{0687}\x{069A}-\x{06BF}\x{06C1}-\x{06C2}\x{06CC}\x{06CE}\x{06D0}-\x{06D1}\x{06FA}-\x{06FC}\x{06FF}\x{0712}-\x{0714}\x{071A}-\x{071D}\x{071F}-\x{0727}\x{0729}\x{072B}\x{072D}-\x{072E}\x{074E}-\x{0758}\x{075C}-\x{076A}\x{076D}-\x{0770}\x{0772}\x{0775}-\x{0777}\x{077A}-\x{077F}\x{07CA}-\x{07EA}\x{0841}-\x{0845}\x{0848}\x{084A}-\x{0853}\x{0855}\x{0860}\x{0862}-\x{0865}\x{0868}\x{08A0}-\x{08A9}\x{08AF}-\x{08B0}\x{08B3}-\x{08B4}\x{08B6}-\x{08B8}\x{08BA}-\x{08C7}\x{1807}\x{1820}-\x{1842}\x{1843}\x{1844}-\x{1878}\x{1887}-\x{18A8}\x{18AA}\x{A840}-\x{A871}\x{10AC0}-\x{10AC4}\x{10AD3}-\x{10AD6}\x{10AD8}-\x{10ADC}\x{10ADE}-\x{10AE0}\x{10AEB}-\x{10AEE}\x{10B80}\x{10B82}\x{10B86}-\x{10B88}\x{10B8A}-\x{10B8B}\x{10B8D}\x{10B90}\x{10BAD}-\x{10BAE}\x{10D01}-\x{10D21}\x{10D23}\x{10F30}-\x{10F32}\x{10F34}-\x{10F44}\x{10F51}-\x{10F53}\x{10FB0}\x{10FB2}-\x{10FB3}\x{10FB8}\x{10FBB}-\x{10FBC}\x{10FBE}-\x{10FBF}\x{10FC1}\x{10FC4}\x{10FCA}\x{1E900}-\x{1E943}][\x{00AD}\x{0300}-\x{036F}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{0610}-\x{061A}\x{061C}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DF}-\x{06E4}\x{06E7}-\x{06E8}\x{06EA}-\x{06ED}\x{070F}\x{0711}\x{0730}-\x{074A}\x{07A6}-\x{07B0}\x{07EB}-\x{07F3}\x{07FD}\x{0816}-\x{0819}\x{081B}-\x{0823}\x{0825}-\x{0827}\x{0829}-\x{082D}\x{0859}-\x{085B}\x{08D3}-\x{08E1}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B55}-\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C81}\x{0CBC}\x{0CBF}\x{0CC6}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0D81}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{135D}-\x{135F}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17DD}\x{180B}-\x{180D}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{200B}\x{200E}-\x{200F}\x{202A}-\x{202E}\x{2060}-\x{2064}\x{206A}-\x{206F}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2CEF}-\x{2CF1}\x{2D7F}\x{2DE0}-\x{2DFF}\x{302A}-\x{302D}\x{3099}-\x{309A}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A82C}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}-\x{A9BD}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEC}-\x{AAED}\x{AAF6}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1E}\x{FE00}-\x{FE0F}\x{FE20}-\x{FE2F}\x{FEFF}\x{FFF9}-\x{FFFB}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10A01}-\x{10A03}\x{10A05}-\x{10A06}\x{10A0C}-\x{10A0F}\x{10A38}-\x{10A3A}\x{10A3F}\x{10AE5}-\x{10AE6}\x{10D24}-\x{10D27}\x{10EAB}-\x{10EAC}\x{10F46}-\x{10F50}\x{11001}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{111CF}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{1193B}-\x{1193C}\x{1193E}\x{11943}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119E0}\x{11A01}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C3F}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{13430}-\x{13438}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F8F}-\x{16F92}\x{16FE4}\x{1BC9D}-\x{1BC9E}\x{1BCA0}-\x{1BCA3}\x{1D167}-\x{1D169}\x{1D173}-\x{1D17A}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D242}-\x{1D244}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{1E94B}\x{E0001}\x{E0020}-\x{E007F}\x{E0100}-\x{E01EF}]*\x{200C}[\x{00AD}\x{0300}-\x{036F}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{0610}-\x{061A}\x{061C}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DF}-\x{06E4}\x{06E7}-\x{06E8}\x{06EA}-\x{06ED}\x{070F}\x{0711}\x{0730}-\x{074A}\x{07A6}-\x{07B0}\x{07EB}-\x{07F3}\x{07FD}\x{0816}-\x{0819}\x{081B}-\x{0823}\x{0825}-\x{0827}\x{0829}-\x{082D}\x{0859}-\x{085B}\x{08D3}-\x{08E1}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B55}-\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C81}\x{0CBC}\x{0CBF}\x{0CC6}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0D81}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{135D}-\x{135F}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17DD}\x{180B}-\x{180D}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{200B}\x{200E}-\x{200F}\x{202A}-\x{202E}\x{2060}-\x{2064}\x{206A}-\x{206F}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2CEF}-\x{2CF1}\x{2D7F}\x{2DE0}-\x{2DFF}\x{302A}-\x{302D}\x{3099}-\x{309A}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A82C}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}-\x{A9BD}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEC}-\x{AAED}\x{AAF6}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1E}\x{FE00}-\x{FE0F}\x{FE20}-\x{FE2F}\x{FEFF}\x{FFF9}-\x{FFFB}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10A01}-\x{10A03}\x{10A05}-\x{10A06}\x{10A0C}-\x{10A0F}\x{10A38}-\x{10A3A}\x{10A3F}\x{10AE5}-\x{10AE6}\x{10D24}-\x{10D27}\x{10EAB}-\x{10EAC}\x{10F46}-\x{10F50}\x{11001}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{111CF}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{1193B}-\x{1193C}\x{1193E}\x{11943}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119E0}\x{11A01}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C3F}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{13430}-\x{13438}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F8F}-\x{16F92}\x{16FE4}\x{1BC9D}-\x{1BC9E}\x{1BCA0}-\x{1BCA3}\x{1D167}-\x{1D169}\x{1D173}-\x{1D17A}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D242}-\x{1D244}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{1E94B}\x{E0001}\x{E0020}-\x{E007F}\x{E0100}-\x{E01EF}]*)[\x{0622}-\x{0625}\x{0627}\x{0629}\x{062F}-\x{0632}\x{0648}\x{0671}-\x{0673}\x{0675}-\x{0677}\x{0688}-\x{0699}\x{06C0}\x{06C3}-\x{06CB}\x{06CD}\x{06CF}\x{06D2}-\x{06D3}\x{06D5}\x{06EE}-\x{06EF}\x{0710}\x{0715}-\x{0719}\x{071E}\x{0728}\x{072A}\x{072C}\x{072F}\x{074D}\x{0759}-\x{075B}\x{076B}-\x{076C}\x{0771}\x{0773}-\x{0774}\x{0778}-\x{0779}\x{0840}\x{0846}-\x{0847}\x{0849}\x{0854}\x{0856}-\x{0858}\x{0867}\x{0869}-\x{086A}\x{08AA}-\x{08AC}\x{08AE}\x{08B1}-\x{08B2}\x{08B9}\x{10AC5}\x{10AC7}\x{10AC9}-\x{10ACA}\x{10ACE}-\x{10AD2}\x{10ADD}\x{10AE1}\x{10AE4}\x{10AEF}\x{10B81}\x{10B83}-\x{10B85}\x{10B89}\x{10B8C}\x{10B8E}-\x{10B8F}\x{10B91}\x{10BA9}-\x{10BAC}\x{10D22}\x{10F33}\x{10F54}\x{10FB4}-\x{10FB6}\x{10FB9}-\x{10FBA}\x{10FBD}\x{10FC2}-\x{10FC3}\x{10FC9}\x{0620}\x{0626}\x{0628}\x{062A}-\x{062E}\x{0633}-\x{063F}\x{0641}-\x{0647}\x{0649}-\x{064A}\x{066E}-\x{066F}\x{0678}-\x{0687}\x{069A}-\x{06BF}\x{06C1}-\x{06C2}\x{06CC}\x{06CE}\x{06D0}-\x{06D1}\x{06FA}-\x{06FC}\x{06FF}\x{0712}-\x{0714}\x{071A}-\x{071D}\x{071F}-\x{0727}\x{0729}\x{072B}\x{072D}-\x{072E}\x{074E}-\x{0758}\x{075C}-\x{076A}\x{076D}-\x{0770}\x{0772}\x{0775}-\x{0777}\x{077A}-\x{077F}\x{07CA}-\x{07EA}\x{0841}-\x{0845}\x{0848}\x{084A}-\x{0853}\x{0855}\x{0860}\x{0862}-\x{0865}\x{0868}\x{08A0}-\x{08A9}\x{08AF}-\x{08B0}\x{08B3}-\x{08B4}\x{08B6}-\x{08B8}\x{08BA}-\x{08C7}\x{1807}\x{1820}-\x{1842}\x{1843}\x{1844}-\x{1878}\x{1887}-\x{18A8}\x{18AA}\x{A840}-\x{A871}\x{10AC0}-\x{10AC4}\x{10AD3}-\x{10AD6}\x{10AD8}-\x{10ADC}\x{10ADE}-\x{10AE0}\x{10AEB}-\x{10AEE}\x{10B80}\x{10B82}\x{10B86}-\x{10B88}\x{10B8A}-\x{10B8B}\x{10B8D}\x{10B90}\x{10BAD}-\x{10BAE}\x{10D01}-\x{10D21}\x{10D23}\x{10F30}-\x{10F32}\x{10F34}-\x{10F44}\x{10F51}-\x{10F53}\x{10FB0}\x{10FB2}-\x{10FB3}\x{10FB8}\x{10FBB}-\x{10FBC}\x{10FBE}-\x{10FBF}\x{10FC1}\x{10FC4}\x{10FCA}\x{1E900}-\x{1E943}]/u';
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/polyfill-intl-idn/Resources/unidata/deviation.php DELETED
@@ -1,8 +0,0 @@
1
- <?php
2
-
3
- return array (
4
- 223 => 'ss',
5
- 962 => 'σ',
6
- 8204 => '',
7
- 8205 => '',
8
- );
 
 
 
 
 
 
 
 
vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php DELETED
@@ -1,2638 +0,0 @@
1
- <?php
2
-
3
- return array (
4
- 888 => true,
5
- 889 => true,
6
- 896 => true,
7
- 897 => true,
8
- 898 => true,
9
- 899 => true,
10
- 907 => true,
11
- 909 => true,
12
- 930 => true,
13
- 1216 => true,
14
- 1328 => true,
15
- 1367 => true,
16
- 1368 => true,
17
- 1419 => true,
18
- 1420 => true,
19
- 1424 => true,
20
- 1480 => true,
21
- 1481 => true,
22
- 1482 => true,
23
- 1483 => true,
24
- 1484 => true,
25
- 1485 => true,
26
- 1486 => true,
27
- 1487 => true,
28
- 1515 => true,
29
- 1516 => true,
30
- 1517 => true,
31
- 1518 => true,
32
- 1525 => true,
33
- 1526 => true,
34
- 1527 => true,
35
- 1528 => true,
36
- 1529 => true,
37
- 1530 => true,
38
- 1531 => true,
39
- 1532 => true,
40
- 1533 => true,
41
- 1534 => true,
42
- 1535 => true,
43
- 1536 => true,
44
- 1537 => true,
45
- 1538 => true,
46
- 1539 => true,
47
- 1540 => true,
48
- 1541 => true,
49
- 1564 => true,
50
- 1565 => true,
51
- 1757 => true,
52
- 1806 => true,
53
- 1807 => true,
54
- 1867 => true,
55
- 1868 => true,
56
- 1970 => true,
57
- 1971 => true,
58
- 1972 => true,
59
- 1973 => true,
60
- 1974 => true,
61
- 1975 => true,
62
- 1976 => true,
63
- 1977 => true,
64
- 1978 => true,
65
- 1979 => true,
66
- 1980 => true,
67
- 1981 => true,
68
- 1982 => true,
69
- 1983 => true,
70
- 2043 => true,
71
- 2044 => true,
72
- 2094 => true,
73
- 2095 => true,
74
- 2111 => true,
75
- 2140 => true,
76
- 2141 => true,
77
- 2143 => true,
78
- 2229 => true,
79
- 2248 => true,
80
- 2249 => true,
81
- 2250 => true,
82
- 2251 => true,
83
- 2252 => true,
84
- 2253 => true,
85
- 2254 => true,
86
- 2255 => true,
87
- 2256 => true,
88
- 2257 => true,
89
- 2258 => true,
90
- 2274 => true,
91
- 2436 => true,
92
- 2445 => true,
93
- 2446 => true,
94
- 2449 => true,
95
- 2450 => true,
96
- 2473 => true,
97
- 2481 => true,
98
- 2483 => true,
99
- 2484 => true,
100
- 2485 => true,
101
- 2490 => true,
102
- 2491 => true,
103
- 2501 => true,
104
- 2502 => true,
105
- 2505 => true,
106
- 2506 => true,
107
- 2511 => true,
108
- 2512 => true,
109
- 2513 => true,
110
- 2514 => true,
111
- 2515 => true,
112
- 2516 => true,
113
- 2517 => true,
114
- 2518 => true,
115
- 2520 => true,
116
- 2521 => true,
117
- 2522 => true,
118
- 2523 => true,
119
- 2526 => true,
120
- 2532 => true,
121
- 2533 => true,
122
- 2559 => true,
123
- 2560 => true,
124
- 2564 => true,
125
- 2571 => true,
126
- 2572 => true,
127
- 2573 => true,
128
- 2574 => true,
129
- 2577 => true,
130
- 2578 => true,
131
- 2601 => true,
132
- 2609 => true,
133
- 2612 => true,
134
- 2615 => true,
135
- 2618 => true,
136
- 2619 => true,
137
- 2621 => true,
138
- 2627 => true,
139
- 2628 => true,
140
- 2629 => true,
141
- 2630 => true,
142
- 2633 => true,
143
- 2634 => true,
144
- 2638 => true,
145
- 2639 => true,
146
- 2640 => true,
147
- 2642 => true,
148
- 2643 => true,
149
- 2644 => true,
150
- 2645 => true,
151
- 2646 => true,
152
- 2647 => true,
153
- 2648 => true,
154
- 2653 => true,
155
- 2655 => true,
156
- 2656 => true,
157
- 2657 => true,
158
- 2658 => true,
159
- 2659 => true,
160
- 2660 => true,
161
- 2661 => true,
162
- 2679 => true,
163
- 2680 => true,
164
- 2681 => true,
165
- 2682 => true,
166
- 2683 => true,
167
- 2684 => true,
168
- 2685 => true,
169
- 2686 => true,
170
- 2687 => true,
171
- 2688 => true,
172
- 2692 => true,
173
- 2702 => true,
174
- 2706 => true,
175
- 2729 => true,
176
- 2737 => true,
177
- 2740 => true,
178
- 2746 => true,
179
- 2747 => true,
180
- 2758 => true,
181
- 2762 => true,
182
- 2766 => true,
183
- 2767 => true,
184
- 2769 => true,
185
- 2770 => true,
186
- 2771 => true,
187
- 2772 => true,
188
- 2773 => true,
189
- 2774 => true,
190
- 2775 => true,
191
- 2776 => true,
192
- 2777 => true,
193
- 2778 => true,
194
- 2779 => true,
195
- 2780 => true,
196
- 2781 => true,
197
- 2782 => true,
198
- 2783 => true,
199
- 2788 => true,
200
- 2789 => true,
201
- 2802 => true,
202
- 2803 => true,
203
- 2804 => true,
204
- 2805 => true,
205
- 2806 => true,
206
- 2807 => true,
207
- 2808 => true,
208
- 2816 => true,
209
- 2820 => true,
210
- 2829 => true,
211
- 2830 => true,
212
- 2833 => true,
213
- 2834 => true,
214
- 2857 => true,
215
- 2865 => true,
216
- 2868 => true,
217
- 2874 => true,
218
- 2875 => true,
219
- 2885 => true,
220
- 2886 => true,
221
- 2889 => true,
222
- 2890 => true,
223
- 2894 => true,
224
- 2895 => true,
225
- 2896 => true,
226
- 2897 => true,
227
- 2898 => true,
228
- 2899 => true,
229
- 2900 => true,
230
- 2904 => true,
231
- 2905 => true,
232
- 2906 => true,
233
- 2907 => true,
234
- 2910 => true,
235
- 2916 => true,
236
- 2917 => true,
237
- 2936 => true,
238
- 2937 => true,
239
- 2938 => true,
240
- 2939 => true,
241
- 2940 => true,
242
- 2941 => true,
243
- 2942 => true,
244
- 2943 => true,
245
- 2944 => true,
246
- 2945 => true,
247
- 2948 => true,
248
- 2955 => true,
249
- 2956 => true,
250
- 2957 => true,
251
- 2961 => true,
252
- 2966 => true,
253
- 2967 => true,
254
- 2968 => true,
255
- 2971 => true,
256
- 2973 => true,
257
- 2976 => true,
258
- 2977 => true,
259
- 2978 => true,
260
- 2981 => true,
261
- 2982 => true,
262
- 2983 => true,
263
- 2987 => true,
264
- 2988 => true,
265
- 2989 => true,
266
- 3002 => true,
267
- 3003 => true,
268
- 3004 => true,
269
- 3005 => true,
270
- 3011 => true,
271
- 3012 => true,
272
- 3013 => true,
273
- 3017 => true,
274
- 3022 => true,
275
- 3023 => true,
276
- 3025 => true,
277
- 3026 => true,
278
- 3027 => true,
279
- 3028 => true,
280
- 3029 => true,
281
- 3030 => true,
282
- 3032 => true,
283
- 3033 => true,
284
- 3034 => true,
285
- 3035 => true,
286
- 3036 => true,
287
- 3037 => true,
288
- 3038 => true,
289
- 3039 => true,
290
- 3040 => true,
291
- 3041 => true,
292
- 3042 => true,
293
- 3043 => true,
294
- 3044 => true,
295
- 3045 => true,
296
- 3067 => true,
297
- 3068 => true,
298
- 3069 => true,
299
- 3070 => true,
300
- 3071 => true,
301
- 3085 => true,
302
- 3089 => true,
303
- 3113 => true,
304
- 3130 => true,
305
- 3131 => true,
306
- 3132 => true,
307
- 3141 => true,
308
- 3145 => true,
309
- 3150 => true,
310
- 3151 => true,
311
- 3152 => true,
312
- 3153 => true,
313
- 3154 => true,
314
- 3155 => true,
315
- 3156 => true,
316
- 3159 => true,
317
- 3163 => true,
318
- 3164 => true,
319
- 3165 => true,
320
- 3166 => true,
321
- 3167 => true,
322
- 3172 => true,
323
- 3173 => true,
324
- 3184 => true,
325
- 3185 => true,
326
- 3186 => true,
327
- 3187 => true,
328
- 3188 => true,
329
- 3189 => true,
330
- 3190 => true,
331
- 3213 => true,
332
- 3217 => true,
333
- 3241 => true,
334
- 3252 => true,
335
- 3258 => true,
336
- 3259 => true,
337
- 3269 => true,
338
- 3273 => true,
339
- 3278 => true,
340
- 3279 => true,
341
- 3280 => true,
342
- 3281 => true,
343
- 3282 => true,
344
- 3283 => true,
345
- 3284 => true,
346
- 3287 => true,
347
- 3288 => true,
348
- 3289 => true,
349
- 3290 => true,
350
- 3291 => true,
351
- 3292 => true,
352
- 3293 => true,
353
- 3295 => true,
354
- 3300 => true,
355
- 3301 => true,
356
- 3312 => true,
357
- 3315 => true,
358
- 3316 => true,
359
- 3317 => true,
360
- 3318 => true,
361
- 3319 => true,
362
- 3320 => true,
363
- 3321 => true,
364
- 3322 => true,
365
- 3323 => true,
366
- 3324 => true,
367
- 3325 => true,
368
- 3326 => true,
369
- 3327 => true,
370
- 3341 => true,
371
- 3345 => true,
372
- 3397 => true,
373
- 3401 => true,
374
- 3408 => true,
375
- 3409 => true,
376
- 3410 => true,
377
- 3411 => true,
378
- 3428 => true,
379
- 3429 => true,
380
- 3456 => true,
381
- 3460 => true,
382
- 3479 => true,
383
- 3480 => true,
384
- 3481 => true,
385
- 3506 => true,
386
- 3516 => true,
387
- 3518 => true,
388
- 3519 => true,
389
- 3527 => true,
390
- 3528 => true,
391
- 3529 => true,
392
- 3531 => true,
393
- 3532 => true,
394
- 3533 => true,
395
- 3534 => true,
396
- 3541 => true,
397
- 3543 => true,
398
- 3552 => true,
399
- 3553 => true,
400
- 3554 => true,
401
- 3555 => true,
402
- 3556 => true,
403
- 3557 => true,
404
- 3568 => true,
405
- 3569 => true,
406
- 3573 => true,
407
- 3574 => true,
408
- 3575 => true,
409
- 3576 => true,
410
- 3577 => true,
411
- 3578 => true,
412
- 3579 => true,
413
- 3580 => true,
414
- 3581 => true,
415
- 3582 => true,
416
- 3583 => true,
417
- 3584 => true,
418
- 3643 => true,
419
- 3644 => true,
420
- 3645 => true,
421
- 3646 => true,
422
- 3715 => true,
423
- 3717 => true,
424
- 3723 => true,
425
- 3748 => true,
426
- 3750 => true,
427
- 3774 => true,
428
- 3775 => true,
429
- 3781 => true,
430
- 3783 => true,
431
- 3790 => true,
432
- 3791 => true,
433
- 3802 => true,
434
- 3803 => true,
435
- 3912 => true,
436
- 3949 => true,
437
- 3950 => true,
438
- 3951 => true,
439
- 3952 => true,
440
- 3992 => true,
441
- 4029 => true,
442
- 4045 => true,
443
- 4294 => true,
444
- 4296 => true,
445
- 4297 => true,
446
- 4298 => true,
447
- 4299 => true,
448
- 4300 => true,
449
- 4302 => true,
450
- 4303 => true,
451
- 4447 => true,
452
- 4448 => true,
453
- 4681 => true,
454
- 4686 => true,
455
- 4687 => true,
456
- 4695 => true,
457
- 4697 => true,
458
- 4702 => true,
459
- 4703 => true,
460
- 4745 => true,
461
- 4750 => true,
462
- 4751 => true,
463
- 4785 => true,
464
- 4790 => true,
465
- 4791 => true,
466
- 4799 => true,
467
- 4801 => true,
468
- 4806 => true,
469
- 4807 => true,
470
- 4823 => true,
471
- 4881 => true,
472
- 4886 => true,
473
- 4887 => true,
474
- 4955 => true,
475
- 4956 => true,
476
- 4989 => true,
477
- 4990 => true,
478
- 4991 => true,
479
- 5018 => true,
480
- 5019 => true,
481
- 5020 => true,
482
- 5021 => true,
483
- 5022 => true,
484
- 5023 => true,
485
- 5110 => true,
486
- 5111 => true,
487
- 5118 => true,
488
- 5119 => true,
489
- 5760 => true,
490
- 5789 => true,
491
- 5790 => true,
492
- 5791 => true,
493
- 5881 => true,
494
- 5882 => true,
495
- 5883 => true,
496
- 5884 => true,
497
- 5885 => true,
498
- 5886 => true,
499
- 5887 => true,
500
- 5901 => true,
501
- 5909 => true,
502
- 5910 => true,
503
- 5911 => true,
504
- 5912 => true,
505
- 5913 => true,
506
- 5914 => true,
507
- 5915 => true,
508
- 5916 => true,
509
- 5917 => true,
510
- 5918 => true,
511
- 5919 => true,
512
- 5943 => true,
513
- 5944 => true,
514
- 5945 => true,
515
- 5946 => true,
516
- 5947 => true,
517
- 5948 => true,
518
- 5949 => true,
519
- 5950 => true,
520
- 5951 => true,
521
- 5972 => true,
522
- 5973 => true,
523
- 5974 => true,
524
- 5975 => true,
525
- 5976 => true,
526
- 5977 => true,
527
- 5978 => true,
528
- 5979 => true,
529
- 5980 => true,
530
- 5981 => true,
531
- 5982 => true,
532
- 5983 => true,
533
- 5997 => true,
534
- 6001 => true,
535
- 6004 => true,
536
- 6005 => true,
537
- 6006 => true,
538
- 6007 => true,
539
- 6008 => true,
540
- 6009 => true,
541
- 6010 => true,
542
- 6011 => true,
543
- 6012 => true,
544
- 6013 => true,
545
- 6014 => true,
546
- 6015 => true,
547
- 6068 => true,
548
- 6069 => true,
549
- 6110 => true,
550
- 6111 => true,
551
- 6122 => true,
552
- 6123 => true,
553
- 6124 => true,
554
- 6125 => true,
555
- 6126 => true,
556
- 6127 => true,
557
- 6138 => true,
558
- 6139 => true,
559
- 6140 => true,
560
- 6141 => true,
561
- 6142 => true,
562
- 6143 => true,
563
- 6150 => true,
564
- 6158 => true,
565
- 6159 => true,
566
- 6170 => true,
567
- 6171 => true,
568
- 6172 => true,
569
- 6173 => true,
570
- 6174 => true,
571
- 6175 => true,
572
- 6265 => true,
573
- 6266 => true,
574
- 6267 => true,
575
- 6268 => true,
576
- 6269 => true,
577
- 6270 => true,
578
- 6271 => true,
579
- 6315 => true,
580
- 6316 => true,
581
- 6317 => true,
582
- 6318 => true,
583
- 6319 => true,
584
- 6390 => true,
585
- 6391 => true,
586
- 6392 => true,
587
- 6393 => true,
588
- 6394 => true,
589
- 6395 => true,
590
- 6396 => true,
591
- 6397 => true,
592
- 6398 => true,
593
- 6399 => true,
594
- 6431 => true,
595
- 6444 => true,
596
- 6445 => true,
597
- 6446 => true,
598
- 6447 => true,
599
- 6460 => true,
600
- 6461 => true,
601
- 6462 => true,
602
- 6463 => true,
603
- 6465 => true,
604
- 6466 => true,
605
- 6467 => true,
606
- 6510 => true,
607
- 6511 => true,
608
- 6517 => true,
609
- 6518 => true,
610
- 6519 => true,
611
- 6520 => true,
612
- 6521 => true,
613
- 6522 => true,
614
- 6523 => true,
615
- 6524 => true,
616
- 6525 => true,
617
- 6526 => true,
618
- 6527 => true,
619
- 6572 => true,
620
- 6573 => true,
621
- 6574 => true,
622
- 6575 => true,
623
- 6602 => true,
624
- 6603 => true,
625
- 6604 => true,
626
- 6605 => true,
627
- 6606 => true,
628
- 6607 => true,
629
- 6619 => true,
630
- 6620 => true,
631
- 6621 => true,
632
- 6684 => true,
633
- 6685 => true,
634
- 6751 => true,
635
- 6781 => true,
636
- 6782 => true,
637
- 6794 => true,
638
- 6795 => true,
639
- 6796 => true,
640
- 6797 => true,
641
- 6798 => true,
642
- 6799 => true,
643
- 6810 => true,
644
- 6811 => true,
645
- 6812 => true,
646
- 6813 => true,
647
- 6814 => true,
648
- 6815 => true,
649
- 6830 => true,
650
- 6831 => true,
651
- 6988 => true,
652
- 6989 => true,
653
- 6990 => true,
654
- 6991 => true,
655
- 7037 => true,
656
- 7038 => true,
657
- 7039 => true,
658
- 7156 => true,
659
- 7157 => true,
660
- 7158 => true,
661
- 7159 => true,
662
- 7160 => true,
663
- 7161 => true,
664
- 7162 => true,
665
- 7163 => true,
666
- 7224 => true,
667
- 7225 => true,
668
- 7226 => true,
669
- 7242 => true,
670
- 7243 => true,
671
- 7244 => true,
672
- 7305 => true,
673
- 7306 => true,
674
- 7307 => true,
675
- 7308 => true,
676
- 7309 => true,
677
- 7310 => true,
678
- 7311 => true,
679
- 7355 => true,
680
- 7356 => true,
681
- 7368 => true,
682
- 7369 => true,
683
- 7370 => true,
684
- 7371 => true,
685
- 7372 => true,
686
- 7373 => true,
687
- 7374 => true,
688
- 7375 => true,
689
- 7419 => true,
690
- 7420 => true,
691
- 7421 => true,
692
- 7422 => true,
693
- 7423 => true,
694
- 7674 => true,
695
- 7958 => true,
696
- 7959 => true,
697
- 7966 => true,
698
- 7967 => true,
699
- 8006 => true,
700
- 8007 => true,
701
- 8014 => true,
702
- 8015 => true,
703
- 8024 => true,
704
- 8026 => true,
705
- 8028 => true,
706
- 8030 => true,
707
- 8062 => true,
708
- 8063 => true,
709
- 8117 => true,
710
- 8133 => true,
711
- 8148 => true,
712
- 8149 => true,
713
- 8156 => true,
714
- 8176 => true,
715
- 8177 => true,
716
- 8181 => true,
717
- 8191 => true,
718
- 8206 => true,
719
- 8207 => true,
720
- 8228 => true,
721
- 8229 => true,
722
- 8230 => true,
723
- 8232 => true,
724
- 8233 => true,
725
- 8234 => true,
726
- 8235 => true,
727
- 8236 => true,
728
- 8237 => true,
729
- 8238 => true,
730
- 8289 => true,
731
- 8290 => true,
732
- 8291 => true,
733
- 8293 => true,
734
- 8294 => true,
735
- 8295 => true,
736
- 8296 => true,
737
- 8297 => true,
738
- 8298 => true,
739
- 8299 => true,
740
- 8300 => true,
741
- 8301 => true,
742
- 8302 => true,
743
- 8303 => true,
744
- 8306 => true,
745
- 8307 => true,
746
- 8335 => true,
747
- 8349 => true,
748
- 8350 => true,
749
- 8351 => true,
750
- 8384 => true,
751
- 8385 => true,
752
- 8386 => true,
753
- 8387 => true,
754
- 8388 => true,
755
- 8389 => true,
756
- 8390 => true,
757
- 8391 => true,
758
- 8392 => true,
759
- 8393 => true,
760
- 8394 => true,
761
- 8395 => true,
762
- 8396 => true,
763
- 8397 => true,
764
- 8398 => true,
765
- 8399 => true,
766
- 8433 => true,
767
- 8434 => true,
768
- 8435 => true,
769
- 8436 => true,
770
- 8437 => true,
771
- 8438 => true,
772
- 8439 => true,
773
- 8440 => true,
774
- 8441 => true,
775
- 8442 => true,
776
- 8443 => true,
777
- 8444 => true,
778
- 8445 => true,
779
- 8446 => true,
780
- 8447 => true,
781
- 8498 => true,
782
- 8579 => true,
783
- 8588 => true,
784
- 8589 => true,
785
- 8590 => true,
786
- 8591 => true,
787
- 9255 => true,
788
- 9256 => true,
789
- 9257 => true,
790
- 9258 => true,
791
- 9259 => true,
792
- 9260 => true,
793
- 9261 => true,
794
- 9262 => true,
795
- 9263 => true,
796
- 9264 => true,
797
- 9265 => true,
798
- 9266 => true,
799
- 9267 => true,
800
- 9268 => true,
801
- 9269 => true,
802
- 9270 => true,
803
- 9271 => true,
804
- 9272 => true,
805
- 9273 => true,
806
- 9274 => true,
807
- 9275 => true,
808
- 9276 => true,
809
- 9277 => true,
810
- 9278 => true,
811
- 9279 => true,
812
- 9291 => true,
813
- 9292 => true,
814
- 9293 => true,
815
- 9294 => true,
816
- 9295 => true,
817
- 9296 => true,
818
- 9297 => true,
819
- 9298 => true,
820
- 9299 => true,
821
- 9300 => true,
822
- 9301 => true,
823
- 9302 => true,
824
- 9303 => true,
825
- 9304 => true,
826
- 9305 => true,
827
- 9306 => true,
828
- 9307 => true,
829
- 9308 => true,
830
- 9309 => true,
831
- 9310 => true,
832
- 9311 => true,
833
- 9352 => true,
834
- 9353 => true,
835
- 9354 => true,
836
- 9355 => true,
837
- 9356 => true,
838
- 9357 => true,
839
- 9358 => true,
840
- 9359 => true,
841
- 9360 => true,
842
- 9361 => true,
843
- 9362 => true,
844
- 9363 => true,
845
- 9364 => true,
846
- 9365 => true,
847
- 9366 => true,
848
- 9367 => true,
849
- 9368 => true,
850
- 9369 => true,
851
- 9370 => true,
852
- 9371 => true,
853
- 11124 => true,
854
- 11125 => true,
855
- 11158 => true,
856
- 11311 => true,
857
- 11359 => true,
858
- 11508 => true,
859
- 11509 => true,
860
- 11510 => true,
861
- 11511 => true,
862
- 11512 => true,
863
- 11558 => true,
864
- 11560 => true,
865
- 11561 => true,
866
- 11562 => true,
867
- 11563 => true,
868
- 11564 => true,
869
- 11566 => true,
870
- 11567 => true,
871
- 11624 => true,
872
- 11625 => true,
873
- 11626 => true,
874
- 11627 => true,
875
- 11628 => true,
876
- 11629 => true,
877
- 11630 => true,
878
- 11633 => true,
879
- 11634 => true,
880
- 11635 => true,
881
- 11636 => true,
882
- 11637 => true,
883
- 11638 => true,
884
- 11639 => true,
885
- 11640 => true,
886
- 11641 => true,
887
- 11642 => true,
888
- 11643 => true,
889
- 11644 => true,
890
- 11645 => true,
891
- 11646 => true,
892
- 11671 => true,
893
- 11672 => true,
894
- 11673 => true,
895
- 11674 => true,
896
- 11675 => true,
897
- 11676 => true,
898
- 11677 => true,
899
- 11678 => true,
900
- 11679 => true,
901
- 11687 => true,
902
- 11695 => true,
903
- 11703 => true,
904
- 11711 => true,
905
- 11719 => true,
906
- 11727 => true,
907
- 11735 => true,
908
- 11743 => true,
909
- 11930 => true,
910
- 12020 => true,
911
- 12021 => true,
912
- 12022 => true,
913
- 12023 => true,
914
- 12024 => true,
915
- 12025 => true,
916
- 12026 => true,
917
- 12027 => true,
918
- 12028 => true,
919
- 12029 => true,
920
- 12030 => true,
921
- 12031 => true,
922
- 12246 => true,
923
- 12247 => true,
924
- 12248 => true,
925
- 12249 => true,
926
- 12250 => true,
927
- 12251 => true,
928
- 12252 => true,
929
- 12253 => true,
930
- 12254 => true,
931
- 12255 => true,
932
- 12256 => true,
933
- 12257 => true,
934
- 12258 => true,
935
- 12259 => true,
936
- 12260 => true,
937
- 12261 => true,
938
- 12262 => true,
939
- 12263 => true,
940
- 12264 => true,
941
- 12265 => true,
942
- 12266 => true,
943
- 12267 => true,
944
- 12268 => true,
945
- 12269 => true,
946
- 12270 => true,
947
- 12271 => true,
948
- 12272 => true,
949
- 12273 => true,
950
- 12274 => true,
951
- 12275 => true,
952
- 12276 => true,
953
- 12277 => true,
954
- 12278 => true,
955
- 12279 => true,
956
- 12280 => true,
957
- 12281 => true,
958
- 12282 => true,
959
- 12283 => true,
960
- 12284 => true,
961
- 12285 => true,
962
- 12286 => true,
963
- 12287 => true,
964
- 12352 => true,
965
- 12439 => true,
966
- 12440 => true,
967
- 12544 => true,
968
- 12545 => true,
969
- 12546 => true,
970
- 12547 => true,
971
- 12548 => true,
972
- 12592 => true,
973
- 12644 => true,
974
- 12687 => true,
975
- 12772 => true,
976
- 12773 => true,
977
- 12774 => true,
978
- 12775 => true,
979
- 12776 => true,
980
- 12777 => true,
981
- 12778 => true,
982
- 12779 => true,
983
- 12780 => true,
984
- 12781 => true,
985
- 12782 => true,
986
- 12783 => true,
987
- 12831 => true,
988
- 13250 => true,
989
- 13255 => true,
990
- 13272 => true,
991
- 40957 => true,
992
- 40958 => true,
993
- 40959 => true,
994
- 42125 => true,
995
- 42126 => true,
996
- 42127 => true,
997
- 42183 => true,
998
- 42184 => true,
999
- 42185 => true,
1000
- 42186 => true,
1001
- 42187 => true,
1002
- 42188 => true,
1003
- 42189 => true,
1004
- 42190 => true,
1005
- 42191 => true,
1006
- 42540 => true,
1007
- 42541 => true,
1008
- 42542 => true,
1009
- 42543 => true,
1010
- 42544 => true,
1011
- 42545 => true,
1012
- 42546 => true,
1013
- 42547 => true,
1014
- 42548 => true,
1015
- 42549 => true,
1016
- 42550 => true,
1017
- 42551 => true,
1018
- 42552 => true,
1019
- 42553 => true,
1020
- 42554 => true,
1021
- 42555 => true,
1022
- 42556 => true,
1023
- 42557 => true,
1024
- 42558 => true,
1025
- 42559 => true,
1026
- 42744 => true,
1027
- 42745 => true,
1028
- 42746 => true,
1029
- 42747 => true,
1030
- 42748 => true,
1031
- 42749 => true,
1032
- 42750 => true,
1033
- 42751 => true,
1034
- 42944 => true,
1035
- 42945 => true,
1036
- 43053 => true,
1037
- 43054 => true,
1038
- 43055 => true,
1039
- 43066 => true,
1040
- 43067 => true,
1041
- 43068 => true,
1042
- 43069 => true,
1043
- 43070 => true,
1044
- 43071 => true,
1045
- 43128 => true,
1046
- 43129 => true,
1047
- 43130 => true,
1048
- 43131 => true,
1049
- 43132 => true,
1050
- 43133 => true,
1051
- 43134 => true,
1052
- 43135 => true,
1053
- 43206 => true,
1054
- 43207 => true,
1055
- 43208 => true,
1056
- 43209 => true,
1057
- 43210 => true,
1058
- 43211 => true,
1059
- 43212 => true,
1060
- 43213 => true,
1061
- 43226 => true,
1062
- 43227 => true,
1063
- 43228 => true,
1064
- 43229 => true,
1065
- 43230 => true,
1066
- 43231 => true,
1067
- 43348 => true,
1068
- 43349 => true,
1069
- 43350 => true,
1070
- 43351 => true,
1071
- 43352 => true,
1072
- 43353 => true,
1073
- 43354 => true,
1074
- 43355 => true,
1075
- 43356 => true,
1076
- 43357 => true,
1077
- 43358 => true,
1078
- 43389 => true,
1079
- 43390 => true,
1080
- 43391 => true,
1081
- 43470 => true,
1082
- 43482 => true,
1083
- 43483 => true,
1084
- 43484 => true,
1085
- 43485 => true,
1086
- 43519 => true,
1087
- 43575 => true,
1088
- 43576 => true,
1089
- 43577 => true,
1090
- 43578 => true,
1091
- 43579 => true,
1092
- 43580 => true,
1093
- 43581 => true,
1094
- 43582 => true,
1095
- 43583 => true,
1096
- 43598 => true,
1097
- 43599 => true,
1098
- 43610 => true,
1099
- 43611 => true,
1100
- 43715 => true,
1101
- 43716 => true,
1102
- 43717 => true,
1103
- 43718 => true,
1104
- 43719 => true,
1105
- 43720 => true,
1106
- 43721 => true,
1107
- 43722 => true,
1108
- 43723 => true,
1109
- 43724 => true,
1110
- 43725 => true,
1111
- 43726 => true,
1112
- 43727 => true,
1113
- 43728 => true,
1114
- 43729 => true,
1115
- 43730 => true,
1116
- 43731 => true,
1117
- 43732 => true,
1118
- 43733 => true,
1119
- 43734 => true,
1120
- 43735 => true,
1121
- 43736 => true,
1122
- 43737 => true,
1123
- 43738 => true,
1124
- 43767 => true,
1125
- 43768 => true,
1126
- 43769 => true,
1127
- 43770 => true,
1128
- 43771 => true,
1129
- 43772 => true,
1130
- 43773 => true,
1131
- 43774 => true,
1132
- 43775 => true,
1133
- 43776 => true,
1134
- 43783 => true,
1135
- 43784 => true,
1136
- 43791 => true,
1137
- 43792 => true,
1138
- 43799 => true,
1139
- 43800 => true,
1140
- 43801 => true,
1141
- 43802 => true,
1142
- 43803 => true,
1143
- 43804 => true,
1144
- 43805 => true,
1145
- 43806 => true,
1146
- 43807 => true,
1147
- 43815 => true,
1148
- 43823 => true,
1149
- 43884 => true,
1150
- 43885 => true,
1151
- 43886 => true,
1152
- 43887 => true,
1153
- 44014 => true,
1154
- 44015 => true,
1155
- 44026 => true,
1156
- 44027 => true,
1157
- 44028 => true,
1158
- 44029 => true,
1159
- 44030 => true,
1160
- 44031 => true,
1161
- 55204 => true,
1162
- 55205 => true,
1163
- 55206 => true,
1164
- 55207 => true,
1165
- 55208 => true,
1166
- 55209 => true,
1167
- 55210 => true,
1168
- 55211 => true,
1169
- 55212 => true,
1170
- 55213 => true,
1171
- 55214 => true,
1172
- 55215 => true,
1173
- 55239 => true,
1174
- 55240 => true,
1175
- 55241 => true,
1176
- 55242 => true,
1177
- 55292 => true,
1178
- 55293 => true,
1179
- 55294 => true,
1180
- 55295 => true,
1181
- 64110 => true,
1182
- 64111 => true,
1183
- 64263 => true,
1184
- 64264 => true,
1185
- 64265 => true,
1186
- 64266 => true,
1187
- 64267 => true,
1188
- 64268 => true,
1189
- 64269 => true,
1190
- 64270 => true,
1191
- 64271 => true,
1192
- 64272 => true,
1193
- 64273 => true,
1194
- 64274 => true,
1195
- 64280 => true,
1196
- 64281 => true,
1197
- 64282 => true,
1198
- 64283 => true,
1199
- 64284 => true,
1200
- 64311 => true,
1201
- 64317 => true,
1202
- 64319 => true,
1203
- 64322 => true,
1204
- 64325 => true,
1205
- 64450 => true,
1206
- 64451 => true,
1207
- 64452 => true,
1208
- 64453 => true,
1209
- 64454 => true,
1210
- 64455 => true,
1211
- 64456 => true,
1212
- 64457 => true,
1213
- 64458 => true,
1214
- 64459 => true,
1215
- 64460 => true,
1216
- 64461 => true,
1217
- 64462 => true,
1218
- 64463 => true,
1219
- 64464 => true,
1220
- 64465 => true,
1221
- 64466 => true,
1222
- 64832 => true,
1223
- 64833 => true,
1224
- 64834 => true,
1225
- 64835 => true,
1226
- 64836 => true,
1227
- 64837 => true,
1228
- 64838 => true,
1229
- 64839 => true,
1230
- 64840 => true,
1231
- 64841 => true,
1232
- 64842 => true,
1233
- 64843 => true,
1234
- 64844 => true,
1235
- 64845 => true,
1236
- 64846 => true,
1237
- 64847 => true,
1238
- 64912 => true,
1239
- 64913 => true,
1240
- 64968 => true,
1241
- 64969 => true,
1242
- 64970 => true,
1243
- 64971 => true,
1244
- 64972 => true,
1245
- 64973 => true,
1246
- 64974 => true,
1247
- 64975 => true,
1248
- 65022 => true,
1249
- 65023 => true,
1250
- 65042 => true,
1251
- 65049 => true,
1252
- 65050 => true,
1253
- 65051 => true,
1254
- 65052 => true,
1255
- 65053 => true,
1256
- 65054 => true,
1257
- 65055 => true,
1258
- 65072 => true,
1259
- 65106 => true,
1260
- 65107 => true,
1261
- 65127 => true,
1262
- 65132 => true,
1263
- 65133 => true,
1264
- 65134 => true,
1265
- 65135 => true,
1266
- 65141 => true,
1267
- 65277 => true,
1268
- 65278 => true,
1269
- 65280 => true,
1270
- 65440 => true,
1271
- 65471 => true,
1272
- 65472 => true,
1273
- 65473 => true,
1274
- 65480 => true,
1275
- 65481 => true,
1276
- 65488 => true,
1277
- 65489 => true,
1278
- 65496 => true,
1279
- 65497 => true,
1280
- 65501 => true,
1281
- 65502 => true,
1282
- 65503 => true,
1283
- 65511 => true,
1284
- 65519 => true,
1285
- 65520 => true,
1286
- 65521 => true,
1287
- 65522 => true,
1288
- 65523 => true,
1289
- 65524 => true,
1290
- 65525 => true,
1291
- 65526 => true,
1292
- 65527 => true,
1293
- 65528 => true,
1294
- 65529 => true,
1295
- 65530 => true,
1296
- 65531 => true,
1297
- 65532 => true,
1298
- 65533 => true,
1299
- 65534 => true,
1300
- 65535 => true,
1301
- 65548 => true,
1302
- 65575 => true,
1303
- 65595 => true,
1304
- 65598 => true,
1305
- 65614 => true,
1306
- 65615 => true,
1307
- 65787 => true,
1308
- 65788 => true,
1309
- 65789 => true,
1310
- 65790 => true,
1311
- 65791 => true,
1312
- 65795 => true,
1313
- 65796 => true,
1314
- 65797 => true,
1315
- 65798 => true,
1316
- 65844 => true,
1317
- 65845 => true,
1318
- 65846 => true,
1319
- 65935 => true,
1320
- 65949 => true,
1321
- 65950 => true,
1322
- 65951 => true,
1323
- 66205 => true,
1324
- 66206 => true,
1325
- 66207 => true,
1326
- 66257 => true,
1327
- 66258 => true,
1328
- 66259 => true,
1329
- 66260 => true,
1330
- 66261 => true,
1331
- 66262 => true,
1332
- 66263 => true,
1333
- 66264 => true,
1334
- 66265 => true,
1335
- 66266 => true,
1336
- 66267 => true,
1337
- 66268 => true,
1338
- 66269 => true,
1339
- 66270 => true,
1340
- 66271 => true,
1341
- 66300 => true,
1342
- 66301 => true,
1343
- 66302 => true,
1344
- 66303 => true,
1345
- 66340 => true,
1346
- 66341 => true,
1347
- 66342 => true,
1348
- 66343 => true,
1349
- 66344 => true,
1350
- 66345 => true,
1351
- 66346 => true,
1352
- 66347 => true,
1353
- 66348 => true,
1354
- 66379 => true,
1355
- 66380 => true,
1356
- 66381 => true,
1357
- 66382 => true,
1358
- 66383 => true,
1359
- 66427 => true,
1360
- 66428 => true,
1361
- 66429 => true,
1362
- 66430 => true,
1363
- 66431 => true,
1364
- 66462 => true,
1365
- 66500 => true,
1366
- 66501 => true,
1367
- 66502 => true,
1368
- 66503 => true,
1369
- 66718 => true,
1370
- 66719 => true,
1371
- 66730 => true,
1372
- 66731 => true,
1373
- 66732 => true,
1374
- 66733 => true,
1375
- 66734 => true,
1376
- 66735 => true,
1377
- 66772 => true,
1378
- 66773 => true,
1379
- 66774 => true,
1380
- 66775 => true,
1381
- 66812 => true,
1382
- 66813 => true,
1383
- 66814 => true,
1384
- 66815 => true,
1385
- 66856 => true,
1386
- 66857 => true,
1387
- 66858 => true,
1388
- 66859 => true,
1389
- 66860 => true,
1390
- 66861 => true,
1391
- 66862 => true,
1392
- 66863 => true,
1393
- 66916 => true,
1394
- 66917 => true,
1395
- 66918 => true,
1396
- 66919 => true,
1397
- 66920 => true,
1398
- 66921 => true,
1399
- 66922 => true,
1400
- 66923 => true,
1401
- 66924 => true,
1402
- 66925 => true,
1403
- 66926 => true,
1404
- 67383 => true,
1405
- 67384 => true,
1406
- 67385 => true,
1407
- 67386 => true,
1408
- 67387 => true,
1409
- 67388 => true,
1410
- 67389 => true,
1411
- 67390 => true,
1412
- 67391 => true,
1413
- 67414 => true,
1414
- 67415 => true,
1415
- 67416 => true,
1416
- 67417 => true,
1417
- 67418 => true,
1418
- 67419 => true,
1419
- 67420 => true,
1420
- 67421 => true,
1421
- 67422 => true,
1422
- 67423 => true,
1423
- 67590 => true,
1424
- 67591 => true,
1425
- 67593 => true,
1426
- 67638 => true,
1427
- 67641 => true,
1428
- 67642 => true,
1429
- 67643 => true,
1430
- 67645 => true,
1431
- 67646 => true,
1432
- 67670 => true,
1433
- 67743 => true,
1434
- 67744 => true,
1435
- 67745 => true,
1436
- 67746 => true,
1437
- 67747 => true,
1438
- 67748 => true,
1439
- 67749 => true,
1440
- 67750 => true,
1441
- 67827 => true,
1442
- 67830 => true,
1443
- 67831 => true,
1444
- 67832 => true,
1445
- 67833 => true,
1446
- 67834 => true,
1447
- 67868 => true,
1448
- 67869 => true,
1449
- 67870 => true,
1450
- 67898 => true,
1451
- 67899 => true,
1452
- 67900 => true,
1453
- 67901 => true,
1454
- 67902 => true,
1455
- 68024 => true,
1456
- 68025 => true,
1457
- 68026 => true,
1458
- 68027 => true,
1459
- 68048 => true,
1460
- 68049 => true,
1461
- 68100 => true,
1462
- 68103 => true,
1463
- 68104 => true,
1464
- 68105 => true,
1465
- 68106 => true,
1466
- 68107 => true,
1467
- 68116 => true,
1468
- 68120 => true,
1469
- 68150 => true,
1470
- 68151 => true,
1471
- 68155 => true,
1472
- 68156 => true,
1473
- 68157 => true,
1474
- 68158 => true,
1475
- 68169 => true,
1476
- 68170 => true,
1477
- 68171 => true,
1478
- 68172 => true,
1479
- 68173 => true,
1480
- 68174 => true,
1481
- 68175 => true,
1482
- 68185 => true,
1483
- 68186 => true,
1484
- 68187 => true,
1485
- 68188 => true,
1486
- 68189 => true,
1487
- 68190 => true,
1488
- 68191 => true,
1489
- 68327 => true,
1490
- 68328 => true,
1491
- 68329 => true,
1492
- 68330 => true,
1493
- 68343 => true,
1494
- 68344 => true,
1495
- 68345 => true,
1496
- 68346 => true,
1497
- 68347 => true,
1498
- 68348 => true,
1499
- 68349 => true,
1500
- 68350 => true,
1501
- 68351 => true,
1502
- 68406 => true,
1503
- 68407 => true,
1504
- 68408 => true,
1505
- 68438 => true,
1506
- 68439 => true,
1507
- 68467 => true,
1508
- 68468 => true,
1509
- 68469 => true,
1510
- 68470 => true,
1511
- 68471 => true,
1512
- 68498 => true,
1513
- 68499 => true,
1514
- 68500 => true,
1515
- 68501 => true,
1516
- 68502 => true,
1517
- 68503 => true,
1518
- 68504 => true,
1519
- 68509 => true,
1520
- 68510 => true,
1521
- 68511 => true,
1522
- 68512 => true,
1523
- 68513 => true,
1524
- 68514 => true,
1525
- 68515 => true,
1526
- 68516 => true,
1527
- 68517 => true,
1528
- 68518 => true,
1529
- 68519 => true,
1530
- 68520 => true,
1531
- 68787 => true,
1532
- 68788 => true,
1533
- 68789 => true,
1534
- 68790 => true,
1535
- 68791 => true,
1536
- 68792 => true,
1537
- 68793 => true,
1538
- 68794 => true,
1539
- 68795 => true,
1540
- 68796 => true,
1541
- 68797 => true,
1542
- 68798 => true,
1543
- 68799 => true,
1544
- 68851 => true,
1545
- 68852 => true,
1546
- 68853 => true,
1547
- 68854 => true,
1548
- 68855 => true,
1549
- 68856 => true,
1550
- 68857 => true,
1551
- 68904 => true,
1552
- 68905 => true,
1553
- 68906 => true,
1554
- 68907 => true,
1555
- 68908 => true,
1556
- 68909 => true,
1557
- 68910 => true,
1558
- 68911 => true,
1559
- 69247 => true,
1560
- 69290 => true,
1561
- 69294 => true,
1562
- 69295 => true,
1563
- 69416 => true,
1564
- 69417 => true,
1565
- 69418 => true,
1566
- 69419 => true,
1567
- 69420 => true,
1568
- 69421 => true,
1569
- 69422 => true,
1570
- 69423 => true,
1571
- 69580 => true,
1572
- 69581 => true,
1573
- 69582 => true,
1574
- 69583 => true,
1575
- 69584 => true,
1576
- 69585 => true,
1577
- 69586 => true,
1578
- 69587 => true,
1579
- 69588 => true,
1580
- 69589 => true,
1581
- 69590 => true,
1582
- 69591 => true,
1583
- 69592 => true,
1584
- 69593 => true,
1585
- 69594 => true,
1586
- 69595 => true,
1587
- 69596 => true,
1588
- 69597 => true,
1589
- 69598 => true,
1590
- 69599 => true,
1591
- 69623 => true,
1592
- 69624 => true,
1593
- 69625 => true,
1594
- 69626 => true,
1595
- 69627 => true,
1596
- 69628 => true,
1597
- 69629 => true,
1598
- 69630 => true,
1599
- 69631 => true,
1600
- 69710 => true,
1601
- 69711 => true,
1602
- 69712 => true,
1603
- 69713 => true,
1604
- 69744 => true,
1605
- 69745 => true,
1606
- 69746 => true,
1607
- 69747 => true,
1608
- 69748 => true,
1609
- 69749 => true,
1610
- 69750 => true,
1611
- 69751 => true,
1612
- 69752 => true,
1613
- 69753 => true,
1614
- 69754 => true,
1615
- 69755 => true,
1616
- 69756 => true,
1617
- 69757 => true,
1618
- 69758 => true,
1619
- 69821 => true,
1620
- 69826 => true,
1621
- 69827 => true,
1622
- 69828 => true,
1623
- 69829 => true,
1624
- 69830 => true,
1625
- 69831 => true,
1626
- 69832 => true,
1627
- 69833 => true,
1628
- 69834 => true,
1629
- 69835 => true,
1630
- 69836 => true,
1631
- 69837 => true,
1632
- 69838 => true,
1633
- 69839 => true,
1634
- 69865 => true,
1635
- 69866 => true,
1636
- 69867 => true,
1637
- 69868 => true,
1638
- 69869 => true,
1639
- 69870 => true,
1640
- 69871 => true,
1641
- 69882 => true,
1642
- 69883 => true,
1643
- 69884 => true,
1644
- 69885 => true,
1645
- 69886 => true,
1646
- 69887 => true,
1647
- 69941 => true,
1648
- 69960 => true,
1649
- 69961 => true,
1650
- 69962 => true,
1651
- 69963 => true,
1652
- 69964 => true,
1653
- 69965 => true,
1654
- 69966 => true,
1655
- 69967 => true,
1656
- 70007 => true,
1657
- 70008 => true,
1658
- 70009 => true,
1659
- 70010 => true,
1660
- 70011 => true,
1661
- 70012 => true,
1662
- 70013 => true,
1663
- 70014 => true,
1664
- 70015 => true,
1665
- 70112 => true,
1666
- 70133 => true,
1667
- 70134 => true,
1668
- 70135 => true,
1669
- 70136 => true,
1670
- 70137 => true,
1671
- 70138 => true,
1672
- 70139 => true,
1673
- 70140 => true,
1674
- 70141 => true,
1675
- 70142 => true,
1676
- 70143 => true,
1677
- 70162 => true,
1678
- 70279 => true,
1679
- 70281 => true,
1680
- 70286 => true,
1681
- 70302 => true,
1682
- 70314 => true,
1683
- 70315 => true,
1684
- 70316 => true,
1685
- 70317 => true,
1686
- 70318 => true,
1687
- 70319 => true,
1688
- 70379 => true,
1689
- 70380 => true,
1690
- 70381 => true,
1691
- 70382 => true,
1692
- 70383 => true,
1693
- 70394 => true,
1694
- 70395 => true,
1695
- 70396 => true,
1696
- 70397 => true,
1697
- 70398 => true,
1698
- 70399 => true,
1699
- 70404 => true,
1700
- 70413 => true,
1701
- 70414 => true,
1702
- 70417 => true,
1703
- 70418 => true,
1704
- 70441 => true,
1705
- 70449 => true,
1706
- 70452 => true,
1707
- 70458 => true,
1708
- 70469 => true,
1709
- 70470 => true,
1710
- 70473 => true,
1711
- 70474 => true,
1712
- 70478 => true,
1713
- 70479 => true,
1714
- 70481 => true,
1715
- 70482 => true,
1716
- 70483 => true,
1717
- 70484 => true,
1718
- 70485 => true,
1719
- 70486 => true,
1720
- 70488 => true,
1721
- 70489 => true,
1722
- 70490 => true,
1723
- 70491 => true,
1724
- 70492 => true,
1725
- 70500 => true,
1726
- 70501 => true,
1727
- 70509 => true,
1728
- 70510 => true,
1729
- 70511 => true,
1730
- 70748 => true,
1731
- 70754 => true,
1732
- 70755 => true,
1733
- 70756 => true,
1734
- 70757 => true,
1735
- 70758 => true,
1736
- 70759 => true,
1737
- 70760 => true,
1738
- 70761 => true,
1739
- 70762 => true,
1740
- 70763 => true,
1741
- 70764 => true,
1742
- 70765 => true,
1743
- 70766 => true,
1744
- 70767 => true,
1745
- 70768 => true,
1746
- 70769 => true,
1747
- 70770 => true,
1748
- 70771 => true,
1749
- 70772 => true,
1750
- 70773 => true,
1751
- 70774 => true,
1752
- 70775 => true,
1753
- 70776 => true,
1754
- 70777 => true,
1755
- 70778 => true,
1756
- 70779 => true,
1757
- 70780 => true,
1758
- 70781 => true,
1759
- 70782 => true,
1760
- 70783 => true,
1761
- 70856 => true,
1762
- 70857 => true,
1763
- 70858 => true,
1764
- 70859 => true,
1765
- 70860 => true,
1766
- 70861 => true,
1767
- 70862 => true,
1768
- 70863 => true,
1769
- 71094 => true,
1770
- 71095 => true,
1771
- 71237 => true,
1772
- 71238 => true,
1773
- 71239 => true,
1774
- 71240 => true,
1775
- 71241 => true,
1776
- 71242 => true,
1777
- 71243 => true,
1778
- 71244 => true,
1779
- 71245 => true,
1780
- 71246 => true,
1781
- 71247 => true,
1782
- 71258 => true,
1783
- 71259 => true,
1784
- 71260 => true,
1785
- 71261 => true,
1786
- 71262 => true,
1787
- 71263 => true,
1788
- 71277 => true,
1789
- 71278 => true,
1790
- 71279 => true,
1791
- 71280 => true,
1792
- 71281 => true,
1793
- 71282 => true,
1794
- 71283 => true,
1795
- 71284 => true,
1796
- 71285 => true,
1797
- 71286 => true,
1798
- 71287 => true,
1799
- 71288 => true,
1800
- 71289 => true,
1801
- 71290 => true,
1802
- 71291 => true,
1803
- 71292 => true,
1804
- 71293 => true,
1805
- 71294 => true,
1806
- 71295 => true,
1807
- 71353 => true,
1808
- 71354 => true,
1809
- 71355 => true,
1810
- 71356 => true,
1811
- 71357 => true,
1812
- 71358 => true,
1813
- 71359 => true,
1814
- 71451 => true,
1815
- 71452 => true,
1816
- 71468 => true,
1817
- 71469 => true,
1818
- 71470 => true,
1819
- 71471 => true,
1820
- 71923 => true,
1821
- 71924 => true,
1822
- 71925 => true,
1823
- 71926 => true,
1824
- 71927 => true,
1825
- 71928 => true,
1826
- 71929 => true,
1827
- 71930 => true,
1828
- 71931 => true,
1829
- 71932 => true,
1830
- 71933 => true,
1831
- 71934 => true,
1832
- 71943 => true,
1833
- 71944 => true,
1834
- 71946 => true,
1835
- 71947 => true,
1836
- 71956 => true,
1837
- 71959 => true,
1838
- 71990 => true,
1839
- 71993 => true,
1840
- 71994 => true,
1841
- 72007 => true,
1842
- 72008 => true,
1843
- 72009 => true,
1844
- 72010 => true,
1845
- 72011 => true,
1846
- 72012 => true,
1847
- 72013 => true,
1848
- 72014 => true,
1849
- 72015 => true,
1850
- 72104 => true,
1851
- 72105 => true,
1852
- 72152 => true,
1853
- 72153 => true,
1854
- 72165 => true,
1855
- 72166 => true,
1856
- 72167 => true,
1857
- 72168 => true,
1858
- 72169 => true,
1859
- 72170 => true,
1860
- 72171 => true,
1861
- 72172 => true,
1862
- 72173 => true,
1863
- 72174 => true,
1864
- 72175 => true,
1865
- 72176 => true,
1866
- 72177 => true,
1867
- 72178 => true,
1868
- 72179 => true,
1869
- 72180 => true,
1870
- 72181 => true,
1871
- 72182 => true,
1872
- 72183 => true,
1873
- 72184 => true,
1874
- 72185 => true,
1875
- 72186 => true,
1876
- 72187 => true,
1877
- 72188 => true,
1878
- 72189 => true,
1879
- 72190 => true,
1880
- 72191 => true,
1881
- 72264 => true,
1882
- 72265 => true,
1883
- 72266 => true,
1884
- 72267 => true,
1885
- 72268 => true,
1886
- 72269 => true,
1887
- 72270 => true,
1888
- 72271 => true,
1889
- 72355 => true,
1890
- 72356 => true,
1891
- 72357 => true,
1892
- 72358 => true,
1893
- 72359 => true,
1894
- 72360 => true,
1895
- 72361 => true,
1896
- 72362 => true,
1897
- 72363 => true,
1898
- 72364 => true,
1899
- 72365 => true,
1900
- 72366 => true,
1901
- 72367 => true,
1902
- 72368 => true,
1903
- 72369 => true,
1904
- 72370 => true,
1905
- 72371 => true,
1906
- 72372 => true,
1907
- 72373 => true,
1908
- 72374 => true,
1909
- 72375 => true,
1910
- 72376 => true,
1911
- 72377 => true,
1912
- 72378 => true,
1913
- 72379 => true,
1914
- 72380 => true,
1915
- 72381 => true,
1916
- 72382 => true,
1917
- 72383 => true,
1918
- 72713 => true,
1919
- 72759 => true,
1920
- 72774 => true,
1921
- 72775 => true,
1922
- 72776 => true,
1923
- 72777 => true,
1924
- 72778 => true,
1925
- 72779 => true,
1926
- 72780 => true,
1927
- 72781 => true,
1928
- 72782 => true,
1929
- 72783 => true,
1930
- 72813 => true,
1931
- 72814 => true,
1932
- 72815 => true,
1933
- 72848 => true,
1934
- 72849 => true,
1935
- 72872 => true,
1936
- 72967 => true,
1937
- 72970 => true,
1938
- 73015 => true,
1939
- 73016 => true,
1940
- 73017 => true,
1941
- 73019 => true,
1942
- 73022 => true,
1943
- 73032 => true,
1944
- 73033 => true,
1945
- 73034 => true,
1946
- 73035 => true,
1947
- 73036 => true,
1948
- 73037 => true,
1949
- 73038 => true,
1950
- 73039 => true,
1951
- 73050 => true,
1952
- 73051 => true,
1953
- 73052 => true,
1954
- 73053 => true,
1955
- 73054 => true,
1956
- 73055 => true,
1957
- 73062 => true,
1958
- 73065 => true,
1959
- 73103 => true,
1960
- 73106 => true,
1961
- 73113 => true,
1962
- 73114 => true,
1963
- 73115 => true,
1964
- 73116 => true,
1965
- 73117 => true,
1966
- 73118 => true,
1967
- 73119 => true,
1968
- 73649 => true,
1969
- 73650 => true,
1970
- 73651 => true,
1971
- 73652 => true,
1972
- 73653 => true,
1973
- 73654 => true,
1974
- 73655 => true,
1975
- 73656 => true,
1976
- 73657 => true,
1977
- 73658 => true,
1978
- 73659 => true,
1979
- 73660 => true,
1980
- 73661 => true,
1981
- 73662 => true,
1982
- 73663 => true,
1983
- 73714 => true,
1984
- 73715 => true,
1985
- 73716 => true,
1986
- 73717 => true,
1987
- 73718 => true,
1988
- 73719 => true,
1989
- 73720 => true,
1990
- 73721 => true,
1991
- 73722 => true,
1992
- 73723 => true,
1993
- 73724 => true,
1994
- 73725 => true,
1995
- 73726 => true,
1996
- 74863 => true,