Migration, Backup, Staging – WPvivid - Version 0.9.6

Version Description

  • Optimized the code of the plugin.
  • A more lightweight Amazon S3 library has been used, so that you do not need to fill in Region field while configuring a S3 storage account.
Download this release

Release Info

Developer wpvivid
Plugin Icon 128x128 Migration, Backup, Staging – WPvivid
Version 0.9.6
Comparing to
See all releases

Code changes from version 0.9.5 to 0.9.6

Files changed (255) hide show
  1. admin/class-wpvivid-admin.php +36 -2
  2. admin/css/wpvivid-admin.css +6 -3
  3. admin/js/wpvivid-admin.js +294 -913
  4. admin/partials/wpvivid-admin-display.php +8 -1028
  5. admin/partials/wpvivid-backup-restore-page-display.php +345 -0
  6. admin/partials/wpvivid-log-read-page-display.php +3 -0
  7. admin/partials/wpvivid-logs-page-display.php +74 -0
  8. admin/partials/wpvivid-remote-storage-page-display.php +56 -0
  9. admin/partials/wpvivid-settings-page-display.php +444 -0
  10. admin/partials/wpvivid-website-info-page-display.php +49 -0
  11. includes/aws/Aws/ACMPCA/ACMPCAClient.php +0 -43
  12. includes/aws/Aws/ACMPCA/Exception/ACMPCAException.php +0 -9
  13. includes/aws/Aws/Acm/AcmClient.php +0 -34
  14. includes/aws/Aws/Acm/Exception/AcmException.php +0 -9
  15. includes/aws/Aws/AlexaForBusiness/AlexaForBusinessClient.php +0 -107
  16. includes/aws/Aws/AlexaForBusiness/Exception/AlexaForBusinessException.php +0 -9
  17. includes/aws/Aws/Api/AbstractModel.php +0 -67
  18. includes/aws/Aws/Api/ApiProvider.php +0 -244
  19. includes/aws/Aws/Api/DateTimeResult.php +0 -41
  20. includes/aws/Aws/Api/DocModel.php +0 -128
  21. includes/aws/Aws/Api/ErrorParser/JsonParserTrait.php +0 -26
  22. includes/aws/Aws/Api/ErrorParser/JsonRpcErrorParser.php +0 -31
  23. includes/aws/Aws/Api/ErrorParser/RestJsonErrorParser.php +0 -35
  24. includes/aws/Aws/Api/ErrorParser/XmlErrorParser.php +0 -82
  25. includes/aws/Aws/Api/ListShape.php +0 -35
  26. includes/aws/Aws/Api/MapShape.php +0 -54
  27. includes/aws/Aws/Api/Operation.php +0 -97
  28. includes/aws/Aws/Api/Parser/AbstractParser.php +0 -45
  29. includes/aws/Aws/Api/Parser/AbstractRestParser.php +0 -173
  30. includes/aws/Aws/Api/Parser/Crc32ValidatingParser.php +0 -53
  31. includes/aws/Aws/Api/Parser/DecodingEventStreamIterator.php +0 -335
  32. includes/aws/Aws/Api/Parser/EventParsingIterator.php +0 -106
  33. includes/aws/Aws/Api/Parser/Exception/ParserException.php +0 -4
  34. includes/aws/Aws/Api/Parser/JsonParser.php +0 -62
  35. includes/aws/Aws/Api/Parser/JsonRpcParser.php +0 -49
  36. includes/aws/Aws/Api/Parser/PayloadParserTrait.php +0 -51
  37. includes/aws/Aws/Api/Parser/QueryParser.php +0 -59
  38. includes/aws/Aws/Api/Parser/RestJsonParser.php +0 -48
  39. includes/aws/Aws/Api/Parser/RestXmlParser.php +0 -41
  40. includes/aws/Aws/Api/Parser/XmlParser.php +0 -138
  41. includes/aws/Aws/Api/Serializer/Ec2ParamBuilder.php +0 -40
  42. includes/aws/Aws/Api/Serializer/JsonBody.php +0 -93
  43. includes/aws/Aws/Api/Serializer/JsonRpcSerializer.php +0 -69
  44. includes/aws/Aws/Api/Serializer/QueryParamBuilder.php +0 -157
  45. includes/aws/Aws/Api/Serializer/QuerySerializer.php +0 -69
  46. includes/aws/Aws/Api/Serializer/RestJsonSerializer.php +0 -39
  47. includes/aws/Aws/Api/Serializer/RestSerializer.php +0 -219
  48. includes/aws/Aws/Api/Serializer/RestXmlSerializer.php +0 -34
  49. includes/aws/Aws/Api/Serializer/XmlBody.php +0 -220
  50. includes/aws/Aws/Api/Service.php +0 -448
  51. includes/aws/Aws/Api/Shape.php +0 -69
  52. includes/aws/Aws/Api/ShapeMap.php +0 -66
  53. includes/aws/Aws/Api/StructureShape.php +0 -79
  54. includes/aws/Aws/Api/TimestampShape.php +0 -48
  55. includes/aws/Aws/Api/Validator.php +0 -273
  56. includes/aws/Aws/ApiGateway/ApiGatewayClient.php +0 -272
  57. includes/aws/Aws/ApiGateway/Exception/ApiGatewayException.php +0 -9
  58. includes/aws/Aws/AppSync/AppSyncClient.php +0 -63
  59. includes/aws/Aws/AppSync/Exception/AppSyncException.php +0 -9
  60. includes/aws/Aws/ApplicationAutoScaling/ApplicationAutoScalingClient.php +0 -29
  61. includes/aws/Aws/ApplicationAutoScaling/Exception/ApplicationAutoScalingException.php +0 -9
  62. includes/aws/Aws/ApplicationDiscoveryService/ApplicationDiscoveryServiceClient.php +0 -53
  63. includes/aws/Aws/ApplicationDiscoveryService/Exception/ApplicationDiscoveryServiceException.php +0 -9
  64. includes/aws/Aws/Appstream/AppstreamClient.php +0 -81
  65. includes/aws/Aws/Appstream/Exception/AppstreamException.php +0 -9
  66. includes/aws/Aws/Athena/AthenaClient.php +0 -31
  67. includes/aws/Aws/Athena/Exception/AthenaException.php +0 -9
  68. includes/aws/Aws/AutoScaling/AutoScalingClient.php +0 -118
  69. includes/aws/Aws/AutoScaling/Exception/AutoScalingException.php +0 -9
  70. includes/aws/Aws/AutoScalingPlans/AutoScalingPlansClient.php +0 -19
  71. includes/aws/Aws/AutoScalingPlans/Exception/AutoScalingPlansException.php +0 -9
  72. includes/aws/Aws/AwsClient.php +0 -328
  73. includes/aws/Aws/AwsClientInterface.php +0 -169
  74. includes/aws/Aws/AwsClientTrait.php +0 -92
  75. includes/aws/Aws/Batch/BatchClient.php +0 -41
  76. includes/aws/Aws/Batch/Exception/BatchException.php +0 -9
  77. includes/aws/Aws/Budgets/BudgetsClient.php +0 -35
  78. includes/aws/Aws/Budgets/Exception/BudgetsException.php +0 -9
  79. includes/aws/Aws/CacheInterface.php +0 -34
  80. includes/aws/Aws/ClientResolver.php +0 -743
  81. includes/aws/Aws/Cloud9/Cloud9Client.php +0 -29
  82. includes/aws/Aws/Cloud9/Exception/Cloud9Exception.php +0 -9
  83. includes/aws/Aws/CloudDirectory/CloudDirectoryClient.php +0 -141
  84. includes/aws/Aws/CloudDirectory/Exception/CloudDirectoryException.php +0 -9
  85. includes/aws/Aws/CloudFormation/CloudFormationClient.php +0 -92
  86. includes/aws/Aws/CloudFormation/Exception/CloudFormationException.php +0 -9
  87. includes/aws/Aws/CloudFront/CloudFrontClient.php +0 -190
  88. includes/aws/Aws/CloudFront/CookieSigner.php +0 -65
  89. includes/aws/Aws/CloudFront/Exception/CloudFrontException.php +0 -9
  90. includes/aws/Aws/CloudFront/Signer.php +0 -109
  91. includes/aws/Aws/CloudFront/UrlSigner.php +0 -119
  92. includes/aws/Aws/CloudHSMV2/CloudHSMV2Client.php +0 -35
  93. includes/aws/Aws/CloudHSMV2/Exception/CloudHSMV2Exception.php +0 -9
  94. includes/aws/Aws/CloudHsm/CloudHsmClient.php +0 -84
  95. includes/aws/Aws/CloudHsm/Exception/CloudHsmException.php +0 -9
  96. includes/aws/Aws/CloudSearch/CloudSearchClient.php +0 -58
  97. includes/aws/Aws/CloudSearch/Exception/CloudSearchException.php +0 -9
  98. includes/aws/Aws/CloudSearchDomain/CloudSearchDomainClient.php +0 -84
  99. includes/aws/Aws/CloudSearchDomain/Exception/CloudSearchDomainException.php +0 -9
  100. includes/aws/Aws/CloudTrail/CloudTrailClient.php +0 -38
  101. includes/aws/Aws/CloudTrail/Exception/CloudTrailException.php +0 -9
  102. includes/aws/Aws/CloudTrail/LogFileIterator.php +0 -324
  103. includes/aws/Aws/CloudTrail/LogFileReader.php +0 -55
  104. includes/aws/Aws/CloudTrail/LogRecordIterator.php +0 -187
  105. includes/aws/Aws/CloudWatch/CloudWatchClient.php +0 -44
  106. includes/aws/Aws/CloudWatch/Exception/CloudWatchException.php +0 -9
  107. includes/aws/Aws/CloudWatchEvents/CloudWatchEventsClient.php +0 -40
  108. includes/aws/Aws/CloudWatchEvents/Exception/CloudWatchEventsException.php +0 -9
  109. includes/aws/Aws/CloudWatchLogs/CloudWatchLogsClient.php +0 -76
  110. includes/aws/Aws/CloudWatchLogs/Exception/CloudWatchLogsException.php +0 -9
  111. includes/aws/Aws/CodeBuild/CodeBuildClient.php +0 -41
  112. includes/aws/Aws/CodeBuild/Exception/CodeBuildException.php +0 -9
  113. includes/aws/Aws/CodeCommit/CodeCommitClient.php +0 -88
  114. includes/aws/Aws/CodeCommit/Exception/CodeCommitException.php +0 -9
  115. includes/aws/Aws/CodeDeploy/CodeDeployClient.php +0 -90
  116. includes/aws/Aws/CodeDeploy/Exception/CodeDeployException.php +0 -9
  117. includes/aws/Aws/CodePipeline/CodePipelineClient.php +0 -74
  118. includes/aws/Aws/CodePipeline/Exception/CodePipelineException.php +0 -9
  119. includes/aws/Aws/CodeStar/CodeStarClient.php +0 -45
  120. includes/aws/Aws/CodeStar/Exception/CodeStarException.php +0 -9
  121. includes/aws/Aws/CognitoIdentity/CognitoIdentityClient.php +0 -46
  122. includes/aws/Aws/CognitoIdentity/CognitoIdentityProvider.php +0 -61
  123. includes/aws/Aws/CognitoIdentity/Exception/CognitoIdentityException.php +0 -9
  124. includes/aws/Aws/CognitoIdentityProvider/CognitoIdentityProviderClient.php +0 -200
  125. includes/aws/Aws/CognitoIdentityProvider/Exception/CognitoIdentityProviderException.php +0 -9
  126. includes/aws/Aws/CognitoSync/CognitoSyncClient.php +0 -44
  127. includes/aws/Aws/CognitoSync/Exception/CognitoSyncException.php +0 -9
  128. includes/aws/Aws/Command.php +0 -62
  129. includes/aws/Aws/CommandInterface.php +0 -42
  130. includes/aws/Aws/CommandPool.php +0 -150
  131. includes/aws/Aws/Comprehend/ComprehendClient.php +0 -67
  132. includes/aws/Aws/Comprehend/Exception/ComprehendException.php +0 -9
  133. includes/aws/Aws/ConfigService/ConfigServiceClient.php +0 -96
  134. includes/aws/Aws/ConfigService/Exception/ConfigServiceException.php +0 -9
  135. includes/aws/Aws/Connect/ConnectClient.php +0 -49
  136. includes/aws/Aws/Connect/Exception/ConnectException.php +0 -9
  137. includes/aws/Aws/CostExplorer/CostExplorerClient.php +0 -21
  138. includes/aws/Aws/CostExplorer/Exception/CostExplorerException.php +0 -9
  139. includes/aws/Aws/CostandUsageReportService/CostandUsageReportServiceClient.php +0 -15
  140. includes/aws/Aws/CostandUsageReportService/Exception/CostandUsageReportServiceException.php +0 -9
  141. includes/aws/Aws/Credentials/AssumeRoleCredentialProvider.php +0 -64
  142. includes/aws/Aws/Credentials/CredentialProvider.php +0 -396
  143. includes/aws/Aws/Credentials/Credentials.php +0 -91
  144. includes/aws/Aws/Credentials/CredentialsInterface.php +0 -52
  145. includes/aws/Aws/Credentials/EcsCredentialProvider.php +0 -88
  146. includes/aws/Aws/Credentials/InstanceProfileProvider.php +0 -111
  147. includes/aws/Aws/Crypto/AbstractCryptoClient.php +0 -113
  148. includes/aws/Aws/Crypto/AesDecryptingStream.php +0 -144
  149. includes/aws/Aws/Crypto/AesEncryptingStream.php +0 -150
  150. includes/aws/Aws/Crypto/AesGcmDecryptingStream.php +0 -95
  151. includes/aws/Aws/Crypto/AesGcmEncryptingStream.php +0 -101
  152. includes/aws/Aws/Crypto/AesStreamInterface.php +0 -30
  153. includes/aws/Aws/Crypto/Cipher/Cbc.php +0 -82
  154. includes/aws/Aws/Crypto/Cipher/CipherBuilderTrait.php +0 -70
  155. includes/aws/Aws/Crypto/Cipher/CipherMethod.php +0 -59
  156. includes/aws/Aws/Crypto/DecryptionTrait.php +0 -179
  157. includes/aws/Aws/Crypto/EncryptionTrait.php +0 -186
  158. includes/aws/Aws/Crypto/KmsMaterialsProvider.php +0 -108
  159. includes/aws/Aws/Crypto/MaterialsProvider.php +0 -105
  160. includes/aws/Aws/Crypto/MetadataEnvelope.php +0 -57
  161. includes/aws/Aws/Crypto/MetadataStrategyInterface.php +0 -30
  162. includes/aws/Aws/DAX/DAXClient.php +0 -51
  163. includes/aws/Aws/DAX/Exception/DAXException.php +0 -9
  164. includes/aws/Aws/DLM/DLMClient.php +0 -19
  165. includes/aws/Aws/DLM/Exception/DLMException.php +0 -9
  166. includes/aws/Aws/DataPipeline/DataPipelineClient.php +0 -48
  167. includes/aws/Aws/DataPipeline/Exception/DataPipelineException.php +0 -9
  168. includes/aws/Aws/DatabaseMigrationService/DatabaseMigrationServiceClient.php +0 -97
  169. includes/aws/Aws/DatabaseMigrationService/Exception/DatabaseMigrationServiceException.php +0 -9
  170. includes/aws/Aws/DeviceFarm/DeviceFarmClient.php +0 -138
  171. includes/aws/Aws/DeviceFarm/Exception/DeviceFarmException.php +0 -9
  172. includes/aws/Aws/DirectConnect/DirectConnectClient.php +0 -98
  173. includes/aws/Aws/DirectConnect/Exception/DirectConnectException.php +0 -9
  174. includes/aws/Aws/DirectoryService/DirectoryServiceClient.php +0 -108
  175. includes/aws/Aws/DirectoryService/Exception/DirectoryServiceException.php +0 -9
  176. includes/aws/Aws/DoctrineCacheAdapter.php +0 -55
  177. includes/aws/Aws/DynamoDb/BinaryValue.php +0 -36
  178. includes/aws/Aws/DynamoDb/DynamoDbClient.php +0 -140
  179. includes/aws/Aws/DynamoDb/Exception/DynamoDbException.php +0 -9
  180. includes/aws/Aws/DynamoDb/LockingSessionConnection.php +0 -62
  181. includes/aws/Aws/DynamoDb/Marshaler.php +0 -324
  182. includes/aws/Aws/DynamoDb/NumberValue.php +0 -29
  183. includes/aws/Aws/DynamoDb/SessionConnectionInterface.php +0 -45
  184. includes/aws/Aws/DynamoDb/SessionHandler.php +0 -227
  185. includes/aws/Aws/DynamoDb/SetValue.php +0 -44
  186. includes/aws/Aws/DynamoDb/StandardSessionConnection.php +0 -149
  187. includes/aws/Aws/DynamoDb/WriteRequestBatch.php +0 -266
  188. includes/aws/Aws/DynamoDbStreams/DynamoDbStreamsClient.php +0 -29
  189. includes/aws/Aws/DynamoDbStreams/Exception/DynamoDbStreamsException.php +0 -9
  190. includes/aws/Aws/EKS/EKSClient.php +0 -17
  191. includes/aws/Aws/EKS/Exception/EKSException.php +0 -9
  192. includes/aws/Aws/Ec2/Ec2Client.php +0 -606
  193. includes/aws/Aws/Ec2/Exception/Ec2Exception.php +0 -9
  194. includes/aws/Aws/Ecr/EcrClient.php +0 -54
  195. includes/aws/Aws/Ecr/Exception/EcrException.php +0 -9
  196. includes/aws/Aws/Ecs/EcsClient.php +0 -72
  197. includes/aws/Aws/Ecs/Exception/EcsException.php +0 -9
  198. includes/aws/Aws/Efs/EfsClient.php +0 -34
  199. includes/aws/Aws/Efs/Exception/EfsException.php +0 -9
  200. includes/aws/Aws/ElastiCache/ElastiCacheClient.php +0 -94
  201. includes/aws/Aws/ElastiCache/Exception/ElastiCacheException.php +0 -9
  202. includes/aws/Aws/ElasticBeanstalk/ElasticBeanstalkClient.php +0 -98
  203. includes/aws/Aws/ElasticBeanstalk/Exception/ElasticBeanstalkException.php +0 -9
  204. includes/aws/Aws/ElasticLoadBalancing/ElasticLoadBalancingClient.php +0 -68
  205. includes/aws/Aws/ElasticLoadBalancing/Exception/ElasticLoadBalancingException.php +0 -9
  206. includes/aws/Aws/ElasticLoadBalancingV2/ElasticLoadBalancingV2Client.php +0 -77
  207. includes/aws/Aws/ElasticLoadBalancingV2/Exception/ElasticLoadBalancingV2Exception.php +0 -9
  208. includes/aws/Aws/ElasticTranscoder/ElasticTranscoderClient.php +0 -44
  209. includes/aws/Aws/ElasticTranscoder/Exception/ElasticTranscoderException.php +0 -9
  210. includes/aws/Aws/ElasticsearchService/ElasticsearchServiceClient.php +0 -52
  211. includes/aws/Aws/ElasticsearchService/Exception/ElasticsearchServiceException.php +0 -9
  212. includes/aws/Aws/Emr/EmrClient.php +0 -64
  213. includes/aws/Aws/Emr/Exception/EmrException.php +0 -9
  214. includes/aws/Aws/Endpoint/EndpointProvider.php +0 -96
  215. includes/aws/Aws/Endpoint/Partition.php +0 -183
  216. includes/aws/Aws/Endpoint/PartitionEndpointProvider.php +0 -108
  217. includes/aws/Aws/Endpoint/PartitionInterface.php +0 -56
  218. includes/aws/Aws/Endpoint/PatternEndpointProvider.php +0 -51
  219. includes/aws/Aws/Exception/AwsException.php +0 -208
  220. includes/aws/Aws/Exception/CouldNotCreateChecksumException.php +0 -19
  221. includes/aws/Aws/Exception/CredentialsException.php +0 -4
  222. includes/aws/Aws/Exception/EventStreamDataException.php +0 -38
  223. includes/aws/Aws/Exception/MultipartUploadException.php +0 -58
  224. includes/aws/Aws/Exception/UnresolvedApiException.php +0 -4
  225. includes/aws/Aws/Exception/UnresolvedEndpointException.php +0 -4
  226. includes/aws/Aws/Exception/UnresolvedSignatureException.php +0 -4
  227. includes/aws/Aws/FMS/Exception/FMSException.php +0 -9
  228. includes/aws/Aws/FMS/FMSClient.php +0 -35
  229. includes/aws/Aws/Firehose/Exception/FirehoseException.php +0 -9
  230. includes/aws/Aws/Firehose/FirehoseClient.php +0 -30
  231. includes/aws/Aws/GameLift/Exception/GameLiftException.php +0 -9
  232. includes/aws/Aws/GameLift/GameLiftClient.php +0 -144
  233. includes/aws/Aws/Glacier/Exception/GlacierException.php +0 -9
  234. includes/aws/Aws/Glacier/GlacierClient.php +0 -251
  235. includes/aws/Aws/Glacier/MultipartUploader.php +0 -284
  236. includes/aws/Aws/Glacier/TreeHash.php +0 -118
  237. includes/aws/Aws/Glue/Exception/GlueException.php +0 -9
  238. includes/aws/Aws/Glue/GlueClient.php +0 -177
  239. includes/aws/Aws/Greengrass/Exception/GreengrassException.php +0 -9
  240. includes/aws/Aws/Greengrass/GreengrassClient.php +0 -157
  241. includes/aws/Aws/GuardDuty/Exception/GuardDutyException.php +0 -9
  242. includes/aws/Aws/GuardDuty/GuardDutyClient.php +0 -93
  243. includes/aws/Aws/Handler/GuzzleV5/GuzzleHandler.php +0 -209
  244. includes/aws/Aws/Handler/GuzzleV5/GuzzleStream.php +0 -24
  245. includes/aws/Aws/Handler/GuzzleV5/PsrStream.php +0 -34
  246. includes/aws/Aws/Handler/GuzzleV6/GuzzleHandler.php +0 -85
  247. includes/aws/Aws/HandlerList.php +0 -426
  248. includes/aws/Aws/HasDataTrait.php +0 -60
  249. includes/aws/Aws/HashInterface.php +0 -27
  250. includes/aws/Aws/HashingStream.php +0 -60
  251. includes/aws/Aws/Health/Exception/HealthException.php +0 -9
  252. includes/aws/Aws/Health/HealthClient.php +0 -21
  253. includes/aws/Aws/History.php +0 -156
  254. includes/aws/Aws/Iam/Exception/IamException.php +0 -9
  255. includes/aws/Aws/Iam/IamClient.php +0 -121
admin/class-wpvivid-admin.php CHANGED
@@ -54,8 +54,10 @@ class WPvivid_Admin {
54
 
55
  $this->plugin_name = $plugin_name;
56
  $this->version = $version;
57
- }
58
 
 
 
 
59
  /**
60
  * Register the stylesheets for the admin area.
61
  *
@@ -216,6 +218,8 @@ class WPvivid_Admin {
216
  global $wpvivid_pulgin;
217
  $wpvivid_pulgin->clean_cache();
218
 
 
 
219
  $restore = new WPvivid_restore_data();
220
  if ($restore->has_restore()) {
221
  $restore_status = $restore->get_restore_status();
@@ -227,7 +231,7 @@ class WPvivid_Admin {
227
 
228
  include_once('partials/wpvivid-admin-display.php');
229
  }
230
-
231
  public function display_plugin_backup_page(){
232
  self::wpvivid_set_page_request('backup');
233
  $this->display_plugin_setup_page();
@@ -263,4 +267,34 @@ class WPvivid_Admin {
263
  return $request_page;
264
  }
265
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
266
  }
54
 
55
  $this->plugin_name = $plugin_name;
56
  $this->version = $version;
 
57
 
58
+
59
+
60
+ }
61
  /**
62
  * Register the stylesheets for the admin area.
63
  *
218
  global $wpvivid_pulgin;
219
  $wpvivid_pulgin->clean_cache();
220
 
221
+ $this->wpvivid_show_add_my_review();
222
+
223
  $restore = new WPvivid_restore_data();
224
  if ($restore->has_restore()) {
225
  $restore_status = $restore->get_restore_status();
231
 
232
  include_once('partials/wpvivid-admin-display.php');
233
  }
234
+
235
  public function display_plugin_backup_page(){
236
  self::wpvivid_set_page_request('backup');
237
  $this->display_plugin_setup_page();
267
  return $request_page;
268
  }
269
 
270
+ public static function wpvivid_show_add_my_review()
271
+ {
272
+ $review = get_option('wpvivid_need_review');
273
+
274
+ if (empty($review)) {
275
+ update_option('wpvivid_need_review', 'not');
276
+ } else {
277
+ if ($review == 'not') {
278
+ } else if ($review == 'show') {
279
+ _e('<div class="notice notice-info is-dismissible" id="wpvivid_notice_rate">
280
+ <p>Rate WPvivid Backup/Restore?
281
+ <span><input type="button" class="button-primary" id="wpvivid_review_comment" value="Rate now" /></span>
282
+ <span><input type="button" class="button-primary" id="wpvivid_review_not_ask" value="Never ask again" /></span>
283
+ <span><input type="button" class="button-primary" id="wpvivid_review_ask_later" value="Ask me later" /></span>
284
+ </p>
285
+ </div>');
286
+ } else if ($review == 'do_not_ask') {
287
+ } else {
288
+ if (time() > $review) {
289
+ _e('<div class="notice notice-info is-dismissible" id="wpvivid_notice_rate">
290
+ <p>Rate WPvivid Backup/Restore?
291
+ <span><input type="button" class="button-primary" id="wpvivid_review_comment" value="Rate now" /></span>
292
+ <span><input type="button" class="button-primary" id="wpvivid_review_not_ask" value="Never ask again" /></span>
293
+ <span><input type="button" class="button-primary" id="wpvivid_review_ask_later" value="Ask me later" /></span>
294
+ </p>
295
+ </div>');
296
+ }
297
+ }
298
+ }
299
+ }
300
  }
admin/css/wpvivid-admin.css CHANGED
@@ -27,7 +27,6 @@
27
  .storage-menu:hover{background-color:#f1f1f1;}
28
  .storage-menu-idle{border-right:1px solid #ccc;}
29
  .storage-menu-active{background-color:#fff;color:#000; border-right:none;border-top:1px solid #ccc;border-left:1px solid #ccc;border-bottom:1px solid #ccc;}
30
- .restore-button{background-image:url()}
31
  .storage-colum-left{width:200px;float:left;height:100%;}
32
  .storage-column-right{margin-left:200px; width:auto;height:100%;position:relative; padding:10px 10px 10px 10px;}
33
  .storage-last-menu{border-bottom:1px solid #ccc;}
@@ -70,8 +69,12 @@
70
  .button-secondary.log-page:focus{color: #00a0d2;border: 1px solid #00a0d2;}
71
  .remote-storage-set-default-block{padding-top:10px;padding-left:10px;padding-right:10px;}
72
  .remote-storage-set-default-block input, span{display:line-block; margin-top:10px; margin-bottom:10px;margin-right:10px;}
73
- .remote-storage-ftp-passive-block{padding-left:10px;}
74
- .remote-storage-ftp-passive-block input, span{display:line-block; margin-top:10px; margin-bottom:10px;margin-right:10px;}
 
 
 
 
75
  .backup-list-head{}
76
  .download-website-info{float:left;}
77
 
27
  .storage-menu:hover{background-color:#f1f1f1;}
28
  .storage-menu-idle{border-right:1px solid #ccc;}
29
  .storage-menu-active{background-color:#fff;color:#000; border-right:none;border-top:1px solid #ccc;border-left:1px solid #ccc;border-bottom:1px solid #ccc;}
 
30
  .storage-colum-left{width:200px;float:left;height:100%;}
31
  .storage-column-right{margin-left:200px; width:auto;height:100%;position:relative; padding:10px 10px 10px 10px;}
32
  .storage-last-menu{border-bottom:1px solid #ccc;}
69
  .button-secondary.log-page:focus{color: #00a0d2;border: 1px solid #00a0d2;}
70
  .remote-storage-set-default-block{padding-top:10px;padding-left:10px;padding-right:10px;}
71
  .remote-storage-set-default-block input, span{display:line-block; margin-top:10px; margin-bottom:10px;margin-right:10px;}
72
+ .remote-storage-ftp-passive-block,
73
+ .remote-storage-amazons3-storage-class,
74
+ .remote-storage-amazons3-encryption{padding-left:10px;}
75
+ .remote-storage-ftp-passive-block input, span,
76
+ .remote-storage-amazons3-storage-class input, span,
77
+ .remote-storage-amazons3-encryption input, span{display:line-block; margin-top:10px; margin-bottom:10px;margin-right:10px;}
78
  .backup-list-head{}
79
  .download-website-info{float:left;}
80
 
admin/js/wpvivid-admin.js CHANGED
@@ -51,8 +51,6 @@ var wpvivid_location_href=false;
51
 
52
  wpvivid_interface_flow_control();
53
 
54
- wpvivid_retrieve_default_remote_storage();
55
-
56
  $('#wpvivid_quickbackup_btn').click(function(){
57
  wpvivid_clear_notice('wpvivid_backup_notice');
58
  wpvivid_start_backup();
@@ -64,23 +62,8 @@ var wpvivid_location_href=false;
64
  });
65
 
66
  $('#storage_account_button').click(function(){
67
- var storageID = $(".storage-providers-active").attr("id");
68
- switch (storageID) {
69
- case 'storage_provider_ftp':
70
- $('#storage_account_button').css({'pointer-events':'none', 'opacity':'0.4'});
71
- wpvivid_add_remote_storage('wpvivid_test_remote_connection', 'ftp');
72
- break;
73
- case 'storage_provider_sftp':
74
- $('#storage_account_button').css({'pointer-events':'none', 'opacity':'0.4'});
75
- wpvivid_add_remote_storage('wpvivid_test_remote_connection', 'sftp');
76
- break;
77
- case 'storage_provider_amazons3':
78
- $('#storage_account_button').css({'pointer-events':'none', 'opacity':'0.4'});
79
- wpvivid_add_remote_storage('wpvivid_test_remote_connection', 'amazonS3');
80
- break;
81
- default:
82
- break;
83
- }
84
  wpvivid_settings_changed = false;
85
  });
86
 
@@ -180,6 +163,19 @@ var wpvivid_location_href=false;
180
  $('#wpvivid_download_website_info').click(function(){
181
  wpvivid_download_website_info();
182
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  });
184
 
185
  })(jQuery);
@@ -213,8 +209,10 @@ function wpvivid_activate_cron(){
213
  * @param ajax_data - Data in Ajax request
214
  * @param callback - A callback function when the request is succeeded
215
  * @param error_callback - A callback function when the request is failed
 
216
  */
217
- function wpvivid_post_request(ajax_data, callback, error_callback){
 
218
  jQuery.ajax({
219
  type: "post",
220
  url: ajax_object.ajax_url,
@@ -225,7 +223,7 @@ function wpvivid_post_request(ajax_data, callback, error_callback){
225
  error: function (XMLHttpRequest, textStatus, errorThrown) {
226
  error_callback(XMLHttpRequest, textStatus, errorThrown);
227
  },
228
- timeout: 30000
229
  });
230
  }
231
 
@@ -462,11 +460,7 @@ function wpvivid_check_runningtask(){
462
 
463
  }
464
  catch(err){
465
- setTimeout(function()
466
- {
467
- m_need_update = true;
468
- wpvivid_manage_task();
469
- }, 1000);
470
  }
471
  }, function (XMLHttpRequest, textStatus, errorThrown) {
472
  setTimeout(function () {
@@ -517,105 +511,64 @@ function wpvivid_read_backup_log(){
517
  * Start backing up
518
  */
519
  function wpvivid_start_backup(){
520
- var backup_type = jQuery('input[name="Backup-files"]:checked').val();
521
- var local;
522
- var remote;
523
- if (jQuery('#wpvivid_backup_local').prop('checked')) {
524
- local = '1';
525
- } else {
526
- local = '0';
527
- }
528
- if (jQuery('#wpvivid_backup_remote').prop('checked')) {
529
- remote = '1';
530
- } else {
531
- remote = '0';
532
- }
533
- if(backup_type !== ''){
534
- if(local !== '0' || remote !== '0') {
535
- var lock = 0;
536
- if(jQuery('#wpvivid_backup_lock').prop('checked') === true){
537
- lock = 1;
538
- }
539
- else{
540
- lock = 0;
 
541
  }
542
- var remote_options = new Array();
543
- remote_options[0] = wpvivid_default_remote_storage;
544
- if(remote !== '1' || wpvivid_default_remote_storage !== '') {
545
- var json = JSON.stringify(remote_options);
546
- var ajax_data = {
547
- 'action': 'wpvivid_prepare_backup',
548
- 'backup_files': backup_type,
549
- 'ismerge': '1',
550
- 'local': local,
551
- 'remote': remote,
552
- 'remote_options': json,
553
- 'lock':lock
554
- };
555
- jQuery('#wpvivid_quickbackup_btn').css({'pointer-events': 'none', 'opacity': '0.4'});
556
- jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'none', 'opacity': '0.4'});
557
- jQuery('#wpvivid_backup_log_btn').css({'pointer-events': 'none', 'opacity': '0.4'});
558
- jQuery('#wpvivid_postbox_backup_percent').show();
559
- jQuery('#wpvivid_current_doing').html('Ready to backup. Progress: 0%, running time: 0second.');
560
- var percent = '0%';
561
- jQuery('#wpvivid_action_progress_bar_percent').css('width', percent);
562
- jQuery('#wpvivid_backup_database_size').html('');
563
- jQuery('#wpvivid_backup_file_size').html('');
564
- jQuery('#wpvivid_current_doing').html('');
565
- wpvivid_completed_backup = 1;
566
- wpvivid_prepare_backup = true;
567
- wpvivid_post_request(ajax_data, function(data){
568
- try {
569
- var jsonarray = jQuery.parseJSON(data);
570
- if (jsonarray.result === 'failed') {
571
- wpvivid_delete_ready_task(jsonarray.error);
572
  }
573
- else if(jsonarray.result === 'success') {
574
- m_backup_task_id = jsonarray.task_id;
575
- if(jsonarray.check.alert_db === false && jsonarray.check.alter_files === false && jsonarray.check.alter_fcgi === false){
576
- wpvivid_retrieve_backup_list();
577
- wpvivid_backup_now(jsonarray.task_id);
578
- }
579
- else{
580
- var descript = '';
581
- if(jsonarray.check.alert_db === true || jsonarray.check.alter_files === true){
582
- descript = 'The database (the dumping SQL file) might be too large, backing up the database may run out of server memory and result in a backup failure.\n' +
583
- 'One or more files might be too large, backing up the file(s) may run out of server memory and result in a backup failure.\n' +
584
- 'Click OK button and continue to back up.';
585
- var ret = confirm(descript);
586
- if(ret === true){
587
- wpvivid_retrieve_backup_list();
588
- wpvivid_backup_now(m_backup_task_id);
589
- }
590
- else{
591
- jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'auto', 'opacity': '1'});
592
- jQuery('#wpvivid_backup_log_btn').css({'pointer-events': 'auto', 'opacity': '1'});
593
- jQuery('#wpvivid_quickbackup_btn').css({'pointer-events': 'auto', 'opacity': '1'});
594
- jQuery('#wpvivid_postbox_backup_percent').hide();
595
- }
596
- }
597
- }
598
  }
599
  }
600
- catch(err){
601
- wpvivid_delete_ready_task(err);
602
- }
603
- }, function(XMLHttpRequest, textStatus, errorThrown) {
604
- var error_message = wpvivid_output_ajaxerror('preparing the backup', textStatus, errorThrown);
605
- wpvivid_delete_ready_task(error_message);
606
- });
607
- }
608
- else{
609
- wpvivid_add_notice('Backup', 'Warning', 'There is no default remote storage configured. Please set it up first.');
610
  }
611
  }
612
- else{
613
- wpvivid_add_notice('Backup', 'Warning', 'Choose at least one storage location for backups.');
614
  }
615
- }
616
- else{
617
- wpvivid_add_notice('Backup', 'Warning', 'A backup type is required.');
618
- }
 
619
  }
620
 
621
  function wpvivid_delete_ready_task(error){
@@ -632,10 +585,9 @@ function wpvivid_delete_ready_task(error){
632
  }
633
  }
634
  catch(err){
635
- setTimeout(function()
636
- {
637
- wpvivid_delete_ready_task(error);
638
- }, 1000);
639
  }
640
  }, function (XMLHttpRequest, textStatus, errorThrown) {
641
  setTimeout(function () {
@@ -679,19 +631,7 @@ function wpvivid_delete_selected_backup(backup_id){
679
  'force': force_del
680
  };
681
  wpvivid_post_request(ajax_data, function(data){
682
- try {
683
- var jsonarray = jQuery.parseJSON(data);
684
- if (jsonarray.result === 'failed') {
685
- alert(jsonarray.error);
686
- }
687
- wpvivid_retrieve_backup_list();
688
- }
689
- catch(err){
690
- setTimeout(function()
691
- {
692
- wpvivid_delete_selected_backup(backup_id);
693
- }, 1000);
694
- }
695
  }, function(XMLHttpRequest, textStatus, errorThrown) {
696
  var error_message = wpvivid_output_ajaxerror('deleting the backup', textStatus, errorThrown);
697
  alert(error_message);
@@ -727,18 +667,7 @@ function wpvivid_delete_backups_inbatches(){
727
  'backup_id': delete_backup_array
728
  };
729
  wpvivid_post_request(ajax_data, function (data) {
730
- try {
731
- var jsonarray = jQuery.parseJSON(data);
732
- if (jsonarray.result === 'failed') {
733
- alert(jsonarray.error);
734
- }
735
- wpvivid_retrieve_backup_list();
736
- }
737
- catch (err) {
738
- setTimeout(function () {
739
- wpvivid_delete_backups_inbatches();
740
- }, 1000);
741
- }
742
  }, function (XMLHttpRequest, textStatus, errorThrown) {
743
  var error_message = wpvivid_output_ajaxerror('deleting the backup', textStatus, errorThrown);
744
  alert(error_message);
@@ -804,10 +733,7 @@ function wpvivid_retrieve_last_backup_message(){
804
  }
805
  }
806
  catch(err){
807
- setTimeout(function()
808
- {
809
- wpvivid_retrieve_last_backup_message();
810
- }, 1000);
811
  }
812
  }, function(XMLHttpRequest, textStatus, errorThrown) {
813
  var error_message = wpvivid_output_ajaxerror('retrieving the last backup log', textStatus, errorThrown);
@@ -821,103 +747,27 @@ function wpvivid_retrieve_last_backup_message(){
821
  * @param action - The action to add or test a remote storage
822
  * @param storage_type - Remote storage types (Amazon S3, SFTP and FTP server)
823
  */
824
- function wpvivid_add_remote_storage(action, storage_type){
825
- if(storage_type === 'ftp'){
826
- var storage_array = new Array('storage_name', 'storage_server', 'storage_login', 'storage_password', 'storage_path');
827
- }
828
- else if(storage_type === 'sftp'){
829
- var storage_array = new Array('storage_name', 'storage_ip', 'storage_username', 'storage_password', 'storage_port', 'storage_path');
830
- }
831
- else if(storage_type === 'amazonS3'){
832
- var storage_array = new Array('storage_name', 'storage_access', 'storage_secret', 'storage_path', 'storage_region');
833
- }
834
- storage_array = wpvivid_get_storage_info(storage_type, storage_array);
835
- var ret = wpvivid_remote_storage_check(storage_type, storage_array);
836
- var ftp_passive=true;
837
- if(jQuery('#storage_passive').prop('checked')){
838
- ftp_passive=true;
839
- }
840
- else{
841
- ftp_passive=false;
842
- }
843
- var default_storage = 1;
844
- if(ret === 'success'){
845
- if(storage_type === 'ftp'){
846
- var remote = {
847
- 'type': storage_type,
848
- 'options': {
849
- 'host': storage_array['storage_server'],
850
- 'username': storage_array['storage_login'],
851
- 'password': storage_array['storage_password'],
852
- 'path': storage_array['storage_path'],
853
- 'name': storage_array['storage_name'],
854
- 'passive': ftp_passive
855
- }
856
- };
857
- if(jQuery('#ftp_default').prop('checked') === true){
858
- default_storage = 1;
859
- }
860
- else {
861
- default_storage = 0;
862
- }
863
- }
864
- else if(storage_type === 'sftp'){
865
- var remote = {
866
- 'type': storage_type,
867
- 'options': {
868
- 'host': storage_array['storage_ip'],
869
- 'port': storage_array['storage_port'],
870
- 'username': storage_array['storage_username'],
871
- 'password': storage_array['storage_password'],
872
- 'path': storage_array['storage_path'],
873
- 'name': storage_array['storage_name']
874
- }
875
- };
876
- if(jQuery('#sftp_default').prop('checked') === true){
877
- default_storage = 1;
878
- }
879
- else {
880
- default_storage = 0;
881
- }
882
- }
883
- else if(storage_type === 'amazonS3'){
884
- var remote = {
885
- 'type': storage_type,
886
- 'options': {
887
- 'access': storage_array['storage_access'],
888
- 'secret': storage_array['storage_secret'],
889
- 's3Path': storage_array['storage_path'],
890
- 'region': storage_array['storage_region'],
891
- 'name': storage_array['storage_name']
892
- }
893
- };
894
- if(jQuery('#amazons3_default').prop('checked') === true){
895
- default_storage = 1;
896
- }
897
- else {
898
- default_storage = 0;
899
- }
900
- }
901
- var json = JSON.stringify(remote);
902
  var ajax_data;
903
- if(action === 'wpvivid_test_remote_connection') {
904
- ajax_data = {
905
- 'action': action,
906
- 'remote': json
907
- };
908
- }
909
- else if(action === 'wpvivid_add_remote'){
910
- ajax_data = {
911
- 'action': action,
912
- 'remote': json,
913
- 'default':default_storage
914
- };
915
- }
916
- wpvivid_post_request(ajax_data, function(data){
917
- if(action === 'wpvivid_test_remote_connection') {
918
  try {
919
  var jsonarray = jQuery.parseJSON(data);
920
- if (jsonarray.result === 'succeed') {
921
  wpvivid_add_remote_storage('wpvivid_add_remote', storage_type);
922
  }
923
  else if (jsonarray.result === 'failed') {
@@ -925,153 +775,51 @@ function wpvivid_add_remote_storage(action, storage_type){
925
  jQuery('#storage_account_button').css({'pointer-events': 'auto', 'opacity': '1'});
926
  }
927
  }
928
- catch(err){
929
- setTimeout(function()
930
- {
931
- wpvivid_add_remote_storage(action, storage_type);
932
- }, 1000);
933
  }
934
  }
935
- else if(action === 'wpvivid_add_remote') {
936
- jQuery('#storage_account_button').css({'pointer-events':'auto', 'opacity':'1'});
937
- jQuery('#storage_account_ftp_storagename').val("");
938
- jQuery('#storage_account_ftp_server').val("");
939
- jQuery('#storage_account_ftp_login').val("");
940
- jQuery('#storage_account_ftp_password').val("");
941
- jQuery('#storage_account_ftp_storagepath').val("");
942
- jQuery('#storage_account_sftp_storagename').val("");
943
- jQuery('#storage_account_sftp_ip').val("");
944
- jQuery('#storage_account_sftp_username').val("");
945
- jQuery('#storage_account_sftp_password').val("");
946
- jQuery('#storage_account_sftp_port').val("");
947
- jQuery('#storage_account_sftp_storagepath').val("");
948
- jQuery('#storage_account_amazons3_storagename').val("");
949
- jQuery('#storage_account_amazons3_access_key').val("");
950
- jQuery('#storage_account_amazons3_secret_key').val("");
951
- jQuery('#storage_account_amazons3_path').val("");
952
- jQuery('#storage_account_amazons3_region').val("");
953
  wpvivid_handle_remote_storage_data(data);
954
  }
955
- }, function(XMLHttpRequest, textStatus, errorThrown) {
956
- jQuery('#storage_account_button').css({'pointer-events':'auto', 'opacity':'1'});
957
- if(action === 'wpvivid_test_remote_connection') {
958
  var error_message = wpvivid_output_ajaxerror('testing the remote storage connection', textStatus, errorThrown);
959
  }
960
- else if(action === 'wpvivid_add_remote') {
961
  var error_message = wpvivid_output_ajaxerror('adding the remote storage', textStatus, errorThrown);
962
  }
963
  alert(error_message);
964
  });
965
  }
966
- else{
967
- jQuery('#storage_account_button').css({'pointer-events':'auto', 'opacity':'1'});
968
- }
969
- }
970
-
971
- /*
972
- * Retrieve storage list once any changes happened.
973
- */
974
- function wpvivid_retrieve_storage_list() {
975
- var ajax_data = {
976
- 'action': 'wpvivid_list_remote'
977
- };
978
- wpvivid_post_request(ajax_data, function(data){
979
- wpvivid_handle_remote_storage_data(data);
980
- }, function(XMLHttpRequest, textStatus, errorThrown) {
981
- setTimeout(function () {
982
- wpvivid_retrieve_storage_list();
983
- }, 3000);
984
- });
985
  }
986
 
987
  function wpvivid_handle_remote_storage_data(data){
988
- jQuery('#wpvivid_remote_storage_list').html('');
989
  var i = 0;
990
  try {
991
  var jsonarray = jQuery.parseJSON(data);
992
  if (jsonarray.result === 'success') {
993
- jQuery.each(jsonarray.data, function (index, value) {
994
- var check_status = '';
995
- var default_storage = '';
996
- i++;
997
- if (jsonarray.data.remote_selected.length !== 0) {
998
- jQuery.each(jsonarray.data.remote_selected, function (index1, value1) {
999
- default_storage = value1;
1000
- wpvivid_default_remote_storage = value1;
1001
- if (index === default_storage) {
1002
- check_status = 'checked';
1003
- if (value.type === 'ftp') {
1004
- jQuery('#wpvivid_out_of_date_remote_path').html(value.options.path);
1005
- jQuery('#wpvivid_upload_storage_type_ftp').attr('src', wpvivid_plugurl + '/images/storage-ftp.png');
1006
- jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl + '/images/storage-sftp(gray).png');
1007
- jQuery('#wpvivid_upload_storage_type_amazon_s3').attr('src', wpvivid_plugurl + '/images/storage-amazon-s3(gray).png');
1008
- jQuery('#wpvivid_schedule_storage_type_ftp').attr('src', wpvivid_plugurl + '/images/storage-ftp.png');
1009
- jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl + '/images/storage-sftp(gray).png');
1010
- jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr('src', wpvivid_plugurl + '/images/storage-amazon-s3(gray).png');
1011
- }
1012
- else if (value.type === 'sftp') {
1013
- jQuery('#wpvivid_out_of_date_remote_path').html(value.options.path);
1014
- jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl + '/images/storage-sftp.png');
1015
- jQuery('#wpvivid_upload_storage_type_ftp').attr('src', wpvivid_plugurl + '/images/storage-ftp(gray).png');
1016
- jQuery('#wpvivid_upload_storage_type_amazon_s3').attr('src', wpvivid_plugurl + '/images/storage-amazon-s3(gray).png');
1017
- jQuery('#wpvivid_schedule_storage_type_ftp').attr('src', wpvivid_plugurl + '/images/storage-ftp(gray).png');
1018
- jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl + '/images/storage-sftp.png');
1019
- jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr('src', wpvivid_plugurl + '/images/storage-amazon-s3(gray).png');
1020
- }
1021
- else if (value.type === 'amazonS3') {
1022
- jQuery('#wpvivid_out_of_date_remote_path').html(value.options.s3Path);
1023
- jQuery('#wpvivid_upload_storage_type_amazon_s3').attr('src', wpvivid_plugurl + '/images/storage-amazon-s3.png');
1024
- jQuery('#wpvivid_upload_storage_type_ftp').attr('src', wpvivid_plugurl + '/images/storage-ftp(gray).png');
1025
- jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl + '/images/storage-sftp(gray).png');
1026
- jQuery('#wpvivid_schedule_storage_type_ftp').attr('src', wpvivid_plugurl + '/images/storage-ftp(gray).png');
1027
- jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl + '/images/storage-sftp(gray).png');
1028
- jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr('src', wpvivid_plugurl + '/images/storage-amazon-s3.png');
1029
- }
1030
- }
1031
- });
1032
- }
1033
- else {
1034
- wpvivid_default_remote_storage = '';
1035
- jQuery('#wpvivid_out_of_date_remote_path').html('There is no path for remote storage, please set it up first.');
1036
- jQuery('#wpvivid_upload_storage_type_ftp').attr('src', wpvivid_plugurl + '/images/storage-ftp(gray).png');
1037
- jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl + '/images/storage-sftp(gray).png');
1038
- jQuery('#wpvivid_upload_storage_type_amazon_s3').attr('src', wpvivid_plugurl + '/images/storage-amazon-s3(gray).png');
1039
- jQuery('#wpvivid_schedule_storage_type_ftp').attr('src', wpvivid_plugurl + '/images/storage-ftp(gray).png');
1040
- jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl + '/images/storage-sftp(gray).png');
1041
- jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr('src', wpvivid_plugurl + '/images/storage-amazon-s3(gray).png');
1042
- }
1043
- if (index !== 'remote_selected') {
1044
- var storage_type = '';
1045
- if (value.type === 'ftp') {
1046
- storage_type = 'FTP';
1047
- }
1048
- else if (value.type === 'sftp') {
1049
- storage_type = 'SFTP';
1050
- }
1051
- else if (value.type === 'amazonS3') {
1052
- storage_type = 'Amazon S3';
1053
- }
1054
- var $remote_storage_tr = jQuery('<tr>' +
1055
- '<td>' + i + '</td>' +
1056
- '<td><input type="checkbox" name="remote_storage" value=\'' + index + '\' ' + check_status + ' /></td>' +
1057
- '<td>' + storage_type + '</td>' +
1058
- '<td class="row-title"><label for="tablecell">' + value.options.name + '</label></td>' +
1059
- '<td onclick="wpvivid_delete_remote_storage(\'' + index + '\');">' +
1060
- '<img src="' + wpvivid_plugurl + '/images/Delete.png" style="vertical-align:middle; cursor:pointer;" title="Delete the backup"/>' +
1061
- '</td>' +
1062
- '</tr>');
1063
- var $remote_storage_table = jQuery('#wpvivid_remote_storage_list');
1064
- $remote_storage_table.append($remote_storage_tr);
1065
- }
1066
- });
1067
  wpvivid_interface_flow_control();
1068
  }
 
 
 
1069
  }
1070
  catch(err){
1071
- setTimeout(function()
1072
- {
1073
- wpvivid_handle_remote_storage_data(data);
1074
- }, 1000);
1075
  }
1076
  }
1077
 
@@ -1092,7 +840,7 @@ function wpvivid_delete_remote_storage(storage_id){
1092
  if(storage_id === wpvivid_default_remote_storage){
1093
  wpvivid_default_remote_storage = '';
1094
  }
1095
- wpvivid_retrieve_storage_list();
1096
  },function(XMLHttpRequest, textStatus, errorThrown) {
1097
  var error_message = wpvivid_output_ajaxerror('deleting the remote storage', textStatus, errorThrown);
1098
  alert(error_message);
@@ -1108,88 +856,7 @@ function wpvivid_retrieve_backup_list(){
1108
  'action': 'wpvivid_get_backup_list'
1109
  };
1110
  wpvivid_post_request(ajax_data, function(data){
1111
- try {
1112
- var jsonarray = jQuery.parseJSON(data);
1113
- jQuery('#wpvivid_backuplist').html("");
1114
- var amazon_s3_url = '/images/storage-amazon-s3(gray).png';
1115
- var ftp_url = '/images/storage-ftp(gray).png';
1116
- var sftp_url = '/images/storage-sftp(gray).png';
1117
- var backup_lock_img = '/images/unlocked.png';
1118
- var backup_lock_status = 'unlock';
1119
- if (jsonarray.result === 'success') {
1120
- jQuery.each(jsonarray.data, function (index, value1) {
1121
- amazon_s3_url = '/images/storage-amazon-s3(gray).png';
1122
- ftp_url = '/images/storage-ftp(gray).png';
1123
- sftp_url = '/images/storage-sftp(gray).png';
1124
- if (typeof(value1.lock) == 'undefined') {
1125
- backup_lock_img = '/images/unlocked.png';
1126
- backup_lock_status = 'unlock';
1127
- }
1128
- else {
1129
- if (value1.lock === 0) {
1130
- backup_lock_img = '/images/unlocked.png';
1131
- backup_lock_status = 'unlock';
1132
- }
1133
- else {
1134
- backup_lock_img = '/images/locked.png';
1135
- backup_lock_status = 'lock';
1136
- }
1137
- }
1138
- jQuery.each(value1.remote, function (index2, value2) {
1139
- if (value2.type === 'amazonS3') {
1140
- amazon_s3_url = '/images/storage-amazon-s3.png';
1141
- }
1142
- if (value2.type === 'ftp') {
1143
- ftp_url = '/images/storage-ftp.png';
1144
- }
1145
- if (value2.type === 'sftp') {
1146
- sftp_url = '/images/storage-sftp.png';
1147
- }
1148
- });
1149
- var $backuptr = jQuery('<tr>' +
1150
- '<th class="check-column"><input name="check_backup" type="checkbox" id="' + index + '" value="' + index + '" onclick="wpvivid_click_check_backup(\''+index+'\');" /></th>' +
1151
- '<td class="tablelistcolumn">' +
1152
- '<div style="float:left;padding:10px 10px 10px 0px;">' +
1153
- '<strong>'+ value1.create_time + '</strong></br>' +
1154
- '<div class="common-table">' +
1155
- '<span title="Lock the backup, it won\'t be deleted automatically">' +
1156
- '<img src="' + wpvivid_plugurl + backup_lock_img + '" name="' + backup_lock_status + '" onclick="wpvivid_set_backup_lock(\'' + index + '\', \'' + backup_lock_status + '\');" style="vertical-align:middle; cursor:pointer;"/>' +
1157
- '</span> | <span>Type: </span><span>' + value1.type + '</span>|<span title="Backup log"><a href="#" onclick="wpvivid_initialize_log(\'' + index + '\');"><img src="' + wpvivid_plugurl + '/images/Log.png" name="' + backup_lock_status + '" style="vertical-align:middle;cursor:pointer;"/>Log</a></span>|<span title="Restore Website from The Backup"><a href="#" onclick="wpvivid_initialize_restore(\'' + index + '\', \'' + value1.create_time + '\');"><img src="' + wpvivid_plugurl + '/images/Restore.png" style="vertical-align:middle;cursor:pointer;"/>Restore</a></span>' +
1158
- '</div>' +
1159
- '</div>' +
1160
- '</td>' +
1161
- '<td class="tablelistcolumn">' +
1162
- '<div style="float:left;padding:10px 10px 10px 0px;">' +
1163
- '<img src="' + wpvivid_plugurl + amazon_s3_url + '" style="vertical-align:middle; " title="Amazon S3"/>' +
1164
- '<img src="' + wpvivid_plugurl + ftp_url + '" style="vertical-align:middle;" title="FTP"/>' +
1165
- '<img src="' + wpvivid_plugurl + sftp_url + '" style="vertical-align:middle;" title="SFTP"/>' +
1166
- '</div>' +
1167
- '</td>' +
1168
- '<td class="tablelistcolumn">' +
1169
- '<div id="wpvivid_file_part_' + index + '" style="float:left;padding:10px 10px 10px 0px;">' +
1170
- '<div style="cursor:pointer;" onclick="wpvivid_initialize_download(\'' + index + '\');" title="Prepare to download the backup">' +
1171
- '<img id="wpvivid_download_btn_' + index + '" src="' + wpvivid_plugurl + '/images/download.png" style="vertical-align:middle;" />Download' +
1172
- '<div class="spinner" id="wpvivid_download_loading_' + index + '" style="float:right;width:auto;height:auto;padding:10px 180px 10px 0;background-position:0 0;"></div>' +
1173
- '</div>' +
1174
- '</div>' +
1175
- '</td>' +
1176
- '<td class="tablelistcolumn">' +
1177
- '<div class="backuplist-delete-backup">' +
1178
- '<img src="' + wpvivid_plugurl + '/images/Delete.png" style="vertical-align:middle; cursor:pointer;" title="Delete the backup" onclick="wpvivid_delete_selected_backup(\'' + index + '\');"/>' +
1179
- '</div>' +
1180
- '</td>' +
1181
- '</tr>');
1182
- var $backuptable = jQuery('#wpvivid_backuplist');
1183
- $backuptable.append($backuptr);
1184
- });
1185
- }
1186
- }
1187
- catch(err){
1188
- setTimeout(function()
1189
- {
1190
- wpvivid_retrieve_backup_list();
1191
- }, 1000);
1192
- }
1193
  },function(XMLHttpRequest, textStatus, errorThrown) {
1194
  setTimeout(function () {
1195
  wpvivid_retrieve_backup_list();
@@ -1197,237 +864,91 @@ function wpvivid_retrieve_backup_list(){
1197
  });
1198
  }
1199
 
1200
- /**
1201
- * Modify general settings
1202
- */
1203
- function wpvivid_set_general_settings(){
1204
- var package_method = jQuery('input[name="choose-package-method"]:checked').val();
1205
- var no_compress = false;
1206
- if(package_method === 'method-no-compress'){
1207
- no_compress = true;
1208
- }
1209
- else{
1210
- no_compress = false;
1211
- }
1212
- var max_file_size = jQuery('#wpvivid_max_zip').val();
1213
- var local_storage_path = jQuery('#wpvivid_option_backup_dir').val();
1214
- var max_exec_time = jQuery('#wpvivid_option_timeout').val();
1215
- var exclude_file_size = jQuery('#wpvivid_ignore_large').val();
1216
- var max_backup_count = jQuery("#wpvivid_max_backup_count option:selected").val();
1217
- var email_enable = false;
1218
- var mail = jQuery('#wpvivid_mail').val();
1219
- var send_method = jQuery('input[name="send_email_report"]:checked').val();
1220
- var always_send = false;
1221
- if(send_method === 'send_mail_always'){
1222
- always_send = true;
1223
- }
1224
- else{
1225
- always_send = false;
1226
- }
1227
- var save_local = 1;
1228
- if(jQuery('#wpvivid_save_local').prop('checked') === true){
1229
- save_local = 0;
1230
- }
1231
- else{
1232
- save_local = 1;
1233
- }
1234
- var estimate_backup = false;
1235
- if(jQuery('#wpvivid_estimate_backup').prop('checked') === true){
1236
- estimate_backup = true;
1237
  }
1238
- else{
1239
- estimate_backup = false;
1240
  }
 
1241
 
1242
- if(jQuery('#wpvivid_general_email_enable').prop('checked') === true){
1243
- email_enable = true;
1244
- }
1245
- else{
1246
- email_enable = false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1247
  }
 
 
 
 
 
 
 
 
 
 
 
 
1248
 
1249
- var email_setting = {
1250
- 'email_enable': email_enable,
1251
- 'send_to': [mail],
1252
- 'always': always_send
1253
- };
1254
- var compress_setting = {
1255
- 'compress_type': 'zip',
1256
- 'max_file_size': max_file_size + 'M',
1257
- 'no_compress': no_compress,
1258
- 'exclude_file_size': exclude_file_size,
1259
- 'use_temp_file':1,
1260
- 'use_temp_size':16
1261
- };
1262
- var local_setting = {
1263
- 'path': local_storage_path,
1264
- 'save_local': save_local
1265
- };
1266
- var common_setting = {
1267
- 'max_execution_time': max_exec_time,
1268
- 'log_save_location': local_storage_path + '/wpvivid_log',
1269
- 'max_backup_count': max_backup_count,
1270
- 'estimate_backup': estimate_backup
1271
- };
1272
- var options = {
1273
- 'wpvivid_email_setting': email_setting,
1274
- 'wpvivid_compress_setting': compress_setting,
1275
- 'wpvivid_local_setting': local_setting,
1276
- 'wpvivid_common_setting': common_setting
1277
- };
1278
-
1279
- var json_options=JSON.stringify(options);
1280
-
1281
- var enable_schedule = '1';
1282
-
1283
- if(max_file_size != '') {
1284
- if(exclude_file_size != '') {
1285
- if(max_exec_time != '') {
1286
- if (local_storage_path !== '') {
1287
- if (mail != '' || email_enable === false) {
1288
- if (jQuery('#wpvivid_schedule_enable').prop('checked') === true) {
1289
- var backup_time = jQuery('input[name="schedule"]:checked').val();
1290
- var backup_type = jQuery('input[name="schedule-backup-files"]:checked').val();
1291
- switch (backup_time) {
1292
- case 'Hours':
1293
- backup_time = 'wpvivid_12hours';
1294
- break;
1295
- case 'Daily':
1296
- backup_time = 'wpvivid_daily';
1297
- break;
1298
- case 'Weekly':
1299
- backup_time = 'wpvivid_weekly';
1300
- break;
1301
- case 'Fortnightly':
1302
- backup_time = 'wpvivid_fortnightly';
1303
- break;
1304
- case 'Monthly':
1305
- backup_time = 'wpvivid_monthly';
1306
- break;
1307
- }
1308
-
1309
- var wpvivid_schedule_local = 0;
1310
- var remote = 0;
1311
- var save_local_remote = jQuery('input[name="save_local_remote"]:checked').val();
1312
- if (save_local_remote === 'local') {
1313
- wpvivid_schedule_local = 1;
1314
- remote = 0;
1315
- }
1316
- else if (save_local_remote === 'remote') {
1317
- wpvivid_schedule_local = 0;
1318
- remote = 1;
1319
- }
1320
- var b_has_default = true;
1321
- if (remote === 1 && wpvivid_default_remote_storage === '') {
1322
- b_has_default = false;
1323
- }
1324
- var remote_options = new Array();
1325
- if (b_has_default === true) {
1326
- remote_options[0] = wpvivid_default_remote_storage;
1327
- var json = JSON.stringify(remote_options);
1328
- var schedule = {
1329
- 'backup': {
1330
- 'backup_files': backup_type,
1331
- 'local': wpvivid_schedule_local,
1332
- 'remote': remote,
1333
- 'remote_options': json,
1334
- 'ismerge': 1
1335
- },
1336
- 'time': {
1337
- 'type': backup_time,
1338
- 'start_time': {
1339
- 'day': '01',
1340
- 'week': 'mon'
1341
- }
1342
- }
1343
- };
1344
-
1345
- enable_schedule = '1';
1346
- var json_schedule = JSON.stringify(schedule);
1347
- var ajax_data = {
1348
- 'action': 'wpvivid_set_general_setting',
1349
- 'options': json_options,
1350
- 'schedule': json_schedule,
1351
- 'enable_schedule': enable_schedule
1352
- };
1353
- jQuery('#wpvivid_setting_general_save').css({'pointer-events': 'none', 'opacity': '0.4'});
1354
- wpvivid_post_request(ajax_data, function (data) {
1355
- try {
1356
- var jsonarray = jQuery.parseJSON(data);
1357
- jQuery('#wpvivid_setting_general_save').css({'pointer-events': 'auto', 'opacity': '1'});
1358
- if (jsonarray.result === 'success') {
1359
- location.reload();
1360
- }
1361
- else {
1362
- alert(jsonarray.error);
1363
- }
1364
- }
1365
- catch(err){
1366
- setTimeout(function()
1367
- {
1368
- wpvivid_set_general_settings();
1369
- }, 1000);
1370
- }
1371
- }, function (XMLHttpRequest, textStatus, errorThrown) {
1372
- jQuery('#wpvivid_setting_general_save').css({'pointer-events': 'auto', 'opacity': '1'});
1373
- var error_message = wpvivid_output_ajaxerror('changing base settings', textStatus, errorThrown);
1374
- alert(error_message);
1375
- });
1376
- }
1377
- else {
1378
- alert('There is no default remote storage configured. Please set it up first.');
1379
- }
1380
- }
1381
- else {
1382
- enable_schedule = '0';
1383
- var ajax_data = {
1384
- 'action': 'wpvivid_set_general_setting',
1385
- 'options': json_options,
1386
- 'enable_schedule': enable_schedule
1387
- };
1388
- jQuery('#wpvivid_setting_general_save').css({'pointer-events': 'none', 'opacity': '0.4'});
1389
- wpvivid_post_request(ajax_data, function (data) {
1390
- try {
1391
- var jsonarray = jQuery.parseJSON(data);
1392
- jQuery('#wpvivid_setting_general_save').css({'pointer-events': 'auto', 'opacity': '1'});
1393
- if (jsonarray.result === 'success') {
1394
- location.reload();
1395
- }
1396
- else {
1397
- alert(jsonarray.error);
1398
- }
1399
- }
1400
- catch(err){
1401
- setTimeout(function()
1402
- {
1403
- wpvivid_set_general_settings();
1404
- }, 1000);
1405
- }
1406
- }, function (XMLHttpRequest, textStatus, errorThrown) {
1407
- jQuery('#wpvivid_setting_general_save').css({'pointer-events': 'auto', 'opacity': '1'});
1408
- var error_message = wpvivid_output_ajaxerror('changing base settings', textStatus, errorThrown);
1409
- alert(error_message);
1410
- });
1411
- }
1412
- }
1413
- else {
1414
- alert('An email address is required.');
1415
- }
1416
  }
1417
  else {
1418
- alert('The local storage path is required.');
1419
  }
1420
  }
1421
- else{
1422
- alert('The maximum execution time for PHP script is required.');
 
1423
  }
1424
- }
1425
- else{
1426
- alert('The size for excluded files is required.');
1427
- }
1428
- }
1429
- else{
1430
- alert('The maximum zip file size is required.');
1431
  }
1432
  }
1433
 
@@ -1451,10 +972,7 @@ function wpvivid_email_test(){
1451
  }
1452
  }
1453
  catch(err){
1454
- setTimeout(function()
1455
- {
1456
- wpvivid_email_test();
1457
- }, 1000);
1458
  }
1459
  }, function(XMLHttpRequest, textStatus, errorThrown) {
1460
  var error_message = wpvivid_output_ajaxerror('sending test mail', textStatus, errorThrown);
@@ -1500,10 +1018,7 @@ function wpvivid_import_settings(){
1500
  }
1501
  }
1502
  catch(err){
1503
- setTimeout(function()
1504
- {
1505
- wpvivid_import_settings();
1506
- }, 1000);
1507
  }
1508
  }, function(XMLHttpRequest, textStatus, errorThrown) {
1509
  var error_message = wpvivid_output_ajaxerror('importing the previously-exported settings', textStatus, errorThrown);
@@ -1543,10 +1058,7 @@ function wpvivid_retrieve_last_backup_log(){
1543
  }
1544
  }
1545
  catch(err){
1546
- setTimeout(function()
1547
- {
1548
- wpvivid_retrieve_last_backup_log();
1549
- }, 1000);
1550
  }
1551
  }, function (XMLHttpRequest, textStatus, errorThrown) {
1552
  var div = 'Reading the log failed. Please try again.';
@@ -1556,10 +1068,7 @@ function wpvivid_retrieve_last_backup_log(){
1556
  }
1557
  }
1558
  catch(err){
1559
- setTimeout(function()
1560
- {
1561
- wpvivid_retrieve_last_backup_log();
1562
- }, 1000);
1563
  }
1564
  }, function(XMLHttpRequest, textStatus, errorThrown) {
1565
  var div = 'Reading the log failed. Please try again.';
@@ -1950,10 +1459,8 @@ function wpvivid_initialize_download(backup_id){
1950
  }
1951
  }
1952
  catch(err){
1953
- setTimeout(function()
1954
- {
1955
- wpvivid_initialize_download(backup_id);
1956
- }, 1000);
1957
  }
1958
  },function(XMLHttpRequest, textStatus, errorThrown){
1959
  jQuery('#wpvivid_download_loading_'+backup_id).removeClass('is-active');
@@ -2124,14 +1631,13 @@ function wpvivid_prepare_download(part_num, backup_id, file_name){
2124
  m_downloading_file_name = file_name;
2125
  wpvivid_post_request(ajax_data, function(data){
2126
  }, function(XMLHttpRequest, textStatus, errorThrown) {
 
 
2127
  wpvivid_unlock_download(backup_id);
2128
- jQuery('#delete_btn_part'+part_num).css({'pointer-events': 'auto', 'opacity': '1'});
2129
- jQuery('#download_btn_part'+part_num).css({'pointer-events': 'auto', 'opacity': '1'});
2130
- jQuery('#download_btn_part'+part_num).val("Prepare");
2131
- setTimeout(function(){
2132
- wpvivid_prepare_download(part_num, backup_id, file_name);
2133
- }, 3000);
2134
- });
2135
  }
2136
 
2137
  /**
@@ -2146,148 +1652,6 @@ function wpvivid_download(backup_id, backup_type, file_name){
2146
  location.href =ajaxurl+'?action=wpvivid_download_backup&backup_id='+backup_id+'&download_type='+backup_type+'&file_name='+file_name;
2147
  }
2148
 
2149
- function wpvivid_get_storage_info(storage_type, storage_array){
2150
- if(storage_type === "ftp"){
2151
- storage_array['storage_name'] = jQuery('#storage_account_ftp_storagename').val();
2152
- storage_array['storage_server'] = jQuery('#storage_account_ftp_server').val();
2153
- storage_array['storage_login'] = jQuery('#storage_account_ftp_login').val();
2154
- storage_array['storage_password'] = jQuery('#storage_account_ftp_password').val();
2155
- storage_array['storage_path'] = jQuery('#storage_account_ftp_storagepath').val();
2156
- }
2157
- else if(storage_type === "sftp"){
2158
- storage_array['storage_name'] = jQuery('#storage_account_sftp_storagename').val();
2159
- storage_array['storage_ip'] = jQuery('#storage_account_sftp_ip').val();
2160
- storage_array['storage_username'] = jQuery('#storage_account_sftp_username').val();
2161
- storage_array['storage_password'] = jQuery('#storage_account_sftp_password').val();
2162
- storage_array['storage_port'] = jQuery('#storage_account_sftp_port').val();
2163
- storage_array['storage_path'] = jQuery('#storage_account_sftp_storagepath').val();
2164
- }
2165
- else if(storage_type === "amazonS3"){
2166
- storage_array['storage_name'] = jQuery('#storage_account_amazons3_storagename').val();
2167
- storage_array['storage_access'] = jQuery('#storage_account_amazons3_access_key').val();
2168
- storage_array['storage_secret'] = jQuery('#storage_account_amazons3_secret_key').val();
2169
- storage_array['storage_path'] = jQuery('#storage_account_amazons3_path').val();
2170
- storage_array['storage_region'] = jQuery('#storage_account_amazons3_region').val();
2171
- }
2172
- return storage_array;
2173
- }
2174
-
2175
- function wpvivid_remote_storage_check(storage_type, storage_array){
2176
- var ret="failed";
2177
- switch(storage_type){
2178
- case "ftp":
2179
- if(storage_array['storage_name'] !== ""){
2180
- if(wpvivid_check_repeat_storage_alias(storage_array['storage_name']) !== -1){
2181
- if(storage_array['storage_server'] !== ""){
2182
- if(storage_array['storage_login'] !== ""){
2183
- if(storage_array['storage_password'] !== ""){
2184
- if(storage_array['storage_path'] !== ""){
2185
- ret = "success";
2186
- }
2187
- else{
2188
- alert("Warning: The storage path is required.");
2189
- }
2190
- }
2191
- else{
2192
- alert("Warning: The FTP password is required.");
2193
- }
2194
- }
2195
- else{
2196
- alert("Warning: The FTP login is required.");
2197
- }
2198
- }
2199
- else{
2200
- alert("Warning: The FTP server is required.");
2201
- }
2202
- }
2203
- else{
2204
- alert("Warning: The alias already exists in storage list.");
2205
- }
2206
- }
2207
- else{
2208
- alert("Warning: An alias for remote storage is required.");
2209
- }
2210
- break;
2211
- case "sftp":
2212
- if(storage_array['storage_name'] !== ""){
2213
- if(wpvivid_check_repeat_storage_alias(storage_array['storage_name']) !== -1){
2214
- if(storage_array['storage_ip'] !== ""){
2215
- if (/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(storage_array['storage_ip'])) {
2216
- if(storage_array['storage_username'] !== ""){
2217
- if(storage_array['storage_password'] !== ""){
2218
- if(storage_array['storage_port'] !== ""){
2219
- if(storage_array['storage_path'] !== ""){
2220
- ret = "success";
2221
- }
2222
- else{
2223
- alert("Warning: The storage path is required.");
2224
- }
2225
- }
2226
- else{
2227
- alert("Warning: The port number is required.");
2228
- }
2229
- }
2230
- else{
2231
- alert("Warning: The password is required.");
2232
- }
2233
- }
2234
- else{
2235
- alert("Warning: The username is required.");
2236
- }
2237
- }
2238
- else{
2239
- alert("Warning: The IP Address you entered is invalid. Please try again.");
2240
- }
2241
- }
2242
- else{
2243
- alert("Warning: The IP Address is required.");
2244
- }
2245
- }
2246
- else{
2247
- alert("Warning: The alias already exists in storage list.");
2248
- }
2249
- }
2250
- else{
2251
- alert("Warning: An alias for remote storage is required.");
2252
- }
2253
- break;
2254
- case "amazonS3":
2255
- if(storage_array['storage_name'] !== ""){
2256
- if(wpvivid_check_repeat_storage_alias(storage_array['storage_name']) !== -1){
2257
- if(storage_array['storage_access'] !== ""){
2258
- if(storage_array['storage_secret'] !== ""){
2259
- if(storage_array['storage_path'] !== ""){
2260
- if(storage_array['storage_region'] !== ""){
2261
- ret = "success";
2262
- }
2263
- else{
2264
- alert("Warning: The storage region is required.");
2265
- }
2266
- }
2267
- else{
2268
- alert("Warning: The storage path is required.");
2269
- }
2270
- }
2271
- else{
2272
- alert("Warning: The storage secret key is required.");
2273
- }
2274
- }
2275
- else{
2276
- alert('Warning: The access key for Amazon S3 is required.');
2277
- }
2278
- }
2279
- else{
2280
- alert("Warning: The alias already exists in storage list.");
2281
- }
2282
- }
2283
- else{
2284
- alert("Warning: An alias for remote storage is required.");
2285
- }
2286
- break;
2287
- }
2288
- return ret;
2289
- }
2290
-
2291
  /**
2292
  * Verify whether the entered alias for the remote storage already exists in the list
2293
  *
@@ -2337,20 +1701,25 @@ function wpvivid_initialize_log(backup_id){
2337
  */
2338
  function wpvivid_show_log(log_msg){
2339
  jQuery('#wpvivid_display_log_content').html("");
2340
- var jsonarray = jQuery.parseJSON(log_msg);
2341
- if(jsonarray.result === "success") {
2342
- var log_data = jsonarray.data;
2343
- while(log_data.indexOf('\n') >= 0){
2344
- var iLength = log_data.indexOf('\n');
2345
- var log = log_data.substring(0, iLength);
2346
- log_data = log_data.substring(iLength+1);
2347
- var insert_log = "<div style=\"clear:both;\">"+log+"</div>";
2348
- jQuery('#wpvivid_display_log_content').append(insert_log);
 
 
 
 
 
 
2349
  }
2350
  }
2351
- else if(jsonarray.result === "failed"){
2352
- var div = "Reading the log failed. Please try again.";
2353
- jQuery('#wpvivid_display_log_content').html(div);
2354
  }
2355
  }
2356
 
@@ -2483,10 +1852,7 @@ function wpvivid_retrieve_log_list(){
2483
  }
2484
  }
2485
  catch(err){
2486
- setTimeout(function()
2487
- {
2488
- wpvivid_retrieve_log_list();
2489
- }, 1000);
2490
  }
2491
  }, function(XMLHttpRequest, textStatus, errorThrown) {
2492
  setTimeout(function () {
@@ -2535,10 +1901,7 @@ function wpvivid_view_log(num){
2535
  }
2536
  }
2537
  catch(err){
2538
- setTimeout(function()
2539
- {
2540
- wpvivid_view_log(num);
2541
- }, 1000);
2542
  }
2543
  }, function (XMLHttpRequest, textStatus, errorThrown) {
2544
  var div = "Reading the log failed. Please try again.";
@@ -2574,20 +1937,7 @@ function wpvivid_set_default_remote_storage(){
2574
  'remote_storage': remote_storage
2575
  };
2576
  wpvivid_post_request(ajax_data, function(data){
2577
- try {
2578
- var jsonarray = jQuery.parseJSON(data);
2579
- if (jsonarray.result === "success") {
2580
- wpvivid_location_href = true;
2581
- location.replace(location.href);
2582
- wpvivid_retrieve_default_remote_storage();
2583
- }
2584
- }
2585
- catch(err){
2586
- setTimeout(function()
2587
- {
2588
- wpvivid_set_default_remote_storage();
2589
- }, 1000);
2590
- }
2591
  }, function(XMLHttpRequest, textStatus, errorThrown) {
2592
  var error_message = wpvivid_output_ajaxerror('setting up the default remote storage', textStatus, errorThrown);
2593
  alert(error_message);
@@ -2598,13 +1948,6 @@ function wpvivid_set_default_remote_storage(){
2598
  }
2599
  }
2600
 
2601
- /**
2602
- * Retrieve the default remote storage while backing up.
2603
- */
2604
- function wpvivid_retrieve_default_remote_storage(){
2605
- wpvivid_retrieve_storage_list();
2606
- }
2607
-
2608
  function wpvivid_pre_log_page(){
2609
  if(wpvivid_cur_log_page > 1){
2610
  wpvivid_cur_log_page--;
@@ -2657,7 +2000,7 @@ function wpvivid_set_backup_lock(backup_id, lock_status){
2657
  'lock': lock
2658
  };
2659
  wpvivid_post_request(ajax_data, function(data) {
2660
- wpvivid_retrieve_backup_list();
2661
  }, function(XMLHttpRequest, textStatus, errorThrown) {
2662
  var error_message = wpvivid_output_ajaxerror('setting up a lock for the backup', textStatus, errorThrown);
2663
  alert(error_message);
@@ -2722,10 +2065,7 @@ function wpvivid_init_restore_data(){
2722
  }
2723
  }
2724
  catch(err){
2725
- setTimeout(function()
2726
- {
2727
- wpvivid_init_restore_data();
2728
- }, 1000);
2729
  }
2730
  }, function(XMLHttpRequest, textStatus, errorThrown) {
2731
  var error_message = wpvivid_output_ajaxerror('initializing restore information', textStatus, errorThrown);
@@ -2793,10 +2133,8 @@ function wpvivid_prepare_restore(){
2793
  }
2794
  }
2795
  catch(err){
2796
- setTimeout(function()
2797
- {
2798
- wpvivid_prepare_restore();
2799
- }, 1000);
2800
  }
2801
  }, function(XMLHttpRequest, textStatus, errorThrown) {
2802
  var error_message = wpvivid_output_ajaxerror('preparing to restore', textStatus, errorThrown);
@@ -2982,10 +2320,7 @@ function wpvivid_delete_incompleted_restore(){
2982
  }
2983
  }
2984
  catch(err){
2985
- setTimeout(function()
2986
- {
2987
- wpvivid_delete_incompleted_restore();
2988
- }, 1000);
2989
  }
2990
  }, function(XMLHttpRequest, textStatus, errorThrown) {
2991
  var error_message = wpvivid_output_ajaxerror('deleting the last incomplete restore task', textStatus, errorThrown);
@@ -3019,10 +2354,7 @@ function wpvivid_rollback(){
3019
  }
3020
  }
3021
  catch(err){
3022
- setTimeout(function()
3023
- {
3024
- wpvivid_rollback();
3025
- }, 1000);
3026
  }
3027
  }, function(XMLHttpRequest, textStatus, errorThrown) {
3028
  var error_message = wpvivid_output_ajaxerror('starting rollbacking', textStatus, errorThrown);
@@ -3161,10 +2493,8 @@ function wpvivid_delete_out_of_date_backups(){
3161
  }
3162
  }
3163
  catch(err){
3164
- setTimeout(function()
3165
- {
3166
- wpvivid_delete_out_of_date_backups();
3167
- }, 1000);
3168
  }
3169
  }, function(XMLHttpRequest, textStatus, errorThrown) {
3170
  var error_message = wpvivid_output_ajaxerror('deleting out of date backups', textStatus, errorThrown);
@@ -3197,10 +2527,10 @@ function wpvivid_calculate_diskspaceused(){
3197
  }
3198
  }
3199
  catch(err){
3200
- setTimeout(function()
3201
- {
3202
- wpvivid_calculate_diskspaceused();
3203
- }, 1000);
3204
  }
3205
  }, function(XMLHttpRequest, textStatus, errorThrown) {
3206
  var error_message = wpvivid_output_ajaxerror('calculating server disk space in use by WPvivid', textStatus, errorThrown);
@@ -3274,10 +2604,7 @@ function wpvivid_clean_junk_files(){
3274
  wpvivid_retrieve_log_list();
3275
  }
3276
  catch(err){
3277
- setTimeout(function()
3278
- {
3279
- wpvivid_clean_junk_files();
3280
- }, 1000);
3281
  }
3282
  }, function (XMLHttpRequest, textStatus, errorThrown) {
3283
  var error_message = wpvivid_output_ajaxerror('cleaning out junk files', textStatus, errorThrown);
@@ -3316,4 +2643,58 @@ function wpvivid_prefix_integer(num) {
3316
  var num_length = num.toString().length;
3317
  if(num_length < 2) num_length = 2;
3318
  return (Array(num_length).join('0') + num).slice(-num_length);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3319
  }
51
 
52
  wpvivid_interface_flow_control();
53
 
 
 
54
  $('#wpvivid_quickbackup_btn').click(function(){
55
  wpvivid_clear_notice('wpvivid_backup_notice');
56
  wpvivid_start_backup();
62
  });
63
 
64
  $('#storage_account_button').click(function(){
65
+ var storage_type = $(".storage-providers-active").attr("remote_type");
66
+ wpvivid_add_remote_storage('wpvivid_test_remote_connection', storage_type);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  wpvivid_settings_changed = false;
68
  });
69
 
163
  $('#wpvivid_download_website_info').click(function(){
164
  wpvivid_download_website_info();
165
  });
166
+
167
+ $('#wpvivid_review_comment').click(function(){
168
+ window.open('https://wordpress.org/support/plugin/wpvivid-backuprestore/reviews/?filter=5');
169
+ wpvivid_add_review_info('do_not_ask');
170
+ });
171
+
172
+ $('#wpvivid_review_not_ask').click(function(){
173
+ wpvivid_add_review_info('do_not_ask');
174
+ });
175
+
176
+ $('#wpvivid_review_ask_later').click(function(){
177
+ wpvivid_add_review_info('next_time');
178
+ });
179
  });
180
 
181
  })(jQuery);
209
  * @param ajax_data - Data in Ajax request
210
  * @param callback - A callback function when the request is succeeded
211
  * @param error_callback - A callback function when the request is failed
212
+ * @param time_out - The timeout for Ajax request
213
  */
214
+ function wpvivid_post_request(ajax_data, callback, error_callback, time_out){
215
+ if(typeof time_out === 'undefined') time_out = 30000;
216
  jQuery.ajax({
217
  type: "post",
218
  url: ajax_object.ajax_url,
223
  error: function (XMLHttpRequest, textStatus, errorThrown) {
224
  error_callback(XMLHttpRequest, textStatus, errorThrown);
225
  },
226
+ timeout: time_out
227
  });
228
  }
229
 
460
 
461
  }
462
  catch(err){
463
+ alert(err);
 
 
 
 
464
  }
465
  }, function (XMLHttpRequest, textStatus, errorThrown) {
466
  setTimeout(function () {
511
  * Start backing up
512
  */
513
  function wpvivid_start_backup(){
514
+ var backup_data = wpvivid_ajax_data_transfer('backup');
515
+ var ajax_data = {
516
+ 'action': 'wpvivid_prepare_backup',
517
+ 'backup': backup_data
518
+ };
519
+ jQuery('#wpvivid_quickbackup_btn').css({'pointer-events': 'none', 'opacity': '0.4'});
520
+ jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'none', 'opacity': '0.4'});
521
+ jQuery('#wpvivid_backup_log_btn').css({'pointer-events': 'none', 'opacity': '0.4'});
522
+ jQuery('#wpvivid_postbox_backup_percent').show();
523
+ jQuery('#wpvivid_current_doing').html('Ready to backup. Progress: 0%, running time: 0second.');
524
+ var percent = '0%';
525
+ jQuery('#wpvivid_action_progress_bar_percent').css('width', percent);
526
+ jQuery('#wpvivid_backup_database_size').html('');
527
+ jQuery('#wpvivid_backup_file_size').html('');
528
+ jQuery('#wpvivid_current_doing').html('');
529
+ wpvivid_completed_backup = 1;
530
+ wpvivid_prepare_backup = true;
531
+ wpvivid_post_request(ajax_data, function(data){
532
+ try {
533
+ var jsonarray = jQuery.parseJSON(data);
534
+ if (jsonarray.result === 'failed') {
535
+ wpvivid_delete_ready_task(jsonarray.error);
536
  }
537
+ else if(jsonarray.result === 'success') {
538
+ m_backup_task_id = jsonarray.task_id;
539
+ if(jsonarray.check.alert_db === false && jsonarray.check.alter_files === false && jsonarray.check.alter_fcgi === false){
540
+ wpvivid_retrieve_backup_list();
541
+ wpvivid_backup_now(jsonarray.task_id);
542
+ }
543
+ else{
544
+ var descript = '';
545
+ if(jsonarray.check.alert_db === true || jsonarray.check.alter_files === true){
546
+ descript = 'The database (the dumping SQL file) might be too large, backing up the database may run out of server memory and result in a backup failure.\n' +
547
+ 'One or more files might be too large, backing up the file(s) may run out of server memory and result in a backup failure.\n' +
548
+ 'Click OK button and continue to back up.';
549
+ var ret = confirm(descript);
550
+ if(ret === true){
551
+ wpvivid_retrieve_backup_list();
552
+ wpvivid_backup_now(m_backup_task_id);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
553
  }
554
+ else{
555
+ jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'auto', 'opacity': '1'});
556
+ jQuery('#wpvivid_backup_log_btn').css({'pointer-events': 'auto', 'opacity': '1'});
557
+ jQuery('#wpvivid_quickbackup_btn').css({'pointer-events': 'auto', 'opacity': '1'});
558
+ jQuery('#wpvivid_postbox_backup_percent').hide();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
559
  }
560
  }
561
+ }
 
 
 
 
 
 
 
 
 
562
  }
563
  }
564
+ catch(err){
565
+ wpvivid_delete_ready_task(err);
566
  }
567
+ }, function(XMLHttpRequest, textStatus, errorThrown) {
568
+ var error_message = wpvivid_output_ajaxerror('preparing the backup', textStatus, errorThrown);
569
+ wpvivid_delete_ready_task(error_message);
570
+ });
571
+
572
  }
573
 
574
  function wpvivid_delete_ready_task(error){
585
  }
586
  }
587
  catch(err){
588
+ wpvivid_add_notice('Backup', 'Error', err);
589
+ jQuery('#wpvivid_quickbackup_btn').css({'pointer-events': 'auto', 'opacity': '1'});
590
+ jQuery('#wpvivid_postbox_backup_percent').hide();
 
591
  }
592
  }, function (XMLHttpRequest, textStatus, errorThrown) {
593
  setTimeout(function () {
631
  'force': force_del
632
  };
633
  wpvivid_post_request(ajax_data, function(data){
634
+ wpvivid_handle_backup_data(data);
 
 
 
 
 
 
 
 
 
 
 
 
635
  }, function(XMLHttpRequest, textStatus, errorThrown) {
636
  var error_message = wpvivid_output_ajaxerror('deleting the backup', textStatus, errorThrown);
637
  alert(error_message);
667
  'backup_id': delete_backup_array
668
  };
669
  wpvivid_post_request(ajax_data, function (data) {
670
+ wpvivid_handle_backup_data(data);
 
 
 
 
 
 
 
 
 
 
 
671
  }, function (XMLHttpRequest, textStatus, errorThrown) {
672
  var error_message = wpvivid_output_ajaxerror('deleting the backup', textStatus, errorThrown);
673
  alert(error_message);
733
  }
734
  }
735
  catch(err){
736
+ alert(err);
 
 
 
737
  }
738
  }, function(XMLHttpRequest, textStatus, errorThrown) {
739
  var error_message = wpvivid_output_ajaxerror('retrieving the last backup log', textStatus, errorThrown);
747
  * @param action - The action to add or test a remote storage
748
  * @param storage_type - Remote storage types (Amazon S3, SFTP and FTP server)
749
  */
750
+ function wpvivid_add_remote_storage(action, storage_type)
751
+ {
752
+ var bcheck = true;
753
+ var name = jQuery('input:text[option='+storage_type+'][name=name]').val();
754
+ if(wpvivid_check_repeat_storage_alias(name) === -1){
755
+ bcheck = false;
756
+ alert("Warning: The alias already exists in storage list.");
757
+ }
758
+ if(bcheck) {
759
+ var remote_from = wpvivid_ajax_data_transfer(storage_type);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
760
  var ajax_data;
761
+ ajax_data = {
762
+ 'action': action,
763
+ 'remote': remote_from,
764
+ 'type': storage_type
765
+ };
766
+ wpvivid_post_request(ajax_data, function (data) {
767
+ if (action === 'wpvivid_test_remote_connection') {
 
 
 
 
 
 
 
 
768
  try {
769
  var jsonarray = jQuery.parseJSON(data);
770
+ if (jsonarray.result === 'success') {
771
  wpvivid_add_remote_storage('wpvivid_add_remote', storage_type);
772
  }
773
  else if (jsonarray.result === 'failed') {
775
  jQuery('#storage_account_button').css({'pointer-events': 'auto', 'opacity': '1'});
776
  }
777
  }
778
+ catch (err) {
779
+ alert(err);
780
+ jQuery('#storage_account_button').css({'pointer-events': 'auto', 'opacity': '1'});
 
 
781
  }
782
  }
783
+ else if (action === 'wpvivid_add_remote') {
784
+ jQuery('input:text[option='+storage_type+']').each(function(){
785
+ jQuery(this).val('');
786
+ });
787
+ jQuery('input:password[option='+storage_type+']').each(function(){
788
+ jQuery(this).val('');
789
+ });
 
 
 
 
 
 
 
 
 
 
 
790
  wpvivid_handle_remote_storage_data(data);
791
  }
792
+ }, function (XMLHttpRequest, textStatus, errorThrown) {
793
+ jQuery('#storage_account_button').css({'pointer-events': 'auto', 'opacity': '1'});
794
+ if (action === 'wpvivid_test_remote_connection') {
795
  var error_message = wpvivid_output_ajaxerror('testing the remote storage connection', textStatus, errorThrown);
796
  }
797
+ else if (action === 'wpvivid_add_remote') {
798
  var error_message = wpvivid_output_ajaxerror('adding the remote storage', textStatus, errorThrown);
799
  }
800
  alert(error_message);
801
  });
802
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
803
  }
804
 
805
  function wpvivid_handle_remote_storage_data(data){
 
806
  var i = 0;
807
  try {
808
  var jsonarray = jQuery.parseJSON(data);
809
  if (jsonarray.result === 'success') {
810
+ jQuery('#wpvivid_remote_storage_list').html('');
811
+ jQuery('#wpvivid_remote_storage_list').append(jsonarray.html);
812
+ jQuery('#upload_storage').html(jsonarray.pic);
813
+ jQuery('#schedule_upload_storage').html(jsonarray.pic);
814
+ jQuery('#wpvivid_out_of_date_remote_path').html(jsonarray.dir);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
815
  wpvivid_interface_flow_control();
816
  }
817
+ else if(jsonarray.result === 'failed'){
818
+ alert(jsonarray.error);
819
+ }
820
  }
821
  catch(err){
822
+ alert(err);
 
 
 
823
  }
824
  }
825
 
840
  if(storage_id === wpvivid_default_remote_storage){
841
  wpvivid_default_remote_storage = '';
842
  }
843
+ wpvivid_handle_remote_storage_data(data);
844
  },function(XMLHttpRequest, textStatus, errorThrown) {
845
  var error_message = wpvivid_output_ajaxerror('deleting the remote storage', textStatus, errorThrown);
846
  alert(error_message);
856
  'action': 'wpvivid_get_backup_list'
857
  };
858
  wpvivid_post_request(ajax_data, function(data){
859
+ wpvivid_handle_backup_data(data);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
860
  },function(XMLHttpRequest, textStatus, errorThrown) {
861
  setTimeout(function () {
862
  wpvivid_retrieve_backup_list();
864
  });
865
  }
866
 
867
+ function wpvivid_handle_backup_data(data){
868
+ var i = 0;
869
+ try {
870
+ var jsonarray = jQuery.parseJSON(data);
871
+ if (jsonarray.result === 'success') {
872
+ jQuery('#wpvivid_backuplist').html('');
873
+ jQuery('#wpvivid_backuplist').append(jsonarray.html);
874
+ }
875
+ else if(jsonarray.result === 'failed'){
876
+ alert(jsonarray.error);
877
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
878
  }
879
+ catch(err){
880
+ alert(err);
881
  }
882
+ }
883
 
884
+ /**
885
+ * Modify general settings
886
+ */
887
+ function wpvivid_set_general_settings()
888
+ {
889
+ var bcheck = true;
890
+ jQuery('input:text[option=setting]').each(function(){
891
+ if(jQuery(this).val() === ''){
892
+ bcheck = false;
893
+ var name = jQuery(this).prop('name');
894
+ switch(name){
895
+ case 'max_file_size':
896
+ alert('The maximum zip file size is required.');
897
+ break;
898
+ case 'exclude_file_size':
899
+ alert('The size for excluded files is required.');
900
+ break;
901
+ case 'max_execution_time':
902
+ alert('The maximum execution time for PHP script is required.');
903
+ break;
904
+ case 'path':
905
+ alert('The local storage path is required.');
906
+ break;
907
+ default:
908
+ bcheck = true;
909
+ break;
910
+ }
911
+ return false;
912
+ }
913
+ });
914
+ if(bcheck) {
915
+ if (jQuery('input:checkbox[name=email_enable]').prop('checked')) {
916
+ if (jQuery('input:text[name=send_to]').val() === '') {
917
+ bcheck = false;
918
+ alert('An email address is required.');
919
+ }
920
+ }
921
  }
922
+ if(bcheck) {
923
+ var setting_data = wpvivid_ajax_data_transfer('setting');
924
+ var schedule_data = wpvivid_ajax_data_transfer('schedule');
925
+ var ajax_data = {
926
+ 'action': 'wpvivid_set_general_setting',
927
+ 'setting': setting_data,
928
+ 'schedule': schedule_data
929
+ };
930
+ jQuery('#wpvivid_setting_general_save').css({'pointer-events': 'none', 'opacity': '0.4'});
931
+ wpvivid_post_request(ajax_data, function (data) {
932
+ try {
933
+ var jsonarray = jQuery.parseJSON(data);
934
 
935
+ jQuery('#wpvivid_setting_general_save').css({'pointer-events': 'auto', 'opacity': '1'});
936
+ if (jsonarray.result === 'success') {
937
+ location.reload();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
938
  }
939
  else {
940
+ alert(jsonarray.error);
941
  }
942
  }
943
+ catch (err) {
944
+ alert(err);
945
+ jQuery('#wpvivid_setting_general_save').css({'pointer-events': 'auto', 'opacity': '1'});
946
  }
947
+ }, function (XMLHttpRequest, textStatus, errorThrown) {
948
+ jQuery('#wpvivid_setting_general_save').css({'pointer-events': 'auto', 'opacity': '1'});
949
+ var error_message = wpvivid_output_ajaxerror('changing base settings', textStatus, errorThrown);
950
+ alert(error_message);
951
+ });
 
 
952
  }
953
  }
954
 
972
  }
973
  }
974
  catch(err){
975
+ alert(err);
 
 
 
976
  }
977
  }, function(XMLHttpRequest, textStatus, errorThrown) {
978
  var error_message = wpvivid_output_ajaxerror('sending test mail', textStatus, errorThrown);
1018
  }
1019
  }
1020
  catch(err){
1021
+ alert(err);
 
 
 
1022
  }
1023
  }, function(XMLHttpRequest, textStatus, errorThrown) {
1024
  var error_message = wpvivid_output_ajaxerror('importing the previously-exported settings', textStatus, errorThrown);
1058
  }
1059
  }
1060
  catch(err){
1061
+ alert(err);
 
 
 
1062
  }
1063
  }, function (XMLHttpRequest, textStatus, errorThrown) {
1064
  var div = 'Reading the log failed. Please try again.';
1068
  }
1069
  }
1070
  catch(err){
1071
+ alert(err);
 
 
 
1072
  }
1073
  }, function(XMLHttpRequest, textStatus, errorThrown) {
1074
  var div = 'Reading the log failed. Please try again.';
1459
  }
1460
  }
1461
  catch(err){
1462
+ alert(err);
1463
+ jQuery('#wpvivid_download_loading_'+backup_id).removeClass('is-active');
 
 
1464
  }
1465
  },function(XMLHttpRequest, textStatus, errorThrown){
1466
  jQuery('#wpvivid_download_loading_'+backup_id).removeClass('is-active');
1631
  m_downloading_file_name = file_name;
1632
  wpvivid_post_request(ajax_data, function(data){
1633
  }, function(XMLHttpRequest, textStatus, errorThrown) {
1634
+ var error_message = wpvivid_output_ajaxerror('initializing download information', textStatus, errorThrown);
1635
+ alert(error_message);
1636
  wpvivid_unlock_download(backup_id);
1637
+ jQuery("#"+backup_id+"-text-part-"+part_num).html("<a onclick=\"wpvivid_prepare_download('" + part_num + "', '" + backup_id + "', '" + file_name + "');\" style=\"cursor: pointer\">Prepare to Download</a>");
1638
+ jQuery("#"+backup_id+"-progress-part-"+part_num).css('width', progress);
1639
+ m_downloading_file_name = '';
1640
+ }, 0);
 
 
 
1641
  }
1642
 
1643
  /**
1652
  location.href =ajaxurl+'?action=wpvivid_download_backup&backup_id='+backup_id+'&download_type='+backup_type+'&file_name='+file_name;
1653
  }
1654
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1655
  /**
1656
  * Verify whether the entered alias for the remote storage already exists in the list
1657
  *
1701
  */
1702
  function wpvivid_show_log(log_msg){
1703
  jQuery('#wpvivid_display_log_content').html("");
1704
+ try {
1705
+ var jsonarray = jQuery.parseJSON(log_msg);
1706
+ if (jsonarray.result === "success") {
1707
+ var log_data = jsonarray.data;
1708
+ while (log_data.indexOf('\n') >= 0) {
1709
+ var iLength = log_data.indexOf('\n');
1710
+ var log = log_data.substring(0, iLength);
1711
+ log_data = log_data.substring(iLength + 1);
1712
+ var insert_log = "<div style=\"clear:both;\">" + log + "</div>";
1713
+ jQuery('#wpvivid_display_log_content').append(insert_log);
1714
+ }
1715
+ }
1716
+ else if (jsonarray.result === "failed") {
1717
+ var div = "Reading the log failed. Please try again.";
1718
+ jQuery('#wpvivid_display_log_content').html(div);
1719
  }
1720
  }
1721
+ catch(err){
1722
+ alert(err);
 
1723
  }
1724
  }
1725
 
1852
  }
1853
  }
1854
  catch(err){
1855
+ alert(err);
 
 
 
1856
  }
1857
  }, function(XMLHttpRequest, textStatus, errorThrown) {
1858
  setTimeout(function () {
1901
  }
1902
  }
1903
  catch(err){
1904
+ alert(err);
 
 
 
1905
  }
1906
  }, function (XMLHttpRequest, textStatus, errorThrown) {
1907
  var div = "Reading the log failed. Please try again.";
1937
  'remote_storage': remote_storage
1938
  };
1939
  wpvivid_post_request(ajax_data, function(data){
1940
+ wpvivid_handle_remote_storage_data(data);
 
 
 
 
 
 
 
 
 
 
 
 
 
1941
  }, function(XMLHttpRequest, textStatus, errorThrown) {
1942
  var error_message = wpvivid_output_ajaxerror('setting up the default remote storage', textStatus, errorThrown);
1943
  alert(error_message);
1948
  }
1949
  }
1950
 
 
 
 
 
 
 
 
1951
  function wpvivid_pre_log_page(){
1952
  if(wpvivid_cur_log_page > 1){
1953
  wpvivid_cur_log_page--;
2000
  'lock': lock
2001
  };
2002
  wpvivid_post_request(ajax_data, function(data) {
2003
+ wpvivid_handle_backup_data(data);
2004
  }, function(XMLHttpRequest, textStatus, errorThrown) {
2005
  var error_message = wpvivid_output_ajaxerror('setting up a lock for the backup', textStatus, errorThrown);
2006
  alert(error_message);
2065
  }
2066
  }
2067
  catch(err){
2068
+ alert(err);
 
 
 
2069
  }
2070
  }, function(XMLHttpRequest, textStatus, errorThrown) {
2071
  var error_message = wpvivid_output_ajaxerror('initializing restore information', textStatus, errorThrown);
2133
  }
2134
  }
2135
  catch(err){
2136
+ alert(err);
2137
+ jQuery('#wpvivid_restore_btn').css({'pointer-events': 'auto', 'opacity': '1'});
 
 
2138
  }
2139
  }, function(XMLHttpRequest, textStatus, errorThrown) {
2140
  var error_message = wpvivid_output_ajaxerror('preparing to restore', textStatus, errorThrown);
2320
  }
2321
  }
2322
  catch(err){
2323
+ alert(err);
 
 
 
2324
  }
2325
  }, function(XMLHttpRequest, textStatus, errorThrown) {
2326
  var error_message = wpvivid_output_ajaxerror('deleting the last incomplete restore task', textStatus, errorThrown);
2354
  }
2355
  }
2356
  catch(err){
2357
+ alert(err);
 
 
 
2358
  }
2359
  }, function(XMLHttpRequest, textStatus, errorThrown) {
2360
  var error_message = wpvivid_output_ajaxerror('starting rollbacking', textStatus, errorThrown);
2493
  }
2494
  }
2495
  catch(err){
2496
+ alert(err);
2497
+ jQuery('#wpvivid_delete_out_of_backup').css({'pointer-events': 'auto', 'opacity': '1'});
 
 
2498
  }
2499
  }, function(XMLHttpRequest, textStatus, errorThrown) {
2500
  var error_message = wpvivid_output_ajaxerror('deleting out of date backups', textStatus, errorThrown);
2527
  }
2528
  }
2529
  catch(err){
2530
+ alert(err);
2531
+ jQuery('#wpvivid_calculate_size').css({'pointer-events': 'auto', 'opacity': '1'});
2532
+ jQuery('#wpvivid_clean_junk_file').css({'pointer-events': 'auto', 'opacity': '1'});
2533
+ jQuery('#wpvivid_junk_sum_size').html(current_size);
2534
  }
2535
  }, function(XMLHttpRequest, textStatus, errorThrown) {
2536
  var error_message = wpvivid_output_ajaxerror('calculating server disk space in use by WPvivid', textStatus, errorThrown);
2604
  wpvivid_retrieve_log_list();
2605
  }
2606
  catch(err){
2607
+ alert(err);
 
 
 
2608
  }
2609
  }, function (XMLHttpRequest, textStatus, errorThrown) {
2610
  var error_message = wpvivid_output_ajaxerror('cleaning out junk files', textStatus, errorThrown);
2643
  var num_length = num.toString().length;
2644
  if(num_length < 2) num_length = 2;
2645
  return (Array(num_length).join('0') + num).slice(-num_length);
2646
+ }
2647
+
2648
+ function wpvivid_add_review_info(action){
2649
+ var ajax_data={
2650
+ 'action': 'wpvivid_need_review',
2651
+ 'review': action
2652
+ };
2653
+ jQuery('#wpvivid_notice_rate').hide();
2654
+ wpvivid_post_request(ajax_data, function(data){
2655
+ }, function(XMLHttpRequest, textStatus, errorThrown) {
2656
+ });
2657
+ }
2658
+
2659
+ function wpvivid_ajax_data_transfer(data_type){
2660
+ var json = {};
2661
+ jQuery('input:checkbox[option='+data_type+']').each(function() {
2662
+ var value = '0';
2663
+ var key = jQuery(this).prop('name');
2664
+ if(jQuery(this).prop('checked')) {
2665
+ value = '1';
2666
+ }
2667
+ else {
2668
+ value = '0';
2669
+ }
2670
+ json[key]=value;
2671
+ });
2672
+ jQuery('input:radio[option='+data_type+']').each(function()
2673
+ {
2674
+ if(jQuery(this).prop('checked'))
2675
+ {
2676
+ var key = jQuery(this).prop('name');
2677
+ var value = jQuery(this).prop('value');
2678
+ json[key]=value;
2679
+ }
2680
+ });
2681
+ jQuery('input:text[option='+data_type+']').each(function(){
2682
+ var obj = {};
2683
+ var key = jQuery(this).prop('name');
2684
+ var value = jQuery(this).val();
2685
+ json[key]=value;
2686
+ });
2687
+ jQuery('input:password[option='+data_type+']').each(function(){
2688
+ var obj = {};
2689
+ var key = jQuery(this).prop('name');
2690
+ var value = jQuery(this).val();
2691
+ json[key]=value;
2692
+ });
2693
+ jQuery('select[option='+data_type+']').each(function(){
2694
+ var obj = {};
2695
+ var key = jQuery(this).prop('name');
2696
+ var value = jQuery(this).val();
2697
+ json[key]=value;
2698
+ });
2699
+ return JSON.stringify(json);
2700
  }
admin/partials/wpvivid-admin-display.php CHANGED
@@ -14,8 +14,6 @@ if (!defined('WPVIVID_PLUGIN_DIR')){
14
  die;
15
  }
16
 
17
-
18
-
19
  $last_backup_message=WPvivid_Setting::get_option('wpvivid_last_msg');
20
  $backuplist=WPvivid_Backuplist::get_backuplist();
21
  $remoteslist=WPvivid_Setting::get_all_remote_options();
@@ -53,6 +51,7 @@ $wpvivid_version=WPVIVID_PLUGIN_VERSION;
53
  <img src="<?php echo esc_url(plugins_url( 'images/delete-tab.png', __FILE__ )); ?>" style="vertical-align:middle; cursor:pointer;" onclick="wpvivid_close_main_tab('log');" />
54
  </div>
55
  </a>
 
56
  </h2>
57
  <div class="wrap" style="max-width:1720px;">
58
  <div id="poststuff">
@@ -60,1015 +59,24 @@ $wpvivid_version=WPVIVID_PLUGIN_VERSION;
60
  <div id="post-body-content">
61
  <div class="inside" style="margin-top:0px;">
62
  <div id="general-page" class="tabcontent wpvivid_tab_general" name="tab-backup" style="width:100%;">
63
- <?php
64
- $btn_style = 'pointer-events: auto; opacity: 1;';
65
- $estimate_db_size='';
66
- $estimate_file_size='';
67
- $percent=0;
68
- $backup_info = '';
69
- if(empty($backup_task['backup']['data'])){
70
- $btn_style = 'pointer-events: auto; opacity: 1;';
71
- }
72
- else{
73
- foreach($backup_task['backup']['data'] as $key=>$value){
74
- if($value['status']['str'] === 'running'){
75
- $btn_style = 'pointer-events: nano; opacity: 0.4;';
76
- $percent=$value['data']['progress'] / 2;
77
- $estimate_db_size=$value['size']['db_size'];
78
- $estimate_file_size=$value['size']['files_size']['sum'];
79
- if($value['is_canceled'] === false){
80
- $descript=$value['data']['descript'];
81
- $backup_running_time=$value['data']['running_time'];
82
- $output = '';
83
- foreach (array(86400 => 'day', 3600 => 'hour', 60 => 'min', 1 => 'second') as $key => $value) {
84
- if ($backup_running_time >= $key) $output .= floor($backup_running_time/$key) . $value;
85
- $backup_running_time %= $key;
86
- }
87
- if($output==''){
88
- $output=0;
89
- }
90
- $backup_info = $descript.' Progress: '.$percent.'%, running time: '.$output;
91
- }
92
- else{
93
- $backup_info = 'The backup will be canceled after backing up the current chunk ends.';
94
- }
95
- }
96
- else{
97
- $percent=0;
98
- $backup_info = '';
99
- }
100
- }
101
- }
102
- ?>
103
- <div class="postbox" id="wpvivid_postbox_backup_percent" style="<?php if(empty($backup_task['backup']['data'])){
104
- esc_attr_e('display:none;', 'wpvivid');
105
- } ?>">
106
- <div class="action-progress-bar" id="wpvivid_action_progress_bar">
107
- <div class="action-progress-bar-percent" id="wpvivid_action_progress_bar_percent" style="height:24px;width:<?php esc_attr_e($percent, 'wpvivid'); ?>%"></div>
108
- </div>
109
- <div id="wpvivid_estimate_backup_info" style="<?php if($general_setting['options']['wpvivid_common_setting']['estimate_backup'] === false){
110
- esc_attr_e('display:none;', 'wpvivid');
111
- } ?>">
112
- <div class="backup-basic-info"><span><?php _e('Database Size:', 'wpvivid'); ?></span><span id="wpvivid_backup_database_size"><?php _e($estimate_db_size, 'wpvivid'); ?></span></div>
113
- <div class="backup-basic-info"><span><?php _e('File Size:', 'wpvivid'); ?></span><span id="wpvivid_backup_file_size"><?php _e($estimate_file_size, 'wpvivid'); ?></span></div>
114
- </div>
115
- <div style="clear:both;"></div>
116
- <div style="margin-left:10px; float: left; width:100%;"><p id="wpvivid_current_doing"><?php _e($backup_info, 'wpvivid'); ?></p></div>
117
- <div style="clear: both;"></div>
118
- <div>
119
- <div id="wpvivid_backup_cancel" class="backup-log-btn"><input class="button-primary" id="wpvivid_backup_cancel_btn" type="submit" value="<?php esc_attr_e( 'Cancel', 'wpvivid' ); ?>" style="<?php esc_attr_e($btn_style, 'wpvivid'); ?>" /></div>
120
- <div id="wpvivid_backup_log" class="backup-log-btn"><input class="button-primary backup-log-btn" id="wpvivid_backup_log_btn" type="submit" value="<?php esc_attr_e( 'Log', 'wpvivid' ); ?>" /></div>
121
- </div>
122
- <div style="clear: both;"></div>
123
- </div>
124
- <div class="meta-box-sortables ui-sortable">
125
- <div class="postbox quickbackup" id="wpvivid_postbox_backup">
126
- <h2><span><?php _e( 'Back Up Manually','wpvivid'); ?></span></h2>
127
- <div class="quickstart-storage-setting">
128
- <span class="list-top-chip"><?php _e('Local storage Directory: '); ?></span>
129
- <span class="list-top-chip" id="wpvivid_local_storage_path"><?php echo WP_CONTENT_DIR.'/'.$backupdir; ?></span>
130
- <span class="list-top-chip" id=""><a href="#" onclick="wpvivid_click_switch_page('wpvivid_tab_setting', '');"><?php _e(' rename directory', 'wpvivid'); ?></a></span>
131
- </div>
132
- <div class="quickstart-archive-block">
133
- <fieldset>
134
- <legend class="screen-reader-text"><span>input type="radio"</span></legend>
135
- <label>
136
- <input type="radio" name="Backup-files" value="files+db" checked />
137
- <span><?php _e( 'Database + Files (Entire website)', 'wpvivid' ); ?></span>
138
- </label><br>
139
- <label>
140
- <input type="radio" name="Backup-files" value="files" />
141
- <span><?php _e( 'All Files (Exclude Database)', 'wpvivid' ); ?></span>
142
- </label><br>
143
- <label>
144
- <input type="radio" name="Backup-files" value="db" />
145
- <span><?php _e( 'Only Database', 'wpvivid' ); ?></span>
146
- </label><br>
147
- </fieldset>
148
- </div>
149
- <div class="quickstart-storage-block">
150
- <fieldset>
151
- <legend class="screen-reader-text"><span>input type="checkbox"</span></legend>
152
- <label>
153
- <input type="checkbox" id="wpvivid_backup_local" name="backup-storage" value="" checked readonly/>
154
- <span><?php _e( 'Save Backups to Local', 'wpvivid' ); ?></span>
155
- </label>
156
-
157
- <div style="clear:both;"></div>
158
- <label>
159
- <input type="checkbox" id="wpvivid_backup_remote" name="backup-storage" value="" />
160
- <span><?php _e( 'Send Backup to Remote Storage:', 'wpvivid' ); ?></span>
161
- </label><br>
162
- <div id="upload_storage" style="cursor:pointer;" title="Highlighted icon illuminates that you have choosed a remote storage to store backups">
163
- <?php
164
- $default_amazon_s3='images/storage-amazon-s3(gray).png';
165
- $default_ftp='images/storage-ftp(gray).png';
166
- $default_sftp='images/storage-sftp(gray).png';
167
- $remote_storage_type='';
168
- foreach ($remoteslist as $key=>$value) {
169
- if($key === $default_remote_storage){
170
- $remote_storage_type=$value['type'];
171
- }
172
- }
173
- if($remote_storage_type === 'amazonS3'){
174
- $default_amazon_s3='images/storage-amazon-s3.png';
175
- }
176
- else if($remote_storage_type === 'ftp'){
177
- $default_ftp='images/storage-ftp.png';
178
- }
179
- else if($remote_storage_type === 'sftp'){
180
- $default_sftp='images/storage-sftp.png';
181
- }
182
- ?>
183
- <img id="wpvivid_upload_storage_type_amazon_s3" src="<?php echo esc_url(plugins_url($default_amazon_s3, __FILE__ )); ?>" style="vertical-align:middle; " title="Amazon S3"/>
184
- <img id="wpvivid_upload_storage_type_ftp" src="<?php echo esc_url(plugins_url($default_ftp, __FILE__ )); ?>" style="vertical-align:middle;" title="FTP"/>
185
- <img id="wpvivid_upload_storage_type_sftp" src="<?php echo esc_url(plugins_url($default_sftp, __FILE__ )); ?>" style="vertical-align:middle;" title="SFTP"/>
186
- <img onclick="wpvivid_click_switch_page('wpvivid_tab_remote_storage', '');" src="<?php echo esc_url(plugins_url( 'images/add-storages.png', __FILE__ )); ?>" style="vertical-align:middle;" title="Add a storage"/>
187
- </div>
188
- </fieldset>
189
- </div>
190
- <div class="quickstart-btn" style="padding-top:20px;">
191
- <input class="button-primary quickbackup-btn" id="wpvivid_quickbackup_btn" type="submit" value="<?php esc_attr_e( 'Backup Now', 'wpvivid'); ?>" <?php esc_attr_e($btn_style, 'wpvivid'); ?> />
192
- <div class="schedule-tab-block" style="text-align:center;">
193
- <fieldset>
194
- <label>
195
-
196
- <input type="checkbox" id="wpvivid_backup_lock" name="lock-backup" value="" />
197
- <span><?php _e( 'This backup can only be deleted manually', 'wpvivid' ); ?></span>
198
- </label>
199
- </fieldset>
200
- </div>
201
- </div>
202
- <div class="custom-info" style="float:left; width:100%;">
203
- <strong><?php _e('Tips', 'wpvivid'); ?></strong><?php _e(': The settings is only for manual backup, which won\'t affect schedule settings.', 'wpvivid'); ?>
204
- </div>
205
- </div>
206
- <div class="postbox qucikbackup-schedule" id="wpvivid_postbox_backup_schedule">
207
- <h2><span><?php _e( 'Backup Schedule','wpvivid'); ?></span></h2>
208
- <div class="schedule-block">
209
- <?php
210
- $schedule=WPvivid_Schedule::get_schedule();
211
- if($schedule['enable']){
212
- $schedule_status='Enabled';
213
- $next_backup_time=date("l, F d, Y H:i", $schedule['next_start']);
214
- }
215
- else{
216
- $schedule_status='Disabled';
217
- $next_backup_time='N/A';
218
- }
219
- if(empty($last_backup_message)) {
220
- $last_backup_msg='The last backup message not found.';
221
- }
222
- else{
223
- if ($last_backup_message['status']['str'] === "completed") {
224
- $last_backup_msg=date("M d, Y H:i", $last_backup_message['status']['start_time']).' Succeed <a id="wpvivid_last_backup_msg_log" style="cursor:pointer;"> Log</a>';
225
- }
226
- else if ($last_backup_message['status']['str'] === "error") {
227
- $last_backup_msg=date("M d, Y H:i", $last_backup_message['status']['start_time']).' Failed <a id="wpvivid_last_backup_msg_log" style="cursor:pointer;"> Log</a>';
228
- }
229
- else if($last_backup_message['status']['str'] === "cancel"){
230
- $last_backup_msg=date("M d, Y H:i", $last_backup_message['status']['start_time']).' Failed <a id="wpvivid_last_backup_msg_log" style="cursor:pointer;"> Log</a>';
231
- }
232
- else{
233
- $last_backup_msg='The last backup message not found.';
234
- }
235
- }
236
- ?>
237
- <p id="wpvivid_schedule_status"><strong><?php _e('Schedule Status: '); ?></strong><?php _e($schedule_status, 'wpvivid'); ?></p>
238
- <div id="wpvivid_schedule_info">
239
- <p><strong><?php _e('Server Time: '); ?></strong><?php _e(date("l, F d, Y H:i",time()), 'wpvivid'); ?></p>
240
- <p><span id="wpvivid_last_backup_msg"><strong><?php _e('Last Backup: '); ?></strong><?php _e($last_backup_msg, 'wpvivid'); ?></span></p>
241
- <p id="wpvivid_next_backup"><strong><?php _e('Next Backup: '); ?></strong><?php _e($next_backup_time, 'wpvivid'); ?></p>
242
- </div>
243
- </div>
244
- </div>
245
- <div style="clear:both;"></div>
246
-
247
- <h2 class="nav-tab-wrapper" id="wpvivid_backup_tab" style="padding-bottom:0!important;">
248
- <a href="#" id="wpvivid_tab_backup" class="nav-tab table-nav-tab nav-tab-active" onclick="switchrestoreTabs(event,'page-backups')"><?php _e('Backups', 'wpvivid'); ?></a>
249
- <a href="#" id="wpvivid_tab_backup_log" class="nav-tab table-nav-tab delete" onclick="switchrestoreTabs(event,'page-log')" style="display: none;">
250
- <div style="margin-right: 15px;"><?php _e('Log', 'wpvivid'); ?></div>
251
- <div class="nav-tab-delete-img">
252
- <img src="<?php echo esc_url(plugins_url( 'images/delete-tab.png', __FILE__ )); ?>" style="vertical-align:middle; cursor:pointer;" onclick="wpvivid_close_tab('log');" />
253
- </div>
254
- </a>
255
- <a href="#" id="wpvivid_tab_restore" class="nav-tab table-nav-tab delete" onclick="switchrestoreTabs(event,'page-restore')" style="display: none;">
256
- <div style="margin-right: 15px;"><?php _e('Restore', 'wpvivid'); ?></div>
257
- <div class="nav-tab-delete-img">
258
- <img src="<?php echo esc_url(plugins_url( 'images/delete-tab.png', __FILE__ )); ?>" style="vertical-align:middle; cursor:pointer;" onclick="wpvivid_close_tab('restore');" />
259
- </div>
260
- </a>
261
- </h2>
262
-
263
- <div class="table-list-content wpvivid_tab_backup" id="page-backups">
264
- <div style="margin-top:10px; margin-bottom:10px;">
265
- <P><strong><?php _e('How to download a backup', 'wpvivid'); ?></strong></p>
266
- <ul><li><?php _e('->If backups are stored in remote storage, our plugin will retrieve the backup to your web server. This may take a little time depending on the size of backup files. Please be patient. Then you can download them to your PC.', 'wpvivid'); ?></li>
267
- <li><?php _e('->If backups are stored in web server, the plugin will list all relevant files immediately.', 'wpvivid'); ?></li>
268
- </ul>
269
- </div>
270
- <div style="margin-bottom:10px;">
271
- <P><strong><?php _e('How to restore website', 'wpvivid'); ?></strong></p>
272
- <ul><li><?php _e('Step One: Click the button called \'Restore\' which is next to \'Log\' button, then a new Tab (Restore Tab) is going to be created', 'wpvivid'); ?></li>
273
- <li><?php _e('Step Two: Click \'Restore\' button', 'wpvivid'); ?></li>
274
- </ul>
275
- </div>
276
- <div style="clear:both;"></div>
277
- <table class="wp-list-table widefat plugins" id="wpvivid_backuplist_table">
278
- <thead>
279
- <tr class="backup-list-head">
280
- <td class=""></td>
281
- <th class=""><?php _e( 'Backup','wpvivid'); ?></th>
282
- <th><?php _e( 'Storage','wpvivid'); ?></th>
283
- <th><?php _e( 'Download','wpvivid'); ?></th>
284
- <th><?php _e( 'Delete','wpvivid'); ?></th>
285
- </tr>
286
- </thead>
287
- <tbody class="wpvivid-backuplist" id="wpvivid_backuplist">
288
- <?php
289
- foreach ($backuplist as $key=>$value) { ?>
290
- <tr>
291
- <th class="check-column"><input name="check_backup" type="checkbox" id="<?php esc_attr_e($key, 'wpvivid'); ?>" value="<?php esc_attr_e($key, 'wpvivid'); ?>" onclick="wpvivid_click_check_backup('<?php _e($key, 'wpvivid'); ?>');" /></th>
292
- <td class="tablelistcolumn">
293
- <div style="float:left;padding:0px 10px 10px 0px;">
294
- <?php
295
- if(empty($value['lock'])){
296
- $backup_lock='images/unlocked.png';
297
- $lock_status='unlock';
298
- }
299
- else{
300
- if($value['lock'] === 0){
301
- $backup_lock='images/unlocked.png';
302
- $lock_status='unlock';
303
- }
304
- else{
305
- $backup_lock='images/locked.png';
306
- $lock_status='lock';
307
- }
308
- }
309
- ?>
310
-
311
- <div class="backuptime"><strong><?php _e(date('M d, Y H:i',$value['create_time']), 'wpvivid'); ?></strong></div>
312
- <div class="common-table">
313
- <span title="To lock the backup, the backup can only be deleted manually">
314
- <img src="<?php echo esc_url(plugins_url($backup_lock, __FILE__)); ?>" name="<?php esc_attr_e($lock_status, 'wpvivid'); ?>" onclick="wpvivid_set_backup_lock('<?php _e($key, 'wpvivid'); ?>', '<?php _e($lock_status, 'wpvivid'); ?>');" style="vertical-align:middle; cursor:pointer;"/>
315
- </span>
316
- | <span><?php _e('Type:', 'wpvivid'); ?></span><span><?php _e($value['type'], 'wpvivid'); ?></span>
317
- |<span title="Backup log"><a href="#" onclick="wpvivid_initialize_log('<?php _e($key, 'wpvivid'); ?>');"><img src="<?php echo esc_url(plugins_url( 'images/Log.png', __FILE__ )); ?>" style="vertical-align:middle;cursor:pointer;"/><?php _e('Log', 'wpvivid'); ?></a></span>
318
- |<span title="Restore Website from The Backup"><a href="#" onclick="wpvivid_initialize_restore('<?php _e($key, 'wpvivid'); ?>','<?php _e(date('M d, Y H:i',$value['create_time']), 'wpvivid'); ?>');"><img src="<?php echo esc_url(plugins_url( 'images/Restore.png', __FILE__ )); ?>" style="vertical-align:middle;cursor:pointer;"/><?php _e('Restore', 'wpvivid'); ?></a></span>
319
- </div>
320
-
321
- </div>
322
- </td>
323
- <td class="tablelistcolumn">
324
- <?php
325
- $amazon_s3_url='images/storage-amazon-s3(gray).png';
326
- $ftp_url='images/storage-ftp(gray).png';
327
- $sftp_url='images/storage-sftp(gray).png';
328
- foreach ($value['remote'] as $storage_type) {
329
- if($storage_type['type'] === 'amazonS3'){
330
- $amazon_s3_url='images/storage-amazon-s3.png';
331
- }
332
- if($storage_type['type'] === 'ftp'){
333
- $ftp_url='images/storage-ftp.png';
334
- }
335
- if($storage_type['type'] === 'sftp'){
336
- $sftp_url='images/storage-sftp.png';
337
- }
338
- }
339
- ?>
340
- <div style="float:left;padding:10px 10px 10px 0px;">
341
- <img src="<?php echo esc_url(plugins_url($amazon_s3_url, __FILE__)); ?>" style="vertical-align:middle; " title="Amazon S3"/>
342
- <img src="<?php echo esc_url(plugins_url($ftp_url, __FILE__ )); ?>" style="vertical-align:middle;" title="FTP"/>
343
- <img src="<?php echo esc_url(plugins_url($sftp_url, __FILE__)); ?>" style="vertical-align:middle;" title="SFTP"/>
344
- </div>
345
- </td>
346
- <td class="tablelistcolumn">
347
- <div id="wpvivid_file_part_<?php _e($key, 'wpvivid'); ?>" style="float:left;padding:10px 10px 10px 0px;">
348
- <div style="cursor:pointer;" onclick="wpvivid_initialize_download('<?php _e($key, 'wpvivid'); ?>');" title="Prepare to download the backup">
349
- <img id="wpvivid_download_btn_<?php _e($key, 'wpvivid'); ?>" src="<?php echo esc_url(plugins_url( 'images/download.png', __FILE__ )); ?>" style="vertical-align:middle;" /><?php _e('Download', 'wpvivid'); ?>
350
- <div class="spinner" id="wpvivid_download_loading_<?php _e($key, 'wpvivid'); ?>" style="float:right;width:auto;height:auto;padding:10px 180px 10px 0;background-position:0 0;"></div>
351
- </div>
352
- </div>
353
- </td>
354
- <td class="tablelistcolumn">
355
- <div class="backuplist-delete-backup">
356
- <img src="<?php echo esc_url(plugins_url( 'images/Delete.png', __FILE__ )); ?>" style="vertical-align:middle; cursor:pointer;" title="Delete the backup" onclick="wpvivid_delete_selected_backup('<?php _e($key, 'wpvivid'); ?>');"/>
357
- </div>
358
- </td>
359
- </tr>
360
- <?php } ?>
361
- </tbody>
362
- <tfoot>
363
- <tr>
364
- <th><input name="" type="checkbox" id="backup_list_all_check" value="1" /></th>
365
- <th class="row-title" colspan="6"><a onclick="wpvivid_delete_backups_inbatches();" style="cursor: pointer;"><?php _e('Delete the selected backups', 'wpvivid'); ?></a></th>
366
- </tr>
367
- </tfoot>
368
- </table>
369
-
370
- </div>
371
- <div class="table-list-content wpvivid_tab_backup_log" id="page-log" style="display:none;">
372
- <div class="postbox restore_log" id="wpvivid_display_log_content">
373
- <div></div>
374
- </div>
375
- </div>
376
- <div class="table-list-content wpvivid_tab_restore" id="page-restore" style="display:none;">
377
- <div>
378
- <h3><?php _e('Restore backup from:', 'wpvivid'); ?><span id="wpvivid_restore_backup_time"></span></h3>
379
- <p><strong><?php _e('Please do not close the page or switch to other pages when a restore task is running, as it could trigger some unexpected errors.', 'wpvivid'); ?></strong></p>
380
- <p><?php _e('Restore function will replace the current site\'s themes, plugins, uploads, database and/or other content directories with the existing equivalents in the selected backup.', 'wpvivid'); ?></p>
381
- <div class="restore-button-position"><input class="button-primary" id="wpvivid_restore_btn" type="submit" name="restore" value="<?php esc_attr_e( 'Restore', 'wpvivid' ); ?>" onclick="wpvivid_start_restore();" /></div>
382
- <div class="restore-button-position"><input class="button-primary" id="wpvivid_clean_restore" type="submit" name="clear_restore" value="<?php esc_attr_e( 'Clean Restore', 'wpvivid' ); ?>" /></div>
383
- <div class="restore-button-position"><input class="button-primary" id="wpvivid_rollback_btn" type="submit" name="rollback" value="<?php esc_attr_e( 'Rollback', 'wpvivid' ); ?>" /></div>
384
- </div>
385
- <div class="postbox restore_log">
386
- <div id="wpvivid_restore_log"></div>
387
- </div>
388
- </div>
389
- </div>
390
  </div>
391
  <div id="storage-page" class="tabcontent wpvivid_tab_remote_storage" name="tab-storage" style="display:none;">
392
- <div>
393
- <div class="storage-content" id="storage-brand-2" style="">
394
- <div class="postbox">
395
- <div class="storage-providers storage-providers-active" id="storage_provider_ftp" onclick="select_remote_storage(event, 'ftp');">
396
- <img src="<?php echo esc_url(plugins_url( 'images/storage-ftp.png', __FILE__ )); ?>" style="vertical-align:middle;"/><?php _e('FTP', 'wpvivid'); ?>
397
- </div>
398
- <div class="storage-providers" id="storage_provider_sftp" onclick="select_remote_storage(event, 'sftp');">
399
- <img src="<?php echo esc_url(plugins_url( 'images/storage-sftp.png', __FILE__ )); ?>" style="vertical-align:middle;"/><?php _e('SFTP', 'wpvivid'); ?>
400
- </div>
401
- <div class="storage-providers" id="storage_provider_amazons3" onclick="select_remote_storage(event, 'amazonS3');">
402
- <img src="<?php echo esc_url(plugins_url( 'images/storage-amazon-s3.png', __FILE__ )); ?>" style="vertical-align:middle;"/><?php _e('Amazon S3', 'wpvivid'); ?>
403
- </div>
404
- </div>
405
- <div class="postbox storage-account-block" id="wpvivid_storage_account_block">
406
- <div id="storage_account_ftp">
407
- <h2><span><?php _e( 'Enter Your FTP Account ','wpvivid'); ?></span></h2>
408
- <div class="storage-account-form"><input type="text" placeholder="Custom an unique name: Example: FTP-001" class="regular-text" id="storage_account_ftp_storagename" /></div>
409
- <div class="storage-account-form"><input type="text" placeholder="FTP server" class="regular-text" id="storage_account_ftp_server" /></div>
410
- <div class="storage-account-form"><input type="text" placeholder="FTP login" class="regular-text" id="storage_account_ftp_login" /></div>
411
- <div class="storage-account-form"><input type="password" placeholder="FTP password" class="regular-text" id="storage_account_ftp_password" /></div>
412
- <div class="storage-account-form"><input type="text" placeholder="Directory path( /wpvivid )" class="regular-text" id="storage_account_ftp_storagepath" /></div>
413
- <div class="remote-storage-set-default-block">
414
- <label for="ftp_default">
415
- <input type="checkbox" id="ftp_default" checked><?php _e('Set as the default remote storage.', 'wpvivid'); ?>
416
- </label>
417
- </div>
418
- <div class="remote-storage-ftp-passive-block">
419
- <label for="storage_passive">
420
- <input type="checkbox" id="storage_passive" checked><?php _e('Uncheck this to enable FTP active mode.', 'wpvivid'); ?>
421
- </label>
422
- </div>
423
- </div>
424
- <div id="storage_account_sftp" style="display:none;">
425
- <h2><span><?php _e( 'Enter Your SFTP Account ','wpvivid'); ?></span></h2>
426
- <div class="storage-account-form"><input type="text" placeholder="Custom an unique name: e.g.SFTP-001" class="regular-text" id="storage_account_sftp_storagename" /></div>
427
- <div class="storage-account-form"><input type="text" placeholder="Server IP Address" class="regular-text" id="storage_account_sftp_ip" /></div>
428
- <div class="storage-account-form"><input type="text" placeholder="User Name" class="regular-text" id="storage_account_sftp_username" /></div>
429
- <div class="storage-account-form"><input type="password" placeholder="Root Password" class="regular-text" id="storage_account_sftp_password" /></div>
430
- <div class="storage-account-form"><input type="text" placeholder="Port" class="regular-text" id="storage_account_sftp_port" onkeyup="value=value.replace(/\D/g,'')" /></div>
431
- <div class="storage-account-form"><input type="text" placeholder="Absolute path must exist(Example: /var/)" class="regular-text" id="storage_account_sftp_storagepath" /></div>
432
- <div class="remote-storage-set-default-block">
433
- <label for="sftp_default">
434
- <input type="checkbox" id="sftp_default" checked><?php _e('Set as the default remote storage.', 'wpvivid'); ?>
435
- </label>
436
- </div>
437
- </div>
438
- <div id="storage_account_amazons3" style="display:none;">
439
- <h2><span><?php _e( 'Enter Your Amazon S3 Account ','wpvivid'); ?></span></h2>
440
- <div class="storage-account-form"><input type="text" placeholder="Custom an unique name: Example: Amazon S3-001" class="regular-text" id="storage_account_amazons3_storagename" /></div>
441
- <div class="storage-account-form"><input type="text" placeholder="Amazon S3 access key" class="regular-text" id="storage_account_amazons3_access_key" /></div>
442
- <div class="storage-account-form"><input type="password" placeholder="Amazon S3 secret key" class="regular-text" id="storage_account_amazons3_secret_key" /></div>
443
- <div class="storage-account-form"><input type="text" placeholder="Amazon S3 Path(Example: s3://test/test)" class="regular-text" id="storage_account_amazons3_path" /></div>
444
- <div class="storage-account-form"><input type="text" placeholder="Amazon S3 Region (Example: ap-northeast-1)" class="regular-text" id="storage_account_amazons3_region" /></div>
445
- <div class="remote-storage-set-default-block">
446
- <label for="amazons3_default">
447
- <input type="checkbox" id="amazons3_default" checked><?php _e('Set as the default remote storage.', 'wpvivid'); ?>
448
- </label>
449
- </div>
450
- </div>
451
- <div id="wpvivid_storage_account_notice"></div>
452
- <div class=""><input class="button-primary storage-account-button" id="storage_account_button" type="submit" name="Example" value="<?php _e( 'Test and Add', 'wpvivid' ); ?>" /></div>
453
- </div>
454
- <div class="schedule-tab-block"><?php _e('Please choose one storage to save your backups (remote storage)', 'wpvivid'); ?></div>
455
- <div class="">
456
- <table class="widefat">
457
- <thead>
458
- <tr>
459
- <th></th>
460
- <th></th>
461
- <th><?php _e( 'Storage Provider', 'wpvivid' ); ?></th>
462
- <th class="row-title"><?php _e( 'Remote Storage Name', 'wpvivid' ); ?></th>
463
- <th><?php _e( 'Action', 'wpvivid' ); ?></th>
464
- </tr>
465
- </thead>
466
- <tbody class="wpvivid-remote-storage-list" id="wpvivid_remote_storage_list">
467
- <?php
468
- $i=1;
469
- foreach ($remoteslist as $key=>$value) {
470
- if($key !== 'remote_selected'){
471
- $has_data='';
472
- $check_status = '';
473
- $storage_type = '';
474
- if($key !== 'remote_selected') {
475
- if ($value['type'] === 'ftp') {
476
- $storage_type = 'FTP';
477
- } else if ($value['type'] === 'sftp') {
478
- $storage_type = 'SFTP';
479
- } else if ($value['type'] === 'amazonS3') {
480
- $storage_type = 'Amazon S3';
481
- }
482
- if ($key === $default_remote_storage) {
483
- $check_status = 'checked';
484
- }
485
- }
486
- else{
487
- $has_data='display: none;';
488
- }
489
- ?>
490
- <tr style="<?php esc_attr_e($has_data, 'wpvivid'); ?>">
491
- <td><?php _e($i++, 'wpvivid'); ?></td>
492
- <td><input type="checkbox" name="remote_storage" value="<?php esc_attr_e($key, 'wpvivid'); ?>" <?php esc_attr_e($check_status, 'wpvivid'); ?> /></td>
493
- <td><?php _e($storage_type, 'wpvivid'); ?></td>
494
- <td class="row-title"><label for="tablecell"><?php _e($value['options']['name'], 'wpvivid'); ?></label></td>
495
- <td onclick="wpvivid_delete_remote_storage('<?php _e($key, 'wpvivid'); ?>');">
496
- <img src="<?php echo esc_url(plugins_url('images/Delete.png', __FILE__)); ?>" style="vertical-align:middle; cursor:pointer;" title="Delete the backup"/>
497
- </td>
498
- </tr>
499
- <?php }} ?>
500
- </tbody>
501
- <tfoot>
502
- <tr>
503
- <th colspan="5" class="row-title"><input class="button-primary" id="wpvivid_set_default_remote_storage" type="submit" name="choose-remote-storage" value="<?php esc_attr_e( 'Save Changes', 'wpvivid' ); ?>" /></th>
504
- </tr>
505
- </tfoot>
506
- </table>
507
- </div>
508
- </div>
509
- </div>
510
  </div>
511
  <div id="settings-page" class="tabcontent wpvivid_tab_setting" name="tab-setting" style="display:none;">
512
- <div>
513
- <table class="widefat">
514
- <tbody>
515
- <tr>
516
- <td class="row-title wpvivid-backup-settings-table-left tablelistcolumn"><label for="tablecell"><?php _e('General Settings', 'wpvivid'); ?></label></td>
517
- <td class="tablelistcolumn">
518
- <div class="postbox schedule-tab-block">
519
- <div><strong><?php _e('Compress Files Every', 'wpvivid'); ?></strong></div>
520
- <div class="schedule-tab-block setting-page-content">
521
- <input type="text" placeholder="400" id="wpvivid_max_zip" class="all-options" value="<?php esc_attr_e(str_replace('M', '', $general_setting['options']['wpvivid_compress_setting']['max_file_size']), 'wpvivid'); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB
522
- <div><p><?php _e( 'Some web hosting providers limit large zip files (e.g. 200MB), and therefore splitting your backup into many parts is an ideal way to avoid to hit the limitation if you are running a big website. Please try to adjust the value if you are encountering backup errors.', 'wpvivid' ); ?></div></p>
523
- </div>
524
- <div><strong><?php _e('Exclude the files which is larger than', 'wpvivid'); ?></strong></div>
525
- <div class="schedule-tab-block setting-page-content">
526
- <input type="text" placeholder="400" id="wpvivid_ignore_large" class="all-options" value="<?php esc_attr_e($general_setting['options']['wpvivid_compress_setting']['exclude_file_size'], 'wpvivid'); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB
527
- <div><p><?php _e( 'Using the option will ignore the file larger than the certain size in MB when backing up, \'0\' (zero) means unlimited.', 'wpvivid' ); ?></p></div>
528
- </div>
529
- <div><strong><?php _e('PHP script execution timeout', 'wpvivid'); ?></strong></div>
530
- <div class="schedule-tab-block setting-page-content">
531
- <input type="text" placeholder="600" id="wpvivid_option_timeout" class="all-options" value="<?php esc_attr_e($general_setting['options']['wpvivid_common_setting']['max_execution_time'], 'wpvivid'); ?>" onkeyup="value=value.replace(/\D/g,'')" />Seconds
532
- <div><p><?php _e( 'The time-out is not your server PHP time-out. With the execution time exhausted, our plugin will shut the process of backup down. If the progress of backup encounters a time-out, that means you have a medium or large sized website, please try to scale the value bigger. ', 'wpvivid' ); ?></p></div>
533
- </div>
534
- <div>
535
- <select name="" id="wpvivid_max_backup_count">
536
- <?php
537
- $display_backup_count = $general_setting['options']['wpvivid_common_setting']['max_backup_count'];
538
- $display_backup_count=intval($display_backup_count);
539
- for($i=1; $i<8;$i++){
540
- if($i === $display_backup_count){
541
- _e('<option selected="selected" value="' . $i . '">' . $i . '</option>', 'wpvivid');
542
- }
543
- else {
544
- _e('<option value="' . $i . '">' . $i . '</option>', 'wpvivid');
545
- }
546
- }
547
- ?>
548
- </select><strong><?php _e('backups retained', 'wpvivid'); ?></strong>
549
- </div>
550
- <div>
551
- <label for="wpvivid_estimate_backup">
552
- <?php
553
- $wpvivid_setting_estimate_backup='';
554
- if($general_setting['options']['wpvivid_common_setting']['estimate_backup'] === true){
555
- $wpvivid_setting_estimate_backup='checked';
556
- }
557
- else{
558
- $wpvivid_setting_estimate_backup='';
559
- }
560
- ?>
561
- <input name="" type="checkbox" id="wpvivid_estimate_backup" value="1" <?php esc_attr_e($wpvivid_setting_estimate_backup, 'wpvivid'); ?> />
562
- <span><?php _e( 'Calculate the size of files, folder and database before backing up ', 'wpvivid' ); ?></span>
563
- </label>
564
- </div>
565
- </div>
566
- <div class="postbox schedule-tab-block">
567
- <div><strong><?php _e('Backup Folder', 'wpvivid'); ?></strong></div>
568
- <div class="schedule-tab-block setting-page-content">
569
- <div><p><?php _e( 'Name your folder, this folder must be writable for creating backup files.', 'wpvivid' ); ?><p> </div>
570
- <input type="text" placeholder="wpvividbackups" id="wpvivid_option_backup_dir" class="all-options" value="<?php esc_attr_e($general_setting['options']['wpvivid_local_setting']['path'], 'wpvivid'); ?>" onkeyup="value=value.replace(/[^\a-\z\A-\Z0-9]/g,\'\')" onpaste="value=value.replace(/[^\a-\z\A-\Z0-9]/g,\'\')" />
571
- <p><span><?php _e('Local storage directory:', 'wpvivid'); ?></span><span><?php echo WP_CONTENT_DIR.'/'; ?><span id="wpvivid_setting_local_storage_path"><?php _e($general_setting['options']['wpvivid_local_setting']['path'], 'wpvivid'); ?></span></span></p>
572
- </div>
573
- </div>
574
- <div class="postbox schedule-tab-block">
575
- <div class="schedule-tab-block">
576
- <fieldset>
577
- <label for="users_can_register">
578
- <?php
579
- if($out_of_date['remote_options'] === false){
580
- $out_of_date_remote='There is no path for remote storage, please set it up first.';
581
- }
582
- else {
583
- foreach ($out_of_date['remote_options'] as $value)
584
- if($value['type'] === 'ftp' || $value['type'] === 'sftp'){
585
- $out_of_date_remote=$value['options']['path'];
586
- }
587
- else if($value['type'] === 'amazonS3'){
588
- $out_of_date_remote=$value['options']['s3Path'];
589
- }
590
- else{
591
- $out_of_date_remote='There is no path for remote storage, please set it up first.';
592
- }
593
- }
594
- ?>
595
- <p><strong><?php _e('Remove out-of-date backups', 'wpvivid'); ?></strong></p>
596
- <p><span><?php _e('Web Server Directory:', 'wpvivid'); ?></span><span id="wpvivid_out_of_date_local_path"><?php _e($out_of_date['web_server'], 'wpvivid'); ?></span></p>
597
- <p><span><?php _e('Remote Storage Directory:', 'wpvivid'); ?></span><span id="wpvivid_out_of_date_remote_path"><?php _e($out_of_date_remote, 'wpvivid'); ?></span></p>
598
- </label>
599
- </fieldset>
600
- </div>
601
- <div class="schedule-tab-block"><input class="button-primary" id="wpvivid_delete_out_of_backup" style="margin-right:10px;" type="submit" name="delete-out-of-backup" value="<?php esc_attr_e( 'Remove', 'wpvivid' ); ?>" />
602
- <p><?php _e('The action is irreversible! It will remove all backups which is(are) out-of-date (including local web server and remote storage) if they exist.', 'wpvivid'); ?> </p>
603
- </div>
604
- </div>
605
- </td>
606
- <tfoot>
607
- <tr>
608
- <th class="row-title"><input class="button-primary storage-account-button" id="wpvivid_setting_general_save" type="submit" name="" value="<?php esc_attr_e( 'Save Changes', 'wpvivid' ); ?>" /></th>
609
- <th></th>
610
- </tr>
611
- </tfoot>
612
- </tr>
613
- <tr>
614
- <td class="row-title wpvivid-backup-settings-table tablelistcolumn"><label for="tablecell"><?php _e('Schedule Settings', 'wpvivid'); ?></label></td>
615
- <td class="tablelistcolumn">
616
- <div id="storage-brand-3" style="">
617
- <div>
618
- <div>
619
- <?php
620
- $schedule_hour = '';
621
- $schedule_daily = 'checked';
622
- $schedule_weekly = '';
623
- $schedule_fortnightly = '';
624
- $schedule_monthly = '';
625
- $schedule_file_db='checked';
626
- $schedule_file='';
627
- $schedule_db='';
628
- $schedule_backup_local='checked';
629
- $schedule_backup_remote='';
630
- if($schedule['enable'] === true){
631
- $schedule_status = 'checked';
632
- $schedule_backup_time_display = '';
633
- $schedule_backup_type_display = '';
634
- $schedule_remote_storage_display = '';
635
- if($schedule['recurrence'] === "wpvivid_12hours"){
636
- $schedule_hour = 'checked';
637
- $schedule_daily = '';
638
- $schedule_weekly = '';
639
- $schedule_fortnightly = '';
640
- $schedule_monthly = '';
641
- }
642
- else if($schedule['recurrence'] === "wpvivid_daily"){
643
- $schedule_hour = '';
644
- $schedule_daily = 'checked';
645
- $schedule_weekly = '';
646
- $schedule_fortnightly = '';
647
- $schedule_monthly = '';
648
- }
649
- else if($schedule['recurrence'] === "wpvivid_weekly"){
650
- $schedule_hour = '';
651
- $schedule_daily = '';
652
- $schedule_weekly = 'checked';
653
- $schedule_fortnightly = '';
654
- $schedule_monthly = '';
655
- }
656
- else if($schedule['recurrence'] === "wpvivid_fortnightly"){
657
- $schedule_hour = '';
658
- $schedule_daily = '';
659
- $schedule_weekly = '';
660
- $schedule_fortnightly = 'checked';
661
- $schedule_monthly = '';
662
- }
663
- else if($schedule['recurrence'] === "wpvivid_monthly"){
664
- $schedule_hour = '';
665
- $schedule_daily = '';
666
- $schedule_weekly = '';
667
- $schedule_fortnightly = '';
668
- $schedule_monthly = 'checked';
669
- }
670
- else{
671
- $schedule_daily = 'checked';
672
- }
673
- if($schedule['backup']['backup_files'] === "files+db"){
674
- $schedule_file_db='checked';
675
- }
676
- else if($schedule['backup']['backup_files'] === "files"){
677
- $schedule_file='checked';
678
- }
679
- else if($schedule['backup']['backup_files'] === "db"){
680
- $schedule_db='checked';
681
- }
682
- if($schedule['backup']['local'] === 1){
683
- $schedule_backup_local='checked';
684
- }
685
- else if($schedule['backup']['remote'] === 1){
686
- $schedule_backup_remote='checked';
687
- }
688
- else{
689
- $schedule_backup_local='checked';
690
- }
691
- }
692
- else{
693
- $schedule_status = '';
694
- $schedule_backup_time_display = 'display: none;';
695
- $schedule_backup_type_display = 'display: none;';
696
- $schedule_remote_storage_display = 'display: none;';
697
- }
698
- ?>
699
- <div class="postbox schedule-tab-block">
700
- <label for="wpvivid_schedule_enable">
701
- <input name="" type="checkbox" id="wpvivid_schedule_enable" value="1" <?php esc_attr_e($schedule_status, 'wpvivid'); ?> />
702
- <span><?php _e( 'Enable backup schedule', 'wpvivid' ); ?></span>
703
- <div>
704
- <p>
705
- <?php _e('1) Scheduled job will start at web server time: 00:00', 'wpvivid'); ?>
706
- </p>
707
- <p>
708
- <?php _e('2) Being subjected to mechanisms of PHP, a scheduled backup task for your site will be triggered only when the site receives at least a visit at any page.', 'wpvivid'); ?>
709
- </p>
710
- </div>
711
- </label><br>
712
- </div>
713
- <div id="wpvivid_schedule_backup_schedule" style="<?php esc_attr_e($schedule_backup_time_display, 'wpvivid'); ?>">
714
- <div class="postbox schedule-tab-block">
715
- <fieldset>
716
- <legend class="screen-reader-text"><span>input type="radio"</span></legend>
717
- <label>
718
- <input type="radio" name="schedule" value="Hours" <?php esc_attr_e($schedule_hour, 'wpvivid'); ?> />
719
- <span><?php _e( '12Hours', 'wpvivid' ); ?></span>
720
- </label><br>
721
- <label>
722
- <input type="radio" name="schedule" value="Daily" <?php esc_attr_e($schedule_daily, 'wpvivid'); ?> />
723
- <span><?php _e( 'Daily', 'wpvivid' ); ?></span>
724
- </label><br>
725
- <label>
726
- <input type="radio" name="schedule" value="Weekly" <?php esc_attr_e($schedule_weekly, 'wpvivid'); ?> />
727
- <span><?php _e( 'Weekly', 'wpvivid' ); ?></span>
728
- </label><br>
729
- <label>
730
- <input type="radio" name="schedule" value="Fortnightly" <?php esc_attr_e($schedule_fortnightly, 'wpvivid'); ?> />
731
- <span><?php _e( 'Fortnightly', 'wpvivid' ); ?></span>
732
- </label><br>
733
- <label>
734
- <input type="radio" name="schedule" value="Monthly" <?php esc_attr_e($schedule_monthly, 'wpvivid'); ?> />
735
- <span><?php _e( 'Monthly', 'wpvivid' ); ?></span>
736
- </label><br>
737
- </fieldset>
738
- </div>
739
- </div>
740
- </div>
741
- <div class="postbox schedule-tab-block" id="wpvivid_schedule_backup_type" style="<?php esc_attr_e($schedule_backup_type_display, 'wpvivid'); ?>">
742
- <div>
743
- <div>
744
- <fieldset>
745
- <legend class="screen-reader-text"><span>input type="radio"</span></legend>
746
- <label>
747
- <input type="radio" name="schedule-backup-files" value="files+db" <?php esc_attr_e($schedule_file_db, 'wpvivid'); ?> />
748
- <span><?php _e( 'Database + Files (Entire website)', 'wpvivid' ); ?></span>
749
- </label><br>
750
- <label>
751
- <input type="radio" name="schedule-backup-files" value="files" <?php esc_attr_e($schedule_file, 'wpvivid'); ?> />
752
- <span><?php _e( 'All Files (Exclude Database)', 'wpvivid' ); ?></span>
753
- </label><br>
754
- <label>
755
- <input type="radio" name="schedule-backup-files" value="db" <?php esc_attr_e($schedule_db, 'wpvivid'); ?> />
756
- <span><?php _e( 'Only Database', 'wpvivid' ); ?></span>
757
- </label><br>
758
- </fieldset>
759
- </div>
760
- <div style="clear:both;"></div>
761
- </div>
762
- </div>
763
- <div class="postbox schedule-tab-block" id="wpvivid_schedule_remote_storage" style="<?php esc_attr_e($schedule_remote_storage_display, 'wpvivid'); ?>">
764
- <div>
765
- <fieldset>
766
- <label title=''>
767
- <input type="radio" name="save_local_remote" value="local" <?php esc_attr_e($schedule_backup_local, 'wpvivid'); ?> />
768
- <span><?php _e( 'Save backups on localhost (web server)', 'wpvivid' ); ?></span>
769
- </label><br>
770
- <label title=''>
771
- <input type="radio" name="save_local_remote" value="remote" <?php esc_attr_e($schedule_backup_remote, 'wpvivid'); ?> />
772
- <span><?php _e( 'Send backups to remote storage (choose this option, the local backup will be deleted after uploading to remote storage completely)', 'wpvivid' ); ?></span>
773
- </label>
774
- </fieldset>
775
- </div>
776
-
777
- <img id="wpvivid_schedule_storage_type_amazon_s3" src="<?php echo esc_url(plugins_url($default_amazon_s3, __FILE__ )); ?>" style="vertical-align:middle; " title="Amazon S3"/>
778
- <img id="wpvivid_schedule_storage_type_ftp" src="<?php echo esc_url(plugins_url($default_ftp, __FILE__ )); ?>" style="vertical-align:middle;" title="FTP"/>
779
- <img id="wpvivid_schedule_storage_type_sftp" src="<?php echo esc_url(plugins_url($default_sftp, __FILE__ )); ?>" style="vertical-align:middle;" title="SFTP"/>
780
- <img onclick="wpvivid_click_switch_page('wpvivid_tab_remote_storage', '');" src="<?php echo esc_url(plugins_url( 'images/add-storages.png', __FILE__ )); ?>" style="vertical-align:middle;" title="Add a storage"/>
781
-
782
- </div>
783
-
784
- </div>
785
- </div>
786
- </td>
787
- </tr>
788
-
789
- <tr>
790
- <td class="row-title wpvivid-backup-settings-table-left tablelistcolumn"><label for="tablecell"><?php _e('Choose How to Archive Your Backups', 'wpvivid'); ?></label></td>
791
- <td class="tablelistcolumn">
792
- <div class="postbox schedule-tab-block setting-page-content" id="wpvivid_archive_type">
793
- <?php
794
- $wpvivid_setting_no_compress='';
795
- $wpvivid_setting_compress='';
796
- if($general_setting['options']['wpvivid_compress_setting']['no_compress'] === true){
797
- $wpvivid_setting_no_compress='checked';
798
- }
799
- else{
800
- $wpvivid_setting_compress='checked';
801
- }
802
- ?>
803
- <fieldset>
804
- <label>
805
- <input type="radio" name="choose-package-method" value="method-no-compress" <?php esc_attr_e($wpvivid_setting_no_compress, 'wpvivid'); ?> />
806
- <span><?php _e( 'Only Archive without compressing', 'wpvivid' ); ?></span>
807
- <span><?php _e( 'It will cause a lower CPU Usage and is recommended in a web hosting/ shared hosting environment.', 'wpvivid' ); ?>
808
- </label><br>
809
- <label>
810
- <input type="radio" name="choose-package-method" value="method-compress" <?php esc_attr_e($wpvivid_setting_compress, 'wpvivid'); ?> />
811
- <span><?php _e( 'Compress and Archive', 'wpvivid' ); ?></span>
812
- <span><?php _e( 'It will cause a higher CPU Usage and is recommended in a VPS/ dedicated hosting environment.', 'wpvivid' ); ?></span>
813
- </label>
814
- </fieldset>
815
- </div>
816
- </td>
817
- </tr>
818
-
819
-
820
- <tr>
821
- <td class="row-title wpvivid-backup-settings-table-left tablelistcolumn"><label for="tablecell"><?php _e('Email Report', 'wpvivid'); ?></label></td>
822
- <td class="tablelistcolumn">
823
- <div class="postbox schedule-tab-block">
824
- <div><p><?php _e('In order to use this function, please install a ', 'wpvivid'); ?><strong><?php _e('WordPress SMTP plugin', 'wpvivid'); ?></strong><?php _e(' of your preference and configure your SMTP server first. This is because WordPress uses the PHP Mail function to send its emails by default, which is not supported by many hosts and can cause issues if it is not set properly.', 'wpvivid'); ?></p>
825
- </div>
826
- <div>
827
- <label for="wpvivid_general_email_enable">
828
- <?php
829
- $setting_email_enable='';
830
- $setting_email_display = 'display: none;';
831
- if(isset($general_setting['options']['wpvivid_email_setting']['email_enable'])){
832
- if($general_setting['options']['wpvivid_email_setting']['email_enable']){
833
- $setting_email_enable='checked';
834
- $setting_email_display = '';
835
- }
836
- }
837
- ?>
838
- <input name="" type="checkbox" id="wpvivid_general_email_enable" value="1" <?php esc_attr_e($setting_email_enable, 'wpvivid'); ?> />
839
- <span><strong><?php _e( 'Enable email report', 'wpvivid' ); ?></strong></span>
840
- </label>
841
- </div>
842
- <div id="wpvivid_general_email_setting" style="<?php esc_attr_e($setting_email_display, 'wpvivid'); ?>" >
843
- <input type="text" placeholder="example@yourdomain.com" class="regular-text" id="wpvivid_mail" value="<?php
844
- foreach ($general_setting['options']['wpvivid_email_setting']['send_to'] as $mail) {
845
- _e($mail, 'wpvivid');
846
- break;
847
- }
848
- ?>" />
849
- <input class="button-secondary" id="wpvivid_send_email_test" style="margin-top:10px;" type="submit" name="" value="<?php esc_attr_e( 'Test Email', 'wpvivid' ); ?>" title="Send an email for testing mail function"/>
850
- <div id="wpvivid_send_email_res"></div>
851
- <fieldset class="schedule-tab-block">
852
- <label >
853
- <?php
854
- $wpvivid_setting_email_always='';
855
- if($general_setting['options']['wpvivid_email_setting']['always'] === true) {
856
- $wpvivid_setting_email_always='checked';
857
- }
858
- ?>
859
- <input type="radio" name="send_email_report" value="send_mail_always" <?php esc_attr_e($wpvivid_setting_email_always, 'wpvivid'); ?> />
860
- <span><?php _e( 'Always send an email notification when a backup is complete', 'wpvivid' ); ?></span>
861
- </label><br>
862
- <label >
863
- <?php
864
- $wpvivid_setting_email_failed='';
865
- if($general_setting['options']['wpvivid_email_setting']['always'] !== true) {
866
- $wpvivid_setting_email_failed='checked';
867
- }
868
- ?>
869
- <input type="radio" name="send_email_report" value="send_mail_failed" <?php esc_attr_e($wpvivid_setting_email_failed, 'wpvivid'); ?> />
870
- <span><?php _e( 'Only send an email notification when a backup fails', 'wpvivid' ); ?></span>
871
- </label>
872
- </fieldset>
873
- </div>
874
- </div>
875
- </td>
876
- </tr>
877
- <tr>
878
- <td class="row-title wpvivid-backup-settings-table-left tablelistcolumn"><label for="tablecell"><?php _e('Clean Junk', 'wpvivid'); ?></label></td>
879
- <td class="tablelistcolumn">
880
- <div class="postbox schedule-tab-block">
881
- <div><p><?php _e('Web-server disk space in use by WPvivid:', 'wpvivid'); ?></p>
882
- <div class="schedule-tab-block"><span class="schedule-tab-block"><?php _e('Total Size:', 'wpvivid'); ?></span><span id="wpvivid_junk_sum_size"><?php _e($junk_file['sum_size'], 'wpvivid'); ?></span><input class="button-secondary" id="wpvivid_calculate_size" style="margin-left:10px;" type="submit" name="Calculate-Sizes" value="<?php esc_attr_e( 'Calculate Sizes', 'wpvivid' ); ?>" /></div>
883
-
884
- </div>
885
- <div class="schedule-tab-block">
886
- <fieldset>
887
- <label for="wpvivid_junk_log">
888
- <input id="wpvivid_junk_log" name="junk-files" type="checkbox" id="" value="junk-log" />
889
- <span><?php _e( 'logs', 'wpvivid' ); ?></span>
890
- <span><?php _e('Path:', 'wpvivid' ); ?></span><span id="wpvivid_junk_log_path"><?php _e($junk_file['log_path'], 'wpvivid'); ?></span>
891
- </label>
892
- </fieldset>
893
- <fieldset>
894
- <label for="wpvivid_junk_backup_cache">
895
- <input id="wpvivid_junk_backup_cache" name="junk-files" type="checkbox" id="" value="junk-backup-cache" />
896
- <span><?php _e( 'Backup Cache', 'wpvivid' ); ?></span>
897
- </label>
898
- <label for="wpvivid_junk_file">
899
- <input id="wpvivid_junk_file" name="junk-files" type="checkbox" id="" value="junk-files" />
900
- <span><?php _e( 'Junk', 'wpvivid' ); ?></span>
901
- <span><?php _e('Path:', 'wpvivid' ); ?></span><span id="wpvivid_junk_file_path"><?php _e($junk_file['junk_path'], 'wpvivid'); ?></span>
902
- </label>
903
- </fieldset>
904
- <fieldset>
905
- <label for="wpvivid_junk_temporary_file">
906
- <input id="wpvivid_junk_temporary_file" name="junk-files" type="checkbox" id="" value="junk-temporary-files" />
907
- <span><?php _e( 'Temporary Files', 'wpvivid' ); ?></span>
908
- <span><?php _e('Path:', 'wpvivid'); ?></span><span id="wpvivid_restore_temp_file_path"><?php _e($junk_file['old_files_path'], 'wpvivid'); ?></span>
909
- <p><?php _e('Temporary Files are created by wpvivid when restoring a website.', 'wpvivid'); ?></p>
910
- </label>
911
- </fieldset>
912
- </div>
913
- <div><input class="button-primary" id="wpvivid_clean_junk_file" type="submit" name="Empty-all-files" value="<?php esc_attr_e( 'Empty', 'wpvivid' ); ?>" /></div>
914
- <div style="clear:both;"></div>
915
- </div>
916
- </td>
917
- </tr>
918
- <tr>
919
- <td class="row-title wpvivid-backup-settings-table-left tablelistcolumn"><label for="tablecell"><?php _e('Export / import settings', 'wpvivid'); ?></label></td>
920
- <td class="tablelistcolumn">
921
- <div class="postbox schedule-tab-block">
922
- <div class="schedule-tab-block">
923
- <input class="button-primary" id="wpvivid_setting_export" type="button" name="" value="<?php esc_attr_e( 'Export', 'wpvivid' ); ?>" />
924
- <p><?php _e('Click \'Export\' button to save WPvivid settings on your local computer.', 'wpvivid'); ?> </p>
925
- </div>
926
- <div class="schedule-tab-block">
927
- <input type="file" name="fileTrans" id="wpvivid_select_import_file"></br>
928
- <input class="button-primary" id="wpvivid_setting_import" type="button" name="" value="<?php esc_attr_e( 'Import', 'wpvivid' ); ?>" />
929
- <p><?php _e('Importing the json file can help you set WPvivid\'s configuration on another wordpress site quickly.', 'wpvivid'); ?></p>
930
- </div>
931
- <div style="clear:both;"></div>
932
- </div>
933
- </td>
934
- </tr>
935
-
936
- </tbody>
937
- </table>
938
- </div>
939
  </div>
940
  <div id="debug-page" class="tabcontent wpvivid_tab_debug" name="tab-debug" style="display:none;">
941
- <table class="widefat">
942
- <div style="padding-left: 10px;">
943
- <?php _e('Click the button below to download the relevant information (website info and error logs) to your PC when you encountering some errors. Sending the file to us will help us diagnose what happened', 'wpvivid'); ?>
944
- </div>
945
- <div class="schedule-tab-block">
946
- <input class="button-primary" id="wpvivid_download_website_info" type="submit" name="download-website-info" value="<?php esc_attr_e( 'Download', 'wpvivid' ); ?>" />
947
- </div>
948
- <thead class="website-info-head">
949
- <tr>
950
- <th class="row-title" style="min-width: 260px;"><?php _e( 'Website Info Key', 'wpvivid' ); ?></th>
951
- <th><?php _e( 'Website Info Value', 'wpvivid' ); ?></th>
952
- </tr>
953
- </thead>
954
- <tbody class="wpvivid-websiteinfo-list">
955
- <?php
956
- if(!empty($website_info['data'])){
957
- foreach ($website_info['data'] as $key=>$value) { ?>
958
- <?php
959
- $website_value='';
960
- if (is_array($value)) {
961
- foreach ($value as $arr_value) {
962
- if (empty($website_value)) {
963
- $website_value = $website_value . $arr_value;
964
- } else {
965
- $website_value = $website_value . ', ' . $arr_value;
966
- }
967
- }
968
- }
969
- else{
970
- if($value === true || $value === false){
971
- if($value === true) {
972
- $website_value = 'true';
973
- }
974
- else{
975
- $website_value = 'false';
976
- }
977
- }
978
- else {
979
- $website_value = $value;
980
- }
981
- }
982
- ?>
983
- <tr>
984
- <td class="row-title tablelistcolumn"><label for="tablecell"><?php _e($key, 'wpvivid'); ?></label></td>
985
- <td class="tablelistcolumn"><?php _e($website_value, 'wpvivid'); ?></td>
986
- </tr>
987
- <?php }} ?>
988
- </tbody>
989
- </table>
990
  </div>
991
  <div id="logs-page" class="tabcontent wpvivid_tab_log" name="tab-logs" style="display:none;">
992
- <div style="padding-bottom: 10px; float: right;">
993
- <select name="" id="wpvivid_display_log_count">
994
- <?php
995
- foreach ($display_log_count as $value){
996
- if($value == $max_log_diaplay){
997
- _e('<option selected="selected" value="' . $value . '">' . $value . '</option>', 'wpvivid');
998
- }
999
- else {
1000
- _e('<option value="' . $value . '">' . $value . '</option>', 'wpvivid');
1001
- }
1002
- }
1003
- ?>
1004
- </select>
1005
- </div>
1006
- <table class="wp-list-table widefat plugins">
1007
- <thead class="log-head">
1008
- <tr>
1009
- <th class="row-title"><?php _e( 'Date', 'wpvivid' ); ?></th>
1010
- <th><?php _e( 'Log Type', 'wpvivid' ); ?></th>
1011
- <th><?php _e( 'Log File Name', 'wpvivid' ); ?></th>
1012
- <th><?php _e( 'Action', 'wpvivid' ); ?></th>
1013
- </tr>
1014
- </thead>
1015
- <tbody class="wpvivid-loglist" id="wpvivid_loglist">
1016
- <?php
1017
- $current_num=1;
1018
- if(!empty($loglist['log_list']['file'])) {
1019
- $log_index=0;
1020
- foreach ($loglist['log_list']['file'] as $value) {
1021
- if ($current_num <= $max_log_diaplay) {
1022
- $log_tr_display = '';
1023
- } else {
1024
- $log_tr_display = 'display: none;';
1025
- }
1026
- if (empty($value['time'])) {
1027
- $value['time'] = 'N/A';
1028
- }
1029
- if (empty($value['des'])) {
1030
- $value['des'] = 'N/A';
1031
- }
1032
- ?>
1033
- <tr style="<?php esc_attr_e($log_tr_display, 'wpvivid'); ?>">
1034
- <td class="row-title"><label for="tablecell"><?php _e($value['time'], 'wpvivid') ?></label>
1035
- </td>
1036
- <td><?php _e($value['des'], 'wpvivid') ?></td>
1037
- <td><?php _e($value['file_name'], 'wpvivid') ?></td>
1038
- <td>
1039
- <a onclick='wpvivid_view_log("<?php _e($log_index); ?>")'
1040
- style="cursor:pointer;"><img
1041
- src="<?php echo esc_url(plugins_url('images/Log.png', __FILE__)); ?>"
1042
- style="vertical-align:middle;">Log</a></td>
1043
- <td id="<?php _e($log_index); ?>" style="display: none"><?php _e($value['path']); ?></td>
1044
- </tr><?php
1045
- $log_index++;
1046
- $current_num++;
1047
- }
1048
- }
1049
- ?>
1050
- </tbody>
1051
- </table>
1052
- <div style="padding-top: 10px; text-align: center;">
1053
- <input class="button-secondary log-page" id="wpvivid_pre_log_page" type="submit" value="<?php esc_attr_e( ' < Pre page ', 'wpvivid' ); ?>" />
1054
- <div style="font-size: 12px; display: inline-block; padding-left: 10px;">
1055
- <span id="wpvivid_log_page_info" style="line-height: 35px;">
1056
- <?php
1057
- $current_page=1;
1058
- $max_page=ceil(sizeof($loglist['log_list']['file'])/$max_log_diaplay);
1059
- if($max_page == 0) $max_page = 1;
1060
- _e($current_page.' / '.$max_page, 'wpvivid');
1061
- ?>
1062
- </span>
1063
- </div>
1064
- <input class="button-secondary log-page" id="wpvivid_next_log_page" type="submit" value="<?php esc_attr_e( ' Next page > ', 'wpvivid' ); ?>" />
1065
- </div>
1066
  </div>
1067
  <div id="log-read-page" class="tabcontent wpvivid_tab_read_log" style="display:none;">
1068
- <div class="postbox restore_log" id="wpvivid_read_log_content">
1069
- <div></div>
1070
- </div>
1071
  </div>
 
1072
  </div>
1073
 
1074
  </div>
@@ -1126,34 +134,6 @@ $wpvivid_version=WPVIVID_PLUGIN_VERSION;
1126
  document.getElementById(contentName).style.display = "block";
1127
  evt.currentTarget.className += " nav-tab-active";
1128
  }
1129
- function select_remote_storage(evt, storageType){
1130
- var i, tablecontent, tablinks;
1131
- tablinks = document.getElementsByClassName("storage-providers");
1132
- for (i = 0; i < tablinks.length; i++) {
1133
- tablinks[i].className = tablinks[i].className.replace("storage-providers-active", "");
1134
- }
1135
- evt.currentTarget.className += " storage-providers-active";
1136
- if(storageType === "ftp"){
1137
- jQuery('#storage_account_amazons3').hide();
1138
- jQuery('#storage_account_sftp').hide();
1139
- jQuery('#storage_account_ftp').show();
1140
- }
1141
- if(storageType === "sftp"){
1142
- jQuery('#storage_account_amazons3').hide();
1143
- jQuery('#storage_account_ftp').hide();
1144
- jQuery('#storage_account_sftp').show();
1145
- }
1146
- else if(storageType === "amazonS3"){
1147
- jQuery('#storage_account_sftp').hide();
1148
- jQuery('#storage_account_ftp').hide();
1149
- jQuery('#storage_account_amazons3').show();
1150
- }
1151
- else if(storageType === "dropbox"){
1152
- jQuery('#storage_account_amazons3').hide();
1153
- jQuery('#storage_account_sftp').hide();
1154
- jQuery('#storage_account_ftp').hide();
1155
- }
1156
- }
1157
 
1158
  var wpvivid_siteurl = '<?php
1159
  $wpvivid_siteurl = array();
14
  die;
15
  }
16
 
 
 
17
  $last_backup_message=WPvivid_Setting::get_option('wpvivid_last_msg');
18
  $backuplist=WPvivid_Backuplist::get_backuplist();
19
  $remoteslist=WPvivid_Setting::get_all_remote_options();
51
  <img src="<?php echo esc_url(plugins_url( 'images/delete-tab.png', __FILE__ )); ?>" style="vertical-align:middle; cursor:pointer;" onclick="wpvivid_close_main_tab('log');" />
52
  </div>
53
  </a>
54
+ <?php do_action('wpvivid_backuprestore_add_tab');?>
55
  </h2>
56
  <div class="wrap" style="max-width:1720px;">
57
  <div id="poststuff">
59
  <div id="post-body-content">
60
  <div class="inside" style="margin-top:0px;">
61
  <div id="general-page" class="tabcontent wpvivid_tab_general" name="tab-backup" style="width:100%;">
62
+ <?php include_once plugin_dir_path( dirname( __FILE__ ) ) .'partials/wpvivid-backup-restore-page-display.php'; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  </div>
64
  <div id="storage-page" class="tabcontent wpvivid_tab_remote_storage" name="tab-storage" style="display:none;">
65
+ <?php include_once plugin_dir_path( dirname( __FILE__ ) ) .'partials/wpvivid-remote-storage-page-display.php'; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  </div>
67
  <div id="settings-page" class="tabcontent wpvivid_tab_setting" name="tab-setting" style="display:none;">
68
+ <?php include_once plugin_dir_path( dirname( __FILE__ ) ) .'partials/wpvivid-settings-page-display.php'; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  </div>
70
  <div id="debug-page" class="tabcontent wpvivid_tab_debug" name="tab-debug" style="display:none;">
71
+ <?php include_once plugin_dir_path( dirname( __FILE__ ) ) .'partials/wpvivid-website-info-page-display.php'; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  </div>
73
  <div id="logs-page" class="tabcontent wpvivid_tab_log" name="tab-logs" style="display:none;">
74
+ <?php include_once plugin_dir_path( dirname( __FILE__ ) ) .'partials/wpvivid-logs-page-display.php'; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  </div>
76
  <div id="log-read-page" class="tabcontent wpvivid_tab_read_log" style="display:none;">
77
+ <?php include_once plugin_dir_path( dirname( __FILE__ ) ) .'partials/wpvivid-log-read-page-display.php'; ?>
 
 
78
  </div>
79
+ <?php do_action('wpvivid_backuprestore_add_page');?>
80
  </div>
81
 
82
  </div>
134
  document.getElementById(contentName).style.display = "block";
135
  evt.currentTarget.className += " nav-tab-active";
136
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
 
138
  var wpvivid_siteurl = '<?php
139
  $wpvivid_siteurl = array();
admin/partials/wpvivid-backup-restore-page-display.php ADDED
@@ -0,0 +1,345 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ function wpvivid_backup_progress_rate(){
5
+ ?>
6
+ <div class="postbox" id="wpvivid_postbox_backup_percent" style="display: none;">
7
+ <div class="action-progress-bar" id="wpvivid_action_progress_bar">
8
+ <div class="action-progress-bar-percent" id="wpvivid_action_progress_bar_percent" style="height:24px;width:0"></div>
9
+ </div>
10
+ <div id="wpvivid_estimate_backup_info">
11
+ <div class="backup-basic-info"><span><?php _e('Database Size:', 'wpvivid'); ?></span><span id="wpvivid_backup_database_size"></span></div>
12
+ <div class="backup-basic-info"><span><?php _e('File Size:', 'wpvivid'); ?></span><span id="wpvivid_backup_file_size"></span></div>
13
+ </div>
14
+ <div style="clear:both;"></div>
15
+ <div style="margin-left:10px; float: left; width:100%;"><p id="wpvivid_current_doing"></p></div>
16
+ <div style="clear: both;"></div>
17
+ <div>
18
+ <div id="wpvivid_backup_cancel" class="backup-log-btn"><input class="button-primary" id="wpvivid_backup_cancel_btn" type="submit" value="<?php esc_attr_e( 'Cancel', 'wpvivid' ); ?>" /></div>
19
+ <div id="wpvivid_backup_log" class="backup-log-btn"><input class="button-primary backup-log-btn" id="wpvivid_backup_log_btn" type="submit" value="<?php esc_attr_e( 'Log', 'wpvivid' ); ?>" /></div>
20
+ </div>
21
+ <div style="clear: both;"></div>
22
+ </div>
23
+ <?php
24
+ }
25
+
26
+ function wpvivid_backup_manual(){
27
+ $backupdir=WPvivid_Setting::get_backupdir();
28
+ ?>
29
+ <div class="postbox quickbackup" id="wpvivid_postbox_backup">
30
+ <h2><span><?php _e( 'Back Up Manually','wpvivid'); ?></span></h2>
31
+ <div class="quickstart-storage-setting">
32
+ <span class="list-top-chip backup" name="ismerge" value="1"><?php _e('Local Storage Directory: '); ?></span>
33
+ <span class="list-top-chip" id="wpvivid_local_storage_path"><?php echo WP_CONTENT_DIR.'/'.$backupdir; ?></span>
34
+ <span class="list-top-chip" id=""><a href="#" onclick="wpvivid_click_switch_page('wpvivid_tab_setting', '');"><?php _e(' rename directory', 'wpvivid'); ?></a></span>
35
+ </div>
36
+ <div class="quickstart-archive-block">
37
+ <fieldset>
38
+ <legend class="screen-reader-text"><span>input type="radio"</span></legend>
39
+ <label>
40
+ <input type="radio" option="backup" name="backup_files" value="files+db" checked />
41
+ <span><?php _e( 'Database + Files (Entire website)', 'wpvivid' ); ?></span>
42
+ </label><br>
43
+ <label>
44
+ <input type="radio" option="backup" name="backup_files" value="files" />
45
+ <span><?php _e( 'All Files (Exclude Database)', 'wpvivid' ); ?></span>
46
+ </label><br>
47
+ <label>
48
+ <input type="radio" option="backup" name="backup_files" value="db" />
49
+ <span><?php _e( 'Only Database', 'wpvivid' ); ?></span>
50
+ </label><br>
51
+ <?php do_action('wpvivid_backuprestore_add_custom'); ?>
52
+ <label style="display: none;">
53
+ <input type="checkbox" option="backup" name="ismerge" value="1" checked />
54
+ </label><br>
55
+ </fieldset>
56
+ </div>
57
+ <div class="quickstart-storage-block">
58
+ <fieldset>
59
+ <legend class="screen-reader-text"><span>input type="checkbox"</span></legend>
60
+ <label>
61
+ <input type="checkbox" id="wpvivid_backup_local" option="backup" name="local" value="" checked readonly/>
62
+ <span><?php _e( 'Save Backups to Local', 'wpvivid' ); ?></span>
63
+ </label>
64
+
65
+ <div style="clear:both;"></div>
66
+ <label>
67
+ <input type="checkbox" id="wpvivid_backup_remote" option="backup" name="remote" value="" />
68
+ <span><?php _e( 'Send Backup to Remote Storage:', 'wpvivid' ); ?></span>
69
+ </label><br>
70
+ <div id="upload_storage" style="cursor:pointer;" title="Highlighted icon illuminates that you have choosed a remote storage to store backups">
71
+ <?php
72
+ $pic='';
73
+ $pic= apply_filters('wpvivid_schedule_add_remote_pic',$pic);
74
+ echo $pic;
75
+ ?>
76
+ </div>
77
+ </fieldset>
78
+ </div>
79
+ <div class="quickstart-btn" style="padding-top:20px;">
80
+ <input class="button-primary quickbackup-btn" id="wpvivid_quickbackup_btn" type="submit" value="<?php esc_attr_e( 'Backup Now', 'wpvivid'); ?>" />
81
+ <div class="schedule-tab-block" style="text-align:center;">
82
+ <fieldset>
83
+ <label>
84
+ <input type="checkbox" id="wpvivid_backup_lock" option="backup" name="lock" value="" />
85
+ <span><?php _e( 'This backup can only be deleted manually', 'wpvivid' ); ?></span>
86
+ </label>
87
+ </fieldset>
88
+ </div>
89
+ </div>
90
+ <div class="custom-info" style="float:left; width:100%;">
91
+ <strong><?php _e('Tips', 'wpvivid'); ?></strong><?php _e(': The settings is only for manual backup, which won\'t affect schedule settings.', 'wpvivid'); ?>
92
+ </div>
93
+ </div>
94
+ <?php
95
+ }
96
+
97
+ function wpvivid_backup_schedule(){
98
+ ?>
99
+ <div class="postbox qucikbackup-schedule" id="wpvivid_postbox_backup_schedule">
100
+ <h2><span><?php _e( 'Backup Schedule','wpvivid'); ?></span></h2>
101
+ <div class="schedule-block">
102
+ <?php
103
+ $schedule=WPvivid_Schedule::get_schedule();
104
+ if($schedule['enable']){
105
+ $schedule_status='Enabled';
106
+ $next_backup_time=date("l, F d, Y H:i", $schedule['next_start']);
107
+ }
108
+ else{
109
+ $schedule_status='Disabled';
110
+ $next_backup_time='N/A';
111
+ }
112
+ if(empty($last_backup_message)) {
113
+ $last_backup_msg='The last backup message not found.';
114
+ }
115
+ else{
116
+ if ($last_backup_message['status']['str'] === "completed") {
117
+ $last_backup_msg=date("M d, Y H:i", $last_backup_message['status']['start_time']).' Succeed <a id="wpvivid_last_backup_msg_log" style="cursor:pointer;"> Log</a>';
118
+ }
119
+ else if ($last_backup_message['status']['str'] === "error") {
120
+ $last_backup_msg=date("M d, Y H:i", $last_backup_message['status']['start_time']).' Failed <a id="wpvivid_last_backup_msg_log" style="cursor:pointer;"> Log</a>';
121
+ }
122
+ else if($last_backup_message['status']['str'] === "cancel"){
123
+ $last_backup_msg=date("M d, Y H:i", $last_backup_message['status']['start_time']).' Failed <a id="wpvivid_last_backup_msg_log" style="cursor:pointer;"> Log</a>';
124
+ }
125
+ else{
126
+ $last_backup_msg='The last backup message not found.';
127
+ }
128
+ }
129
+ ?>
130
+ <p id="wpvivid_schedule_status"><strong><?php _e('Schedule Status: '); ?></strong><?php _e($schedule_status, 'wpvivid'); ?></p>
131
+ <div id="wpvivid_schedule_info">
132
+ <p><strong><?php _e('Server Time: '); ?></strong><?php _e(date("l, F d, Y H:i",time()), 'wpvivid'); ?></p>
133
+ <p><span id="wpvivid_last_backup_msg"><strong><?php _e('Last Backup: '); ?></strong><?php _e($last_backup_msg, 'wpvivid'); ?></span></p>
134
+ <p id="wpvivid_next_backup"><strong><?php _e('Next Backup: '); ?></strong><?php _e($next_backup_time, 'wpvivid'); ?></p>
135
+ </div>
136
+ </div>
137
+ </div>
138
+ <div style="clear:both;"></div>
139
+ <?php
140
+ }
141
+
142
+ function wpvivid_add_tab_backup(){
143
+ ?>
144
+ <a href="#" id="wpvivid_tab_backup" class="nav-tab table-nav-tab nav-tab-active" onclick="switchrestoreTabs(event,'page-backups')"><?php _e('Backups', 'wpvivid'); ?></a>
145
+ <?php
146
+ }
147
+
148
+ function wpvivid_add_tab_log(){
149
+ ?>
150
+ <a href="#" id="wpvivid_tab_backup_log" class="nav-tab table-nav-tab delete" onclick="switchrestoreTabs(event,'page-log')" style="display: none;">
151
+ <div style="margin-right: 15px;"><?php _e('Log', 'wpvivid'); ?></div>
152
+ <div class="nav-tab-delete-img">
153
+ <img src="<?php echo esc_url(plugins_url( 'images/delete-tab.png', __FILE__ )); ?>" style="vertical-align:middle; cursor:pointer;" onclick="wpvivid_close_tab('log');" />
154
+ </div>
155
+ </a>
156
+ <?php
157
+ }
158
+
159
+ function wpvivid_add_tab_restore(){
160
+ ?>
161
+ <a href="#" id="wpvivid_tab_restore" class="nav-tab table-nav-tab delete" onclick="switchrestoreTabs(event,'page-restore')" style="display: none;">
162
+ <div style="margin-right: 15px;"><?php _e('Restore', 'wpvivid'); ?></div>
163
+ <div class="nav-tab-delete-img">
164
+ <img src="<?php echo esc_url(plugins_url( 'images/delete-tab.png', __FILE__ )); ?>" style="vertical-align:middle; cursor:pointer;" onclick="wpvivid_close_tab('restore');" />
165
+ </div>
166
+ </a>
167
+ <?php
168
+ }
169
+
170
+ function wpvivid_add_page_backup(){
171
+ $backuplist=WPvivid_Backuplist::get_backuplist();
172
+ ?>
173
+ <div class="table-list-content wpvivid_tab_backup" id="page-backups">
174
+ <div style="margin-top:10px; margin-bottom:10px;">
175
+ <?php
176
+ $descript='';
177
+ $descript= apply_filters('wpvivid_download_backup_descript',$descript);
178
+ echo $descript;
179
+ ?>
180
+ </div>
181
+ <div style="margin-bottom:10px;">
182
+ <?php
183
+ $descript='';
184
+ $descript= apply_filters('wpvivid_restore_website_dexcript',$descript);
185
+ echo $descript;
186
+ ?>
187
+ </div>
188
+ <div style="clear:both;"></div>
189
+ <table class="wp-list-table widefat plugins" id="wpvivid_backuplist_table">
190
+ <thead>
191
+ <tr class="backup-list-head">
192
+ <td class=""></td>
193
+ <th class=""><?php _e( 'Backup','wpvivid'); ?></th>
194
+ <th><?php _e( 'Storage','wpvivid'); ?></th>
195
+ <th><?php _e( 'Download','wpvivid'); ?></th>
196
+ <th><?php _e( 'Delete','wpvivid'); ?></th>
197
+ </tr>
198
+ </thead>
199
+ <tbody class="wpvivid-backuplist" id="wpvivid_backuplist">
200
+ <?php
201
+ $html = '';
202
+ $html = apply_filters('wpvivid_add_backup_list', $html);
203
+ echo $html;
204
+ ?>
205
+ </tbody>
206
+ <tfoot>
207
+ <tr>
208
+ <th><input name="" type="checkbox" id="backup_list_all_check" value="1" /></th>
209
+ <th class="row-title" colspan="6"><a onclick="wpvivid_delete_backups_inbatches();" style="cursor: pointer;"><?php _e('Delete the selected backups', 'wpvivid'); ?></a></th>
210
+ </tr>
211
+ </tfoot>
212
+ </table>
213
+
214
+ </div>
215
+ <?php
216
+ }
217
+
218
+ function wpvivid_add_page_log(){
219
+ ?>
220
+ <div class="table-list-content wpvivid_tab_backup_log" id="page-log" style="display:none;">
221
+ <div class="postbox restore_log" id="wpvivid_display_log_content">
222
+ <div></div>
223
+ </div>
224
+ </div>
225
+ <?php
226
+ }
227
+
228
+ function wpvivid_add_page_restore(){
229
+ ?>
230
+ <div class="table-list-content wpvivid_tab_restore" id="page-restore" style="display:none;">
231
+ <div>
232
+ <h3><?php _e('Restore backup from:', 'wpvivid'); ?><span id="wpvivid_restore_backup_time"></span></h3>
233
+ <p><strong><?php _e('Please do not close the page or switch to other pages when a restore task is running, as it could trigger some unexpected errors.', 'wpvivid'); ?></strong></p>
234
+ <p><?php _e('Restore function will replace the current site\'s themes, plugins, uploads, database and/or other content directories with the existing equivalents in the selected backup.', 'wpvivid'); ?></p>
235
+ <div class="restore-button-position"><input class="button-primary" id="wpvivid_restore_btn" type="submit" name="restore" value="<?php esc_attr_e( 'Restore', 'wpvivid' ); ?>" onclick="wpvivid_start_restore();" /></div>
236
+ <div class="restore-button-position"><input class="button-primary" id="wpvivid_clean_restore" type="submit" name="clear_restore" value="<?php esc_attr_e( 'Clean Restore', 'wpvivid' ); ?>" /></div>
237
+ <div class="restore-button-position"><input class="button-primary" id="wpvivid_rollback_btn" type="submit" name="rollback" value="<?php esc_attr_e( 'Rollback', 'wpvivid' ); ?>" /></div>
238
+ </div>
239
+ <div class="postbox restore_log">
240
+ <div id="wpvivid_restore_log"></div>
241
+ </div>
242
+ </div>
243
+ <?php
244
+ }
245
+
246
+ function wpvivid_backup_do_js(){
247
+ global $wpvivid_pulgin;
248
+ $backup_task=$wpvivid_pulgin->_list_tasks(false);
249
+ if(empty($backup_task['backup']['data'])){
250
+ ?>
251
+ jQuery('#wpvivid_postbox_backup_percent').hide();
252
+ jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'auto', 'opacity': '1'});
253
+ jQuery('#wpvivid_quickbackup_btn').css({'pointer-events': 'auto', 'opacity': '1'});
254
+ <?php
255
+ }
256
+ else{
257
+ foreach($backup_task['backup']['data'] as $key=>$value){
258
+ if($value['status']['str'] === 'running'){
259
+ $percent=$value['data']['progress'];
260
+ ?>
261
+ jQuery('#wpvivid_postbox_backup_percent').show();
262
+ jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'nano', 'opacity': '0.4'});
263
+ jQuery('#wpvivid_quickbackup_btn').css({'pointer-events': 'nano', 'opacity': '0.4'});
264
+ jQuery('#wpvivid_action_progress_bar_percent').css('width', <?php echo $percent; ?>+'%');
265
+ <?php
266
+ $general_setting=WPvivid_Setting::get_setting(true, "");
267
+ if($general_setting['options']['wpvivid_common_setting']['estimate_backup'] === false){
268
+ ?>
269
+ jQuery('#wpvivid_estimate_backup_info').hide();
270
+ <?php
271
+ }
272
+ ?>
273
+ jQuery('#wpvivid_backup_database_size').html('<?php echo $value['size']['db_size']; ?>');
274
+ jQuery('#wpvivid_backup_file_size').html('<?php echo $value['size']['files_size']['sum']; ?>');
275
+ <?php
276
+ if($value['is_canceled'] === false){
277
+ $descript=$value['data']['descript'];
278
+ $backup_running_time=$value['data']['running_time'];
279
+ $output = '';
280
+ foreach (array(86400 => 'day', 3600 => 'hour', 60 => 'min', 1 => 'second') as $key => $value) {
281
+ if ($backup_running_time >= $key) $output .= floor($backup_running_time/$key) . $value;
282
+ $backup_running_time %= $key;
283
+ }
284
+ if($output==''){
285
+ $output=0;
286
+ }
287
+ ?>
288
+ jQuery('#wpvivid_current_doing').html('<?php echo $descript; ?> Progress: <?php echo $percent; ?>%, running time: <?php echo $output; ?>');
289
+ <?php
290
+ }
291
+ else{
292
+ ?>
293
+ jQuery('#wpvivid_current_doing').html('The backup will be canceled after backing up the current chunk ends.');
294
+ <?php
295
+ }
296
+ }
297
+ }
298
+ }
299
+ }
300
+
301
+ function wpvivid_download_backup_descript($html){
302
+ $html = '<p><strong>'.__('How to download a backup', 'wpvivid').'</strong></p>';
303
+ $html .= '<ul>';
304
+ $html .= '<li>'.__('->If backups are stored in remote storage, our plugin will retrieve the backup to your web server. This may take a little time depending on the size of backup files. Please be patient. Then you can download them to your PC.', 'wpvivid').'</li>';
305
+ $html .= '<li>'.__('->If backups are stored in web server, the plugin will list all relevant files immediately.', 'wpvivid').'</li>';
306
+ $html .= '</ul>';
307
+ return $html;
308
+ }
309
+
310
+ function wpvivid_restore_website_dexcript($html){
311
+ $html = '<p><strong>'.__('How to restore website', 'wpvivid').'</strong></p>';
312
+ $html .= '<ul>';
313
+ $html .= '<li>'.__('Step One: Click the button called \'Restore\' which is next to \'Log\' button, then a new Tab (Restore Tab) is going to be created', 'wpvivid').'</li>';
314
+ $html .= '<li>'.__('Step Two: Click \'Restore\' button', 'wpvivid').'</li>';
315
+ $html .= '</ul>';
316
+ return $html;
317
+ }
318
+
319
+ add_action('wpvivid_backup_add_module', 'wpvivid_backup_progress_rate', 10);
320
+ add_action('wpvivid_backup_add_module', 'wpvivid_backup_manual', 11);
321
+ add_action('wpvivid_backup_add_module', 'wpvivid_backup_schedule', 12);
322
+ add_action('wpvivid_backup_add_tab', 'wpvivid_add_tab_backup', 13);
323
+ add_action('wpvivid_backup_add_tab', 'wpvivid_add_tab_log', 14);
324
+ add_action('wpvivid_backup_add_tab', 'wpvivid_add_tab_restore', 15);
325
+ add_action('wpvivid_backup_add_page', 'wpvivid_add_page_backup', 13);
326
+ add_action('wpvivid_backup_add_page', 'wpvivid_add_page_log', 14);
327
+ add_action('wpvivid_backup_add_page', 'wpvivid_add_page_restore', 15);
328
+ add_action('wpvivid_backup_do_js', 'wpvivid_backup_do_js', 10);
329
+ add_filter('wpvivid_download_backup_descript', 'wpvivid_download_backup_descript', 10);
330
+ add_filter('wpvivid_restore_website_dexcript', 'wpvivid_restore_website_dexcript', 10);
331
+
332
+ ?>
333
+
334
+ <div class="meta-box-sortables ui-sortable">
335
+ <?php do_action('wpvivid_backup_add_module'); ?>
336
+
337
+ <h2 class="nav-tab-wrapper" id="wpvivid_backup_tab" style="padding-bottom:0!important;">
338
+ <?php do_action('wpvivid_backup_add_tab'); ?>
339
+ </h2>
340
+
341
+ <?php do_action('wpvivid_backup_add_page'); ?>
342
+ </div>
343
+ <script>
344
+ <?php do_action('wpvivid_backup_do_js'); ?>
345
+ </script>
admin/partials/wpvivid-log-read-page-display.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <div class="postbox restore_log" id="wpvivid_read_log_content">
2
+ <div></div>
3
+ </div>
admin/partials/wpvivid-logs-page-display.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div style="padding-bottom: 10px; float: right;">
2
+ <select name="" id="wpvivid_display_log_count">
3
+ <?php
4
+ foreach ($display_log_count as $value){
5
+ if($value == $max_log_diaplay){
6
+ _e('<option selected="selected" value="' . $value . '">' . $value . '</option>', 'wpvivid');
7
+ }
8
+ else {
9
+ _e('<option value="' . $value . '">' . $value . '</option>', 'wpvivid');
10
+ }
11
+ }
12
+ ?>
13
+ </select>
14
+ </div>
15
+ <table class="wp-list-table widefat plugins">
16
+ <thead class="log-head">
17
+ <tr>
18
+ <th class="row-title"><?php _e( 'Date', 'wpvivid' ); ?></th>
19
+ <th><?php _e( 'Log Type', 'wpvivid' ); ?></th>
20
+ <th><?php _e( 'Log File Name', 'wpvivid' ); ?></th>
21
+ <th><?php _e( 'Action', 'wpvivid' ); ?></th>
22
+ </tr>
23
+ </thead>
24
+ <tbody class="wpvivid-loglist" id="wpvivid_loglist">
25
+ <?php
26
+ $current_num=1;
27
+ if(!empty($loglist['log_list']['file'])) {
28
+ $log_index=0;
29
+ foreach ($loglist['log_list']['file'] as $value) {
30
+ if ($current_num <= $max_log_diaplay) {
31
+ $log_tr_display = '';
32
+ } else {
33
+ $log_tr_display = 'display: none;';
34
+ }
35
+ if (empty($value['time'])) {
36
+ $value['time'] = 'N/A';
37
+ }
38
+ if (empty($value['des'])) {
39
+ $value['des'] = 'N/A';
40
+ }
41
+ ?>
42
+ <tr style="<?php esc_attr_e($log_tr_display, 'wpvivid'); ?>">
43
+ <td class="row-title"><label for="tablecell"><?php _e($value['time'], 'wpvivid') ?></label>
44
+ </td>
45
+ <td><?php _e($value['des'], 'wpvivid') ?></td>
46
+ <td><?php _e($value['file_name'], 'wpvivid') ?></td>
47
+ <td>
48
+ <a onclick='wpvivid_view_log("<?php _e($log_index); ?>")'
49
+ style="cursor:pointer;"><img
50
+ src="<?php echo esc_url(plugins_url('images/Log.png', __FILE__)); ?>"
51
+ style="vertical-align:middle;">Log</a></td>
52
+ <td id="<?php _e($log_index); ?>" style="display: none"><?php _e($value['path']); ?></td>
53
+ </tr><?php
54
+ $log_index++;
55
+ $current_num++;
56
+ }
57
+ }
58
+ ?>
59
+ </tbody>
60
+ </table>
61
+ <div style="padding-top: 10px; text-align: center;">
62
+ <input class="button-secondary log-page" id="wpvivid_pre_log_page" type="submit" value="<?php esc_attr_e( ' < Pre page ', 'wpvivid' ); ?>" />
63
+ <div style="font-size: 12px; display: inline-block; padding-left: 10px;">
64
+ <span id="wpvivid_log_page_info" style="line-height: 35px;">
65
+ <?php
66
+ $current_page=1;
67
+ $max_page=ceil(sizeof($loglist['log_list']['file'])/$max_log_diaplay);
68
+ if($max_page == 0) $max_page = 1;
69
+ _e($current_page.' / '.$max_page, 'wpvivid');
70
+ ?>
71
+ </span>
72
+ </div>
73
+ <input class="button-secondary log-page" id="wpvivid_next_log_page" type="submit" value="<?php esc_attr_e( ' Next page > ', 'wpvivid' ); ?>" />
74
+ </div>
admin/partials/wpvivid-remote-storage-page-display.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ ?>
4
+
5
+ <div>
6
+ <div class="storage-content" id="storage-brand-2" style="">
7
+ <div class="postbox">
8
+ <?php do_action('wpvivid_add_storage_tab'); ?>
9
+ </div>
10
+ <div class="postbox storage-account-block" id="wpvivid_storage_account_block">
11
+ <?php do_action('wpvivid_add_storage_page'); ?>
12
+ <div id="wpvivid_storage_account_notice"></div>
13
+ <div class=""><input class="button-primary storage-account-button" id="storage_account_button" type="submit" name="Example" value="<?php _e( 'Test and Add', 'wpvivid' ); ?>" /></div>
14
+ </div>
15
+ <div class="schedule-tab-block"><?php _e('Please choose one storage to save your backups (remote storage)', 'wpvivid'); ?></div>
16
+ <div class="">
17
+ <table class="widefat">
18
+ <thead>
19
+ <tr>
20
+ <th></th>
21
+ <th></th>
22
+ <th><?php _e( 'Storage Provider', 'wpvivid' ); ?></th>
23
+ <th class="row-title"><?php _e( 'Remote Storage Name', 'wpvivid' ); ?></th>
24
+ <th><?php _e( 'Action', 'wpvivid' ); ?></th>
25
+ </tr>
26
+ </thead>
27
+ <tbody class="wpvivid-remote-storage-list" id="wpvivid_remote_storage_list">
28
+ <?php
29
+ $html = '';
30
+ $html = apply_filters('wpvivid_add_remote_storage_list', $html);
31
+ echo $html;
32
+ ?>
33
+ </tbody>
34
+ <tfoot>
35
+ <tr>
36
+ <th colspan="5" class="row-title"><input class="button-primary" id="wpvivid_set_default_remote_storage" type="submit" name="choose-remote-storage" value="<?php esc_attr_e( 'Save Changes', 'wpvivid' ); ?>" /></th>
37
+ </tr>
38
+ </tfoot>
39
+ </table>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ <script>
44
+ function select_remote_storage(evt, storage_page_id)
45
+ {
46
+ var i, tablecontent, tablinks;
47
+ tablinks = document.getElementsByClassName("storage-providers");
48
+ for (i = 0; i < tablinks.length; i++) {
49
+ tablinks[i].className = tablinks[i].className.replace("storage-providers-active", "");
50
+ }
51
+ evt.currentTarget.className += " storage-providers-active";
52
+
53
+ jQuery(".storage-account-page").hide();
54
+ jQuery("#"+storage_page_id).show();
55
+ }
56
+ </script>
admin/partials/wpvivid-settings-page-display.php ADDED
@@ -0,0 +1,444 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function wpvivid_general_settings()
4
+ {
5
+ $general_setting=WPvivid_Setting::get_setting(true, "");
6
+ $display_backup_count = $general_setting['options']['wpvivid_common_setting']['max_backup_count'];
7
+ $display_backup_count=intval($display_backup_count);
8
+ if($general_setting['options']['wpvivid_common_setting']['estimate_backup']){
9
+ $wpvivid_setting_estimate_backup='checked';
10
+ }
11
+ else{
12
+ $wpvivid_setting_estimate_backup='';
13
+ }
14
+ global $wpvivid_pulgin;
15
+ $out_of_date=$wpvivid_pulgin->_get_out_of_date_info();
16
+ $out_of_date_remote='There is no path for remote storage, please set it up first.';
17
+
18
+ if($out_of_date['remote_options'] !== false)
19
+ {
20
+ foreach ($out_of_date['remote_options'] as $value)
21
+ {
22
+ if($value['type'] === 'ftp' || $value['type'] === 'sftp')
23
+ {
24
+ $out_of_date_remote=$value['path'];
25
+ }
26
+ else if($value['type'] === WPVIVID_REMOTE_AMAZONS3)
27
+ {
28
+ $out_of_date_remote=$value['s3Path'];
29
+ }
30
+ else{
31
+ $out_of_date_remote='There is no path for remote storage, please set it up first.';
32
+ }
33
+ }
34
+ }
35
+ ?>
36
+ <tr>
37
+ <td class="row-title wpvivid-backup-settings-table-left tablelistcolumn"><label for="tablecell"><?php _e('General Settings', 'wpvivid'); ?></label></td>
38
+ <td class="tablelistcolumn">
39
+ <div class="postbox schedule-tab-block">
40
+ <div><strong><?php _e('Compress Files Every', 'wpvivid'); ?></strong></div>
41
+ <div class="schedule-tab-block setting-page-content">
42
+ <input type="text" placeholder="400" option="setting" name="max_file_size" id="wpvivid_max_zip" class="all-options" value="<?php esc_attr_e(str_replace('M', '', $general_setting['options']['wpvivid_compress_setting']['max_file_size']), 'wpvivid'); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB
43
+ <div><p><?php _e( 'Some web hosting providers limit large zip files (e.g. 200MB), and therefore splitting your backup into many parts is an ideal way to avoid to hit the limitation if you are running a big website. Please try to adjust the value if you are encountering backup errors.', 'wpvivid' ); ?></div></p>
44
+ </div>
45
+ <div><strong><?php _e('Exclude the files which is larger than', 'wpvivid'); ?></strong></div>
46
+ <div class="schedule-tab-block setting-page-content">
47
+ <input type="text" placeholder="400" option="setting" name="exclude_file_size" id="wpvivid_ignore_large" class="all-options" value="<?php esc_attr_e($general_setting['options']['wpvivid_compress_setting']['exclude_file_size'], 'wpvivid'); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB
48
+ <div><p><?php _e( 'Using the option will ignore the file larger than the certain size in MB when backing up, \'0\' (zero) means unlimited.', 'wpvivid' ); ?></p></div>
49
+ </div>
50
+ <div><strong><?php _e('PHP script execution timeout', 'wpvivid'); ?></strong></div>
51
+ <div class="schedule-tab-block setting-page-content">
52
+ <input type="text" placeholder="600" option="setting" name="max_execution_time" id="wpvivid_option_timeout" class="all-options" value="<?php esc_attr_e($general_setting['options']['wpvivid_common_setting']['max_execution_time'], 'wpvivid'); ?>" onkeyup="value=value.replace(/\D/g,'')" />Seconds
53
+ <div><p><?php _e( 'The time-out is not your server PHP time-out. With the execution time exhausted, our plugin will shut the process of backup down. If the progress of backup encounters a time-out, that means you have a medium or large sized website, please try to scale the value bigger. ', 'wpvivid' ); ?></p></div>
54
+ </div>
55
+ <div>
56
+ <select option="setting" name="max_backup_count" id="wpvivid_max_backup_count">
57
+ <?php
58
+ for($i=1; $i<8;$i++){
59
+ if($i === $display_backup_count){
60
+ _e('<option selected="selected" value="' . $i . '">' . $i . '</option>', 'wpvivid');
61
+ }
62
+ else {
63
+ _e('<option value="' . $i . '">' . $i . '</option>', 'wpvivid');
64
+ }
65
+ }
66
+ ?>
67
+ </select><strong><?php _e('backups retained', 'wpvivid'); ?></strong>
68
+ </div>
69
+ <div>
70
+ <label for="wpvivid_estimate_backup">
71
+ <input type="checkbox" option="setting" name="estimate_backup" id="wpvivid_estimate_backup" value="1" <?php esc_attr_e($wpvivid_setting_estimate_backup, 'wpvivid'); ?> />
72
+ <span><?php _e( 'Calculate the size of files, folder and database before backing up ', 'wpvivid' ); ?></span>
73
+ </label>
74
+ </div>
75
+ </div>
76
+ <div class="postbox schedule-tab-block">
77
+ <div><strong><?php _e('Backup Folder', 'wpvivid'); ?></strong></div>
78
+ <div class="schedule-tab-block setting-page-content">
79
+ <div><p><?php _e( 'Name your folder, this folder must be writable for creating backup files.', 'wpvivid' ); ?><p> </div>
80
+ <input type="text" placeholder="wpvividbackups" option="setting" name="path" id="wpvivid_option_backup_dir" class="all-options" value="<?php esc_attr_e($general_setting['options']['wpvivid_local_setting']['path'], 'wpvivid'); ?>" onkeyup="value=value.replace(/[^\a-\z\A-\Z0-9]/g,'')" onpaste="value=value.replace(/[^\a-\z\A-\Z0-9]/g,'')" />
81
+ <p><span><?php _e('Local storage directory:', 'wpvivid'); ?></span><span><?php echo WP_CONTENT_DIR.'/'; ?><span id="wpvivid_setting_local_storage_path"><?php _e($general_setting['options']['wpvivid_local_setting']['path'], 'wpvivid'); ?></span></span></p>
82
+ </div>
83
+ </div>
84
+ <div class="postbox schedule-tab-block">
85
+ <div class="schedule-tab-block">
86
+ <fieldset>
87
+ <label for="users_can_register">
88
+ <p><strong><?php _e('Remove out-of-date backups', 'wpvivid'); ?></strong></p>
89
+ <p><span><?php _e('Web Server Directory:', 'wpvivid'); ?></span><span id="wpvivid_out_of_date_local_path"><?php _e($out_of_date['web_server'], 'wpvivid'); ?></span></p>
90
+ <p><span><?php _e('Remote Storage Directory:', 'wpvivid'); ?></span><span id="wpvivid_out_of_date_remote_path">
91
+ <?php
92
+ $wpvivid_get_remote_directory = '';
93
+ $wpvivid_get_remote_directory = apply_filters('wpvivid_get_remote_directory', $wpvivid_get_remote_directory);
94
+ echo $wpvivid_get_remote_directory;
95
+ ?>
96
+ </span>
97
+ </p>
98
+ </label>
99
+ </fieldset>
100
+ </div>
101
+ <div class="schedule-tab-block"><input class="button-primary" id="wpvivid_delete_out_of_backup" style="margin-right:10px;" type="submit" name="delete-out-of-backup" value="<?php esc_attr_e( 'Remove', 'wpvivid' ); ?>" />
102
+ <p><?php _e('The action is irreversible! It will remove all backups which is(are) out-of-date (including local web server and remote storage) if they exist.', 'wpvivid'); ?> </p>
103
+ </div>
104
+ </div>
105
+ </td>
106
+ </tr>
107
+ <?php
108
+ }
109
+
110
+ function wpvivid_compressing()
111
+ {
112
+ $general_setting=WPvivid_Setting::get_setting(true, "");
113
+ $wpvivid_setting_no_compress='';
114
+ $wpvivid_setting_compress='';
115
+ if($general_setting['options']['wpvivid_compress_setting']['no_compress']){
116
+ $wpvivid_setting_no_compress='checked';
117
+ }
118
+ else{
119
+ $wpvivid_setting_compress='checked';
120
+ }
121
+ ?>
122
+ <tr>
123
+ <td class="row-title wpvivid-backup-settings-table-left tablelistcolumn"><label for="tablecell"><?php _e('Choose How to Archive Your Backups', 'wpvivid'); ?></label></td>
124
+ <td class="tablelistcolumn">
125
+ <div class="postbox schedule-tab-block setting-page-content" id="wpvivid_archive_type">
126
+ <fieldset>
127
+ <label>
128
+ <input type="radio" option="setting" name="no_compress" value="1" <?php esc_attr_e($wpvivid_setting_no_compress, 'wpvivid'); ?> />
129
+ <span><?php _e( 'Only Archive without compressing', 'wpvivid' ); ?></span>
130
+ <span><?php _e( 'It will cause a lower CPU Usage and is recommended in a web hosting/ shared hosting environment.', 'wpvivid' ); ?>
131
+ </label><br>
132
+ <label>
133
+ <input type="radio" option="setting" name="no_compress" value="0" <?php esc_attr_e($wpvivid_setting_compress, 'wpvivid'); ?> />
134
+ <span><?php _e( 'Compress and Archive', 'wpvivid' ); ?></span>
135
+ <span><?php _e( 'It will cause a higher CPU Usage and is recommended in a VPS/ dedicated hosting environment.', 'wpvivid' ); ?></span>
136
+ </label>
137
+ <label style="display: none;">
138
+ <input type="radio" option="setting" name="compress_type" value="zip" checked />
139
+ <input type="radio" option="setting" name="use_temp_file" value="1" checked />
140
+ <input type="radio" option="setting" name="use_temp_size" value="16" checked />
141
+ </label>
142
+ </fieldset>
143
+ </div>
144
+ </td>
145
+ </tr>
146
+ <?php
147
+ }
148
+
149
+ function wpvivid_email_report()
150
+ {
151
+ $general_setting=WPvivid_Setting::get_setting(true, "");
152
+ $setting_email_enable='';
153
+ $setting_email_display = 'display: none;';
154
+ if(isset($general_setting['options']['wpvivid_email_setting']['email_enable'])){
155
+ if($general_setting['options']['wpvivid_email_setting']['email_enable']){
156
+ $setting_email_enable='checked';
157
+ $setting_email_display = '';
158
+ }
159
+ }
160
+ $wpvivid_setting_email_always='';
161
+ $wpvivid_setting_email_failed='';
162
+ if($general_setting['options']['wpvivid_email_setting']['always']) {
163
+ $wpvivid_setting_email_always='checked';
164
+ }
165
+ else{
166
+ $wpvivid_setting_email_failed='checked';
167
+ }
168
+ ?>
169
+ <tr>
170
+ <td class="row-title wpvivid-backup-settings-table-left tablelistcolumn"><label for="tablecell"><?php _e('Email Report', 'wpvivid'); ?></label></td>
171
+ <td class="tablelistcolumn">
172
+ <div class="postbox schedule-tab-block">
173
+ <div><p><?php _e('In order to use this function, please install a ', 'wpvivid'); ?><strong><?php _e('WordPress SMTP plugin', 'wpvivid'); ?></strong><?php _e(' of your preference and configure your SMTP server first. This is because WordPress uses the PHP Mail function to send its emails by default, which is not supported by many hosts and can cause issues if it is not set properly.', 'wpvivid'); ?></p>
174
+ </div>
175
+ <div>
176
+ <label for="wpvivid_general_email_enable">
177
+ <input type="checkbox" option="setting" name="email_enable" id="wpvivid_general_email_enable" value="1" <?php esc_attr_e($setting_email_enable, 'wpvivid'); ?> />
178
+ <span><strong><?php _e( 'Enable email report', 'wpvivid' ); ?></strong></span>
179
+ </label>
180
+ </div>
181
+ <div id="wpvivid_general_email_setting" style="<?php esc_attr_e($setting_email_display, 'wpvivid'); ?>" >
182
+ <input type="text" placeholder="example@yourdomain.com" option="setting" name="send_to" class="regular-text" id="wpvivid_mail" value="<?php
183
+ foreach ($general_setting['options']['wpvivid_email_setting']['send_to'] as $mail) {
184
+ _e($mail, 'wpvivid');
185
+ break;
186
+ }
187
+ ?>" />
188
+ <input class="button-secondary" id="wpvivid_send_email_test" style="margin-top:10px;" type="submit" name="" value="<?php esc_attr_e( 'Test Email', 'wpvivid' ); ?>" title="Send an email for testing mail function"/>
189
+ <div id="wpvivid_send_email_res"></div>
190
+ <fieldset class="schedule-tab-block">
191
+ <label >
192
+ <input type="radio" option="setting" name="always" value="1" <?php esc_attr_e($wpvivid_setting_email_always, 'wpvivid'); ?> />
193
+ <span><?php _e( 'Always send an email notification when a backup is complete', 'wpvivid' ); ?></span>
194
+ </label><br>
195
+ <label >
196
+ <input type="radio" option="setting" name="always" value="0" <?php esc_attr_e($wpvivid_setting_email_failed, 'wpvivid'); ?> />
197
+ <span><?php _e( 'Only send an email notification when a backup fails', 'wpvivid' ); ?></span>
198
+ </label>
199
+ </fieldset>
200
+ </div>
201
+ </div>
202
+ </td>
203
+ </tr>
204
+ <?php
205
+ }
206
+
207
+ function wpvivid_clean_junk()
208
+ {
209
+ global $wpvivid_pulgin;
210
+ $junk_file=$wpvivid_pulgin->_junk_files_info();
211
+ ?>
212
+ <tr>
213
+ <td class="row-title wpvivid-backup-settings-table-left tablelistcolumn"><label for="tablecell"><?php _e('Clean Junk', 'wpvivid'); ?></label></td>
214
+ <td class="tablelistcolumn">
215
+ <div class="postbox schedule-tab-block">
216
+ <div><p><?php _e('Web-server disk space in use by WPvivid:', 'wpvivid'); ?></p>
217
+ <div class="schedule-tab-block"><span class="schedule-tab-block"><?php _e('Total Size:', 'wpvivid'); ?></span><span id="wpvivid_junk_sum_size"><?php _e($junk_file['sum_size'], 'wpvivid'); ?></span><input class="button-secondary" id="wpvivid_calculate_size" style="margin-left:10px;" type="submit" name="Calculate-Sizes" value="<?php esc_attr_e( 'Calculate Sizes', 'wpvivid' ); ?>" /></div>
218
+
219
+ </div>
220
+ <div class="schedule-tab-block">
221
+ <fieldset>
222
+ <label for="wpvivid_junk_log">
223
+ <input id="wpvivid_junk_log" name="junk-files" type="checkbox" id="" value="junk-log" />
224
+ <span><?php _e( 'logs', 'wpvivid' ); ?></span>
225
+ <span><?php _e('Path:', 'wpvivid' ); ?></span><span id="wpvivid_junk_log_path"><?php _e($junk_file['log_path'], 'wpvivid'); ?></span>
226
+ </label>
227
+ </fieldset>
228
+ <fieldset>
229
+ <label for="wpvivid_junk_backup_cache">
230
+ <input id="wpvivid_junk_backup_cache" name="junk-files" type="checkbox" id="" value="junk-backup-cache" />
231
+ <span><?php _e( 'Backup Cache', 'wpvivid' ); ?></span>
232
+ </label>
233
+ <label for="wpvivid_junk_file">
234
+ <input id="wpvivid_junk_file" name="junk-files" type="checkbox" id="" value="junk-files" />
235
+ <span><?php _e( 'Junk', 'wpvivid' ); ?></span>
236
+ <span><?php _e('Path:', 'wpvivid' ); ?></span><span id="wpvivid_junk_file_path"><?php _e($junk_file['junk_path'], 'wpvivid'); ?></span>
237
+ </label>
238
+ </fieldset>
239
+ <fieldset>
240
+ <label for="wpvivid_junk_temporary_file">
241
+ <input id="wpvivid_junk_temporary_file" name="junk-files" type="checkbox" id="" value="junk-temporary-files" />
242
+ <span><?php _e( 'Temporary Files', 'wpvivid' ); ?></span>
243
+ <span><?php _e('Path:', 'wpvivid'); ?></span><span id="wpvivid_restore_temp_file_path"><?php _e($junk_file['old_files_path'], 'wpvivid'); ?></span>
244
+ <p><?php _e('Temporary Files are created by wpvivid when restoring a website.', 'wpvivid'); ?></p>
245
+ </label>
246
+ </fieldset>
247
+ </div>
248
+ <div><input class="button-primary" id="wpvivid_clean_junk_file" type="submit" name="Empty-all-files" value="<?php esc_attr_e( 'Empty', 'wpvivid' ); ?>" /></div>
249
+ <div style="clear:both;"></div>
250
+ </div>
251
+ </td>
252
+ </tr>
253
+ <?php
254
+ }
255
+
256
+ function wpvivid_export_import_settings()
257
+ {
258
+ ?>
259
+ <tr>
260
+ <td class="row-title wpvivid-backup-settings-table-left tablelistcolumn"><label for="tablecell"><?php _e('Export / import settings', 'wpvivid'); ?></label></td>
261
+ <td class="tablelistcolumn">
262
+ <div class="postbox schedule-tab-block">
263
+ <div class="schedule-tab-block">
264
+ <input class="button-primary" id="wpvivid_setting_export" type="button" name="" value="<?php esc_attr_e( 'Export', 'wpvivid' ); ?>" />
265
+ <p><?php _e('Click \'Export\' button to save WPvivid settings on your local computer.', 'wpvivid'); ?> </p>
266
+ </div>
267
+ <div class="schedule-tab-block">
268
+ <input type="file" name="fileTrans" id="wpvivid_select_import_file"></br>
269
+ <input class="button-primary" id="wpvivid_setting_import" type="button" name="" value="<?php esc_attr_e( 'Import', 'wpvivid' ); ?>" />
270
+ <p><?php _e('Importing the json file can help you set WPvivid\'s configuration on another wordpress site quickly.', 'wpvivid'); ?></p>
271
+ </div>
272
+ <div style="clear:both;"></div>
273
+ </div>
274
+ </td>
275
+ </tr>
276
+ <?php
277
+ }
278
+
279
+ function wpvivid_schedule_settings()
280
+ {
281
+ ?>
282
+ <tr>
283
+ <td class="row-title wpvivid-backup-settings-table tablelistcolumn"><label for="tablecell"><?php _e('Schedule Settings', 'wpvivid'); ?></label></td>
284
+ <td class="tablelistcolumn">
285
+ <div id="storage-brand-3" style="">
286
+ <div>
287
+ <div>
288
+ <div class="postbox schedule-tab-block">
289
+ <label for="wpvivid_schedule_enable">
290
+ <input option="schedule" name="enable" type="checkbox" id="wpvivid_schedule_enable" />
291
+ <span><?php _e( 'Enable backup schedule', 'wpvivid' ); ?></span>
292
+ <div>
293
+ <?php
294
+ $notice='';
295
+ $notice= apply_filters('wpvivid_schedule_notice',$notice);
296
+ echo $notice;
297
+ ?>
298
+ </div>
299
+ </label><br>
300
+ </div>
301
+ <div id="wpvivid_schedule_backup_schedule"">
302
+ <div class="postbox schedule-tab-block">
303
+ <fieldset>
304
+ <legend class="screen-reader-text"><span>input type="radio"</span></legend>
305
+ <?php
306
+ $time='';
307
+ $time= apply_filters('wpvivid_schedule_time',$time);
308
+ echo $time;
309
+ ?>
310
+ </fieldset>
311
+ </div>
312
+ </div>
313
+ </div>
314
+ <div class="postbox schedule-tab-block" id="wpvivid_schedule_backup_type">
315
+ <div>
316
+ <div>
317
+ <fieldset>
318
+ <legend class="screen-reader-text"><span>input type="radio"</span></legend>
319
+ <?php
320
+ $backup_type='';
321
+ $backup_type= apply_filters('wpvivid_schedule_backup_type',$backup_type);
322
+ echo $backup_type;
323
+ ?>
324
+ </fieldset>
325
+ </div>
326
+ <div style="clear:both;"></div>
327
+ </div>
328
+ </div>
329
+ <div class="postbox schedule-tab-block" id="wpvivid_schedule_remote_storage">
330
+ <div>
331
+ <fieldset>
332
+ <label title=''>
333
+ <input type="radio" option="schedule" name="save_local_remote" value="local"/>
334
+ <span><?php _e( 'Save backups on localhost (web server)', 'wpvivid' ); ?></span>
335
+ </label><br>
336
+ <label title=''>
337
+ <input type="radio" option="schedule" name="save_local_remote" value="remote"/>
338
+ <span><?php _e( 'Send backups to remote storage (choose this option, the local backup will be deleted after uploading to remote storage completely)', 'wpvivid' ); ?></span>
339
+ </label>
340
+ </fieldset>
341
+ </div>
342
+ <div id="schedule_upload_storage">
343
+ <?php
344
+ $pic='';
345
+ $pic= apply_filters('wpvivid_schedule_add_remote_pic',$pic);
346
+ echo $pic;
347
+ ?>
348
+ </div>
349
+ </div>
350
+ </div>
351
+ </div>
352
+ </td>
353
+ </tr>
354
+ <script>
355
+ <?php
356
+ do_action('wpvivid_schedule_do_js');
357
+ ?>
358
+ </script>
359
+ <?php
360
+ }
361
+
362
+ function wpvivid_schedule_notice($html)
363
+ {
364
+ $html='<p>1) Scheduled job will start at web server time: </p>';
365
+ $html.='<p>2) Being subjected to mechanisms of PHP, a scheduled backup task for your site will be triggered only when the site receives at least a visit at any page.</p>';
366
+ return $html;
367
+ }
368
+
369
+ function wpvivid_schedule_backup_type($html)
370
+ {
371
+ $html='<label>';
372
+ $html.='<input type="radio" option="schedule" name="backup_type" value="files+db"/>';
373
+ $html.='<span>Database + Files (Entire website)</span>';
374
+ $html.='</label><br>';
375
+
376
+ $html.='<label>';
377
+ $html.='<input type="radio" option="schedule" name="backup_type" value="files"/>';
378
+ $html.='<span>All Files (Exclude Database)</span>';
379
+ $html.='</label><br>';
380
+
381
+ $html.='<label>';
382
+ $html.='<input type="radio" option="schedule" name="backup_type" value="db"/>';
383
+ $html.='<span>Only Database</span>';
384
+ $html.='</label><br>';
385
+
386
+ return $html;
387
+ }
388
+
389
+ function wpvivid_schedule_do_js()
390
+ {
391
+ $schedule=WPvivid_Schedule::get_schedule();
392
+ if($schedule['enable'] === true)
393
+ {
394
+ ?>
395
+ jQuery("#wpvivid_schedule_enable").prop('checked', true);
396
+ <?php
397
+ if($schedule['backup']['remote'] === 1)
398
+ {
399
+ $schedule_remote='remote';
400
+ }
401
+ else{
402
+ $schedule_remote='local';
403
+ }
404
+ }
405
+ else{
406
+ ?>
407
+ jQuery("#wpvivid_schedule_backup_schedule").hide();
408
+ jQuery("#wpvivid_schedule_backup_type").hide();
409
+ jQuery("#wpvivid_schedule_remote_storage").hide();
410
+ <?php
411
+ $schedule['recurrence']='wpvivid_daily';
412
+ $schedule['backup']['backup_files']='files+db';
413
+ $schedule_remote='local';
414
+ }
415
+ ?>
416
+ jQuery("input:radio[value='<?php echo $schedule['recurrence']?>']").prop('checked', true);
417
+ jQuery("input:radio[value='<?php echo $schedule['backup']['backup_files']?>']").prop('checked', true);
418
+ jQuery("input:radio[value='<?php echo $schedule_remote?>']").prop('checked', true);
419
+ <?php
420
+ }
421
+
422
+ add_action('wpvivid_setting_add_cell','wpvivid_general_settings',10);
423
+ add_action('wpvivid_setting_add_cell','wpvivid_schedule_settings',11);
424
+ add_action('wpvivid_setting_add_cell','wpvivid_compressing',12);
425
+ add_action('wpvivid_setting_add_cell','wpvivid_email_report',13);
426
+ add_action('wpvivid_setting_add_cell','wpvivid_clean_junk',14);
427
+ add_action('wpvivid_setting_add_cell','wpvivid_export_import_settings',15);
428
+ add_action('wpvivid_schedule_do_js','wpvivid_schedule_do_js',10);
429
+ add_filter('wpvivid_schedule_backup_type','wpvivid_schedule_backup_type');
430
+ add_filter('wpvivid_schedule_notice','wpvivid_schedule_notice',10);
431
+ ?>
432
+ <div>
433
+ <table class="widefat">
434
+ <tbody>
435
+ <?php do_action('wpvivid_setting_add_cell'); ?>
436
+ <tfoot>
437
+ <tr>
438
+ <th class="row-title"><input class="button-primary storage-account-button" id="wpvivid_setting_general_save" type="submit" name="" value="<?php esc_attr_e( 'Save Changes', 'wpvivid' ); ?>" /></th>
439
+ <th></th>
440
+ </tr>
441
+ </tfoot>
442
+ </tbody>
443
+ </table>
444
+ </div>
admin/partials/wpvivid-website-info-page-display.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <table class="widefat">
2
+ <div style="padding-left: 10px;">
3
+ <?php _e('Click the button below to download the relevant information (website info and error logs) to your PC when you encountering some errors. Sending the file to us will help us diagnose what happened', 'wpvivid'); ?>
4
+ </div>
5
+ <div class="schedule-tab-block">
6
+ <input class="button-primary" id="wpvivid_download_website_info" type="submit" name="download-website-info" value="<?php esc_attr_e( 'Download', 'wpvivid' ); ?>" />
7
+ </div>
8
+ <thead class="website-info-head">
9
+ <tr>
10
+ <th class="row-title" style="min-width: 260px;"><?php _e( 'Website Info Key', 'wpvivid' ); ?></th>
11
+ <th><?php _e( 'Website Info Value', 'wpvivid' ); ?></th>
12
+ </tr>
13
+ </thead>
14
+ <tbody class="wpvivid-websiteinfo-list">
15
+ <?php
16
+ if(!empty($website_info['data'])){
17
+ foreach ($website_info['data'] as $key=>$value) { ?>
18
+ <?php
19
+ $website_value='';
20
+ if (is_array($value)) {
21
+ foreach ($value as $arr_value) {
22
+ if (empty($website_value)) {
23
+ $website_value = $website_value . $arr_value;
24
+ } else {
25
+ $website_value = $website_value . ', ' . $arr_value;
26
+ }
27
+ }
28
+ }
29
+ else{
30
+ if($value === true || $value === false){
31
+ if($value === true) {
32
+ $website_value = 'true';
33
+ }
34
+ else{
35
+ $website_value = 'false';
36
+ }
37
+ }
38
+ else {
39
+ $website_value = $value;
40
+ }
41
+ }
42
+ ?>
43
+ <tr>
44
+ <td class="row-title tablelistcolumn"><label for="tablecell"><?php _e($key, 'wpvivid'); ?></label></td>
45
+ <td class="tablelistcolumn"><?php _e($website_value, 'wpvivid'); ?></td>
46
+ </tr>
47
+ <?php }} ?>
48
+ </tbody>
49
+ </table>
includes/aws/Aws/ACMPCA/ACMPCAClient.php DELETED
@@ -1,43 +0,0 @@
1
- <?php
2
- namespace Aws\ACMPCA;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS Certificate Manager Private Certificate Authority** service.
8
- * @method \Aws\Result createCertificateAuthority(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise createCertificateAuthorityAsync(array $args = [])
10
- * @method \Aws\Result createCertificateAuthorityAuditReport(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise createCertificateAuthorityAuditReportAsync(array $args = [])
12
- * @method \Aws\Result deleteCertificateAuthority(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise deleteCertificateAuthorityAsync(array $args = [])
14
- * @method \Aws\Result describeCertificateAuthority(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise describeCertificateAuthorityAsync(array $args = [])
16
- * @method \Aws\Result describeCertificateAuthorityAuditReport(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise describeCertificateAuthorityAuditReportAsync(array $args = [])
18
- * @method \Aws\Result getCertificate(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise getCertificateAsync(array $args = [])
20
- * @method \Aws\Result getCertificateAuthorityCertificate(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise getCertificateAuthorityCertificateAsync(array $args = [])
22
- * @method \Aws\Result getCertificateAuthorityCsr(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise getCertificateAuthorityCsrAsync(array $args = [])
24
- * @method \Aws\Result importCertificateAuthorityCertificate(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise importCertificateAuthorityCertificateAsync(array $args = [])
26
- * @method \Aws\Result issueCertificate(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise issueCertificateAsync(array $args = [])
28
- * @method \Aws\Result listCertificateAuthorities(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise listCertificateAuthoritiesAsync(array $args = [])
30
- * @method \Aws\Result listTags(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise listTagsAsync(array $args = [])
32
- * @method \Aws\Result restoreCertificateAuthority(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise restoreCertificateAuthorityAsync(array $args = [])
34
- * @method \Aws\Result revokeCertificate(array $args = [])
35
- * @method \GuzzleHttp\Promise\Promise revokeCertificateAsync(array $args = [])
36
- * @method \Aws\Result tagCertificateAuthority(array $args = [])
37
- * @method \GuzzleHttp\Promise\Promise tagCertificateAuthorityAsync(array $args = [])
38
- * @method \Aws\Result untagCertificateAuthority(array $args = [])
39
- * @method \GuzzleHttp\Promise\Promise untagCertificateAuthorityAsync(array $args = [])
40
- * @method \Aws\Result updateCertificateAuthority(array $args = [])
41
- * @method \GuzzleHttp\Promise\Promise updateCertificateAuthorityAsync(array $args = [])
42
- */
43
- class ACMPCAClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/ACMPCA/Exception/ACMPCAException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\ACMPCA\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **AWS Certificate Manager Private Certificate Authority** service.
8
- */
9
- class ACMPCAException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Acm/AcmClient.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
- namespace Aws\Acm;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS Certificate Manager** service.
8
- *
9
- * @method \Aws\Result addTagsToCertificate(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise addTagsToCertificateAsync(array $args = [])
11
- * @method \Aws\Result deleteCertificate(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise deleteCertificateAsync(array $args = [])
13
- * @method \Aws\Result describeCertificate(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise describeCertificateAsync(array $args = [])
15
- * @method \Aws\Result exportCertificate(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise exportCertificateAsync(array $args = [])
17
- * @method \Aws\Result getCertificate(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise getCertificateAsync(array $args = [])
19
- * @method \Aws\Result importCertificate(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise importCertificateAsync(array $args = [])
21
- * @method \Aws\Result listCertificates(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise listCertificatesAsync(array $args = [])
23
- * @method \Aws\Result listTagsForCertificate(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise listTagsForCertificateAsync(array $args = [])
25
- * @method \Aws\Result removeTagsFromCertificate(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise removeTagsFromCertificateAsync(array $args = [])
27
- * @method \Aws\Result requestCertificate(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise requestCertificateAsync(array $args = [])
29
- * @method \Aws\Result resendValidationEmail(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise resendValidationEmailAsync(array $args = [])
31
- * @method \Aws\Result updateCertificateOptions(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise updateCertificateOptionsAsync(array $args = [])
33
- */
34
- class AcmClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Acm/Exception/AcmException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\Acm\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **AWS Certificate Manager** service.
8
- */
9
- class AcmException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/AlexaForBusiness/AlexaForBusinessClient.php DELETED
@@ -1,107 +0,0 @@
1
- <?php
2
- namespace Aws\AlexaForBusiness;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Alexa For Business** service.
8
- * @method \Aws\Result associateContactWithAddressBook(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise associateContactWithAddressBookAsync(array $args = [])
10
- * @method \Aws\Result associateDeviceWithRoom(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise associateDeviceWithRoomAsync(array $args = [])
12
- * @method \Aws\Result associateSkillGroupWithRoom(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise associateSkillGroupWithRoomAsync(array $args = [])
14
- * @method \Aws\Result createAddressBook(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise createAddressBookAsync(array $args = [])
16
- * @method \Aws\Result createContact(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise createContactAsync(array $args = [])
18
- * @method \Aws\Result createProfile(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise createProfileAsync(array $args = [])
20
- * @method \Aws\Result createRoom(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise createRoomAsync(array $args = [])
22
- * @method \Aws\Result createSkillGroup(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise createSkillGroupAsync(array $args = [])
24
- * @method \Aws\Result createUser(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise createUserAsync(array $args = [])
26
- * @method \Aws\Result deleteAddressBook(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise deleteAddressBookAsync(array $args = [])
28
- * @method \Aws\Result deleteContact(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise deleteContactAsync(array $args = [])
30
- * @method \Aws\Result deleteProfile(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise deleteProfileAsync(array $args = [])
32
- * @method \Aws\Result deleteRoom(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise deleteRoomAsync(array $args = [])
34
- * @method \Aws\Result deleteRoomSkillParameter(array $args = [])
35
- * @method \GuzzleHttp\Promise\Promise deleteRoomSkillParameterAsync(array $args = [])
36
- * @method \Aws\Result deleteSkillGroup(array $args = [])
37
- * @method \GuzzleHttp\Promise\Promise deleteSkillGroupAsync(array $args = [])
38
- * @method \Aws\Result deleteUser(array $args = [])
39
- * @method \GuzzleHttp\Promise\Promise deleteUserAsync(array $args = [])
40
- * @method \Aws\Result disassociateContactFromAddressBook(array $args = [])
41
- * @method \GuzzleHttp\Promise\Promise disassociateContactFromAddressBookAsync(array $args = [])
42
- * @method \Aws\Result disassociateDeviceFromRoom(array $args = [])
43
- * @method \GuzzleHttp\Promise\Promise disassociateDeviceFromRoomAsync(array $args = [])
44
- * @method \Aws\Result disassociateSkillGroupFromRoom(array $args = [])
45
- * @method \GuzzleHttp\Promise\Promise disassociateSkillGroupFromRoomAsync(array $args = [])
46
- * @method \Aws\Result getAddressBook(array $args = [])
47
- * @method \GuzzleHttp\Promise\Promise getAddressBookAsync(array $args = [])
48
- * @method \Aws\Result getContact(array $args = [])
49
- * @method \GuzzleHttp\Promise\Promise getContactAsync(array $args = [])
50
- * @method \Aws\Result getDevice(array $args = [])
51
- * @method \GuzzleHttp\Promise\Promise getDeviceAsync(array $args = [])
52
- * @method \Aws\Result getProfile(array $args = [])
53
- * @method \GuzzleHttp\Promise\Promise getProfileAsync(array $args = [])
54
- * @method \Aws\Result getRoom(array $args = [])
55
- * @method \GuzzleHttp\Promise\Promise getRoomAsync(array $args = [])
56
- * @method \Aws\Result getRoomSkillParameter(array $args = [])
57
- * @method \GuzzleHttp\Promise\Promise getRoomSkillParameterAsync(array $args = [])
58
- * @method \Aws\Result getSkillGroup(array $args = [])
59
- * @method \GuzzleHttp\Promise\Promise getSkillGroupAsync(array $args = [])
60
- * @method \Aws\Result listDeviceEvents(array $args = [])
61
- * @method \GuzzleHttp\Promise\Promise listDeviceEventsAsync(array $args = [])
62
- * @method \Aws\Result listSkills(array $args = [])
63
- * @method \GuzzleHttp\Promise\Promise listSkillsAsync(array $args = [])
64
- * @method \Aws\Result listTags(array $args = [])
65
- * @method \GuzzleHttp\Promise\Promise listTagsAsync(array $args = [])
66
- * @method \Aws\Result putRoomSkillParameter(array $args = [])
67
- * @method \GuzzleHttp\Promise\Promise putRoomSkillParameterAsync(array $args = [])
68
- * @method \Aws\Result resolveRoom(array $args = [])
69
- * @method \GuzzleHttp\Promise\Promise resolveRoomAsync(array $args = [])
70
- * @method \Aws\Result revokeInvitation(array $args = [])
71
- * @method \GuzzleHttp\Promise\Promise revokeInvitationAsync(array $args = [])
72
- * @method \Aws\Result searchAddressBooks(array $args = [])
73
- * @method \GuzzleHttp\Promise\Promise searchAddressBooksAsync(array $args = [])
74
- * @method \Aws\Result searchContacts(array $args = [])
75
- * @method \GuzzleHttp\Promise\Promise searchContactsAsync(array $args = [])
76
- * @method \Aws\Result searchDevices(array $args = [])
77
- * @method \GuzzleHttp\Promise\Promise searchDevicesAsync(array $args = [])
78
- * @method \Aws\Result searchProfiles(array $args = [])
79
- * @method \GuzzleHttp\Promise\Promise searchProfilesAsync(array $args = [])
80
- * @method \Aws\Result searchRooms(array $args = [])
81
- * @method \GuzzleHttp\Promise\Promise searchRoomsAsync(array $args = [])
82
- * @method \Aws\Result searchSkillGroups(array $args = [])
83
- * @method \GuzzleHttp\Promise\Promise searchSkillGroupsAsync(array $args = [])
84
- * @method \Aws\Result searchUsers(array $args = [])
85
- * @method \GuzzleHttp\Promise\Promise searchUsersAsync(array $args = [])
86
- * @method \Aws\Result sendInvitation(array $args = [])
87
- * @method \GuzzleHttp\Promise\Promise sendInvitationAsync(array $args = [])
88
- * @method \Aws\Result startDeviceSync(array $args = [])
89
- * @method \GuzzleHttp\Promise\Promise startDeviceSyncAsync(array $args = [])
90
- * @method \Aws\Result tagResource(array $args = [])
91
- * @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
92
- * @method \Aws\Result untagResource(array $args = [])
93
- * @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
94
- * @method \Aws\Result updateAddressBook(array $args = [])
95
- * @method \GuzzleHttp\Promise\Promise updateAddressBookAsync(array $args = [])
96
- * @method \Aws\Result updateContact(array $args = [])
97
- * @method \GuzzleHttp\Promise\Promise updateContactAsync(array $args = [])
98
- * @method \Aws\Result updateDevice(array $args = [])
99
- * @method \GuzzleHttp\Promise\Promise updateDeviceAsync(array $args = [])
100
- * @method \Aws\Result updateProfile(array $args = [])
101
- * @method \GuzzleHttp\Promise\Promise updateProfileAsync(array $args = [])
102
- * @method \Aws\Result updateRoom(array $args = [])
103
- * @method \GuzzleHttp\Promise\Promise updateRoomAsync(array $args = [])
104
- * @method \Aws\Result updateSkillGroup(array $args = [])
105
- * @method \GuzzleHttp\Promise\Promise updateSkillGroupAsync(array $args = [])
106
- */
107
- class AlexaForBusinessClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/AlexaForBusiness/Exception/AlexaForBusinessException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\AlexaForBusiness\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **Alexa For Business** service.
8
- */
9
- class AlexaForBusinessException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/AbstractModel.php DELETED
@@ -1,67 +0,0 @@
1
- <?php
2
- namespace Aws\Api;
3
-
4
- /**
5
- * Base class that is used by most API shapes
6
- */
7
- abstract class AbstractModel implements \ArrayAccess
8
- {
9
- /** @var array */
10
- protected $definition;
11
-
12
- /** @var ShapeMap */
13
- protected $shapeMap;
14
-
15
- /**
16
- * @param array $definition Service description
17
- * @param ShapeMap $shapeMap Shapemap used for creating shapes
18
- */
19
- public function __construct(array $definition, ShapeMap $shapeMap)
20
- {
21
- $this->definition = $definition;
22
- $this->shapeMap = $shapeMap;
23
- }
24
-
25
- public function toArray()
26
- {
27
- return $this->definition;
28
- }
29
-
30
- public function offsetGet($offset)
31
- {
32
- return isset($this->definition[$offset])
33
- ? $this->definition[$offset] : null;
34
- }
35
-
36
- public function offsetSet($offset, $value)
37
- {
38
- $this->definition[$offset] = $value;
39
- }
40
-
41
- public function offsetExists($offset)
42
- {
43
- return isset($this->definition[$offset]);
44
- }
45
-
46
- public function offsetUnset($offset)
47
- {
48
- unset($this->definition[$offset]);
49
- }
50
-
51
- protected function shapeAt($key)
52
- {
53
- if (!isset($this->definition[$key])) {
54
- throw new \InvalidArgumentException('Expected shape definition at '
55
- . $key);
56
- }
57
-
58
- return $this->shapeFor($this->definition[$key]);
59
- }
60
-
61
- protected function shapeFor(array $definition)
62
- {
63
- return isset($definition['shape'])
64
- ? $this->shapeMap->resolve($definition)
65
- : Shape::create($definition, $this->shapeMap);
66
- }
67
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/ApiProvider.php DELETED
@@ -1,244 +0,0 @@
1
- <?php
2
- namespace Aws\Api;
3
-
4
- use Aws\Exception\UnresolvedApiException;
5
-
6
- /**
7
- * API providers.
8
- *
9
- * An API provider is a function that accepts a type, service, and version and
10
- * returns an array of API data on success or NULL if no API data can be created
11
- * for the provided arguments.
12
- *
13
- * You can wrap your calls to an API provider with the
14
- * {@see ApiProvider::resolve} method to ensure that API data is created. If the
15
- * API data is not created, then the resolve() method will throw a
16
- * {@see Aws\Exception\UnresolvedApiException}.
17
- *
18
- * use Aws\Api\ApiProvider;
19
- * $provider = ApiProvider::defaultProvider();
20
- * // Returns an array or NULL.
21
- * $data = $provider('api', 's3', '2006-03-01');
22
- * // Returns an array or throws.
23
- * $data = ApiProvider::resolve($provider, 'api', 'elasticfood', '2020-01-01');
24
- *
25
- * You can compose multiple providers into a single provider using
26
- * {@see Aws\or_chain}. This method accepts providers as arguments and
27
- * returns a new function that will invoke each provider until a non-null value
28
- * is returned.
29
- *
30
- * $a = ApiProvider::filesystem(sys_get_temp_dir() . '/aws-beta-models');
31
- * $b = ApiProvider::manifest();
32
- *
33
- * $c = \Aws\or_chain($a, $b);
34
- * $data = $c('api', 'betaservice', '2015-08-08'); // $a handles this.
35
- * $data = $c('api', 's3', '2006-03-01'); // $b handles this.
36
- * $data = $c('api', 'invalid', '2014-12-15'); // Neither handles this.
37
- */
38
- class ApiProvider
39
- {
40
- /** @var array A map of public API type names to their file suffix. */
41
- private static $typeMap = [
42
- 'api' => 'api-2',
43
- 'paginator' => 'paginators-1',
44
- 'waiter' => 'waiters-2',
45
- 'docs' => 'docs-2',
46
- ];
47
-
48
- /** @var array API manifest */
49
- private $manifest;
50
-
51
- /** @var string The directory containing service models. */
52
- private $modelsDir;
53
-
54
- /**
55
- * Resolves an API provider and ensures a non-null return value.
56
- *
57
- * @param callable $provider Provider function to invoke.
58
- * @param string $type Type of data ('api', 'waiter', 'paginator').
59
- * @param string $service Service name.
60
- * @param string $version API version.
61
- *
62
- * @return array
63
- * @throws UnresolvedApiException
64
- */
65
- public static function resolve(callable $provider, $type, $service, $version)
66
- {
67
- // Execute the provider and return the result, if there is one.
68
- $result = $provider($type, $service, $version);
69
- if (is_array($result)) {
70
- if (!isset($result['metadata']['serviceIdentifier'])) {
71
- $result['metadata']['serviceIdentifier'] = $service;
72
- }
73
- return $result;
74
- }
75
-
76
- // Throw an exception with a message depending on the inputs.
77
- if (!isset(self::$typeMap[$type])) {
78
- $msg = "The type must be one of: " . implode(', ', self::$typeMap);
79
- } elseif ($service) {
80
- $msg = "The {$service} service does not have version: {$version}.";
81
- } else {
82
- $msg = "You must specify a service name to retrieve its API data.";
83
- }
84
-
85
- throw new UnresolvedApiException($msg);
86
- }
87
-
88
- /**
89
- * Default SDK API provider.
90
- *
91
- * This provider loads pre-built manifest data from the `data` directory.
92
- *
93
- * @return self
94
- */
95
- public static function defaultProvider()
96
- {
97
- return new self(__DIR__ . '/../data', \Aws\manifest());
98
- }
99
-
100
- /**
101
- * Loads API data after resolving the version to the latest, compatible,
102
- * available version based on the provided manifest data.
103
- *
104
- * Manifest data is essentially an associative array of service names to
105
- * associative arrays of API version aliases.
106
- *
107
- * [
108
- * ...
109
- * 'ec2' => [
110
- * 'latest' => '2014-10-01',
111
- * '2014-10-01' => '2014-10-01',
112
- * '2014-09-01' => '2014-10-01',
113
- * '2014-06-15' => '2014-10-01',
114
- * ...
115
- * ],
116
- * 'ecs' => [...],
117
- * 'elasticache' => [...],
118
- * ...
119
- * ]
120
- *
121
- * @param string $dir Directory containing service models.
122
- * @param array $manifest The API version manifest data.
123
- *
124
- * @return self
125
- */
126
- public static function manifest($dir, array $manifest)
127
- {
128
- return new self($dir, $manifest);
129
- }
130
-
131
- /**
132
- * Loads API data from the specified directory.
133
- *
134
- * If "latest" is specified as the version, this provider must glob the
135
- * directory to find which is the latest available version.
136
- *
137
- * @param string $dir Directory containing service models.
138
- *
139
- * @return self
140
- * @throws \InvalidArgumentException if the provided `$dir` is invalid.
141
- */
142
- public static function filesystem($dir)
143
- {
144
- return new self($dir);
145
- }
146
-
147
- /**
148
- * Retrieves a list of valid versions for the specified service.
149
- *
150
- * @param string $service Service name
151
- *
152
- * @return array
153
- */
154
- public function getVersions($service)
155
- {
156
- if (!isset($this->manifest)) {
157
- $this->buildVersionsList($service);
158
- }
159
-
160
- if (!isset($this->manifest[$service]['versions'])) {
161
- return [];
162
- }
163
-
164
- return array_values(array_unique($this->manifest[$service]['versions']));
165
- }
166
-
167
- /**
168
- * Execute the the provider.
169
- *
170
- * @param string $type Type of data ('api', 'waiter', 'paginator').
171
- * @param string $service Service name.
172
- * @param string $version API version.
173
- *
174
- * @return array|null
175
- */
176
- public function __invoke($type, $service, $version)
177
- {
178
- // Resolve the type or return null.
179
- if (isset(self::$typeMap[$type])) {
180
- $type = self::$typeMap[$type];
181
- } else {
182
- return null;
183
- }
184
-
185
- // Resolve the version or return null.
186
- if (!isset($this->manifest)) {
187
- $this->buildVersionsList($service);
188
- }
189
-
190
- if (!isset($this->manifest[$service]['versions'][$version])) {
191
- return null;
192
- }
193
-
194
- $version = $this->manifest[$service]['versions'][$version];
195
- $path = "{$this->modelsDir}/{$service}/{$version}/{$type}.json";
196
-
197
- try {
198
- return \Aws\load_compiled_json($path);
199
- } catch (\InvalidArgumentException $e) {
200
- return null;
201
- }
202
- }
203
-
204
- /**
205
- * @param string $modelsDir Directory containing service models.
206
- * @param array $manifest The API version manifest data.
207
- */
208
- private function __construct($modelsDir, array $manifest = null)
209
- {
210
- $this->manifest = $manifest;
211
- $this->modelsDir = rtrim($modelsDir, '/');
212
- if (!is_dir($this->modelsDir)) {
213
- throw new \InvalidArgumentException(
214
- "The specified models directory, {$modelsDir}, was not found."
215
- );
216
- }
217
- }
218
-
219
- /**
220
- * Build the versions list for the specified service by globbing the dir.
221
- */
222
- private function buildVersionsList($service)
223
- {
224
- $dir = "{$this->modelsDir}/{$service}/";
225
-
226
- if (!is_dir($dir)) {
227
- return;
228
- }
229
-
230
- // Get versions, remove . and .., and sort in descending order.
231
- $results = array_diff(scandir($dir, SCANDIR_SORT_DESCENDING), ['..', '.']);
232
-
233
- if (!$results) {
234
- $this->manifest[$service] = ['versions' => []];
235
- } else {
236
- $this->manifest[$service] = [
237
- 'versions' => [
238
- 'latest' => $results[0]
239
- ]
240
- ];
241
- $this->manifest[$service]['versions'] += array_combine($results, $results);
242
- }
243
- }
244
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/DateTimeResult.php DELETED
@@ -1,41 +0,0 @@
1
- <?php
2
- namespace Aws\Api;
3
-
4
- /**
5
- * DateTime overrides that make DateTime work more seamlessly as a string,
6
- * with JSON documents, and with JMESPath.
7
- */
8
- class DateTimeResult extends \DateTime implements \JsonSerializable
9
- {
10
- /**
11
- * Create a new DateTimeResult from a unix timestamp.
12
- *
13
- * @param $unixTimestamp
14
- *
15
- * @return DateTimeResult
16
- */
17
- public static function fromEpoch($unixTimestamp)
18
- {
19
- return new self(gmdate('c', $unixTimestamp));
20
- }
21
-
22
- /**
23
- * Serialize the DateTimeResult as an ISO 8601 date string.
24
- *
25
- * @return string
26
- */
27
- public function __toString()
28
- {
29
- return $this->format('c');
30
- }
31
-
32
- /**
33
- * Serialize the date as an ISO 8601 date when serializing as JSON.
34
- *
35
- * @return mixed|string
36
- */
37
- public function jsonSerialize()
38
- {
39
- return (string) $this;
40
- }
41
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/DocModel.php DELETED
@@ -1,128 +0,0 @@
1
- <?php
2
- namespace Aws\Api;
3
-
4
- /**
5
- * Encapsulates the documentation strings for a given service-version and
6
- * provides methods for extracting the desired parts related to a service,
7
- * operation, error, or shape (i.e., parameter).
8
- */
9
- class DocModel
10
- {
11
- /** @var array */
12
- private $docs;
13
-
14
- /**
15
- * @param array $docs
16
- *
17
- * @throws \RuntimeException
18
- */
19
- public function __construct(array $docs)
20
- {
21
- if (!extension_loaded('tidy')) {
22
- throw new \RuntimeException('The "tidy" PHP extension is required.');
23
- }
24
-
25
- $this->docs = $docs;
26
- }
27
-
28
- /**
29
- * Convert the doc model to an array.
30
- *
31
- * @return array
32
- */
33
- public function toArray()
34
- {
35
- return $this->docs;
36
- }
37
-
38
- /**
39
- * Retrieves documentation about the service.
40
- *
41
- * @return null|string
42
- */
43
- public function getServiceDocs()
44
- {
45
- return isset($this->docs['service']) ? $this->docs['service'] : null;
46
- }
47
-
48
- /**
49
- * Retrieves documentation about an operation.
50
- *
51
- * @param string $operation Name of the operation
52
- *
53
- * @return null|string
54
- */
55
- public function getOperationDocs($operation)
56
- {
57
- return isset($this->docs['operations'][$operation])
58
- ? $this->docs['operations'][$operation]
59
- : null;
60
- }
61
-
62
- /**
63
- * Retrieves documentation about an error.
64
- *
65
- * @param string $error Name of the error
66
- *
67
- * @return null|string
68
- */
69
- public function getErrorDocs($error)
70
- {
71
- return isset($this->docs['shapes'][$error]['base'])
72
- ? $this->docs['shapes'][$error]['base']
73
- : null;
74
- }
75
-
76
- /**
77
- * Retrieves documentation about a shape, specific to the context.
78
- *
79
- * @param string $shapeName Name of the shape.
80
- * @param string $parentName Name of the parent/context shape.
81
- * @param string $ref Name used by the context to reference the shape.
82
- *
83
- * @return null|string
84
- */
85
- public function getShapeDocs($shapeName, $parentName, $ref)
86
- {
87
- if (!isset($this->docs['shapes'][$shapeName])) {
88
- return '';
89
- }
90
-
91
- $result = '';
92
- $d = $this->docs['shapes'][$shapeName];
93
- if (isset($d['refs']["{$parentName}\$${ref}"])) {
94
- $result = $d['refs']["{$parentName}\$${ref}"];
95
- } elseif (isset($d['base'])) {
96
- $result = $d['base'];
97
- }
98
-
99
- if (isset($d['append'])) {
100
- $result .= $d['append'];
101
- }
102
-
103
- return $this->clean($result);
104
- }
105
-
106
- private function clean($content)
107
- {
108
- if (!$content) {
109
- return '';
110
- }
111
-
112
- $tidy = new \Tidy();
113
- $tidy->parseString($content, [
114
- 'indent' => true,
115
- 'doctype' => 'omit',
116
- 'output-html' => true,
117
- 'show-body-only' => true,
118
- 'drop-empty-paras' => true,
119
- 'drop-font-tags' => true,
120
- 'drop-proprietary-attributes' => true,
121
- 'hide-comments' => true,
122
- 'logical-emphasis' => true
123
- ]);
124
- $tidy->cleanRepair();
125
-
126
- return (string) $content;
127
- }
128
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/ErrorParser/JsonParserTrait.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
- namespace Aws\Api\ErrorParser;
3
-
4
- use Aws\Api\Parser\PayloadParserTrait;
5
- use Psr\Http\Message\ResponseInterface;
6
-
7
- /**
8
- * Provides basic JSON error parsing functionality.
9
- */
10
- trait JsonParserTrait
11
- {
12
- use PayloadParserTrait;
13
-
14
- private function genericHandler(ResponseInterface $response)
15
- {
16
- $code = (string) $response->getStatusCode();
17
-
18
- return [
19
- 'request_id' => (string) $response->getHeaderLine('x-amzn-requestid'),
20
- 'code' => null,
21
- 'message' => null,
22
- 'type' => $code[0] == '4' ? 'client' : 'server',
23
- 'parsed' => $this->parseJson($response->getBody())
24
- ];
25
- }
26
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/ErrorParser/JsonRpcErrorParser.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- namespace Aws\Api\ErrorParser;
3
-
4
- use Psr\Http\Message\ResponseInterface;
5
-
6
- /**
7
- * Parsers JSON-RPC errors.
8
- */
9
- class JsonRpcErrorParser
10
- {
11
- use JsonParserTrait;
12
-
13
- public function __invoke(ResponseInterface $response)
14
- {
15
- $data = $this->genericHandler($response);
16
- // Make the casing consistent across services.
17
- if ($data['parsed']) {
18
- $data['parsed'] = array_change_key_case($data['parsed']);
19
- }
20
-
21
- if (isset($data['parsed']['__type'])) {
22
- $parts = explode('#', $data['parsed']['__type']);
23
- $data['code'] = isset($parts[1]) ? $parts[1] : $parts[0];
24
- $data['message'] = isset($data['parsed']['message'])
25
- ? $data['parsed']['message']
26
- : null;
27
- }
28
-
29
- return $data;
30
- }
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/ErrorParser/RestJsonErrorParser.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
- namespace Aws\Api\ErrorParser;
3
-
4
- use Psr\Http\Message\ResponseInterface;
5
-
6
- /**
7
- * Parses JSON-REST errors.
8
- */
9
- class RestJsonErrorParser
10
- {
11
- use JsonParserTrait;
12
-
13
- public function __invoke(ResponseInterface $response)
14
- {
15
- $data = $this->genericHandler($response);
16
-
17
- // Merge in error data from the JSON body
18
- if ($json = $data['parsed']) {
19
- $data = array_replace($data, $json);
20
- }
21
-
22
- // Correct error type from services like Amazon Glacier
23
- if (!empty($data['type'])) {
24
- $data['type'] = strtolower($data['type']);
25
- }
26
-
27
- // Retrieve the error code from services like Amazon Elastic Transcoder
28
- if ($code = $response->getHeaderLine('x-amzn-errortype')) {
29
- $colon = strpos($code, ':');
30
- $data['code'] = $colon ? substr($code, 0, $colon) : $code;
31
- }
32
-
33
- return $data;
34
- }
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/ErrorParser/XmlErrorParser.php DELETED
@@ -1,82 +0,0 @@
1
- <?php
2
- namespace Aws\Api\ErrorParser;
3
-
4
- use Aws\Api\Parser\PayloadParserTrait;
5
- use Psr\Http\Message\ResponseInterface;
6
-
7
- /**
8
- * Parses XML errors.
9
- */
10
- class XmlErrorParser
11
- {
12
- use PayloadParserTrait;
13
-
14
- public function __invoke(ResponseInterface $response)
15
- {
16
- $code = (string) $response->getStatusCode();
17
-
18
- $data = [
19
- 'type' => $code[0] == '4' ? 'client' : 'server',
20
- 'request_id' => null,
21
- 'code' => null,
22
- 'message' => null,
23
- 'parsed' => null
24
- ];
25
-
26
- $body = $response->getBody();
27
- if ($body->getSize() > 0) {
28
- $this->parseBody($this->parseXml($body), $data);
29
- } else {
30
- $this->parseHeaders($response, $data);
31
- }
32
-
33
- return $data;
34
- }
35
-
36
- private function parseHeaders(ResponseInterface $response, array &$data)
37
- {
38
- if ($response->getStatusCode() == '404') {
39
- $data['code'] = 'NotFound';
40
- }
41
-
42
- $data['message'] = $response->getStatusCode() . ' '
43
- . $response->getReasonPhrase();
44
-
45
- if ($requestId = $response->getHeaderLine('x-amz-request-id')) {
46
- $data['request_id'] = $requestId;
47
- $data['message'] .= " (Request-ID: $requestId)";
48
- }
49
- }
50
-
51
- private function parseBody(\SimpleXMLElement $body, array &$data)
52
- {
53
- $data['parsed'] = $body;
54
-
55
- $namespaces = $body->getDocNamespaces();
56
- if (!isset($namespaces[''])) {
57
- $prefix = '';
58
- } else {
59
- // Account for the default namespace being defined and PHP not
60
- // being able to handle it :(.
61
- $body->registerXPathNamespace('ns', $namespaces['']);
62
- $prefix = 'ns:';
63
- }
64
-
65
- if ($tempXml = $body->xpath("//{$prefix}Code[1]")) {
66
- $data['code'] = (string) $tempXml[0];
67
- }
68
-
69
- if ($tempXml = $body->xpath("//{$prefix}Message[1]")) {
70
- $data['message'] = (string) $tempXml[0];
71
- }
72
-
73
- $tempXml = $body->xpath("//{$prefix}RequestId[1]");
74
- if (empty($tempXml)) {
75
- $tempXml = $body->xpath("//{$prefix}RequestID[1]");
76
- }
77
-
78
- if (isset($tempXml[0])) {
79
- $data['request_id'] = (string) $tempXml[0];
80
- }
81
- }
82
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/ListShape.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
- namespace Aws\Api;
3
-
4
- /**
5
- * Represents a list shape.
6
- */
7
- class ListShape extends Shape
8
- {
9
- private $member;
10
-
11
- public function __construct(array $definition, ShapeMap $shapeMap)
12
- {
13
- $definition['type'] = 'list';
14
- parent::__construct($definition, $shapeMap);
15
- }
16
-
17
- /**
18
- * @return Shape
19
- * @throws \RuntimeException if no member is specified
20
- */
21
- public function getMember()
22
- {
23
- if (!$this->member) {
24
- if (!isset($this->definition['member'])) {
25
- throw new \RuntimeException('No member attribute specified');
26
- }
27
- $this->member = Shape::create(
28
- $this->definition['member'],
29
- $this->shapeMap
30
- );
31
- }
32
-
33
- return $this->member;
34
- }
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/MapShape.php DELETED
@@ -1,54 +0,0 @@
1
- <?php
2
- namespace Aws\Api;
3
-
4
- /**
5
- * Represents a map shape.
6
- */
7
- class MapShape extends Shape
8
- {
9
- /** @var Shape */
10
- private $value;
11
-
12
- /** @var Shape */
13
- private $key;
14
-
15
- public function __construct(array $definition, ShapeMap $shapeMap)
16
- {
17
- $definition['type'] = 'map';
18
- parent::__construct($definition, $shapeMap);
19
- }
20
-
21
- /**
22
- * @return Shape
23
- * @throws \RuntimeException if no value is specified
24
- */
25
- public function getValue()
26
- {
27
- if (!$this->value) {
28
- if (!isset($this->definition['value'])) {
29
- throw new \RuntimeException('No value specified');
30
- }
31
-
32
- $this->value = Shape::create(
33
- $this->definition['value'],
34
- $this->shapeMap
35
- );
36
- }
37
-
38
- return $this->value;
39
- }
40
-
41
- /**
42
- * @return Shape
43
- */
44
- public function getKey()
45
- {
46
- if (!$this->key) {
47
- $this->key = isset($this->definition['key'])
48
- ? Shape::create($this->definition['key'], $this->shapeMap)
49
- : new Shape(['type' => 'string'], $this->shapeMap);
50
- }
51
-
52
- return $this->key;
53
- }
54
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Operation.php DELETED
@@ -1,97 +0,0 @@
1
- <?php
2
- namespace Aws\Api;
3
-
4
- /**
5
- * Represents an API operation.
6
- */
7
- class Operation extends AbstractModel
8
- {
9
- private $input;
10
- private $output;
11
- private $errors;
12
-
13
- public function __construct(array $definition, ShapeMap $shapeMap)
14
- {
15
- $definition['type'] = 'structure';
16
-
17
- if (!isset($definition['http']['method'])) {
18
- $definition['http']['method'] = 'POST';
19
- }
20
-
21
- if (!isset($definition['http']['requestUri'])) {
22
- $definition['http']['requestUri'] = '/';
23
- }
24
-
25
- parent::__construct($definition, $shapeMap);
26
- }
27
-
28
- /**
29
- * Returns an associative array of the HTTP attribute of the operation:
30
- *
31
- * - method: HTTP method of the operation
32
- * - requestUri: URI of the request (can include URI template placeholders)
33
- *
34
- * @return array
35
- */
36
- public function getHttp()
37
- {
38
- return $this->definition['http'];
39
- }
40
-
41
- /**
42
- * Get the input shape of the operation.
43
- *
44
- * @return StructureShape
45
- */
46
- public function getInput()
47
- {
48
- if (!$this->input) {
49
- if ($input = $this['input']) {
50
- $this->input = $this->shapeFor($input);
51
- } else {
52
- $this->input = new StructureShape([], $this->shapeMap);
53
- }
54
- }
55
-
56
- return $this->input;
57
- }
58
-
59
- /**
60
- * Get the output shape of the operation.
61
- *
62
- * @return StructureShape
63
- */
64
- public function getOutput()
65
- {
66
- if (!$this->output) {
67
- if ($output = $this['output']) {
68
- $this->output = $this->shapeFor($output);
69
- } else {
70
- $this->output = new StructureShape([], $this->shapeMap);
71
- }
72
- }
73
-
74
- return $this->output;
75
- }
76
-
77
- /**
78
- * Get an array of operation error shapes.
79
- *
80
- * @return Shape[]
81
- */
82
- public function getErrors()
83
- {
84
- if ($this->errors === null) {
85
- if ($errors = $this['errors']) {
86
- foreach ($errors as $key => $error) {
87
- $errors[$key] = $this->shapeFor($error);
88
- }
89
- $this->errors = $errors;
90
- } else {
91
- $this->errors = [];
92
- }
93
- }
94
-
95
- return $this->errors;
96
- }
97
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Parser/AbstractParser.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
- namespace Aws\Api\Parser;
3
-
4
- use Aws\Api\Service;
5
- use Aws\Api\StructureShape;
6
- use Aws\CommandInterface;
7
- use Aws\ResultInterface;
8
- use Psr\Http\Message\ResponseInterface;
9
- use Psr\Http\Message\StreamInterface;
10
-
11
- /**
12
- * @internal
13
- */
14
- abstract class AbstractParser
15
- {
16
- /** @var \Aws\Api\Service Representation of the service API*/
17
- protected $api;
18
-
19
- /** @var callable */
20
- protected $parser;
21
-
22
- /**
23
- * @param Service $api Service description.
24
- */
25
- public function __construct(Service $api)
26
- {
27
- $this->api = $api;
28
- }
29
-
30
- /**
31
- * @param CommandInterface $command Command that was executed.
32
- * @param ResponseInterface $response Response that was received.
33
- *
34
- * @return ResultInterface
35
- */
36
- abstract public function __invoke(
37
- CommandInterface $command,
38
- ResponseInterface $response
39
- );
40
-
41
- abstract public function parseMemberFromStream(
42
- StreamInterface $stream,
43
- StructureShape $member
44
- );
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Parser/AbstractRestParser.php DELETED
@@ -1,173 +0,0 @@
1
- <?php
2
- namespace Aws\Api\Parser;
3
-
4
- use Aws\Api\DateTimeResult;
5
- use Aws\Api\Shape;
6
- use Aws\Api\StructureShape;
7
- use Aws\Result;
8
- use Aws\CommandInterface;
9
- use Psr\Http\Message\ResponseInterface;
10
-
11
- /**
12
- * @internal
13
- */
14
- abstract class AbstractRestParser extends AbstractParser
15
- {
16
- use PayloadParserTrait;
17
- /**
18
- * Parses a payload from a response.
19
- *
20
- * @param ResponseInterface $response Response to parse.
21
- * @param StructureShape $member Member to parse
22
- * @param array $result Result value
23
- *
24
- * @return mixed
25
- */
26
- abstract protected function payload(
27
- ResponseInterface $response,
28
- StructureShape $member,
29
- array &$result
30
- );
31
-
32
- public function __invoke(
33
- CommandInterface $command,
34
- ResponseInterface $response
35
- ) {
36
- $output = $this->api->getOperation($command->getName())->getOutput();
37
- $result = [];
38
-
39
- if ($payload = $output['payload']) {
40
- $this->extractPayload($payload, $output, $response, $result);
41
- }
42
-
43
- foreach ($output->getMembers() as $name => $member) {
44
- switch ($member['location']) {
45
- case 'header':
46
- $this->extractHeader($name, $member, $response, $result);
47
- break;
48
- case 'headers':
49
- $this->extractHeaders($name, $member, $response, $result);
50
- break;
51
- case 'statusCode':
52
- $this->extractStatus($name, $response, $result);
53
- break;
54
- }
55
- }
56
-
57
- if (!$payload
58
- && $response->getBody()->getSize() > 0
59
- && count($output->getMembers()) > 0
60
- ) {
61
- // if no payload was found, then parse the contents of the body
62
- $this->payload($response, $output, $result);
63
- }
64
-
65
- return new Result($result);
66
- }
67
-
68
- private function extractPayload(
69
- $payload,
70
- StructureShape $output,
71
- ResponseInterface $response,
72
- array &$result
73
- ) {
74
- $member = $output->getMember($payload);
75
-
76
- if (!empty($member['eventstream'])) {
77
- $result[$payload] = new EventParsingIterator(
78
- $response->getBody(),
79
- $member,
80
- $this
81
- );
82
- } else if ($member instanceof StructureShape) {
83
- // Structure members parse top-level data into a specific key.
84
- $result[$payload] = [];
85
- $this->payload($response, $member, $result[$payload]);
86
- } else {
87
- // Streaming data is just the stream from the response body.
88
- $result[$payload] = $response->getBody();
89
- }
90
- }
91
-
92
- /**
93
- * Extract a single header from the response into the result.
94
- */
95
- private function extractHeader(
96
- $name,
97
- Shape $shape,
98
- ResponseInterface $response,
99
- &$result
100
- ) {
101
- $value = $response->getHeaderLine($shape['locationName'] ?: $name);
102
-
103
- switch ($shape->getType()) {
104
- case 'float':
105
- case 'double':
106
- $value = (float) $value;
107
- break;
108
- case 'long':
109
- $value = (int) $value;
110
- break;
111
- case 'boolean':
112
- $value = filter_var($value, FILTER_VALIDATE_BOOLEAN);
113
- break;
114
- case 'blob':
115
- $value = base64_decode($value);
116
- break;
117
- case 'timestamp':
118
- try {
119
- if (!empty($shape['timestampFormat'])
120
- && $shape['timestampFormat'] === 'unixTimestamp') {
121
- $value = DateTimeResult::fromEpoch($value);
122
- }
123
- $value = new DateTimeResult($value);
124
- break;
125
- } catch (\Exception $e) {
126
- // If the value cannot be parsed, then do not add it to the
127
- // output structure.
128
- return;
129
- }
130
- case 'string':
131
- if ($shape['jsonvalue']) {
132
- $value = $this->parseJson(base64_decode($value));
133
- }
134
- break;
135
- }
136
-
137
- $result[$name] = $value;
138
- }
139
-
140
- /**
141
- * Extract a map of headers with an optional prefix from the response.
142
- */
143
- private function extractHeaders(
144
- $name,
145
- Shape $shape,
146
- ResponseInterface $response,
147
- &$result
148
- ) {
149
- // Check if the headers are prefixed by a location name
150
- $result[$name] = [];
151
- $prefix = $shape['locationName'];
152
- $prefixLen = strlen($prefix);
153
-
154
- foreach ($response->getHeaders() as $k => $values) {
155
- if (!$prefixLen) {
156
- $result[$name][$k] = implode(', ', $values);
157
- } elseif (stripos($k, $prefix) === 0) {
158
- $result[$name][substr($k, $prefixLen)] = implode(', ', $values);
159
- }
160
- }
161
- }
162
-
163
- /**
164
- * Places the status code of the response into the result array.
165
- */
166
- private function extractStatus(
167
- $name,
168
- ResponseInterface $response,
169
- array &$result
170
- ) {
171
- $result[$name] = (int) $response->getStatusCode();
172
- }
173
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Parser/Crc32ValidatingParser.php DELETED
@@ -1,53 +0,0 @@
1
- <?php
2
- namespace Aws\Api\Parser;
3
-
4
- use Aws\Api\StructureShape;
5
- use Aws\CommandInterface;
6
- use Aws\Exception\AwsException;
7
- use Psr\Http\Message\ResponseInterface;
8
- use Psr\Http\Message\StreamInterface;
9
- use GuzzleHttp\Psr7;
10
-
11
- /**
12
- * @internal Decorates a parser and validates the x-amz-crc32 header.
13
- */
14
- class Crc32ValidatingParser extends AbstractParser
15
- {
16
- /**
17
- * @param callable $parser Parser to wrap.
18
- */
19
- public function __construct(callable $parser)
20
- {
21
- $this->parser = $parser;
22
- }
23
-
24
- public function __invoke(
25
- CommandInterface $command,
26
- ResponseInterface $response
27
- ) {
28
- if ($expected = $response->getHeaderLine('x-amz-crc32')) {
29
- $hash = hexdec(Psr7\hash($response->getBody(), 'crc32b'));
30
- if ($expected != $hash) {
31
- throw new AwsException(
32
- "crc32 mismatch. Expected {$expected}, found {$hash}.",
33
- $command,
34
- [
35
- 'code' => 'ClientChecksumMismatch',
36
- 'connection_error' => true,
37
- 'response' => $response
38
- ]
39
- );
40
- }
41
- }
42
-
43
- $fn = $this->parser;
44
- return $fn($command, $response);
45
- }
46
-
47
- public function parseMemberFromStream(
48
- StreamInterface $stream,
49
- StructureShape $member
50
- ) {
51
- return $this->parser->parseMemberFromStream($stream, $member);
52
- }
53
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Parser/DecodingEventStreamIterator.php DELETED
@@ -1,335 +0,0 @@
1
- <?php
2
-
3
- namespace Aws\Api\Parser;
4
-
5
- use \Iterator;
6
- use Aws\Api\DateTimeResult;
7
- use GuzzleHttp\Psr7;
8
- use Psr\Http\Message\StreamInterface;
9
- use Aws\Api\Parser\Exception\ParserException;
10
-
11
- /**
12
- * @internal Implements a decoder for a binary encoded event stream that will
13
- * decode, validate, and provide individual events from the stream.
14
- */
15
- class DecodingEventStreamIterator implements Iterator
16
- {
17
- const HEADERS = 'headers';
18
- const PAYLOAD = 'payload';
19
-
20
- const LENGTH_TOTAL = 'total_length';
21
- const LENGTH_HEADERS = 'headers_length';
22
-
23
- const CRC_PRELUDE = 'prelude_crc';
24
-
25
- const BYTES_PRELUDE = 12;
26
- const BYTES_TRAILING = 4;
27
-
28
- private static $preludeFormat = [
29
- self::LENGTH_TOTAL => 'decodeUint32',
30
- self::LENGTH_HEADERS => 'decodeUint32',
31
- self::CRC_PRELUDE => 'decodeUint32',
32
- ];
33
-
34
- private static $lengthFormatMap = [
35
- 1 => 'decodeUint8',
36
- 2 => 'decodeUint16',
37
- 4 => 'decodeUint32',
38
- 8 => 'decodeUint64',
39
- ];
40
-
41
- private static $headerTypeMap = [
42
- 0 => 'decodeBooleanTrue',
43
- 1 => 'decodeBooleanFalse',
44
- 2 => 'decodeInt8',
45
- 3 => 'decodeInt16',
46
- 4 => 'decodeInt32',
47
- 5 => 'decodeInt64',
48
- 6 => 'decodeBytes',
49
- 7 => 'decodeString',
50
- 8 => 'decodeTimestamp',
51
- 9 => 'decodeUuid',
52
- ];
53
-
54
- /** @var StreamInterface Stream of eventstream shape to parse. */
55
- private $stream;
56
-
57
- /** @var array Currently parsed event. */
58
- private $currentEvent;
59
-
60
- /** @var int Current in-order event key. */
61
- private $key;
62
-
63
- /** @var resource|HashContext CRC32 hash context for event validation */
64
- private $hashContext;
65
-
66
- /** @var int $currentPosition */
67
- private $currentPosition;
68
-
69
- /**
70
- * DecodingEventStreamIterator constructor.
71
- *
72
- * @param StreamInterface $stream
73
- */
74
- public function __construct(StreamInterface $stream)
75
- {
76
- $this->stream = $stream;
77
- $this->rewind();
78
- }
79
-
80
- private function parseHeaders($headerBytes)
81
- {
82
- $headers = [];
83
- $bytesRead = 0;
84
-
85
- while ($bytesRead < $headerBytes) {
86
- list($key, $numBytes) = $this->decodeString(1);
87
- $bytesRead += $numBytes;
88
-
89
- list($type, $numBytes) = $this->decodeUint8();
90
- $bytesRead += $numBytes;
91
-
92
- $f = self::$headerTypeMap[$type];
93
- list($value, $numBytes) = $this->{$f}();
94
- $bytesRead += $numBytes;
95
-
96
- if (isset($headers[$key])) {
97
- throw new ParserException('Duplicate key in event headers.');
98
- }
99
- $headers[$key] = $value;
100
- }
101
-
102
- return [$headers, $bytesRead];
103
- }
104
-
105
- private function parsePrelude()
106
- {
107
- $prelude = [];
108
- $bytesRead = 0;
109
-
110
- $calculatedCrc = null;
111
- foreach (self::$preludeFormat as $key => $decodeFunction) {
112
- if ($key === self::CRC_PRELUDE) {
113
- $hashCopy = hash_copy($this->hashContext);
114
- $calculatedCrc = hash_final($this->hashContext, true);
115
- $this->hashContext = $hashCopy;
116
- }
117
- list($value, $numBytes) = $this->{$decodeFunction}();
118
- $bytesRead += $numBytes;
119
-
120
- $prelude[$key] = $value;
121
- }
122
-
123
- if (unpack('N', $calculatedCrc)[1] !== $prelude[self::CRC_PRELUDE]) {
124
- throw new ParserException('Prelude checksum mismatch.');
125
- }
126
-
127
- return [$prelude, $bytesRead];
128
- }
129
-
130
- private function parseEvent()
131
- {
132
- $event = [];
133
-
134
- if ($this->stream->tell() < $this->stream->getSize()) {
135
- $this->hashContext = hash_init('crc32b');
136
-
137
- $bytesLeft = $this->stream->getSize() - $this->stream->tell();
138
- list($prelude, $numBytes) = $this->parsePrelude();
139
- if ($prelude[self::LENGTH_TOTAL] > $bytesLeft) {
140
- throw new ParserException('Message length too long.');
141
- }
142
- $bytesLeft -= $numBytes;
143
-
144
- if ($prelude[self::LENGTH_HEADERS] > $bytesLeft) {
145
- throw new ParserException('Headers length too long.');
146
- }
147
-
148
- list(
149
- $event[self::HEADERS],
150
- $numBytes
151
- ) = $this->parseHeaders($prelude[self::LENGTH_HEADERS]);
152
-
153
- $event[self::PAYLOAD] = Psr7\stream_for(
154
- $this->readAndHashBytes(
155
- $prelude[self::LENGTH_TOTAL] - self::BYTES_PRELUDE
156
- - $numBytes - self::BYTES_TRAILING
157
- )
158
- );
159
-
160
- $calculatedCrc = hash_final($this->hashContext, true);
161
- $messageCrc = $this->stream->read(4);
162
- if ($calculatedCrc !== $messageCrc) {
163
- throw new ParserException('Message checksum mismatch.');
164
- }
165
- }
166
-
167
- return $event;
168
- }
169
-
170
- // Iterator Functionality
171
-
172
- /**
173
- * @return array
174
- */
175
- public function current()
176
- {
177
- return $this->currentEvent;
178
- }
179
-
180
- /**
181
- * @return int
182
- */
183
- public function key()
184
- {
185
- return $this->key;
186
- }
187
-
188
- public function next()
189
- {
190
- $this->currentPosition = $this->stream->tell();
191
- if ($this->valid()) {
192
- $this->key++;
193
- $this->currentEvent = $this->parseEvent();
194
- }
195
- }
196
-
197
- public function rewind()
198
- {
199
- $this->stream->rewind();
200
- $this->key = 0;
201
- $this->currentPosition = 0;
202
- $this->currentEvent = $this->parseEvent();
203
- }
204
-
205
- /**
206
- * @return bool
207
- */
208
- public function valid()
209
- {
210
- return $this->currentPosition < $this->stream->getSize();
211
- }
212
-
213
- // Decoding Utilities
214
-
215
- private function readAndHashBytes($num)
216
- {
217
- $bytes = $this->stream->read($num);
218
- hash_update($this->hashContext, $bytes);
219
- return $bytes;
220
- }
221
-
222
- private function decodeBooleanTrue()
223
- {
224
- return [true, 0];
225
- }
226
-
227
- private function decodeBooleanFalse()
228
- {
229
- return [false, 0];
230
- }
231
-
232
- private function uintToInt($val, $size)
233
- {
234
- $signedCap = pow(2, $size - 1);
235
- if ($val > $signedCap) {
236
- $val -= (2 * $signedCap);
237
- }
238
- return $val;
239
- }
240
-
241
- private function decodeInt8()
242
- {
243
- $val = (int)unpack('C', $this->readAndHashBytes(1))[1];
244
- return [$this->uintToInt($val, 8), 1];
245
- }
246
-
247
- private function decodeUint8()
248
- {
249
- return [unpack('C', $this->readAndHashBytes(1))[1], 1];
250
- }
251
-
252
- private function decodeInt16()
253
- {
254
- $val = (int)unpack('n', $this->readAndHashBytes(2))[1];
255
- return [$this->uintToInt($val, 16), 2];
256
- }
257
-
258
- private function decodeUint16()
259
- {
260
- return [unpack('n', $this->readAndHashBytes(2))[1], 2];
261
- }
262
-
263
- private function decodeInt32()
264
- {
265
- $val = (int)unpack('N', $this->readAndHashBytes(4))[1];
266
- return [$this->uintToInt($val, 32), 4];
267
- }
268
-
269
- private function decodeUint32()
270
- {
271
- return [unpack('N', $this->readAndHashBytes(4))[1], 4];
272
- }
273
-
274
- private function decodeInt64()
275
- {
276
- $val = $this->unpackInt64($this->readAndHashBytes(8))[1];
277
- return [$this->uintToInt($val, 64), 8];
278
- }
279
-
280
- private function decodeUint64()
281
- {
282
- return [$this->unpackInt64($this->readAndHashBytes(8))[1], 8];
283
- }
284
-
285
- private function unpackInt64($bytes)
286
- {
287
- if (version_compare(PHP_VERSION, '5.6.3', '<')) {
288
- $d = unpack('N2', $bytes);
289
- return [1 => $d[1] << 32 | $d[2]];
290
- }
291
- return unpack('J', $bytes);
292
- }
293
-
294
- private function decodeBytes($lengthBytes=2)
295
- {
296
- if (!isset(self::$lengthFormatMap[$lengthBytes])) {
297
- throw new ParserException('Undefined variable length format.');
298
- }
299
- $f = self::$lengthFormatMap[$lengthBytes];
300
- list($len, $bytes) = $this->{$f}();
301
- return [$this->readAndHashBytes($len), $len + $bytes];
302
- }
303
-
304
- private function decodeString($lengthBytes=2)
305
- {
306
- if (!isset(self::$lengthFormatMap[$lengthBytes])) {
307
- throw new ParserException('Undefined variable length format.');
308
- }
309
- $f = self::$lengthFormatMap[$lengthBytes];
310
- list($len, $bytes) = $this->{$f}();
311
- return [$this->readAndHashBytes($len), $len + $bytes];
312
- }
313
-
314
- private function decodeTimestamp()
315
- {
316
- list($val, $bytes) = $this->decodeInt64();
317
- return [
318
- DateTimeResult::createFromFormat('U.u', $val / 1000),
319
- $bytes
320
- ];
321
- }
322
-
323
- private function decodeUuid()
324
- {
325
- $val = unpack('H32', $this->readAndHashBytes(16))[1];
326
- return [
327
- substr($val, 0, 8) . '-'
328
- . substr($val, 8, 4) . '-'
329
- . substr($val, 12, 4) . '-'
330
- . substr($val, 16, 4) . '-'
331
- . substr($val, 20, 12),
332
- 16
333
- ];
334
- }
335
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Parser/EventParsingIterator.php DELETED
@@ -1,106 +0,0 @@
1
- <?php
2
-
3
- namespace Aws\Api\Parser;
4
-
5
- use \Iterator;
6
- use Aws\Exception\EventStreamDataException;
7
- use Aws\Api\Parser\Exception\ParserException;
8
- use Aws\Api\StructureShape;
9
- use Psr\Http\Message\StreamInterface;
10
-
11
- /**
12
- * @internal Implements a decoder for a binary encoded event stream that will
13
- * decode, validate, and provide individual events from the stream.
14
- */
15
- class EventParsingIterator implements Iterator
16
- {
17
- /** @var StreamInterface */
18
- private $decodingIterator;
19
-
20
- /** @var StructureShape */
21
- private $shape;
22
-
23
- /** @var AbstractParser */
24
- private $parser;
25
-
26
- public function __construct(
27
- StreamInterface $stream,
28
- StructureShape $shape,
29
- AbstractParser $parser
30
- ) {
31
- $this->decodingIterator = new DecodingEventStreamIterator($stream);
32
- $this->shape = $shape;
33
- $this->parser = $parser;
34
- }
35
-
36
- public function current()
37
- {
38
- return $this->parseEvent($this->decodingIterator->current());
39
- }
40
-
41
- public function key()
42
- {
43
- return $this->decodingIterator->key();
44
- }
45
-
46
- public function next()
47
- {
48
- $this->decodingIterator->next();
49
- }
50
-
51
- public function rewind()
52
- {
53
- $this->decodingIterator->rewind();
54
- }
55
-
56
- public function valid()
57
- {
58
- return $this->decodingIterator->valid();
59
- }
60
-
61
- private function parseEvent(array $event)
62
- {
63
- if (!empty($event['headers'][':message-type'])) {
64
- if ($event['headers'][':message-type'] === 'error') {
65
- return $this->parseError($event);
66
- }
67
- if ($event['headers'][':message-type'] !== 'event') {
68
- throw new ParserException('Failed to parse unknown message type.');
69
- }
70
- }
71
-
72
- if (empty($event['headers'][':event-type'])) {
73
- throw new ParserException('Failed to parse without event type.');
74
- }
75
- $eventShape = $this->shape->getMember($event['headers'][':event-type']);
76
-
77
- $parsedEvent = [];
78
- foreach ($eventShape['members'] as $shape => $details) {
79
- if (!empty($details['eventpayload'])) {
80
- $payloadShape = $eventShape->getMember($shape);
81
- if ($payloadShape['type'] === 'blob') {
82
- $parsedEvent[$shape] = $event['payload'];
83
- } else {
84
- $parsedEvent[$shape] = $this->parser->parseMemberFromStream(
85
- $event['payload'],
86
- $payloadShape
87
- );
88
- }
89
- } else {
90
- $parsedEvent[$shape] = $event['headers'][$shape];
91
- }
92
- }
93
-
94
- return [
95
- $event['headers'][':event-type'] => $parsedEvent
96
- ];
97
- }
98
-
99
- private function parseError(array $event)
100
- {
101
- throw new EventStreamDataException(
102
- $event['headers'][':error-code'],
103
- $event['headers'][':error-message']
104
- );
105
- }
106
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Parser/Exception/ParserException.php DELETED
@@ -1,4 +0,0 @@
1
- <?php
2
- namespace Aws\Api\Parser\Exception;
3
-
4
- class ParserException extends \RuntimeException {}
 
 
 
 
includes/aws/Aws/Api/Parser/JsonParser.php DELETED
@@ -1,62 +0,0 @@
1
- <?php
2
- namespace Aws\Api\Parser;
3
-
4
- use Aws\Api\DateTimeResult;
5
- use Aws\Api\Shape;
6
-
7
- /**
8
- * @internal Implements standard JSON parsing.
9
- */
10
- class JsonParser
11
- {
12
- public function parse(Shape $shape, $value)
13
- {
14
- if ($value === null) {
15
- return $value;
16
- }
17
-
18
- switch ($shape['type']) {
19
- case 'structure':
20
- $target = [];
21
- foreach ($shape->getMembers() as $name => $member) {
22
- $locationName = $member['locationName'] ?: $name;
23
- if (isset($value[$locationName])) {
24
- $target[$name] = $this->parse($member, $value[$locationName]);
25
- }
26
- }
27
- return $target;
28
-
29
- case 'list':
30
- $member = $shape->getMember();
31
- $target = [];
32
- foreach ($value as $v) {
33
- $target[] = $this->parse($member, $v);
34
- }
35
- return $target;
36
-
37
- case 'map':
38
- $values = $shape->getValue();
39
- $target = [];
40
- foreach ($value as $k => $v) {
41
- $target[$k] = $this->parse($values, $v);
42
- }
43
- return $target;
44
-
45
- case 'timestamp':
46
- if (!empty($shape['timestampFormat'])
47
- && $shape['timestampFormat'] !== 'unixTimestamp') {
48
- return new DateTimeResult($value);
49
- }
50
- // The Unix epoch (or Unix time or POSIX time or Unix
51
- // timestamp) is the number of seconds that have elapsed since
52
- // January 1, 1970 (midnight UTC/GMT).
53
- return DateTimeResult::fromEpoch($value);
54
-
55
- case 'blob':
56
- return base64_decode($value);
57
-
58
- default:
59
- return $value;
60
- }
61
- }
62
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Parser/JsonRpcParser.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
- namespace Aws\Api\Parser;
3
-
4
- use Aws\Api\StructureShape;
5
- use Aws\Api\Service;
6
- use Aws\Result;
7
- use Aws\CommandInterface;
8
- use Psr\Http\Message\ResponseInterface;
9
- use Psr\Http\Message\StreamInterface;
10
-
11
- /**
12
- * @internal Implements JSON-RPC parsing (e.g., DynamoDB)
13
- */
14
- class JsonRpcParser extends AbstractParser
15
- {
16
- use PayloadParserTrait;
17
-
18
- /**
19
- * @param Service $api Service description
20
- * @param JsonParser $parser JSON body builder
21
- */
22
- public function __construct(Service $api, JsonParser $parser = null)
23
- {
24
- parent::__construct($api);
25
- $this->parser = $parser ?: new JsonParser();
26
- }
27
-
28
- public function __invoke(
29
- CommandInterface $command,
30
- ResponseInterface $response
31
- ) {
32
- $operation = $this->api->getOperation($command->getName());
33
- $result = null === $operation['output']
34
- ? null
35
- : $this->parseMemberFromStream(
36
- $response->getBody(),
37
- $operation->getOutput()
38
- );
39
-
40
- return new Result($result ?: []);
41
- }
42
-
43
- public function parseMemberFromStream(
44
- StreamInterface $stream,
45
- StructureShape $member
46
- ) {
47
- return $this->parser->parse($member, $this->parseJson($stream));
48
- }
49
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Parser/PayloadParserTrait.php DELETED
@@ -1,51 +0,0 @@
1
- <?php
2
- namespace Aws\Api\Parser;
3
-
4
- use Aws\Api\Parser\Exception\ParserException;
5
-
6
- trait PayloadParserTrait
7
- {
8
- /**
9
- * @param string $json
10
- *
11
- * @throws ParserException
12
- *
13
- * @return array
14
- */
15
- private function parseJson($json)
16
- {
17
- $jsonPayload = json_decode($json, true);
18
-
19
- if (JSON_ERROR_NONE !== json_last_error()) {
20
- throw new ParserException('Error parsing JSON: '
21
- . json_last_error_msg());
22
- }
23
-
24
- return $jsonPayload;
25
- }
26
-
27
- /**
28
- * @param string $xml
29
- *
30
- * @throws ParserException
31
- *
32
- * @return \SimpleXMLElement
33
- */
34
- private function parseXml($xml)
35
- {
36
- $priorSetting = libxml_use_internal_errors(true);
37
- try {
38
- libxml_clear_errors();
39
- $xmlPayload = new \SimpleXMLElement($xml);
40
- if ($error = libxml_get_last_error()) {
41
- throw new \RuntimeException($error->message);
42
- }
43
- } catch (\Exception $e) {
44
- throw new ParserException("Error parsing XML: {$e->getMessage()}", 0, $e);
45
- } finally {
46
- libxml_use_internal_errors($priorSetting);
47
- }
48
-
49
- return $xmlPayload;
50
- }
51
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Parser/QueryParser.php DELETED
@@ -1,59 +0,0 @@
1
- <?php
2
- namespace Aws\Api\Parser;
3
-
4
- use Aws\Api\Service;
5
- use Aws\Api\StructureShape;
6
- use Aws\Result;
7
- use Aws\CommandInterface;
8
- use Psr\Http\Message\ResponseInterface;
9
- use Psr\Http\Message\StreamInterface;
10
-
11
- /**
12
- * @internal Parses query (XML) responses (e.g., EC2, SQS, and many others)
13
- */
14
- class QueryParser extends AbstractParser
15
- {
16
- use PayloadParserTrait;
17
-
18
- /** @var bool */
19
- private $honorResultWrapper;
20
-
21
- /**
22
- * @param Service $api Service description
23
- * @param XmlParser $xmlParser Optional XML parser
24
- * @param bool $honorResultWrapper Set to false to disable the peeling
25
- * back of result wrappers from the
26
- * output structure.
27
- */
28
- public function __construct(
29
- Service $api,
30
- XmlParser $xmlParser = null,
31
- $honorResultWrapper = true
32
- ) {
33
- parent::__construct($api);
34
- $this->parser = $xmlParser ?: new XmlParser();
35
- $this->honorResultWrapper = $honorResultWrapper;
36
- }
37
-
38
- public function __invoke(
39
- CommandInterface $command,
40
- ResponseInterface $response
41
- ) {
42
- $output = $this->api->getOperation($command->getName())->getOutput();
43
- $xml = $this->parseXml($response->getBody());
44
-
45
- if ($this->honorResultWrapper && $output['resultWrapper']) {
46
- $xml = $xml->{$output['resultWrapper']};
47
- }
48
-
49
- return new Result($this->parser->parse($output, $xml));
50
- }
51
-
52
- public function parseMemberFromStream(
53
- StreamInterface $stream,
54
- StructureShape $member
55
- ) {
56
- $xml = $this->parseXml($stream);
57
- return $this->parser->parse($member, $xml);
58
- }
59
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Parser/RestJsonParser.php DELETED
@@ -1,48 +0,0 @@
1
- <?php
2
- namespace Aws\Api\Parser;
3
-
4
- use Aws\Api\Service;
5
- use Aws\Api\StructureShape;
6
- use Psr\Http\Message\ResponseInterface;
7
- use Psr\Http\Message\StreamInterface;
8
-
9
- /**
10
- * @internal Implements REST-JSON parsing (e.g., Glacier, Elastic Transcoder)
11
- */
12
- class RestJsonParser extends AbstractRestParser
13
- {
14
- use PayloadParserTrait;
15
-
16
- /**
17
- * @param Service $api Service description
18
- * @param JsonParser $parser JSON body builder
19
- */
20
- public function __construct(Service $api, JsonParser $parser = null)
21
- {
22
- parent::__construct($api);
23
- $this->parser = $parser ?: new JsonParser();
24
- }
25
-
26
- protected function payload(
27
- ResponseInterface $response,
28
- StructureShape $member,
29
- array &$result
30
- ) {
31
- $jsonBody = $this->parseJson($response->getBody());
32
-
33
- if ($jsonBody) {
34
- $result += $this->parser->parse($member, $jsonBody);
35
- }
36
- }
37
-
38
- public function parseMemberFromStream(
39
- StreamInterface $stream,
40
- StructureShape $member
41
- ) {
42
- $jsonBody = $this->parseJson($stream);
43
- if ($jsonBody) {
44
- return $this->parser->parse($member, $jsonBody);
45
- }
46
- return [];
47
- }
48
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Parser/RestXmlParser.php DELETED
@@ -1,41 +0,0 @@
1
- <?php
2
- namespace Aws\Api\Parser;
3
-
4
- use Aws\Api\StructureShape;
5
- use Aws\Api\Service;
6
- use Psr\Http\Message\ResponseInterface;
7
- use Psr\Http\Message\StreamInterface;
8
-
9
- /**
10
- * @internal Implements REST-XML parsing (e.g., S3, CloudFront, etc...)
11
- */
12
- class RestXmlParser extends AbstractRestParser
13
- {
14
- use PayloadParserTrait;
15
-
16
- /**
17
- * @param Service $api Service description
18
- * @param XmlParser $parser XML body parser
19
- */
20
- public function __construct(Service $api, XmlParser $parser = null)
21
- {
22
- parent::__construct($api);
23
- $this->parser = $parser ?: new XmlParser();
24
- }
25
-
26
- protected function payload(
27
- ResponseInterface $response,
28
- StructureShape $member,
29
- array &$result
30
- ) {
31
- $result += $this->parseMemberFromStream($response->getBody(), $member);
32
- }
33
-
34
- public function parseMemberFromStream(
35
- StreamInterface $stream,
36
- StructureShape $member
37
- ) {
38
- $xml = $this->parseXml($stream);
39
- return $this->parser->parse($member, $xml);
40
- }
41
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Parser/XmlParser.php DELETED
@@ -1,138 +0,0 @@
1
- <?php
2
- namespace Aws\Api\Parser;
3
-
4
- use Aws\Api\DateTimeResult;
5
- use Aws\Api\ListShape;
6
- use Aws\Api\MapShape;
7
- use Aws\Api\Shape;
8
- use Aws\Api\StructureShape;
9
-
10
- /**
11
- * @internal Implements standard XML parsing for REST-XML and Query protocols.
12
- */
13
- class XmlParser
14
- {
15
- public function parse(StructureShape $shape, \SimpleXMLElement $value)
16
- {
17
- return $this->dispatch($shape, $value);
18
- }
19
-
20
- private function dispatch($shape, \SimpleXMLElement $value)
21
- {
22
- static $methods = [
23
- 'structure' => 'parse_structure',
24
- 'list' => 'parse_list',
25
- 'map' => 'parse_map',
26
- 'blob' => 'parse_blob',
27
- 'boolean' => 'parse_boolean',
28
- 'integer' => 'parse_integer',
29
- 'float' => 'parse_float',
30
- 'double' => 'parse_float',
31
- 'timestamp' => 'parse_timestamp',
32
- ];
33
-
34
- $type = $shape['type'];
35
- if (isset($methods[$type])) {
36
- return $this->{$methods[$type]}($shape, $value);
37
- }
38
-
39
- return (string) $value;
40
- }
41
-
42
- private function parse_structure(
43
- StructureShape $shape,
44
- \SimpleXMLElement $value
45
- ) {
46
- $target = [];
47
-
48
- foreach ($shape->getMembers() as $name => $member) {
49
- // Extract the name of the XML node
50
- $node = $this->memberKey($member, $name);
51
- if (isset($value->{$node})) {
52
- $target[$name] = $this->dispatch($member, $value->{$node});
53
- }
54
- }
55
-
56
- return $target;
57
- }
58
-
59
- private function memberKey(Shape $shape, $name)
60
- {
61
- if (null !== $shape['locationName']) {
62
- return $shape['locationName'];
63
- }
64
-
65
- if ($shape instanceof ListShape && $shape['flattened']) {
66
- return $shape->getMember()['locationName'] ?: $name;
67
- }
68
-
69
- return $name;
70
- }
71
-
72
- private function parse_list(ListShape $shape, \SimpleXMLElement $value)
73
- {
74
- $target = [];
75
- $member = $shape->getMember();
76
-
77
- if (!$shape['flattened']) {
78
- $value = $value->{$member['locationName'] ?: 'member'};
79
- }
80
-
81
- foreach ($value as $v) {
82
- $target[] = $this->dispatch($member, $v);
83
- }
84
-
85
- return $target;
86
- }
87
-
88
- private function parse_map(MapShape $shape, \SimpleXMLElement $value)
89
- {
90
- $target = [];
91
-
92
- if (!$shape['flattened']) {
93
- $value = $value->entry;
94
- }
95
-
96
- $mapKey = $shape->getKey();
97
- $mapValue = $shape->getValue();
98
- $keyName = $shape->getKey()['locationName'] ?: 'key';
99
- $valueName = $shape->getValue()['locationName'] ?: 'value';
100
-
101
- foreach ($value as $node) {
102
- $key = $this->dispatch($mapKey, $node->{$keyName});
103
- $value = $this->dispatch($mapValue, $node->{$valueName});
104
- $target[$key] = $value;
105
- }
106
-
107
- return $target;
108
- }
109
-
110
- private function parse_blob(Shape $shape, $value)
111
- {
112
- return base64_decode((string) $value);
113
- }
114
-
115
- private function parse_float(Shape $shape, $value)
116
- {
117
- return (float) (string) $value;
118
- }
119
-
120
- private function parse_integer(Shape $shape, $value)
121
- {
122
- return (int) (string) $value;
123
- }
124
-
125
- private function parse_boolean(Shape $shape, $value)
126
- {
127
- return $value == 'true';
128
- }
129
-
130
- private function parse_timestamp(Shape $shape, $value)
131
- {
132
- if (!empty($shape['timestampFormat'])
133
- && $shape['timestampFormat'] === 'unixTimestamp') {
134
- return DateTimeResult::fromEpoch((string) $value);
135
- }
136
- return new DateTimeResult($value);
137
- }
138
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Serializer/Ec2ParamBuilder.php DELETED
@@ -1,40 +0,0 @@
1
- <?php
2
- namespace Aws\Api\Serializer;
3
-
4
- use Aws\Api\Shape;
5
- use Aws\Api\ListShape;
6
-
7
- /**
8
- * @internal
9
- */
10
- class Ec2ParamBuilder extends QueryParamBuilder
11
- {
12
- protected function queryName(Shape $shape, $default = null)
13
- {
14
- return ($shape['queryName']
15
- ?: ucfirst($shape['locationName']))
16
- ?: $default;
17
- }
18
-
19
- protected function isFlat(Shape $shape)
20
- {
21
- return false;
22
- }
23
-
24
- protected function format_list(
25
- ListShape $shape,
26
- array $value,
27
- $prefix,
28
- &$query
29
- ) {
30
- // Handle empty list serialization
31
- if (!$value) {
32
- $query[$prefix] = false;
33
- } else {
34
- $items = $shape->getMember();
35
- foreach ($value as $k => $v) {
36
- $this->format($items, $v, $prefix . '.' . ($k + 1), $query);
37
- }
38
- }
39
- }
40
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Serializer/JsonBody.php DELETED
@@ -1,93 +0,0 @@
1
- <?php
2
- namespace Aws\Api\Serializer;
3
-
4
- use Aws\Api\Service;
5
- use Aws\Api\Shape;
6
- use Aws\Api\TimestampShape;
7
-
8
- /**
9
- * Formats the JSON body of a JSON-REST or JSON-RPC operation.
10
- * @internal
11
- */
12
- class JsonBody
13
- {
14
- private $api;
15
-
16
- public function __construct(Service $api)
17
- {
18
- $this->api = $api;
19
- }
20
-
21
- /**
22
- * Gets the JSON Content-Type header for a service API
23
- *
24
- * @param Service $service
25
- *
26
- * @return string
27
- */
28
- public static function getContentType(Service $service)
29
- {
30
- return 'application/x-amz-json-'
31
- . number_format($service->getMetadata('jsonVersion'), 1);
32
- }
33
-
34
- /**
35
- * Builds the JSON body based on an array of arguments.
36
- *
37
- * @param Shape $shape Operation being constructed
38
- * @param array $args Associative array of arguments
39
- *
40
- * @return string
41
- */
42
- public function build(Shape $shape, array $args)
43
- {
44
- $result = json_encode($this->format($shape, $args));
45
-
46
- return $result == '[]' ? '{}' : $result;
47
- }
48
-
49
- private function format(Shape $shape, $value)
50
- {
51
- switch ($shape['type']) {
52
- case 'structure':
53
- $data = [];
54
- foreach ($value as $k => $v) {
55
- if ($v !== null && $shape->hasMember($k)) {
56
- $valueShape = $shape->getMember($k);
57
- $data[$valueShape['locationName'] ?: $k]
58
- = $this->format($valueShape, $v);
59
- }
60
- }
61
- return $data;
62
-
63
- case 'list':
64
- $items = $shape->getMember();
65
- foreach ($value as $k => $v) {
66
- $value[$k] = $this->format($items, $v);
67
- }
68
- return $value;
69
-
70
- case 'map':
71
- if (empty($value)) {
72
- return new \stdClass;
73
- }
74
- $values = $shape->getValue();
75
- foreach ($value as $k => $v) {
76
- $value[$k] = $this->format($values, $v);
77
- }
78
- return $value;
79
-
80
- case 'blob':
81
- return base64_encode($value);
82
-
83
- case 'timestamp':
84
- $timestampFormat = !empty($shape['timestampFormat'])
85
- ? $shape['timestampFormat']
86
- : 'unixTimestamp';
87
- return TimestampShape::format($value, $timestampFormat);
88
-
89
- default:
90
- return $value;
91
- }
92
- }
93
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Serializer/JsonRpcSerializer.php DELETED
@@ -1,69 +0,0 @@
1
- <?php
2
- namespace Aws\Api\Serializer;
3
-
4
- use Aws\Api\Service;
5
- use Aws\CommandInterface;
6
- use GuzzleHttp\Psr7\Request;
7
- use Psr\Http\Message\RequestInterface;
8
-
9
- /**
10
- * Prepares a JSON-RPC request for transfer.
11
- * @internal
12
- */
13
- class JsonRpcSerializer
14
- {
15
- /** @var JsonBody */
16
- private $jsonFormatter;
17
-
18
- /** @var string */
19
- private $endpoint;
20
-
21
- /** @var Service */
22
- private $api;
23
-
24
- /** @var string */
25
- private $contentType;
26
-
27
- /**
28
- * @param Service $api Service description
29
- * @param string $endpoint Endpoint to connect to
30
- * @param JsonBody $jsonFormatter Optional JSON formatter to use
31
- */
32
- public function __construct(
33
- Service $api,
34
- $endpoint,
35
- JsonBody $jsonFormatter = null
36
- ) {
37
- $this->endpoint = $endpoint;
38
- $this->api = $api;
39
- $this->jsonFormatter = $jsonFormatter ?: new JsonBody($this->api);
40
- $this->contentType = JsonBody::getContentType($api);
41
- }
42
-
43
- /**
44
- * When invoked with an AWS command, returns a serialization array
45
- * containing "method", "uri", "headers", and "body" key value pairs.
46
- *
47
- * @param CommandInterface $command
48
- *
49
- * @return RequestInterface
50
- */
51
- public function __invoke(CommandInterface $command)
52
- {
53
- $name = $command->getName();
54
- $operation = $this->api->getOperation($name);
55
-
56
- return new Request(
57
- $operation['http']['method'],
58
- $this->endpoint,
59
- [
60
- 'X-Amz-Target' => $this->api->getMetadata('targetPrefix') . '.' . $name,
61
- 'Content-Type' => $this->contentType
62
- ],
63
- $this->jsonFormatter->build(
64
- $operation->getInput(),
65
- $command->toArray()
66
- )
67
- );
68
- }
69
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Serializer/QueryParamBuilder.php DELETED
@@ -1,157 +0,0 @@
1
- <?php
2
- namespace Aws\Api\Serializer;
3
-
4
- use Aws\Api\StructureShape;
5
- use Aws\Api\ListShape;
6
- use Aws\Api\MapShape;
7
- use Aws\Api\Shape;
8
- use Aws\Api\TimestampShape;
9
-
10
- /**
11
- * @internal
12
- */
13
- class QueryParamBuilder
14
- {
15
- private $methods;
16
-
17
- protected function queryName(Shape $shape, $default = null)
18
- {
19
- if (null !== $shape['queryName']) {
20
- return $shape['queryName'];
21
- }
22
-
23
- if (null !== $shape['locationName']) {
24
- return $shape['locationName'];
25
- }
26
-
27
- if ($this->isFlat($shape) && !empty($shape['member']['locationName'])) {
28
- return $shape['member']['locationName'];
29
- }
30
-
31
- return $default;
32
- }
33
-
34
- protected function isFlat(Shape $shape)
35
- {
36
- return $shape['flattened'] === true;
37
- }
38
-
39
- public function __invoke(StructureShape $shape, array $params)
40
- {
41
- if (!$this->methods) {
42
- $this->methods = array_fill_keys(get_class_methods($this), true);
43
- }
44
-
45
- $query = [];
46
- $this->format_structure($shape, $params, '', $query);
47
-
48
- return $query;
49
- }
50
-
51
- protected function format(Shape $shape, $value, $prefix, array &$query)
52
- {
53
- $type = 'format_' . $shape['type'];
54
- if (isset($this->methods[$type])) {
55
- $this->{$type}($shape, $value, $prefix, $query);
56
- } else {
57
- $query[$prefix] = (string) $value;
58
- }
59
- }
60
-
61
- protected function format_structure(
62
- StructureShape $shape,
63
- array $value,
64
- $prefix,
65
- &$query
66
- ) {
67
- if ($prefix) {
68
- $prefix .= '.';
69
- }
70
-
71
- foreach ($value as $k => $v) {
72
- if ($shape->hasMember($k)) {
73
- $member = $shape->getMember($k);
74
- $this->format(
75
- $member,
76
- $v,
77
- $prefix . $this->queryName($member, $k),
78
- $query
79
- );
80
- }
81
- }
82
- }
83
-
84
- protected function format_list(
85
- ListShape $shape,
86
- array $value,
87
- $prefix,
88
- &$query
89
- ) {
90
- // Handle empty list serialization
91
- if (!$value) {
92
- $query[$prefix] = '';
93
- return;
94
- }
95
-
96
- $items = $shape->getMember();
97
-
98
- if (!$this->isFlat($shape)) {
99
- $locationName = $shape->getMember()['locationName'] ?: 'member';
100
- $prefix .= ".$locationName";
101
- } elseif ($name = $this->queryName($items)) {
102
- $parts = explode('.', $prefix);
103
- $parts[count($parts) - 1] = $name;
104
- $prefix = implode('.', $parts);
105
- }
106
-
107
- foreach ($value as $k => $v) {
108
- $this->format($items, $v, $prefix . '.' . ($k + 1), $query);
109
- }
110
- }
111
-
112
- protected function format_map(
113
- MapShape $shape,
114
- array $value,
115
- $prefix,
116
- array &$query
117
- ) {
118
- $vals = $shape->getValue();
119
- $keys = $shape->getKey();
120
-
121
- if (!$this->isFlat($shape)) {
122
- $prefix .= '.entry';
123
- }
124
-
125
- $i = 0;
126
- $keyName = '%s.%d.' . $this->queryName($keys, 'key');
127
- $valueName = '%s.%s.' . $this->queryName($vals, 'value');
128
-
129
- foreach ($value as $k => $v) {
130
- $i++;
131
- $this->format($keys, $k, sprintf($keyName, $prefix, $i), $query);
132
- $this->format($vals, $v, sprintf($valueName, $prefix, $i), $query);
133
- }
134
- }
135
-
136
- protected function format_blob(Shape $shape, $value, $prefix, array &$query)
137
- {
138
- $query[$prefix] = base64_encode($value);
139
- }
140
-
141
- protected function format_timestamp(
142
- TimestampShape $shape,
143
- $value,
144
- $prefix,
145
- array &$query
146
- ) {
147
- $timestampFormat = !empty($shape['timestampFormat'])
148
- ? $shape['timestampFormat']
149
- : 'iso8601';
150
- $query[$prefix] = TimestampShape::format($value, $timestampFormat);
151
- }
152
-
153
- protected function format_boolean(Shape $shape, $value, $prefix, array &$query)
154
- {
155
- $query[$prefix] = ($value) ? 'true' : 'false';
156
- }
157
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Serializer/QuerySerializer.php DELETED
@@ -1,69 +0,0 @@
1
- <?php
2
- namespace Aws\Api\Serializer;
3
-
4
- use Aws\Api\Service;
5
- use Aws\CommandInterface;
6
- use GuzzleHttp\Psr7\Request;
7
- use Psr\Http\Message\RequestInterface;
8
-
9
- /**
10
- * Serializes a query protocol request.
11
- * @internal
12
- */
13
- class QuerySerializer
14
- {
15
- private $endpoint;
16
- private $api;
17
- private $paramBuilder;
18
-
19
- public function __construct(
20
- Service $api,
21
- $endpoint,
22
- callable $paramBuilder = null
23
- ) {
24
- $this->api = $api;
25
- $this->endpoint = $endpoint;
26
- $this->paramBuilder = $paramBuilder ?: new QueryParamBuilder();
27
- }
28
-
29
- /**
30
- * When invoked with an AWS command, returns a serialization array
31
- * containing "method", "uri", "headers", and "body" key value pairs.
32
- *
33
- * @param CommandInterface $command
34
- *
35
- * @return RequestInterface
36
- */
37
- public function __invoke(CommandInterface $command)
38
- {
39
- $operation = $this->api->getOperation($command->getName());
40
-
41
- $body = [
42
- 'Action' => $command->getName(),
43
- 'Version' => $this->api->getMetadata('apiVersion')
44
- ];
45
-
46
- $params = $command->toArray();
47
-
48
- // Only build up the parameters when there are parameters to build
49
- if ($params) {
50
- $body += call_user_func(
51
- $this->paramBuilder,
52
- $operation->getInput(),
53
- $params
54
- );
55
- }
56
-
57
- $body = http_build_query($body, null, '&', PHP_QUERY_RFC3986);
58
-
59
- return new Request(
60
- 'POST',
61
- $this->endpoint,
62
- [
63
- 'Content-Length' => strlen($body),
64
- 'Content-Type' => 'application/x-www-form-urlencoded'
65
- ],
66
- $body
67
- );
68
- }
69
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Serializer/RestJsonSerializer.php DELETED
@@ -1,39 +0,0 @@
1
- <?php
2
- namespace Aws\Api\Serializer;
3
-
4
- use Aws\Api\Service;
5
- use Aws\Api\StructureShape;
6
-
7
- /**
8
- * Serializes requests for the REST-JSON protocol.
9
- * @internal
10
- */
11
- class RestJsonSerializer extends RestSerializer
12
- {
13
- /** @var JsonBody */
14
- private $jsonFormatter;
15
-
16
- /** @var string */
17
- private $contentType;
18
-
19
- /**
20
- * @param Service $api Service API description
21
- * @param string $endpoint Endpoint to connect to
22
- * @param JsonBody $jsonFormatter Optional JSON formatter to use
23
- */
24
- public function __construct(
25
- Service $api,
26
- $endpoint,
27
- JsonBody $jsonFormatter = null
28
- ) {
29
- parent::__construct($api, $endpoint);
30
- $this->contentType = JsonBody::getContentType($api);
31
- $this->jsonFormatter = $jsonFormatter ?: new JsonBody($api);
32
- }
33
-
34
- protected function payload(StructureShape $member, array $value, array &$opts)
35
- {
36
- $opts['headers']['Content-Type'] = $this->contentType;
37
- $opts['body'] = (string) $this->jsonFormatter->build($member, $value);
38
- }
39
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Serializer/RestSerializer.php DELETED
@@ -1,219 +0,0 @@
1
- <?php
2
- namespace Aws\Api\Serializer;
3
-
4
- use Aws\Api\MapShape;
5
- use Aws\Api\Service;
6
- use Aws\Api\Operation;
7
- use Aws\Api\Shape;
8
- use Aws\Api\StructureShape;
9
- use Aws\Api\TimestampShape;
10
- use Aws\CommandInterface;
11
- use GuzzleHttp\Psr7;
12
- use GuzzleHttp\Psr7\Uri;
13
- use GuzzleHttp\Psr7\UriResolver;
14
- use Psr\Http\Message\RequestInterface;
15
-
16
- /**
17
- * Serializes HTTP locations like header, uri, payload, etc...
18
- * @internal
19
- */
20
- abstract class RestSerializer
21
- {
22
- /** @var Service */
23
- private $api;
24
-
25
- /** @var Psr7\Uri */
26
- private $endpoint;
27
-
28
- /**
29
- * @param Service $api Service API description
30
- * @param string $endpoint Endpoint to connect to
31
- */
32
- public function __construct(Service $api, $endpoint)
33
- {
34
- $this->api = $api;
35
- $this->endpoint = Psr7\uri_for($endpoint);
36
- }
37
-
38
- /**
39
- * @param CommandInterface $command Command to serialized
40
- *
41
- * @return RequestInterface
42
- */
43
- public function __invoke(CommandInterface $command)
44
- {
45
- $operation = $this->api->getOperation($command->getName());
46
- $args = $command->toArray();
47
- $opts = $this->serialize($operation, $args);
48
- $uri = $this->buildEndpoint($operation, $args, $opts);
49
-
50
- return new Psr7\Request(
51
- $operation['http']['method'],
52
- $uri,
53
- isset($opts['headers']) ? $opts['headers'] : [],
54
- isset($opts['body']) ? $opts['body'] : null
55
- );
56
- }
57
-
58
- /**
59
- * Modifies a hash of request options for a payload body.
60
- *
61
- * @param StructureShape $member Member to serialize
62
- * @param array $value Value to serialize
63
- * @param array $opts Request options to modify.
64
- */
65
- abstract protected function payload(
66
- StructureShape $member,
67
- array $value,
68
- array &$opts
69
- );
70
-
71
- private function serialize(Operation $operation, array $args)
72
- {
73
- $opts = [];
74
- $input = $operation->getInput();
75
-
76
- // Apply the payload trait if present
77
- if ($payload = $input['payload']) {
78
- $this->applyPayload($input, $payload, $args, $opts);
79
- }
80
-
81
- foreach ($args as $name => $value) {
82
- if ($input->hasMember($name)) {
83
- $member = $input->getMember($name);
84
- $location = $member['location'];
85
- if (!$payload && !$location) {
86
- $bodyMembers[$name] = $value;
87
- } elseif ($location == 'header') {
88
- $this->applyHeader($name, $member, $value, $opts);
89
- } elseif ($location == 'querystring') {
90
- $this->applyQuery($name, $member, $value, $opts);
91
- } elseif ($location == 'headers') {
92
- $this->applyHeaderMap($name, $member, $value, $opts);
93
- }
94
- }
95
- }
96
-
97
- if (isset($bodyMembers)) {
98
- $this->payload($operation->getInput(), $bodyMembers, $opts);
99
- }
100
-
101
- return $opts;
102
- }
103
-
104
- private function applyPayload(StructureShape $input, $name, array $args, array &$opts)
105
- {
106
- if (!isset($args[$name])) {
107
- return;
108
- }
109
-
110
- $m = $input->getMember($name);
111
-
112
- if ($m['streaming'] ||
113
- ($m['type'] == 'string' || $m['type'] == 'blob')
114
- ) {
115
- // Streaming bodies or payloads that are strings are
116
- // always just a stream of data.
117
- $opts['body'] = Psr7\stream_for($args[$name]);
118
- return;
119
- }
120
-
121
- $this->payload($m, $args[$name], $opts);
122
- }
123
-
124
- private function applyHeader($name, Shape $member, $value, array &$opts)
125
- {
126
- if ($member->getType() === 'timestamp') {
127
- $timestampFormat = !empty($member['timestampFormat'])
128
- ? $member['timestampFormat']
129
- : 'rfc822';
130
- $value = TimestampShape::format($value, $timestampFormat);
131
- }
132
- if ($member['jsonvalue']) {
133
- $value = json_encode($value);
134
- if (empty($value) && JSON_ERROR_NONE !== json_last_error()) {
135
- throw new \InvalidArgumentException('Unable to encode the provided value'
136
- . ' with \'json_encode\'. ' . json_last_error_msg());
137
- }
138
-
139
- $value = base64_encode($value);
140
- }
141
-
142
- $opts['headers'][$member['locationName'] ?: $name] = $value;
143
- }
144
-
145
- /**
146
- * Note: This is currently only present in the Amazon S3 model.
147
- */
148
- private function applyHeaderMap($name, Shape $member, array $value, array &$opts)
149
- {
150
- $prefix = $member['locationName'];
151
- foreach ($value as $k => $v) {
152
- $opts['headers'][$prefix . $k] = $v;
153
- }
154
- }
155
-
156
- private function applyQuery($name, Shape $member, $value, array &$opts)
157
- {
158
- if ($member instanceof MapShape) {
159
- $opts['query'] = isset($opts['query']) && is_array($opts['query'])
160
- ? $opts['query'] + $value
161
- : $value;
162
- } elseif ($value !== null) {
163
- $type = $member->getType();
164
- if ($type === 'boolean') {
165
- $value = $value ? 'true' : 'false';
166
- } elseif ($type === 'timestamp') {
167
- $timestampFormat = !empty($member['timestampFormat'])
168
- ? $member['timestampFormat']
169
- : 'iso8601';
170
- $value = TimestampShape::format($value, $timestampFormat);
171
- }
172
-
173
- $opts['query'][$member['locationName'] ?: $name] = $value;
174
- }
175
- }
176
-
177
- private function buildEndpoint(Operation $operation, array $args, array $opts)
178
- {
179
- $varspecs = [];
180
-
181
- // Create an associative array of varspecs used in expansions
182
- foreach ($operation->getInput()->getMembers() as $name => $member) {
183
- if ($member['location'] == 'uri') {
184
- $varspecs[$member['locationName'] ?: $name] =
185
- isset($args[$name])
186
- ? $args[$name]
187
- : null;
188
- }
189
- }
190
-
191
- $relative = preg_replace_callback(
192
- '/\{([^\}]+)\}/',
193
- function (array $matches) use ($varspecs) {
194
- $isGreedy = substr($matches[1], -1, 1) == '+';
195
- $k = $isGreedy ? substr($matches[1], 0, -1) : $matches[1];
196
- if (!isset($varspecs[$k])) {
197
- return '';
198
- }
199
-
200
- if ($isGreedy) {
201
- return str_replace('%2F', '/', rawurlencode($varspecs[$k]));
202
- }
203
-
204
- return rawurlencode($varspecs[$k]);
205
- },
206
- $operation['http']['requestUri']
207
- );
208
-
209
- // Add the query string variables or appending to one if needed.
210
- if (!empty($opts['query'])) {
211
- $append = Psr7\build_query($opts['query']);
212
- $relative .= strpos($relative, '?') ? "&{$append}" : "?$append";
213
- }
214
-
215
- // Expand path place holders using Amazon's slightly different URI
216
- // template syntax.
217
- return UriResolver::resolve($this->endpoint, new Uri($relative));
218
- }
219
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Serializer/RestXmlSerializer.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
- namespace Aws\Api\Serializer;
3
-
4
- use Aws\Api\StructureShape;
5
- use Aws\Api\Service;
6
-
7
- /**
8
- * @internal
9
- */
10
- class RestXmlSerializer extends RestSerializer
11
- {
12
- /** @var XmlBody */
13
- private $xmlBody;
14
-
15
- /**
16
- * @param Service $api Service API description
17
- * @param string $endpoint Endpoint to connect to
18
- * @param XmlBody $xmlBody Optional XML formatter to use
19
- */
20
- public function __construct(
21
- Service $api,
22
- $endpoint,
23
- XmlBody $xmlBody = null
24
- ) {
25
- parent::__construct($api, $endpoint);
26
- $this->xmlBody = $xmlBody ?: new XmlBody($api);
27
- }
28
-
29
- protected function payload(StructureShape $member, array $value, array &$opts)
30
- {
31
- $opts['headers']['Content-Type'] = 'application/xml';
32
- $opts['body'] = (string) $this->xmlBody->build($member, $value);
33
- }
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Serializer/XmlBody.php DELETED
@@ -1,220 +0,0 @@
1
- <?php
2
- namespace Aws\Api\Serializer;
3
-
4
- use Aws\Api\MapShape;
5
- use Aws\Api\Service;
6
- use Aws\Api\Shape;
7
- use Aws\Api\StructureShape;
8
- use Aws\Api\ListShape;
9
- use Aws\Api\TimestampShape;
10
- use XMLWriter;
11
-
12
- /**
13
- * @internal Formats the XML body of a REST-XML services.
14
- */
15
- class XmlBody
16
- {
17
- /** @var \Aws\Api\Service */
18
- private $api;
19
-
20
- /**
21
- * @param Service $api API being used to create the XML body.
22
- */
23
- public function __construct(Service $api)
24
- {
25
- $this->api = $api;
26
- }
27
-
28
- /**
29
- * Builds the XML body based on an array of arguments.
30
- *
31
- * @param Shape $shape Operation being constructed
32
- * @param array $args Associative array of arguments
33
- *
34
- * @return string
35
- */
36
- public function build(Shape $shape, array $args)
37
- {
38
- $xml = new XMLWriter();
39
- $xml->openMemory();
40
- $xml->startDocument('1.0', 'UTF-8');
41
- $this->format($shape, $shape['locationName'] ?: $shape['name'], $args, $xml);
42
- $xml->endDocument();
43
-
44
- return $xml->outputMemory();
45
- }
46
-
47
- private function startElement(Shape $shape, $name, XMLWriter $xml)
48
- {
49
- $xml->startElement($name);
50
-
51
- if ($ns = $shape['xmlNamespace']) {
52
- $xml->writeAttribute(
53
- isset($ns['prefix']) ? "xmlns:{$ns['prefix']}" : 'xmlns',
54
- $shape['xmlNamespace']['uri']
55
- );
56
- }
57
- }
58
-
59
- private function format(Shape $shape, $name, $value, XMLWriter $xml)
60
- {
61
- // Any method mentioned here has a custom serialization handler.
62
- static $methods = [
63
- 'add_structure' => true,
64
- 'add_list' => true,
65
- 'add_blob' => true,
66
- 'add_timestamp' => true,
67
- 'add_boolean' => true,
68
- 'add_map' => true,
69
- 'add_string' => true
70
- ];
71
-
72
- $type = 'add_' . $shape['type'];
73
- if (isset($methods[$type])) {
74
- $this->{$type}($shape, $name, $value, $xml);
75
- } else {
76
- $this->defaultShape($shape, $name, $value, $xml);
77
- }
78
- }
79
-
80
- private function defaultShape(Shape $shape, $name, $value, XMLWriter $xml)
81
- {
82
- $this->startElement($shape, $name, $xml);
83
- $xml->writeRaw($value);
84
- $xml->endElement();
85
- }
86
-
87
- private function add_structure(
88
- StructureShape $shape,
89
- $name,
90
- array $value,
91
- \XMLWriter $xml
92
- ) {
93
- $this->startElement($shape, $name, $xml);
94
-
95
- foreach ($this->getStructureMembers($shape, $value) as $k => $definition) {
96
- $this->format(
97
- $definition['member'],
98
- $definition['member']['locationName'] ?: $k,
99
- $definition['value'],
100
- $xml
101
- );
102
- }
103
-
104
- $xml->endElement();
105
- }
106
-
107
- private function getStructureMembers(StructureShape $shape, array $value)
108
- {
109
- $members = [];
110
-
111
- foreach ($value as $k => $v) {
112
- if ($v !== null && $shape->hasMember($k)) {
113
- $definition = [
114
- 'member' => $shape->getMember($k),
115
- 'value' => $v,
116
- ];
117
-
118
- if ($definition['member']['xmlAttribute']) {
119
- // array_unshift_associative
120
- $members = [$k => $definition] + $members;
121
- } else {
122
- $members[$k] = $definition;
123
- }
124
- }
125
- }
126
-
127
- return $members;
128
- }
129
-
130
- private function add_list(
131
- ListShape $shape,
132
- $name,
133
- array $value,
134
- XMLWriter $xml
135
- ) {
136
- $items = $shape->getMember();
137
-
138
- if ($shape['flattened']) {
139
- $elementName = $name;
140
- } else {
141
- $this->startElement($shape, $name, $xml);
142
- $elementName = $items['locationName'] ?: 'member';
143
- }
144
-
145
- foreach ($value as $v) {
146
- $this->format($items, $elementName, $v, $xml);
147
- }
148
-
149
- if (!$shape['flattened']) {
150
- $xml->endElement();
151
- }
152
- }
153
-
154
- private function add_map(
155
- MapShape $shape,
156
- $name,
157
- array $value,
158
- XMLWriter $xml
159
- ) {
160
- $xmlEntry = $shape['flattened'] ? $shape['locationName'] : 'entry';
161
- $xmlKey = $shape->getKey()['locationName'] ?: 'key';
162
- $xmlValue = $shape->getValue()['locationName'] ?: 'value';
163
-
164
- $this->startElement($shape, $name, $xml);
165
-
166
- foreach ($value as $key => $v) {
167
- $this->startElement($shape, $xmlEntry, $xml);
168
- $this->format($shape->getKey(), $xmlKey, $key, $xml);
169
- $this->format($shape->getValue(), $xmlValue, $v, $xml);
170
- $xml->endElement();
171
- }
172
-
173
- $xml->endElement();
174
- }
175
-
176
- private function add_blob(Shape $shape, $name, $value, XMLWriter $xml)
177
- {
178
- $this->startElement($shape, $name, $xml);
179
- $xml->writeRaw(base64_encode($value));
180
- $xml->endElement();
181
- }
182
-
183
- private function add_timestamp(
184
- TimestampShape $shape,
185
- $name,
186
- $value,
187
- XMLWriter $xml
188
- ) {
189
- $this->startElement($shape, $name, $xml);
190
- $timestampFormat = !empty($shape['timestampFormat'])
191
- ? $shape['timestampFormat']
192
- : 'iso8601';
193
- $xml->writeRaw(TimestampShape::format($value, $timestampFormat));
194
- $xml->endElement();
195
- }
196
-
197
- private function add_boolean(
198
- Shape $shape,
199
- $name,
200
- $value,
201
- XMLWriter $xml
202
- ) {
203
- $this->startElement($shape, $name, $xml);
204
- $xml->writeRaw($value ? 'true' : 'false');
205
- $xml->endElement();
206
- }
207
-
208
- private function add_string(
209
- Shape $shape,
210
- $name,
211
- $value,
212
- XMLWriter $xml
213
- ) {
214
- if ($shape['xmlAttribute']) {
215
- $xml->writeAttribute($shape['locationName'] ?: $name, $value);
216
- } else {
217
- $this->defaultShape($shape, $name, $value, $xml);
218
- }
219
- }
220
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Service.php DELETED
@@ -1,448 +0,0 @@
1
- <?php
2
- namespace Aws\Api;
3
-
4
- use Aws\Api\Serializer\QuerySerializer;
5
- use Aws\Api\Serializer\Ec2ParamBuilder;
6
- use Aws\Api\Parser\QueryParser;
7
-
8
- /**
9
- * Represents a web service API model.
10
- */
11
- class Service extends AbstractModel
12
- {
13
- /** @var callable */
14
- private $apiProvider;
15
-
16
- /** @var string */
17
- private $serviceName;
18
-
19
- /** @var string */
20
- private $apiVersion;
21
-
22
- /** @var Operation[] */
23
- private $operations = [];
24
-
25
- /** @var array */
26
- private $paginators = null;
27
-
28
- /** @var array */
29
- private $waiters = null;
30
-
31
- /**
32
- * @param array $definition
33
- * @param callable $provider
34
- *
35
- * @internal param array $definition Service description
36
- */
37
- public function __construct(array $definition, callable $provider)
38
- {
39
- static $defaults = [
40
- 'operations' => [],
41
- 'shapes' => [],
42
- 'metadata' => []
43
- ], $defaultMeta = [
44
- 'apiVersion' => null,
45
- 'serviceFullName' => null,
46
- 'serviceId' => null,
47
- 'endpointPrefix' => null,
48
- 'signingName' => null,
49
- 'signatureVersion' => null,
50
- 'protocol' => null,
51
- 'uid' => null
52
- ];
53
-
54
- $definition += $defaults;
55
- $definition['metadata'] += $defaultMeta;
56
- $this->definition = $definition;
57
- $this->apiProvider = $provider;
58
- parent::__construct($definition, new ShapeMap($definition['shapes']));
59
-
60
- if (isset($definition['metadata']['serviceIdentifier'])) {
61
- $this->serviceName = $this->getServiceName();
62
- } else {
63
- $this->serviceName = $this->getEndpointPrefix();
64
- }
65
-
66
- $this->apiVersion = $this->getApiVersion();
67
- }
68
-
69
- /**
70
- * Creates a request serializer for the provided API object.
71
- *
72
- * @param Service $api API that contains a protocol.
73
- * @param string $endpoint Endpoint to send requests to.
74
- *
75
- * @return callable
76
- * @throws \UnexpectedValueException
77
- */
78
- public static function createSerializer(Service $api, $endpoint)
79
- {
80
- static $mapping = [
81
- 'json' => 'Aws\Api\Serializer\JsonRpcSerializer',
82
- 'query' => 'Aws\Api\Serializer\QuerySerializer',
83
- 'rest-json' => 'Aws\Api\Serializer\RestJsonSerializer',
84
- 'rest-xml' => 'Aws\Api\Serializer\RestXmlSerializer'
85
- ];
86
-
87
- $proto = $api->getProtocol();
88
-
89
- if (isset($mapping[$proto])) {
90
- return new $mapping[$proto]($api, $endpoint);
91
- }
92
-
93
- if ($proto == 'ec2') {
94
- return new QuerySerializer($api, $endpoint, new Ec2ParamBuilder());
95
- }
96
-
97
- throw new \UnexpectedValueException(
98
- 'Unknown protocol: ' . $api->getProtocol()
99
- );
100
- }
101
-
102
- /**
103
- * Creates an error parser for the given protocol.
104
- *
105
- * @param string $protocol Protocol to parse (e.g., query, json, etc.)
106
- *
107
- * @return callable
108
- * @throws \UnexpectedValueException
109
- */
110
- public static function createErrorParser($protocol)
111
- {
112
- static $mapping = [
113
- 'json' => 'Aws\Api\ErrorParser\JsonRpcErrorParser',
114
- 'query' => 'Aws\Api\ErrorParser\XmlErrorParser',
115
- 'rest-json' => 'Aws\Api\ErrorParser\RestJsonErrorParser',
116
- 'rest-xml' => 'Aws\Api\ErrorParser\XmlErrorParser',
117
- 'ec2' => 'Aws\Api\ErrorParser\XmlErrorParser'
118
- ];
119
-
120
- if (isset($mapping[$protocol])) {
121
- return new $mapping[$protocol]();
122
- }
123
-
124
- throw new \UnexpectedValueException("Unknown protocol: $protocol");
125
- }
126
-
127
- /**
128
- * Applies the listeners needed to parse client models.
129
- *
130
- * @param Service $api API to create a parser for
131
- * @return callable
132
- * @throws \UnexpectedValueException
133
- */
134
- public static function createParser(Service $api)
135
- {
136
- static $mapping = [
137
- 'json' => 'Aws\Api\Parser\JsonRpcParser',
138
- 'query' => 'Aws\Api\Parser\QueryParser',
139
- 'rest-json' => 'Aws\Api\Parser\RestJsonParser',
140
- 'rest-xml' => 'Aws\Api\Parser\RestXmlParser'
141
- ];
142
-
143
- $proto = $api->getProtocol();
144
- if (isset($mapping[$proto])) {
145
- return new $mapping[$proto]($api);
146
- }
147
-
148
- if ($proto == 'ec2') {
149
- return new QueryParser($api, null, false);
150
- }
151
-
152
- throw new \UnexpectedValueException(
153
- 'Unknown protocol: ' . $api->getProtocol()
154
- );
155
- }
156
-
157
- /**
158
- * Get the full name of the service
159
- *
160
- * @return string
161
- */
162
- public function getServiceFullName()
163
- {
164
- return $this->definition['metadata']['serviceFullName'];
165
- }
166
-
167
- /**
168
- * Get the service id
169
- *
170
- * @return string
171
- */
172
- public function getServiceId()
173
- {
174
- return $this->definition['metadata']['serviceId'];
175
- }
176
-
177
- /**
178
- * Get the API version of the service
179
- *
180
- * @return string
181
- */
182
- public function getApiVersion()
183
- {
184
- return $this->definition['metadata']['apiVersion'];
185
- }
186
-
187
- /**
188
- * Get the API version of the service
189
- *
190
- * @return string
191
- */
192
- public function getEndpointPrefix()
193
- {
194
- return $this->definition['metadata']['endpointPrefix'];
195
- }
196
-
197
- /**
198
- * Get the signing name used by the service.
199
- *
200
- * @return string
201
- */
202
- public function getSigningName()
203
- {
204
- return $this->definition['metadata']['signingName']
205
- ?: $this->definition['metadata']['endpointPrefix'];
206
- }
207
-
208
- /**
209
- * Get the service name.
210
- *
211
- * @return string
212
- */
213
- public function getServiceName()
214
- {
215
- return $this->definition['metadata']['serviceIdentifier'];
216
- }
217
-
218
- /**
219
- * Get the default signature version of the service.
220
- *
221
- * Note: this method assumes "v4" when not specified in the model.
222
- *
223
- * @return string
224
- */
225
- public function getSignatureVersion()
226
- {
227
- return $this->definition['metadata']['signatureVersion'] ?: 'v4';
228
- }
229
-
230
- /**
231
- * Get the protocol used by the service.
232
- *
233
- * @return string
234
- */
235
- public function getProtocol()
236
- {
237
- return $this->definition['metadata']['protocol'];
238
- }
239
-
240
- /**
241
- * Get the uid string used by the service
242
- *
243
- * @return string
244
- */
245
- public function getUid()
246
- {
247
- return $this->definition['metadata']['uid'];
248
- }
249
-
250
- /**
251
- * Check if the description has a specific operation by name.
252
- *
253
- * @param string $name Operation to check by name
254
- *
255
- * @return bool
256
- */
257
- public function hasOperation($name)
258
- {
259
- return isset($this['operations'][$name]);
260
- }
261
-
262
- /**
263
- * Get an operation by name.
264
- *
265
- * @param string $name Operation to retrieve by name
266
- *
267
- * @return Operation
268
- * @throws \InvalidArgumentException If the operation is not found
269
- */
270
- public function getOperation($name)
271
- {
272
- if (!isset($this->operations[$name])) {
273
- if (!isset($this->definition['operations'][$name])) {
274
- throw new \InvalidArgumentException("Unknown operation: $name");
275
- }
276
- $this->operations[$name] = new Operation(
277
- $this->definition['operations'][$name],
278
- $this->shapeMap
279
- );
280
- }
281
-
282
- return $this->operations[$name];
283
- }
284
-
285
- /**
286
- * Get all of the operations of the description.
287
- *
288
- * @return Operation[]
289
- */
290
- public function getOperations()
291
- {
292
- $result = [];
293
- foreach ($this->definition['operations'] as $name => $definition) {
294
- $result[$name] = $this->getOperation($name);
295
- }
296
-
297
- return $result;
298
- }
299
-
300
- /**
301
- * Get all of the service metadata or a specific metadata key value.
302
- *
303
- * @param string|null $key Key to retrieve or null to retrieve all metadata
304
- *
305
- * @return mixed Returns the result or null if the key is not found
306
- */
307
- public function getMetadata($key = null)
308
- {
309
- if (!$key) {
310
- return $this['metadata'];
311
- }
312
-
313
- if (isset($this->definition['metadata'][$key])) {
314
- return $this->definition['metadata'][$key];
315
- }
316
-
317
- return null;
318
- }
319
-
320
- /**
321
- * Gets an associative array of available paginator configurations where
322
- * the key is the name of the paginator, and the value is the paginator
323
- * configuration.
324
- *
325
- * @return array
326
- * @unstable The configuration format of paginators may change in the future
327
- */
328
- public function getPaginators()
329
- {
330
- if (!isset($this->paginators)) {
331
- $res = call_user_func(
332
- $this->apiProvider,
333
- 'paginator',
334
- $this->serviceName,
335
- $this->apiVersion
336
- );
337
- $this->paginators = isset($res['pagination'])
338
- ? $res['pagination']
339
- : [];
340
- }
341
-
342
- return $this->paginators;
343
- }
344
-
345
- /**
346
- * Determines if the service has a paginator by name.
347
- *
348
- * @param string $name Name of the paginator.
349
- *
350
- * @return bool
351
- */
352
- public function hasPaginator($name)
353
- {
354
- return isset($this->getPaginators()[$name]);
355
- }
356
-
357
- /**
358
- * Retrieve a paginator by name.
359
- *
360
- * @param string $name Paginator to retrieve by name. This argument is
361
- * typically the operation name.
362
- * @return array
363
- * @throws \UnexpectedValueException if the paginator does not exist.
364
- * @unstable The configuration format of paginators may change in the future
365
- */
366
- public function getPaginatorConfig($name)
367
- {
368
- static $defaults = [
369
- 'input_token' => null,
370
- 'output_token' => null,
371
- 'limit_key' => null,
372
- 'result_key' => null,
373
- 'more_results' => null,
374
- ];
375
-
376
- if ($this->hasPaginator($name)) {
377
- return $this->paginators[$name] + $defaults;
378
- }
379
-
380
- throw new \UnexpectedValueException("There is no {$name} "
381
- . "paginator defined for the {$this->serviceName} service.");
382
- }
383
-
384
- /**
385
- * Gets an associative array of available waiter configurations where the
386
- * key is the name of the waiter, and the value is the waiter
387
- * configuration.
388
- *
389
- * @return array
390
- */
391
- public function getWaiters()
392
- {
393
- if (!isset($this->waiters)) {
394
- $res = call_user_func(
395
- $this->apiProvider,
396
- 'waiter',
397
- $this->serviceName,
398
- $this->apiVersion
399
- );
400
- $this->waiters = isset($res['waiters'])
401
- ? $res['waiters']
402
- : [];
403
- }
404
-
405
- return $this->waiters;
406
- }
407
-
408
- /**
409
- * Determines if the service has a waiter by name.
410
- *
411
- * @param string $name Name of the waiter.
412
- *
413
- * @return bool
414
- */
415
- public function hasWaiter($name)
416
- {
417
- return isset($this->getWaiters()[$name]);
418
- }
419
-
420
- /**
421
- * Get a waiter configuration by name.
422
- *
423
- * @param string $name Name of the waiter by name.
424
- *
425
- * @return array
426
- * @throws \UnexpectedValueException if the waiter does not exist.
427
- */
428
- public function getWaiterConfig($name)
429
- {
430
- // Error if the waiter is not defined
431
- if ($this->hasWaiter($name)) {
432
- return $this->waiters[$name];
433
- }
434
-
435
- throw new \UnexpectedValueException("There is no {$name} waiter "
436
- . "defined for the {$this->serviceName} service.");
437
- }
438
-
439
- /**
440
- * Get the shape map used by the API.
441
- *
442
- * @return ShapeMap
443
- */
444
- public function getShapeMap()
445
- {
446
- return $this->shapeMap;
447
- }
448
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Shape.php DELETED
@@ -1,69 +0,0 @@
1
- <?php
2
- namespace Aws\Api;
3
-
4
- /**
5
- * Base class representing a modeled shape.
6
- */
7
- class Shape extends AbstractModel
8
- {
9
- /**
10
- * Get a concrete shape for the given definition.
11
- *
12
- * @param array $definition
13
- * @param ShapeMap $shapeMap
14
- *
15
- * @return mixed
16
- * @throws \RuntimeException if the type is invalid
17
- */
18
- public static function create(array $definition, ShapeMap $shapeMap)
19
- {
20
- static $map = [
21
- 'structure' => 'Aws\Api\StructureShape',
22
- 'map' => 'Aws\Api\MapShape',
23
- 'list' => 'Aws\Api\ListShape',
24
- 'timestamp' => 'Aws\Api\TimestampShape',
25
- 'integer' => 'Aws\Api\Shape',
26
- 'double' => 'Aws\Api\Shape',
27
- 'float' => 'Aws\Api\Shape',
28
- 'long' => 'Aws\Api\Shape',
29
- 'string' => 'Aws\Api\Shape',
30
- 'byte' => 'Aws\Api\Shape',
31
- 'character' => 'Aws\Api\Shape',
32
- 'blob' => 'Aws\Api\Shape',
33
- 'boolean' => 'Aws\Api\Shape'
34
- ];
35
-
36
- if (isset($definition['shape'])) {
37
- return $shapeMap->resolve($definition);
38
- }
39
-
40
- if (!isset($map[$definition['type']])) {
41
- throw new \RuntimeException('Invalid type: '
42
- . print_r($definition, true));
43
- }
44
-
45
- $type = $map[$definition['type']];
46
-
47
- return new $type($definition, $shapeMap);
48
- }
49
-
50
- /**
51
- * Get the type of the shape
52
- *
53
- * @return string
54
- */
55
- public function getType()
56
- {
57
- return $this->definition['type'];
58
- }
59
-
60
- /**
61
- * Get the name of the shape
62
- *
63
- * @return string
64
- */
65
- public function getName()
66
- {
67
- return $this->definition['name'];
68
- }
69
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/ShapeMap.php DELETED
@@ -1,66 +0,0 @@
1
- <?php
2
- namespace Aws\Api;
3
-
4
- /**
5
- * Builds shape based on shape references.
6
- */
7
- class ShapeMap
8
- {
9
- /** @var array */
10
- private $definitions;
11
-
12
- /** @var Shape[] */
13
- private $simple;
14
-
15
- /**
16
- * @param array $shapeModels Associative array of shape definitions.
17
- */
18
- public function __construct(array $shapeModels)
19
- {
20
- $this->definitions = $shapeModels;
21
- }
22
-
23
- /**
24
- * Get an array of shape names.
25
- *
26
- * @return array
27
- */
28
- public function getShapeNames()
29
- {
30
- return array_keys($this->definitions);
31
- }
32
-
33
- /**
34
- * Resolve a shape reference
35
- *
36
- * @param array $shapeRef Shape reference shape
37
- *
38
- * @return Shape
39
- * @throws \InvalidArgumentException
40
- */
41
- public function resolve(array $shapeRef)
42
- {
43
- $shape = $shapeRef['shape'];
44
-
45
- if (!isset($this->definitions[$shape])) {
46
- throw new \InvalidArgumentException('Shape not found: ' . $shape);
47
- }
48
-
49
- $isSimple = count($shapeRef) == 1;
50
- if ($isSimple && isset($this->simple[$shape])) {
51
- return $this->simple[$shape];
52
- }
53
-
54
- $definition = $shapeRef + $this->definitions[$shape];
55
- $definition['name'] = $definition['shape'];
56
- unset($definition['shape']);
57
-
58
- $result = Shape::create($definition, $this);
59
-
60
- if ($isSimple) {
61
- $this->simple[$shape] = $result;
62
- }
63
-
64
- return $result;
65
- }
66
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/StructureShape.php DELETED
@@ -1,79 +0,0 @@
1
- <?php
2
- namespace Aws\Api;
3
-
4
- /**
5
- * Represents a structure shape and resolve member shape references.
6
- */
7
- class StructureShape extends Shape
8
- {
9
- /**
10
- * @var Shape[]
11
- */
12
- private $members;
13
-
14
- public function __construct(array $definition, ShapeMap $shapeMap)
15
- {
16
- $definition['type'] = 'structure';
17
-
18
- if (!isset($definition['members'])) {
19
- $definition['members'] = [];
20
- }
21
-
22
- parent::__construct($definition, $shapeMap);
23
- }
24
-
25
- /**
26
- * Gets a list of all members
27
- *
28
- * @return Shape[]
29
- */
30
- public function getMembers()
31
- {
32
- if (empty($this->members)) {
33
- $this->generateMembersHash();
34
- }
35
-
36
- return $this->members;
37
- }
38
-
39
- /**
40
- * Check if a specific member exists by name.
41
- *
42
- * @param string $name Name of the member to check
43
- *
44
- * @return bool
45
- */
46
- public function hasMember($name)
47
- {
48
- return isset($this->definition['members'][$name]);
49
- }
50
-
51
- /**
52
- * Retrieve a member by name.
53
- *
54
- * @param string $name Name of the member to retrieve
55
- *
56
- * @return Shape
57
- * @throws \InvalidArgumentException if the member is not found.
58
- */
59
- public function getMember($name)
60
- {
61
- $members = $this->getMembers();
62
-
63
- if (!isset($members[$name])) {
64
- throw new \InvalidArgumentException('Unknown member ' . $name);
65
- }
66
-
67
- return $members[$name];
68
- }
69
-
70
-
71
- private function generateMembersHash()
72
- {
73
- $this->members = [];
74
-
75
- foreach ($this->definition['members'] as $name => $definition) {
76
- $this->members[$name] = $this->shapeFor($definition);
77
- }
78
- }
79
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/TimestampShape.php DELETED
@@ -1,48 +0,0 @@
1
- <?php
2
- namespace Aws\Api;
3
-
4
- /**
5
- * Represents a timestamp shape.
6
- */
7
- class TimestampShape extends Shape
8
- {
9
- public function __construct(array $definition, ShapeMap $shapeMap)
10
- {
11
- $definition['type'] = 'timestamp';
12
- parent::__construct($definition, $shapeMap);
13
- }
14
-
15
- /**
16
- * Formats a timestamp value for a service.
17
- *
18
- * @param mixed $value Value to format
19
- * @param string $format Format used to serialize the value
20
- *
21
- * @return int|string
22
- * @throws \UnexpectedValueException if the format is unknown.
23
- * @throws \InvalidArgumentException if the value is an unsupported type.
24
- */
25
- public static function format($value, $format)
26
- {
27
- if ($value instanceof \DateTime) {
28
- $value = $value->getTimestamp();
29
- } elseif (is_string($value)) {
30
- $value = strtotime($value);
31
- } elseif (!is_int($value)) {
32
- throw new \InvalidArgumentException('Unable to handle the provided'
33
- . ' timestamp type: ' . gettype($value));
34
- }
35
-
36
- switch ($format) {
37
- case 'iso8601':
38
- return gmdate('Y-m-d\TH:i:s\Z', $value);
39
- case 'rfc822':
40
- return gmdate('D, d M Y H:i:s \G\M\T', $value);
41
- case 'unixTimestamp':
42
- return $value;
43
- default:
44
- throw new \UnexpectedValueException('Unknown timestamp format: '
45
- . $format);
46
- }
47
- }
48
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Api/Validator.php DELETED
@@ -1,273 +0,0 @@
1
- <?php
2
- namespace Aws\Api;
3
-
4
- use Aws;
5
-
6
- /**
7
- * Validates a schema against a hash of input.
8
- */
9
- class Validator
10
- {
11
- private $path = [];
12
- private $errors = [];
13
- private $constraints = [];
14
-
15
- private static $defaultConstraints = [
16
- 'required' => true,
17
- 'min' => true,
18
- 'max' => false,
19
- 'pattern' => false
20
- ];
21
-
22
- /**
23
- * @param array $constraints Associative array of constraints to enforce.
24
- * Accepts the following keys: "required", "min",
25
- * "max", and "pattern". If a key is not
26
- * provided, the constraint will assume false.
27
- */
28
- public function __construct(array $constraints = null)
29
- {
30
- static $assumedFalseValues = [
31
- 'required' => false,
32
- 'min' => false,
33
- 'max' => false,
34
- 'pattern' => false
35
- ];
36
- $this->constraints = empty($constraints)
37
- ? self::$defaultConstraints
38
- : $constraints + $assumedFalseValues;
39
- }
40
-
41
- /**
42
- * Validates the given input against the schema.
43
- *
44
- * @param string $name Operation name
45
- * @param Shape $shape Shape to validate
46
- * @param array $input Input to validate
47
- *
48
- * @throws \InvalidArgumentException if the input is invalid.
49
- */
50
- public function validate($name, Shape $shape, array $input)
51
- {
52
- $this->dispatch($shape, $input);
53
-
54
- if ($this->errors) {
55
- $message = sprintf(
56
- "Found %d error%s while validating the input provided for the "
57
- . "%s operation:\n%s",
58
- count($this->errors),
59
- count($this->errors) > 1 ? 's' : '',
60
- $name,
61
- implode("\n", $this->errors)
62
- );
63
- $this->errors = [];
64
-
65
- throw new \InvalidArgumentException($message);
66
- }
67
- }
68
-
69
- private function dispatch(Shape $shape, $value)
70
- {
71
- static $methods = [
72
- 'structure' => 'check_structure',
73
- 'list' => 'check_list',
74
- 'map' => 'check_map',
75
- 'blob' => 'check_blob',
76
- 'boolean' => 'check_boolean',
77
- 'integer' => 'check_numeric',
78
- 'float' => 'check_numeric',
79
- 'long' => 'check_numeric',
80
- 'string' => 'check_string',
81
- 'byte' => 'check_string',
82
- 'char' => 'check_string'
83
- ];
84
-
85
- $type = $shape->getType();
86
- if (isset($methods[$type])) {
87
- $this->{$methods[$type]}($shape, $value);
88
- }
89
- }
90
-
91
- private function check_structure(StructureShape $shape, $value)
92
- {
93
- if (!$this->checkAssociativeArray($value)) {
94
- return;
95
- }
96
-
97
- if ($this->constraints['required'] && $shape['required']) {
98
- foreach ($shape['required'] as $req) {
99
- if (!isset($value[$req])) {
100
- $this->path[] = $req;
101
- $this->addError('is missing and is a required parameter');
102
- array_pop($this->path);
103
- }
104
- }
105
- }
106
-
107
- foreach ($value as $name => $v) {
108
- if ($shape->hasMember($name)) {
109
- $this->path[] = $name;
110
- $this->dispatch(
111
- $shape->getMember($name),
112
- isset($value[$name]) ? $value[$name] : null
113
- );
114
- array_pop($this->path);
115
- }
116
- }
117
- }
118
-
119
- private function check_list(ListShape $shape, $value)
120
- {
121
- if (!is_array($value)) {
122
- $this->addError('must be an array. Found '
123
- . Aws\describe_type($value));
124
- return;
125
- }
126
-
127
- $this->validateRange($shape, count($value), "list element count");
128
-
129
- $items = $shape->getMember();
130
- foreach ($value as $index => $v) {
131
- $this->path[] = $index;
132
- $this->dispatch($items, $v);
133
- array_pop($this->path);
134
- }
135
- }
136
-
137
- private function check_map(MapShape $shape, $value)
138
- {
139
- if (!$this->checkAssociativeArray($value)) {
140
- return;
141
- }
142
-
143
- $values = $shape->getValue();
144
- foreach ($value as $key => $v) {
145
- $this->path[] = $key;
146
- $this->dispatch($values, $v);
147
- array_pop($this->path);
148
- }
149
- }
150
-
151
- private function check_blob(Shape $shape, $value)
152
- {
153
- static $valid = [
154
- 'string' => true,
155
- 'integer' => true,
156
- 'double' => true,
157
- 'resource' => true
158
- ];
159
-
160
- $type = gettype($value);
161
- if (!isset($valid[$type])) {
162
- if ($type != 'object' || !method_exists($value, '__toString')) {
163
- $this->addError('must be an fopen resource, a '
164
- . 'GuzzleHttp\Stream\StreamInterface object, or something '
165
- . 'that can be cast to a string. Found '
166
- . Aws\describe_type($value));
167
- }
168
- }
169
- }
170
-
171
- private function check_numeric(Shape $shape, $value)
172
- {
173
- if (!is_numeric($value)) {
174
- $this->addError('must be numeric. Found '
175
- . Aws\describe_type($value));
176
- return;
177
- }
178
-
179
- $this->validateRange($shape, $value, "numeric value");
180
- }
181
-
182
- private function check_boolean(Shape $shape, $value)
183
- {
184
- if (!is_bool($value)) {
185
- $this->addError('must be a boolean. Found '
186
- . Aws\describe_type($value));
187
- }
188
- }
189
-
190
- private function check_string(Shape $shape, $value)
191
- {
192
- if ($shape['jsonvalue']) {
193
- if (!self::canJsonEncode($value)) {
194
- $this->addError('must be a value encodable with \'json_encode\'.'
195
- . ' Found ' . Aws\describe_type($value));
196
- }
197
- return;
198
- }
199
-
200
- if (!$this->checkCanString($value)) {
201
- $this->addError('must be a string or an object that implements '
202
- . '__toString(). Found ' . Aws\describe_type($value));
203
- return;
204
- }
205
-
206
- $this->validateRange($shape, strlen($value), "string length");
207
-
208
- if ($this->constraints['pattern']) {
209
- $pattern = $shape['pattern'];
210
- if ($pattern && !preg_match("/$pattern/", $value)) {
211
- $this->addError("Pattern /$pattern/ failed to match '$value'");
212
- }
213
- }
214
- }
215
-
216
- private function validateRange(Shape $shape, $length, $descriptor)
217
- {
218
- if ($this->constraints['min']) {
219
- $min = $shape['min'];
220
- if ($min && $length < $min) {
221
- $this->addError("expected $descriptor to be >= $min, but "
222
- . "found $descriptor of $length");
223
- }
224
- }
225
-
226
- if ($this->constraints['max']) {
227
- $max = $shape['max'];
228
- if ($max && $length > $max) {
229
- $this->addError("expected $descriptor to be <= $max, but "
230
- . "found $descriptor of $length");
231
- }
232
- }
233
- }
234
-
235
- private function checkCanString($value)
236
- {
237
- static $valid = [
238
- 'string' => true,
239
- 'integer' => true,
240
- 'double' => true,
241
- 'NULL' => true,
242
- ];
243
-
244
- $type = gettype($value);
245
-
246
- return isset($valid[$type]) ||
247
- ($type == 'object' && method_exists($value, '__toString'));
248
- }
249
-
250
- private function checkAssociativeArray($value)
251
- {
252
- if (!is_array($value) || isset($value[0])) {
253
- $this->addError('must be an associative array. Found '
254
- . Aws\describe_type($value));
255
- return false;
256
- }
257
-
258
- return true;
259
- }
260
-
261
- private function addError($message)
262
- {
263
- $this->errors[] =
264
- implode('', array_map(function ($s) { return "[{$s}]"; }, $this->path))
265
- . ' '
266
- . $message;
267
- }
268
-
269
- private function canJsonEncode($data)
270
- {
271
- return !is_resource($data);
272
- }
273
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/ApiGateway/ApiGatewayClient.php DELETED
@@ -1,272 +0,0 @@
1
- <?php
2
- namespace Aws\ApiGateway;
3
-
4
- use Aws\AwsClient;
5
- use Aws\CommandInterface;
6
- use Psr\Http\Message\RequestInterface;
7
-
8
- /**
9
- * This client is used to interact with the **AWS API Gateway** service.
10
- *
11
- * @method \Aws\Result createApiKey(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise createApiKeyAsync(array $args = [])
13
- * @method \Aws\Result createAuthorizer(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise createAuthorizerAsync(array $args = [])
15
- * @method \Aws\Result createBasePathMapping(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise createBasePathMappingAsync(array $args = [])
17
- * @method \Aws\Result createDeployment(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise createDeploymentAsync(array $args = [])
19
- * @method \Aws\Result createDocumentationPart(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise createDocumentationPartAsync(array $args = [])
21
- * @method \Aws\Result createDocumentationVersion(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise createDocumentationVersionAsync(array $args = [])
23
- * @method \Aws\Result createDomainName(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise createDomainNameAsync(array $args = [])
25
- * @method \Aws\Result createModel(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise createModelAsync(array $args = [])
27
- * @method \Aws\Result createRequestValidator(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise createRequestValidatorAsync(array $args = [])
29
- * @method \Aws\Result createResource(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise createResourceAsync(array $args = [])
31
- * @method \Aws\Result createRestApi(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise createRestApiAsync(array $args = [])
33
- * @method \Aws\Result createStage(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise createStageAsync(array $args = [])
35
- * @method \Aws\Result createUsagePlan(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise createUsagePlanAsync(array $args = [])
37
- * @method \Aws\Result createUsagePlanKey(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise createUsagePlanKeyAsync(array $args = [])
39
- * @method \Aws\Result createVpcLink(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise createVpcLinkAsync(array $args = [])
41
- * @method \Aws\Result deleteApiKey(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise deleteApiKeyAsync(array $args = [])
43
- * @method \Aws\Result deleteAuthorizer(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise deleteAuthorizerAsync(array $args = [])
45
- * @method \Aws\Result deleteBasePathMapping(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise deleteBasePathMappingAsync(array $args = [])
47
- * @method \Aws\Result deleteClientCertificate(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise deleteClientCertificateAsync(array $args = [])
49
- * @method \Aws\Result deleteDeployment(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise deleteDeploymentAsync(array $args = [])
51
- * @method \Aws\Result deleteDocumentationPart(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise deleteDocumentationPartAsync(array $args = [])
53
- * @method \Aws\Result deleteDocumentationVersion(array $args = [])
54
- * @method \GuzzleHttp\Promise\Promise deleteDocumentationVersionAsync(array $args = [])
55
- * @method \Aws\Result deleteDomainName(array $args = [])
56
- * @method \GuzzleHttp\Promise\Promise deleteDomainNameAsync(array $args = [])
57
- * @method \Aws\Result deleteGatewayResponse(array $args = [])
58
- * @method \GuzzleHttp\Promise\Promise deleteGatewayResponseAsync(array $args = [])
59
- * @method \Aws\Result deleteIntegration(array $args = [])
60
- * @method \GuzzleHttp\Promise\Promise deleteIntegrationAsync(array $args = [])
61
- * @method \Aws\Result deleteIntegrationResponse(array $args = [])
62
- * @method \GuzzleHttp\Promise\Promise deleteIntegrationResponseAsync(array $args = [])
63
- * @method \Aws\Result deleteMethod(array $args = [])
64
- * @method \GuzzleHttp\Promise\Promise deleteMethodAsync(array $args = [])
65
- * @method \Aws\Result deleteMethodResponse(array $args = [])
66
- * @method \GuzzleHttp\Promise\Promise deleteMethodResponseAsync(array $args = [])
67
- * @method \Aws\Result deleteModel(array $args = [])
68
- * @method \GuzzleHttp\Promise\Promise deleteModelAsync(array $args = [])
69
- * @method \Aws\Result deleteRequestValidator(array $args = [])
70
- * @method \GuzzleHttp\Promise\Promise deleteRequestValidatorAsync(array $args = [])
71
- * @method \Aws\Result deleteResource(array $args = [])
72
- * @method \GuzzleHttp\Promise\Promise deleteResourceAsync(array $args = [])
73
- * @method \Aws\Result deleteRestApi(array $args = [])
74
- * @method \GuzzleHttp\Promise\Promise deleteRestApiAsync(array $args = [])
75
- * @method \Aws\Result deleteStage(array $args = [])
76
- * @method \GuzzleHttp\Promise\Promise deleteStageAsync(array $args = [])
77
- * @method \Aws\Result deleteUsagePlan(array $args = [])
78
- * @method \GuzzleHttp\Promise\Promise deleteUsagePlanAsync(array $args = [])
79
- * @method \Aws\Result deleteUsagePlanKey(array $args = [])
80
- * @method \GuzzleHttp\Promise\Promise deleteUsagePlanKeyAsync(array $args = [])
81
- * @method \Aws\Result deleteVpcLink(array $args = [])
82
- * @method \GuzzleHttp\Promise\Promise deleteVpcLinkAsync(array $args = [])
83
- * @method \Aws\Result flushStageAuthorizersCache(array $args = [])
84
- * @method \GuzzleHttp\Promise\Promise flushStageAuthorizersCacheAsync(array $args = [])
85
- * @method \Aws\Result flushStageCache(array $args = [])
86
- * @method \GuzzleHttp\Promise\Promise flushStageCacheAsync(array $args = [])
87
- * @method \Aws\Result generateClientCertificate(array $args = [])
88
- * @method \GuzzleHttp\Promise\Promise generateClientCertificateAsync(array $args = [])
89
- * @method \Aws\Result getAccount(array $args = [])
90
- * @method \GuzzleHttp\Promise\Promise getAccountAsync(array $args = [])
91
- * @method \Aws\Result getApiKey(array $args = [])
92
- * @method \GuzzleHttp\Promise\Promise getApiKeyAsync(array $args = [])
93
- * @method \Aws\Result getApiKeys(array $args = [])
94
- * @method \GuzzleHttp\Promise\Promise getApiKeysAsync(array $args = [])
95
- * @method \Aws\Result getAuthorizer(array $args = [])
96
- * @method \GuzzleHttp\Promise\Promise getAuthorizerAsync(array $args = [])
97
- * @method \Aws\Result getAuthorizers(array $args = [])
98
- * @method \GuzzleHttp\Promise\Promise getAuthorizersAsync(array $args = [])
99
- * @method \Aws\Result getBasePathMapping(array $args = [])
100
- * @method \GuzzleHttp\Promise\Promise getBasePathMappingAsync(array $args = [])
101
- * @method \Aws\Result getBasePathMappings(array $args = [])
102
- * @method \GuzzleHttp\Promise\Promise getBasePathMappingsAsync(array $args = [])
103
- * @method \Aws\Result getClientCertificate(array $args = [])
104
- * @method \GuzzleHttp\Promise\Promise getClientCertificateAsync(array $args = [])
105
- * @method \Aws\Result getClientCertificates(array $args = [])
106
- * @method \GuzzleHttp\Promise\Promise getClientCertificatesAsync(array $args = [])
107
- * @method \Aws\Result getDeployment(array $args = [])
108
- * @method \GuzzleHttp\Promise\Promise getDeploymentAsync(array $args = [])
109
- * @method \Aws\Result getDeployments(array $args = [])
110
- * @method \GuzzleHttp\Promise\Promise getDeploymentsAsync(array $args = [])
111
- * @method \Aws\Result getDocumentationPart(array $args = [])
112
- * @method \GuzzleHttp\Promise\Promise getDocumentationPartAsync(array $args = [])
113
- * @method \Aws\Result getDocumentationParts(array $args = [])
114
- * @method \GuzzleHttp\Promise\Promise getDocumentationPartsAsync(array $args = [])
115
- * @method \Aws\Result getDocumentationVersion(array $args = [])
116
- * @method \GuzzleHttp\Promise\Promise getDocumentationVersionAsync(array $args = [])
117
- * @method \Aws\Result getDocumentationVersions(array $args = [])
118
- * @method \GuzzleHttp\Promise\Promise getDocumentationVersionsAsync(array $args = [])
119
- * @method \Aws\Result getDomainName(array $args = [])
120
- * @method \GuzzleHttp\Promise\Promise getDomainNameAsync(array $args = [])
121
- * @method \Aws\Result getDomainNames(array $args = [])
122
- * @method \GuzzleHttp\Promise\Promise getDomainNamesAsync(array $args = [])
123
- * @method \Aws\Result getExport(array $args = [])
124
- * @method \GuzzleHttp\Promise\Promise getExportAsync(array $args = [])
125
- * @method \Aws\Result getGatewayResponse(array $args = [])
126
- * @method \GuzzleHttp\Promise\Promise getGatewayResponseAsync(array $args = [])
127
- * @method \Aws\Result getGatewayResponses(array $args = [])
128
- * @method \GuzzleHttp\Promise\Promise getGatewayResponsesAsync(array $args = [])
129
- * @method \Aws\Result getIntegration(array $args = [])
130
- * @method \GuzzleHttp\Promise\Promise getIntegrationAsync(array $args = [])
131
- * @method \Aws\Result getIntegrationResponse(array $args = [])
132
- * @method \GuzzleHttp\Promise\Promise getIntegrationResponseAsync(array $args = [])
133
- * @method \Aws\Result getMethod(array $args = [])
134
- * @method \GuzzleHttp\Promise\Promise getMethodAsync(array $args = [])
135
- * @method \Aws\Result getMethodResponse(array $args = [])
136
- * @method \GuzzleHttp\Promise\Promise getMethodResponseAsync(array $args = [])
137
- * @method \Aws\Result getModel(array $args = [])
138
- * @method \GuzzleHttp\Promise\Promise getModelAsync(array $args = [])
139
- * @method \Aws\Result getModelTemplate(array $args = [])
140
- * @method \GuzzleHttp\Promise\Promise getModelTemplateAsync(array $args = [])
141
- * @method \Aws\Result getModels(array $args = [])
142
- * @method \GuzzleHttp\Promise\Promise getModelsAsync(array $args = [])
143
- * @method \Aws\Result getRequestValidator(array $args = [])
144
- * @method \GuzzleHttp\Promise\Promise getRequestValidatorAsync(array $args = [])
145
- * @method \Aws\Result getRequestValidators(array $args = [])
146
- * @method \GuzzleHttp\Promise\Promise getRequestValidatorsAsync(array $args = [])
147
- * @method \Aws\Result getResource(array $args = [])
148
- * @method \GuzzleHttp\Promise\Promise getResourceAsync(array $args = [])
149
- * @method \Aws\Result getResources(array $args = [])
150
- * @method \GuzzleHttp\Promise\Promise getResourcesAsync(array $args = [])
151
- * @method \Aws\Result getRestApi(array $args = [])
152
- * @method \GuzzleHttp\Promise\Promise getRestApiAsync(array $args = [])
153
- * @method \Aws\Result getRestApis(array $args = [])
154
- * @method \GuzzleHttp\Promise\Promise getRestApisAsync(array $args = [])
155
- * @method \Aws\Result getSdk(array $args = [])
156
- * @method \GuzzleHttp\Promise\Promise getSdkAsync(array $args = [])
157
- * @method \Aws\Result getSdkType(array $args = [])
158
- * @method \GuzzleHttp\Promise\Promise getSdkTypeAsync(array $args = [])
159
- * @method \Aws\Result getSdkTypes(array $args = [])
160
- * @method \GuzzleHttp\Promise\Promise getSdkTypesAsync(array $args = [])
161
- * @method \Aws\Result getStage(array $args = [])
162
- * @method \GuzzleHttp\Promise\Promise getStageAsync(array $args = [])
163
- * @method \Aws\Result getStages(array $args = [])
164
- * @method \GuzzleHttp\Promise\Promise getStagesAsync(array $args = [])
165
- * @method \Aws\Result getTags(array $args = [])
166
- * @method \GuzzleHttp\Promise\Promise getTagsAsync(array $args = [])
167
- * @method \Aws\Result getUsage(array $args = [])
168
- * @method \GuzzleHttp\Promise\Promise getUsageAsync(array $args = [])
169
- * @method \Aws\Result getUsagePlan(array $args = [])
170
- * @method \GuzzleHttp\Promise\Promise getUsagePlanAsync(array $args = [])
171
- * @method \Aws\Result getUsagePlanKey(array $args = [])
172
- * @method \GuzzleHttp\Promise\Promise getUsagePlanKeyAsync(array $args = [])
173
- * @method \Aws\Result getUsagePlanKeys(array $args = [])
174
- * @method \GuzzleHttp\Promise\Promise getUsagePlanKeysAsync(array $args = [])
175
- * @method \Aws\Result getUsagePlans(array $args = [])
176
- * @method \GuzzleHttp\Promise\Promise getUsagePlansAsync(array $args = [])
177
- * @method \Aws\Result getVpcLink(array $args = [])
178
- * @method \GuzzleHttp\Promise\Promise getVpcLinkAsync(array $args = [])
179
- * @method \Aws\Result getVpcLinks(array $args = [])
180
- * @method \GuzzleHttp\Promise\Promise getVpcLinksAsync(array $args = [])
181
- * @method \Aws\Result importApiKeys(array $args = [])
182
- * @method \GuzzleHttp\Promise\Promise importApiKeysAsync(array $args = [])
183
- * @method \Aws\Result importDocumentationParts(array $args = [])
184
- * @method \GuzzleHttp\Promise\Promise importDocumentationPartsAsync(array $args = [])
185
- * @method \Aws\Result importRestApi(array $args = [])
186
- * @method \GuzzleHttp\Promise\Promise importRestApiAsync(array $args = [])
187
- * @method \Aws\Result putGatewayResponse(array $args = [])
188
- * @method \GuzzleHttp\Promise\Promise putGatewayResponseAsync(array $args = [])
189
- * @method \Aws\Result putIntegration(array $args = [])
190
- * @method \GuzzleHttp\Promise\Promise putIntegrationAsync(array $args = [])
191
- * @method \Aws\Result putIntegrationResponse(array $args = [])
192
- * @method \GuzzleHttp\Promise\Promise putIntegrationResponseAsync(array $args = [])
193
- * @method \Aws\Result putMethod(array $args = [])
194
- * @method \GuzzleHttp\Promise\Promise putMethodAsync(array $args = [])
195
- * @method \Aws\Result putMethodResponse(array $args = [])
196
- * @method \GuzzleHttp\Promise\Promise putMethodResponseAsync(array $args = [])
197
- * @method \Aws\Result putRestApi(array $args = [])
198
- * @method \GuzzleHttp\Promise\Promise putRestApiAsync(array $args = [])
199
- * @method \Aws\Result tagResource(array $args = [])
200
- * @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
201
- * @method \Aws\Result testInvokeAuthorizer(array $args = [])
202
- * @method \GuzzleHttp\Promise\Promise testInvokeAuthorizerAsync(array $args = [])
203
- * @method \Aws\Result testInvokeMethod(array $args = [])
204
- * @method \GuzzleHttp\Promise\Promise testInvokeMethodAsync(array $args = [])
205
- * @method \Aws\Result untagResource(array $args = [])
206
- * @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
207
- * @method \Aws\Result updateAccount(array $args = [])
208
- * @method \GuzzleHttp\Promise\Promise updateAccountAsync(array $args = [])
209
- * @method \Aws\Result updateApiKey(array $args = [])
210
- * @method \GuzzleHttp\Promise\Promise updateApiKeyAsync(array $args = [])
211
- * @method \Aws\Result updateAuthorizer(array $args = [])
212
- * @method \GuzzleHttp\Promise\Promise updateAuthorizerAsync(array $args = [])
213
- * @method \Aws\Result updateBasePathMapping(array $args = [])
214
- * @method \GuzzleHttp\Promise\Promise updateBasePathMappingAsync(array $args = [])
215
- * @method \Aws\Result updateClientCertificate(array $args = [])
216
- * @method \GuzzleHttp\Promise\Promise updateClientCertificateAsync(array $args = [])
217
- * @method \Aws\Result updateDeployment(array $args = [])
218
- * @method \GuzzleHttp\Promise\Promise updateDeploymentAsync(array $args = [])
219
- * @method \Aws\Result updateDocumentationPart(array $args = [])
220
- * @method \GuzzleHttp\Promise\Promise updateDocumentationPartAsync(array $args = [])
221
- * @method \Aws\Result updateDocumentationVersion(array $args = [])
222
- * @method \GuzzleHttp\Promise\Promise updateDocumentationVersionAsync(array $args = [])
223
- * @method \Aws\Result updateDomainName(array $args = [])
224
- * @method \GuzzleHttp\Promise\Promise updateDomainNameAsync(array $args = [])
225
- * @method \Aws\Result updateGatewayResponse(array $args = [])
226
- * @method \GuzzleHttp\Promise\Promise updateGatewayResponseAsync(array $args = [])
227
- * @method \Aws\Result updateIntegration(array $args = [])
228
- * @method \GuzzleHttp\Promise\Promise updateIntegrationAsync(array $args = [])
229
- * @method \Aws\Result updateIntegrationResponse(array $args = [])
230
- * @method \GuzzleHttp\Promise\Promise updateIntegrationResponseAsync(array $args = [])
231
- * @method \Aws\Result updateMethod(array $args = [])
232
- * @method \GuzzleHttp\Promise\Promise updateMethodAsync(array $args = [])
233
- * @method \Aws\Result updateMethodResponse(array $args = [])
234
- * @method \GuzzleHttp\Promise\Promise updateMethodResponseAsync(array $args = [])
235
- * @method \Aws\Result updateModel(array $args = [])
236
- * @method \GuzzleHttp\Promise\Promise updateModelAsync(array $args = [])
237
- * @method \Aws\Result updateRequestValidator(array $args = [])
238
- * @method \GuzzleHttp\Promise\Promise updateRequestValidatorAsync(array $args = [])
239
- * @method \Aws\Result updateResource(array $args = [])
240
- * @method \GuzzleHttp\Promise\Promise updateResourceAsync(array $args = [])
241
- * @method \Aws\Result updateRestApi(array $args = [])
242
- * @method \GuzzleHttp\Promise\Promise updateRestApiAsync(array $args = [])
243
- * @method \Aws\Result updateStage(array $args = [])
244
- * @method \GuzzleHttp\Promise\Promise updateStageAsync(array $args = [])
245
- * @method \Aws\Result updateUsage(array $args = [])
246
- * @method \GuzzleHttp\Promise\Promise updateUsageAsync(array $args = [])
247
- * @method \Aws\Result updateUsagePlan(array $args = [])
248
- * @method \GuzzleHttp\Promise\Promise updateUsagePlanAsync(array $args = [])
249
- * @method \Aws\Result updateVpcLink(array $args = [])
250
- * @method \GuzzleHttp\Promise\Promise updateVpcLinkAsync(array $args = [])
251
- */
252
- class ApiGatewayClient extends AwsClient
253
- {
254
- public function __construct(array $args)
255
- {
256
- parent::__construct($args);
257
- $stack = $this->getHandlerList();
258
- $stack->appendBuild([__CLASS__, '_add_accept_header']);
259
- }
260
-
261
- public static function _add_accept_header(callable $handler)
262
- {
263
- return function (
264
- CommandInterface $command,
265
- RequestInterface $request
266
- ) use ($handler) {
267
- $request = $request->withHeader('Accept', 'application/json');
268
-
269
- return $handler($command, $request);
270
- };
271
- }
272
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/ApiGateway/Exception/ApiGatewayException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\ApiGateway\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **AWS API Gateway** service.
8
- */
9
- class ApiGatewayException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/AppSync/AppSyncClient.php DELETED
@@ -1,63 +0,0 @@
1
- <?php
2
- namespace Aws\AppSync;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS AppSync** service.
8
- * @method \Aws\Result createApiKey(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise createApiKeyAsync(array $args = [])
10
- * @method \Aws\Result createDataSource(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise createDataSourceAsync(array $args = [])
12
- * @method \Aws\Result createGraphqlApi(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise createGraphqlApiAsync(array $args = [])
14
- * @method \Aws\Result createResolver(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise createResolverAsync(array $args = [])
16
- * @method \Aws\Result createType(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise createTypeAsync(array $args = [])
18
- * @method \Aws\Result deleteApiKey(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise deleteApiKeyAsync(array $args = [])
20
- * @method \Aws\Result deleteDataSource(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise deleteDataSourceAsync(array $args = [])
22
- * @method \Aws\Result deleteGraphqlApi(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise deleteGraphqlApiAsync(array $args = [])
24
- * @method \Aws\Result deleteResolver(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise deleteResolverAsync(array $args = [])
26
- * @method \Aws\Result deleteType(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise deleteTypeAsync(array $args = [])
28
- * @method \Aws\Result getDataSource(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise getDataSourceAsync(array $args = [])
30
- * @method \Aws\Result getGraphqlApi(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise getGraphqlApiAsync(array $args = [])
32
- * @method \Aws\Result getIntrospectionSchema(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise getIntrospectionSchemaAsync(array $args = [])
34
- * @method \Aws\Result getResolver(array $args = [])
35
- * @method \GuzzleHttp\Promise\Promise getResolverAsync(array $args = [])
36
- * @method \Aws\Result getSchemaCreationStatus(array $args = [])
37
- * @method \GuzzleHttp\Promise\Promise getSchemaCreationStatusAsync(array $args = [])
38
- * @method \Aws\Result getType(array $args = [])
39
- * @method \GuzzleHttp\Promise\Promise getTypeAsync(array $args = [])
40
- * @method \Aws\Result listApiKeys(array $args = [])
41
- * @method \GuzzleHttp\Promise\Promise listApiKeysAsync(array $args = [])
42
- * @method \Aws\Result listDataSources(array $args = [])
43
- * @method \GuzzleHttp\Promise\Promise listDataSourcesAsync(array $args = [])
44
- * @method \Aws\Result listGraphqlApis(array $args = [])
45
- * @method \GuzzleHttp\Promise\Promise listGraphqlApisAsync(array $args = [])
46
- * @method \Aws\Result listResolvers(array $args = [])
47
- * @method \GuzzleHttp\Promise\Promise listResolversAsync(array $args = [])
48
- * @method \Aws\Result listTypes(array $args = [])
49
- * @method \GuzzleHttp\Promise\Promise listTypesAsync(array $args = [])
50
- * @method \Aws\Result startSchemaCreation(array $args = [])
51
- * @method \GuzzleHttp\Promise\Promise startSchemaCreationAsync(array $args = [])
52
- * @method \Aws\Result updateApiKey(array $args = [])
53
- * @method \GuzzleHttp\Promise\Promise updateApiKeyAsync(array $args = [])
54
- * @method \Aws\Result updateDataSource(array $args = [])
55
- * @method \GuzzleHttp\Promise\Promise updateDataSourceAsync(array $args = [])
56
- * @method \Aws\Result updateGraphqlApi(array $args = [])
57
- * @method \GuzzleHttp\Promise\Promise updateGraphqlApiAsync(array $args = [])
58
- * @method \Aws\Result updateResolver(array $args = [])
59
- * @method \GuzzleHttp\Promise\Promise updateResolverAsync(array $args = [])
60
- * @method \Aws\Result updateType(array $args = [])
61
- * @method \GuzzleHttp\Promise\Promise updateTypeAsync(array $args = [])
62
- */
63
- class AppSyncClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/AppSync/Exception/AppSyncException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\AppSync\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **AWS AppSync** service.
8
- */
9
- class AppSyncException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/ApplicationAutoScaling/ApplicationAutoScalingClient.php DELETED
@@ -1,29 +0,0 @@
1
- <?php
2
- namespace Aws\ApplicationAutoScaling;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Application Auto Scaling** service.
8
- * @method \Aws\Result deleteScalingPolicy(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise deleteScalingPolicyAsync(array $args = [])
10
- * @method \Aws\Result deleteScheduledAction(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise deleteScheduledActionAsync(array $args = [])
12
- * @method \Aws\Result deregisterScalableTarget(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise deregisterScalableTargetAsync(array $args = [])
14
- * @method \Aws\Result describeScalableTargets(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise describeScalableTargetsAsync(array $args = [])
16
- * @method \Aws\Result describeScalingActivities(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise describeScalingActivitiesAsync(array $args = [])
18
- * @method \Aws\Result describeScalingPolicies(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise describeScalingPoliciesAsync(array $args = [])
20
- * @method \Aws\Result describeScheduledActions(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise describeScheduledActionsAsync(array $args = [])
22
- * @method \Aws\Result putScalingPolicy(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise putScalingPolicyAsync(array $args = [])
24
- * @method \Aws\Result putScheduledAction(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise putScheduledActionAsync(array $args = [])
26
- * @method \Aws\Result registerScalableTarget(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise registerScalableTargetAsync(array $args = [])
28
- */
29
- class ApplicationAutoScalingClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/ApplicationAutoScaling/Exception/ApplicationAutoScalingException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\ApplicationAutoScaling\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **Application Auto Scaling** service.
8
- */
9
- class ApplicationAutoScalingException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/ApplicationDiscoveryService/ApplicationDiscoveryServiceClient.php DELETED
@@ -1,53 +0,0 @@
1
- <?php
2
- namespace Aws\ApplicationDiscoveryService;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS Application Discovery Service** service.
8
- * @method \Aws\Result associateConfigurationItemsToApplication(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise associateConfigurationItemsToApplicationAsync(array $args = [])
10
- * @method \Aws\Result createApplication(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise createApplicationAsync(array $args = [])
12
- * @method \Aws\Result createTags(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise createTagsAsync(array $args = [])
14
- * @method \Aws\Result deleteApplications(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise deleteApplicationsAsync(array $args = [])
16
- * @method \Aws\Result deleteTags(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise deleteTagsAsync(array $args = [])
18
- * @method \Aws\Result describeAgents(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise describeAgentsAsync(array $args = [])
20
- * @method \Aws\Result describeConfigurations(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise describeConfigurationsAsync(array $args = [])
22
- * @method \Aws\Result describeContinuousExports(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise describeContinuousExportsAsync(array $args = [])
24
- * @method \Aws\Result describeExportConfigurations(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise describeExportConfigurationsAsync(array $args = [])
26
- * @method \Aws\Result describeExportTasks(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise describeExportTasksAsync(array $args = [])
28
- * @method \Aws\Result describeTags(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise describeTagsAsync(array $args = [])
30
- * @method \Aws\Result disassociateConfigurationItemsFromApplication(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise disassociateConfigurationItemsFromApplicationAsync(array $args = [])
32
- * @method \Aws\Result exportConfigurations(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise exportConfigurationsAsync(array $args = [])
34
- * @method \Aws\Result getDiscoverySummary(array $args = [])
35
- * @method \GuzzleHttp\Promise\Promise getDiscoverySummaryAsync(array $args = [])
36
- * @method \Aws\Result listConfigurations(array $args = [])
37
- * @method \GuzzleHttp\Promise\Promise listConfigurationsAsync(array $args = [])
38
- * @method \Aws\Result listServerNeighbors(array $args = [])
39
- * @method \GuzzleHttp\Promise\Promise listServerNeighborsAsync(array $args = [])
40
- * @method \Aws\Result startContinuousExport(array $args = [])
41
- * @method \GuzzleHttp\Promise\Promise startContinuousExportAsync(array $args = [])
42
- * @method \Aws\Result startDataCollectionByAgentIds(array $args = [])
43
- * @method \GuzzleHttp\Promise\Promise startDataCollectionByAgentIdsAsync(array $args = [])
44
- * @method \Aws\Result startExportTask(array $args = [])
45
- * @method \GuzzleHttp\Promise\Promise startExportTaskAsync(array $args = [])
46
- * @method \Aws\Result stopContinuousExport(array $args = [])
47
- * @method \GuzzleHttp\Promise\Promise stopContinuousExportAsync(array $args = [])
48
- * @method \Aws\Result stopDataCollectionByAgentIds(array $args = [])
49
- * @method \GuzzleHttp\Promise\Promise stopDataCollectionByAgentIdsAsync(array $args = [])
50
- * @method \Aws\Result updateApplication(array $args = [])
51
- * @method \GuzzleHttp\Promise\Promise updateApplicationAsync(array $args = [])
52
- */
53
- class ApplicationDiscoveryServiceClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/ApplicationDiscoveryService/Exception/ApplicationDiscoveryServiceException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\ApplicationDiscoveryService\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **AWS Application Discovery Service** service.
8
- */
9
- class ApplicationDiscoveryServiceException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Appstream/AppstreamClient.php DELETED
@@ -1,81 +0,0 @@
1
- <?php
2
- namespace Aws\Appstream;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon AppStream** service.
8
- * @method \Aws\Result associateFleet(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise associateFleetAsync(array $args = [])
10
- * @method \Aws\Result copyImage(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise copyImageAsync(array $args = [])
12
- * @method \Aws\Result createDirectoryConfig(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise createDirectoryConfigAsync(array $args = [])
14
- * @method \Aws\Result createFleet(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise createFleetAsync(array $args = [])
16
- * @method \Aws\Result createImageBuilder(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise createImageBuilderAsync(array $args = [])
18
- * @method \Aws\Result createImageBuilderStreamingURL(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise createImageBuilderStreamingURLAsync(array $args = [])
20
- * @method \Aws\Result createStack(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise createStackAsync(array $args = [])
22
- * @method \Aws\Result createStreamingURL(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise createStreamingURLAsync(array $args = [])
24
- * @method \Aws\Result deleteDirectoryConfig(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise deleteDirectoryConfigAsync(array $args = [])
26
- * @method \Aws\Result deleteFleet(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise deleteFleetAsync(array $args = [])
28
- * @method \Aws\Result deleteImage(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise deleteImageAsync(array $args = [])
30
- * @method \Aws\Result deleteImageBuilder(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise deleteImageBuilderAsync(array $args = [])
32
- * @method \Aws\Result deleteImagePermissions(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise deleteImagePermissionsAsync(array $args = [])
34
- * @method \Aws\Result deleteStack(array $args = [])
35
- * @method \GuzzleHttp\Promise\Promise deleteStackAsync(array $args = [])
36
- * @method \Aws\Result describeDirectoryConfigs(array $args = [])
37
- * @method \GuzzleHttp\Promise\Promise describeDirectoryConfigsAsync(array $args = [])
38
- * @method \Aws\Result describeFleets(array $args = [])
39
- * @method \GuzzleHttp\Promise\Promise describeFleetsAsync(array $args = [])
40
- * @method \Aws\Result describeImageBuilders(array $args = [])
41
- * @method \GuzzleHttp\Promise\Promise describeImageBuildersAsync(array $args = [])
42
- * @method \Aws\Result describeImagePermissions(array $args = [])
43
- * @method \GuzzleHttp\Promise\Promise describeImagePermissionsAsync(array $args = [])
44
- * @method \Aws\Result describeImages(array $args = [])
45
- * @method \GuzzleHttp\Promise\Promise describeImagesAsync(array $args = [])
46
- * @method \Aws\Result describeSessions(array $args = [])
47
- * @method \GuzzleHttp\Promise\Promise describeSessionsAsync(array $args = [])
48
- * @method \Aws\Result describeStacks(array $args = [])
49
- * @method \GuzzleHttp\Promise\Promise describeStacksAsync(array $args = [])
50
- * @method \Aws\Result disassociateFleet(array $args = [])
51
- * @method \GuzzleHttp\Promise\Promise disassociateFleetAsync(array $args = [])
52
- * @method \Aws\Result expireSession(array $args = [])
53
- * @method \GuzzleHttp\Promise\Promise expireSessionAsync(array $args = [])
54
- * @method \Aws\Result listAssociatedFleets(array $args = [])
55
- * @method \GuzzleHttp\Promise\Promise listAssociatedFleetsAsync(array $args = [])
56
- * @method \Aws\Result listAssociatedStacks(array $args = [])
57
- * @method \GuzzleHttp\Promise\Promise listAssociatedStacksAsync(array $args = [])
58
- * @method \Aws\Result listTagsForResource(array $args = [])
59
- * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
60
- * @method \Aws\Result startFleet(array $args = [])
61
- * @method \GuzzleHttp\Promise\Promise startFleetAsync(array $args = [])
62
- * @method \Aws\Result startImageBuilder(array $args = [])
63
- * @method \GuzzleHttp\Promise\Promise startImageBuilderAsync(array $args = [])
64
- * @method \Aws\Result stopFleet(array $args = [])
65
- * @method \GuzzleHttp\Promise\Promise stopFleetAsync(array $args = [])
66
- * @method \Aws\Result stopImageBuilder(array $args = [])
67
- * @method \GuzzleHttp\Promise\Promise stopImageBuilderAsync(array $args = [])
68
- * @method \Aws\Result tagResource(array $args = [])
69
- * @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
70
- * @method \Aws\Result untagResource(array $args = [])
71
- * @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
72
- * @method \Aws\Result updateDirectoryConfig(array $args = [])
73
- * @method \GuzzleHttp\Promise\Promise updateDirectoryConfigAsync(array $args = [])
74
- * @method \Aws\Result updateFleet(array $args = [])
75
- * @method \GuzzleHttp\Promise\Promise updateFleetAsync(array $args = [])
76
- * @method \Aws\Result updateImagePermissions(array $args = [])
77
- * @method \GuzzleHttp\Promise\Promise updateImagePermissionsAsync(array $args = [])
78
- * @method \Aws\Result updateStack(array $args = [])
79
- * @method \GuzzleHttp\Promise\Promise updateStackAsync(array $args = [])
80
- */
81
- class AppstreamClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Appstream/Exception/AppstreamException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\Appstream\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **Amazon AppStream** service.
8
- */
9
- class AppstreamException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Athena/AthenaClient.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- namespace Aws\Athena;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon Athena** service.
8
- * @method \Aws\Result batchGetNamedQuery(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise batchGetNamedQueryAsync(array $args = [])
10
- * @method \Aws\Result batchGetQueryExecution(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise batchGetQueryExecutionAsync(array $args = [])
12
- * @method \Aws\Result createNamedQuery(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise createNamedQueryAsync(array $args = [])
14
- * @method \Aws\Result deleteNamedQuery(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise deleteNamedQueryAsync(array $args = [])
16
- * @method \Aws\Result getNamedQuery(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise getNamedQueryAsync(array $args = [])
18
- * @method \Aws\Result getQueryExecution(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise getQueryExecutionAsync(array $args = [])
20
- * @method \Aws\Result getQueryResults(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise getQueryResultsAsync(array $args = [])
22
- * @method \Aws\Result listNamedQueries(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise listNamedQueriesAsync(array $args = [])
24
- * @method \Aws\Result listQueryExecutions(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise listQueryExecutionsAsync(array $args = [])
26
- * @method \Aws\Result startQueryExecution(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise startQueryExecutionAsync(array $args = [])
28
- * @method \Aws\Result stopQueryExecution(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise stopQueryExecutionAsync(array $args = [])
30
- */
31
- class AthenaClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Athena/Exception/AthenaException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\Athena\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **Amazon Athena** service.
8
- */
9
- class AthenaException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/AutoScaling/AutoScalingClient.php DELETED
@@ -1,118 +0,0 @@
1
- <?php
2
- namespace Aws\AutoScaling;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * Auto Scaling client.
8
- *
9
- * @method \Aws\Result attachInstances(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise attachInstancesAsync(array $args = [])
11
- * @method \Aws\Result attachLoadBalancerTargetGroups(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise attachLoadBalancerTargetGroupsAsync(array $args = [])
13
- * @method \Aws\Result attachLoadBalancers(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise attachLoadBalancersAsync(array $args = [])
15
- * @method \Aws\Result batchDeleteScheduledAction(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise batchDeleteScheduledActionAsync(array $args = [])
17
- * @method \Aws\Result batchPutScheduledUpdateGroupAction(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise batchPutScheduledUpdateGroupActionAsync(array $args = [])
19
- * @method \Aws\Result completeLifecycleAction(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise completeLifecycleActionAsync(array $args = [])
21
- * @method \Aws\Result createAutoScalingGroup(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise createAutoScalingGroupAsync(array $args = [])
23
- * @method \Aws\Result createLaunchConfiguration(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise createLaunchConfigurationAsync(array $args = [])
25
- * @method \Aws\Result createOrUpdateTags(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise createOrUpdateTagsAsync(array $args = [])
27
- * @method \Aws\Result deleteAutoScalingGroup(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise deleteAutoScalingGroupAsync(array $args = [])
29
- * @method \Aws\Result deleteLaunchConfiguration(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise deleteLaunchConfigurationAsync(array $args = [])
31
- * @method \Aws\Result deleteLifecycleHook(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise deleteLifecycleHookAsync(array $args = [])
33
- * @method \Aws\Result deleteNotificationConfiguration(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise deleteNotificationConfigurationAsync(array $args = [])
35
- * @method \Aws\Result deletePolicy(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise deletePolicyAsync(array $args = [])
37
- * @method \Aws\Result deleteScheduledAction(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise deleteScheduledActionAsync(array $args = [])
39
- * @method \Aws\Result deleteTags(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise deleteTagsAsync(array $args = [])
41
- * @method \Aws\Result describeAccountLimits(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise describeAccountLimitsAsync(array $args = [])
43
- * @method \Aws\Result describeAdjustmentTypes(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise describeAdjustmentTypesAsync(array $args = [])
45
- * @method \Aws\Result describeAutoScalingGroups(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise describeAutoScalingGroupsAsync(array $args = [])
47
- * @method \Aws\Result describeAutoScalingInstances(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise describeAutoScalingInstancesAsync(array $args = [])
49
- * @method \Aws\Result describeAutoScalingNotificationTypes(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise describeAutoScalingNotificationTypesAsync(array $args = [])
51
- * @method \Aws\Result describeLaunchConfigurations(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise describeLaunchConfigurationsAsync(array $args = [])
53
- * @method \Aws\Result describeLifecycleHookTypes(array $args = [])
54
- * @method \GuzzleHttp\Promise\Promise describeLifecycleHookTypesAsync(array $args = [])
55
- * @method \Aws\Result describeLifecycleHooks(array $args = [])
56
- * @method \GuzzleHttp\Promise\Promise describeLifecycleHooksAsync(array $args = [])
57
- * @method \Aws\Result describeLoadBalancerTargetGroups(array $args = [])
58
- * @method \GuzzleHttp\Promise\Promise describeLoadBalancerTargetGroupsAsync(array $args = [])
59
- * @method \Aws\Result describeLoadBalancers(array $args = [])
60
- * @method \GuzzleHttp\Promise\Promise describeLoadBalancersAsync(array $args = [])
61
- * @method \Aws\Result describeMetricCollectionTypes(array $args = [])
62
- * @method \GuzzleHttp\Promise\Promise describeMetricCollectionTypesAsync(array $args = [])
63
- * @method \Aws\Result describeNotificationConfigurations(array $args = [])
64
- * @method \GuzzleHttp\Promise\Promise describeNotificationConfigurationsAsync(array $args = [])
65
- * @method \Aws\Result describePolicies(array $args = [])
66
- * @method \GuzzleHttp\Promise\Promise describePoliciesAsync(array $args = [])
67
- * @method \Aws\Result describeScalingActivities(array $args = [])
68
- * @method \GuzzleHttp\Promise\Promise describeScalingActivitiesAsync(array $args = [])
69
- * @method \Aws\Result describeScalingProcessTypes(array $args = [])
70
- * @method \GuzzleHttp\Promise\Promise describeScalingProcessTypesAsync(array $args = [])
71
- * @method \Aws\Result describeScheduledActions(array $args = [])
72
- * @method \GuzzleHttp\Promise\Promise describeScheduledActionsAsync(array $args = [])
73
- * @method \Aws\Result describeTags(array $args = [])
74
- * @method \GuzzleHttp\Promise\Promise describeTagsAsync(array $args = [])
75
- * @method \Aws\Result describeTerminationPolicyTypes(array $args = [])
76
- * @method \GuzzleHttp\Promise\Promise describeTerminationPolicyTypesAsync(array $args = [])
77
- * @method \Aws\Result detachInstances(array $args = [])
78
- * @method \GuzzleHttp\Promise\Promise detachInstancesAsync(array $args = [])
79
- * @method \Aws\Result detachLoadBalancerTargetGroups(array $args = [])
80
- * @method \GuzzleHttp\Promise\Promise detachLoadBalancerTargetGroupsAsync(array $args = [])
81
- * @method \Aws\Result detachLoadBalancers(array $args = [])
82
- * @method \GuzzleHttp\Promise\Promise detachLoadBalancersAsync(array $args = [])
83
- * @method \Aws\Result disableMetricsCollection(array $args = [])
84
- * @method \GuzzleHttp\Promise\Promise disableMetricsCollectionAsync(array $args = [])
85
- * @method \Aws\Result enableMetricsCollection(array $args = [])
86
- * @method \GuzzleHttp\Promise\Promise enableMetricsCollectionAsync(array $args = [])
87
- * @method \Aws\Result enterStandby(array $args = [])
88
- * @method \GuzzleHttp\Promise\Promise enterStandbyAsync(array $args = [])
89
- * @method \Aws\Result executePolicy(array $args = [])
90
- * @method \GuzzleHttp\Promise\Promise executePolicyAsync(array $args = [])
91
- * @method \Aws\Result exitStandby(array $args = [])
92
- * @method \GuzzleHttp\Promise\Promise exitStandbyAsync(array $args = [])
93
- * @method \Aws\Result putLifecycleHook(array $args = [])
94
- * @method \GuzzleHttp\Promise\Promise putLifecycleHookAsync(array $args = [])
95
- * @method \Aws\Result putNotificationConfiguration(array $args = [])
96
- * @method \GuzzleHttp\Promise\Promise putNotificationConfigurationAsync(array $args = [])
97
- * @method \Aws\Result putScalingPolicy(array $args = [])
98
- * @method \GuzzleHttp\Promise\Promise putScalingPolicyAsync(array $args = [])
99
- * @method \Aws\Result putScheduledUpdateGroupAction(array $args = [])
100
- * @method \GuzzleHttp\Promise\Promise putScheduledUpdateGroupActionAsync(array $args = [])
101
- * @method \Aws\Result recordLifecycleActionHeartbeat(array $args = [])
102
- * @method \GuzzleHttp\Promise\Promise recordLifecycleActionHeartbeatAsync(array $args = [])
103
- * @method \Aws\Result resumeProcesses(array $args = [])
104
- * @method \GuzzleHttp\Promise\Promise resumeProcessesAsync(array $args = [])
105
- * @method \Aws\Result setDesiredCapacity(array $args = [])
106
- * @method \GuzzleHttp\Promise\Promise setDesiredCapacityAsync(array $args = [])
107
- * @method \Aws\Result setInstanceHealth(array $args = [])
108
- * @method \GuzzleHttp\Promise\Promise setInstanceHealthAsync(array $args = [])
109
- * @method \Aws\Result setInstanceProtection(array $args = [])
110
- * @method \GuzzleHttp\Promise\Promise setInstanceProtectionAsync(array $args = [])
111
- * @method \Aws\Result suspendProcesses(array $args = [])
112
- * @method \GuzzleHttp\Promise\Promise suspendProcessesAsync(array $args = [])
113
- * @method \Aws\Result terminateInstanceInAutoScalingGroup(array $args = [])
114
- * @method \GuzzleHttp\Promise\Promise terminateInstanceInAutoScalingGroupAsync(array $args = [])
115
- * @method \Aws\Result updateAutoScalingGroup(array $args = [])
116
- * @method \GuzzleHttp\Promise\Promise updateAutoScalingGroupAsync(array $args = [])
117
- */
118
- class AutoScalingClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/AutoScaling/Exception/AutoScalingException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\AutoScaling\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error while interacting with the Auto Scaling service.
8
- */
9
- class AutoScalingException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/AutoScalingPlans/AutoScalingPlansClient.php DELETED
@@ -1,19 +0,0 @@
1
- <?php
2
- namespace Aws\AutoScalingPlans;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS Auto Scaling Plans** service.
8
- * @method \Aws\Result createScalingPlan(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise createScalingPlanAsync(array $args = [])
10
- * @method \Aws\Result deleteScalingPlan(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise deleteScalingPlanAsync(array $args = [])
12
- * @method \Aws\Result describeScalingPlanResources(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise describeScalingPlanResourcesAsync(array $args = [])
14
- * @method \Aws\Result describeScalingPlans(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise describeScalingPlansAsync(array $args = [])
16
- * @method \Aws\Result updateScalingPlan(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise updateScalingPlanAsync(array $args = [])
18
- */
19
- class AutoScalingPlansClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/AutoScalingPlans/Exception/AutoScalingPlansException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\AutoScalingPlans\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **AWS Auto Scaling Plans** service.
8
- */
9
- class AutoScalingPlansException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/AwsClient.php DELETED
@@ -1,328 +0,0 @@
1
- <?php
2
- namespace Aws;
3
-
4
- use Aws\Api\ApiProvider;
5
- use Aws\Api\DocModel;
6
- use Aws\Api\Service;
7
- use Aws\Signature\SignatureProvider;
8
- use GuzzleHttp\Psr7\Uri;
9
-
10
- /**
11
- * Default AWS client implementation
12
- */
13
- class AwsClient implements AwsClientInterface
14
- {
15
- use AwsClientTrait;
16
-
17
- /** @var array */
18
- private $config;
19
-
20
- /** @var string */
21
- private $region;
22
-
23
- /** @var string */
24
- private $endpoint;
25
-
26
- /** @var Service */
27
- private $api;
28
-
29
- /** @var callable */
30
- private $signatureProvider;
31
-
32
- /** @var callable */
33
- private $credentialProvider;
34
-
35
- /** @var HandlerList */
36
- private $handlerList;
37
-
38
- /** @var array*/
39
- private $defaultRequestOptions;
40
-
41
- /**
42
- * Get an array of client constructor arguments used by the client.
43
- *
44
- * @return array
45
- */
46
- public static function getArguments()
47
- {
48
- return ClientResolver::getDefaultArguments();
49
- }
50
-
51
- /**
52
- * The client constructor accepts the following options:
53
- *
54
- * - api_provider: (callable) An optional PHP callable that accepts a
55
- * type, service, and version argument, and returns an array of
56
- * corresponding configuration data. The type value can be one of api,
57
- * waiter, or paginator.
58
- * - credentials:
59
- * (Aws\Credentials\CredentialsInterface|array|bool|callable) Specifies
60
- * the credentials used to sign requests. Provide an
61
- * Aws\Credentials\CredentialsInterface object, an associative array of
62
- * "key", "secret", and an optional "token" key, `false` to use null
63
- * credentials, or a callable credentials provider used to create
64
- * credentials or return null. See Aws\Credentials\CredentialProvider for
65
- * a list of built-in credentials providers. If no credentials are
66
- * provided, the SDK will attempt to load them from the environment.
67
- * - debug: (bool|array) Set to true to display debug information when
68
- * sending requests. Alternatively, you can provide an associative array
69
- * with the following keys: logfn: (callable) Function that is invoked
70
- * with log messages; stream_size: (int) When the size of a stream is
71
- * greater than this number, the stream data will not be logged (set to
72
- * "0" to not log any stream data); scrub_auth: (bool) Set to false to
73
- * disable the scrubbing of auth data from the logged messages; http:
74
- * (bool) Set to false to disable the "debug" feature of lower level HTTP
75
- * adapters (e.g., verbose curl output).
76
- * - stats: (bool|array) Set to true to gather transfer statistics on
77
- * requests sent. Alternatively, you can provide an associative array with
78
- * the following keys: retries: (bool) Set to false to disable reporting
79
- * on retries attempted; http: (bool) Set to true to enable collecting
80
- * statistics from lower level HTTP adapters (e.g., values returned in
81
- * GuzzleHttp\TransferStats). HTTP handlers must support an
82
- * `http_stats_receiver` option for this to have an effect; timer: (bool)
83
- * Set to true to enable a command timer that reports the total wall clock
84
- * time spent on an operation in seconds.
85
- * - endpoint: (string) The full URI of the webservice. This is only
86
- * required when connecting to a custom endpoint (e.g., a local version
87
- * of S3).
88
- * - endpoint_provider: (callable) An optional PHP callable that
89
- * accepts a hash of options including a "service" and "region" key and
90
- * returns NULL or a hash of endpoint data, of which the "endpoint" key
91
- * is required. See Aws\Endpoint\EndpointProvider for a list of built-in
92
- * providers.
93
- * - handler: (callable) A handler that accepts a command object,
94
- * request object and returns a promise that is fulfilled with an
95
- * Aws\ResultInterface object or rejected with an
96
- * Aws\Exception\AwsException. A handler does not accept a next handler
97
- * as it is terminal and expected to fulfill a command. If no handler is
98
- * provided, a default Guzzle handler will be utilized.
99
- * - http: (array, default=array(0)) Set to an array of SDK request
100
- * options to apply to each request (e.g., proxy, verify, etc.).
101
- * - http_handler: (callable) An HTTP handler is a function that
102
- * accepts a PSR-7 request object and returns a promise that is fulfilled
103
- * with a PSR-7 response object or rejected with an array of exception
104
- * data. NOTE: This option supersedes any provided "handler" option.
105
- * - idempotency_auto_fill: (bool|callable) Set to false to disable SDK to
106
- * populate parameters that enabled 'idempotencyToken' trait with a random
107
- * UUID v4 value on your behalf. Using default value 'true' still allows
108
- * parameter value to be overwritten when provided. Note: auto-fill only
109
- * works when cryptographically secure random bytes generator functions
110
- * (random_bytes, openssl_random_pseudo_bytes or mcrypt_create_iv) can be
111
- * found. You may also provide a callable source of random bytes.
112
- * - profile: (string) Allows you to specify which profile to use when
113
- * credentials are created from the AWS credentials file in your HOME
114
- * directory. This setting overrides the AWS_PROFILE environment
115
- * variable. Note: Specifying "profile" will cause the "credentials" key
116
- * to be ignored.
117
- * - region: (string, required) Region to connect to. See
118
- * http://docs.aws.amazon.com/general/latest/gr/rande.html for a list of
119
- * available regions.
120
- * - retries: (int, default=int(3)) Configures the maximum number of
121
- * allowed retries for a client (pass 0 to disable retries).
122
- * - scheme: (string, default=string(5) "https") URI scheme to use when
123
- * connecting connect. The SDK will utilize "https" endpoints (i.e.,
124
- * utilize SSL/TLS connections) by default. You can attempt to connect to
125
- * a service over an unencrypted "http" endpoint by setting ``scheme`` to
126
- * "http".
127
- * - signature_provider: (callable) A callable that accepts a signature
128
- * version name (e.g., "v4"), a service name, and region, and
129
- * returns a SignatureInterface object or null. This provider is used to
130
- * create signers utilized by the client. See
131
- * Aws\Signature\SignatureProvider for a list of built-in providers
132
- * - signature_version: (string) A string representing a custom
133
- * signature version to use with a service (e.g., v4). Note that
134
- * per/operation signature version MAY override this requested signature
135
- * version.
136
- * - validate: (bool, default=bool(true)) Set to false to disable
137
- * client-side parameter validation.
138
- * - version: (string, required) The version of the webservice to
139
- * utilize (e.g., 2006-03-01).
140
- *
141
- * @param array $args Client configuration arguments.
142
- *
143
- * @throws \InvalidArgumentException if any required options are missing or
144
- * the service is not supported.
145
- */
146
- public function __construct(array $args)
147
- {
148
- list($service, $exceptionClass) = $this->parseClass();
149
- if (!isset($args['service'])) {
150
- $args['service'] = manifest($service)['endpoint'];
151
- }
152
- if (!isset($args['exception_class'])) {
153
- $args['exception_class'] = $exceptionClass;
154
- }
155
-
156
- $this->handlerList = new HandlerList();
157
- $resolver = new ClientResolver(static::getArguments());
158
- $config = $resolver->resolve($args, $this->handlerList);
159
- $this->api = $config['api'];
160
- $this->signatureProvider = $config['signature_provider'];
161
- $this->endpoint = new Uri($config['endpoint']);
162
- $this->credentialProvider = $config['credentials'];
163
- $this->region = isset($config['region']) ? $config['region'] : null;
164
- $this->config = $config['config'];
165
- $this->defaultRequestOptions = $config['http'];
166
- $this->addSignatureMiddleware();
167
- $this->addInvocationId();
168
-
169
- if (isset($args['with_resolved'])) {
170
- $args['with_resolved']($config);
171
- }
172
- }
173
-
174
- public function getHandlerList()
175
- {
176
- return $this->handlerList;
177
- }
178
-
179
- public function getConfig($option = null)
180
- {
181
- return $option === null
182
- ? $this->config
183
- : (isset($this->config[$option])
184
- ? $this->config[$option]
185
- : null);
186
- }
187
-
188
- public function getCredentials()
189
- {
190
- $fn = $this->credentialProvider;
191
- return $fn();
192
- }
193
-
194
- public function getEndpoint()
195
- {
196
- return $this->endpoint;
197
- }
198
-
199
- public function getRegion()
200
- {
201
- return $this->region;
202
- }
203
-
204
- public function getApi()
205
- {
206
- return $this->api;
207
- }
208
-
209
- public function getCommand($name, array $args = [])
210
- {
211
- // Fail fast if the command cannot be found in the description.
212
- if (!isset($this->getApi()['operations'][$name])) {
213
- $name = ucfirst($name);
214
- if (!isset($this->getApi()['operations'][$name])) {
215
- throw new \InvalidArgumentException("Operation not found: $name");
216
- }
217
- }
218
-
219
- if (!isset($args['@http'])) {
220
- $args['@http'] = $this->defaultRequestOptions;
221
- } else {
222
- $args['@http'] += $this->defaultRequestOptions;
223
- }
224
-
225
- return new Command($name, $args, clone $this->getHandlerList());
226
- }
227
-
228
- public function __sleep()
229
- {
230
- throw new \RuntimeException('Instances of ' . static::class
231
- . ' cannot be serialized');
232
- }
233
-
234
- /**
235
- * Get the signature_provider function of the client.
236
- *
237
- * @return callable
238
- */
239
- final protected function getSignatureProvider()
240
- {
241
- return $this->signatureProvider;
242
- }
243
-
244
- /**
245
- * Parse the class name and setup the custom exception class of the client
246
- * and return the "service" name of the client and "exception_class".
247
- *
248
- * @return array
249
- */
250
- private function parseClass()
251
- {
252
- $klass = get_class($this);
253
-
254
- if ($klass === __CLASS__) {
255
- return ['', 'Aws\Exception\AwsException'];
256
- }
257
-
258
- $service = substr($klass, strrpos($klass, '\\') + 1, -6);
259
-
260
- return [
261
- strtolower($service),
262
- "Aws\\{$service}\\Exception\\{$service}Exception"
263
- ];
264
- }
265
-
266
- private function addSignatureMiddleware()
267
- {
268
- $api = $this->getApi();
269
- $provider = $this->signatureProvider;
270
- $version = $this->config['signature_version'];
271
- $name = $this->config['signing_name'];
272
- $region = $this->config['signing_region'];
273
-
274
- $resolver = static function (
275
- CommandInterface $c
276
- ) use ($api, $provider, $name, $region, $version) {
277
- $authType = $api->getOperation($c->getName())['authtype'];
278
- switch ($authType){
279
- case 'none':
280
- $version = 'anonymous';
281
- break;
282
- case 'v4-unsigned-body':
283
- $version = 'v4-unsigned-body';
284
- break;
285
- }
286
- return SignatureProvider::resolve($provider, $version, $name, $region);
287
- };
288
- $this->handlerList->appendSign(
289
- Middleware::signer($this->credentialProvider, $resolver),
290
- 'signer'
291
- );
292
- }
293
-
294
- private function addInvocationId()
295
- {
296
- // Add invocation id to each request
297
- $this->handlerList->prependSign(Middleware::invocationId(), 'invocation-id');
298
- }
299
-
300
- /**
301
- * Returns a service model and doc model with any necessary changes
302
- * applied.
303
- *
304
- * @param array $api Array of service data being documented.
305
- * @param array $docs Array of doc model data.
306
- *
307
- * @return array Tuple containing a [Service, DocModel]
308
- *
309
- * @internal This should only used to document the service API.
310
- * @codeCoverageIgnore
311
- */
312
- public static function applyDocFilters(array $api, array $docs)
313
- {
314
- return [
315
- new Service($api, ApiProvider::defaultProvider()),
316
- new DocModel($docs)
317
- ];
318
- }
319
-
320
- /**
321
- * @deprecated
322
- * @return static
323
- */
324
- public static function factory(array $config = [])
325
- {
326
- return new static($config);
327
- }
328
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/AwsClientInterface.php DELETED
@@ -1,169 +0,0 @@
1
- <?php
2
- namespace Aws;
3
-
4
- use Psr\Http\Message\UriInterface;
5
- use GuzzleHttp\Promise\PromiseInterface;
6
-
7
- /**
8
- * Represents an AWS client.
9
- */
10
- interface AwsClientInterface
11
- {
12
- /**
13
- * Creates and executes a command for an operation by name.
14
- *
15
- * Suffixing an operation name with "Async" will return a
16
- * promise that can be used to execute commands asynchronously.
17
- *
18
- * @param string $name Name of the command to execute.
19
- * @param array $arguments Arguments to pass to the getCommand method.
20
- *
21
- * @return ResultInterface
22
- * @throws \Exception
23
- */
24
- public function __call($name, array $arguments);
25
-
26
- /**
27
- * Create a command for an operation name.
28
- *
29
- * Special keys may be set on the command to control how it behaves,
30
- * including:
31
- *
32
- * - @http: Associative array of transfer specific options to apply to the
33
- * request that is serialized for this command. Available keys include
34
- * "proxy", "verify", "timeout", "connect_timeout", "debug", "delay", and
35
- * "headers".
36
- *
37
- * @param string $name Name of the operation to use in the command
38
- * @param array $args Arguments to pass to the command
39
- *
40
- * @return CommandInterface
41
- * @throws \InvalidArgumentException if no command can be found by name
42
- */
43
- public function getCommand($name, array $args = []);
44
-
45
- /**
46
- * Execute a single command.
47
- *
48
- * @param CommandInterface $command Command to execute
49
- *
50
- * @return ResultInterface
51
- * @throws \Exception
52
- */
53
- public function execute(CommandInterface $command);
54
-
55
- /**
56
- * Execute a command asynchronously.
57
- *
58
- * @param CommandInterface $command Command to execute
59
- *
60
- * @return \GuzzleHttp\Promise\PromiseInterface
61
- */
62
- public function executeAsync(CommandInterface $command);
63
-
64
- /**
65
- * Returns a promise that is fulfilled with an
66
- * {@see \Aws\Credentials\CredentialsInterface} object.
67
- *
68
- * If you need the credentials synchronously, then call the wait() method
69
- * on the returned promise.
70
- *
71
- * @return PromiseInterface
72
- */
73
- public function getCredentials();
74
-
75
- /**
76
- * Get the region to which the client is configured to send requests.
77
- *
78
- * @return string
79
- */
80
- public function getRegion();
81
-
82
- /**
83
- * Gets the default endpoint, or base URL, used by the client.
84
- *
85
- * @return UriInterface
86
- */
87
- public function getEndpoint();
88
-
89
- /**
90
- * Get the service description associated with the client.
91
- *
92
- * @return \Aws\Api\Service
93
- */
94
- public function getApi();
95
-
96
- /**
97
- * Get a client configuration value.
98
- *
99
- * @param string|null $option The option to retrieve. Pass null to retrieve
100
- * all options.
101
- * @return mixed|null
102
- */
103
- public function getConfig($option = null);
104
-
105
- /**
106
- * Get the handler list used to transfer commands.
107
- *
108
- * This list can be modified to add middleware or to change the underlying
109
- * handler used to send HTTP requests.
110
- *
111
- * @return HandlerList
112
- */
113
- public function getHandlerList();
114
-
115
- /**
116
- * Get a resource iterator for the specified operation.
117
- *
118
- * @param string $name Name of the iterator to retrieve.
119
- * @param array $args Command arguments to use with each command.
120
- *
121
- * @return \Iterator
122
- * @throws \UnexpectedValueException if the iterator config is invalid.
123
- */
124
- public function getIterator($name, array $args = []);
125
-
126
- /**
127
- * Get a result paginator for the specified operation.
128
- *
129
- * @param string $name Name of the operation used for iterator
130
- * @param array $args Command args to be used with each command
131
- *
132
- * @return \Aws\ResultPaginator
133
- * @throws \UnexpectedValueException if the iterator config is invalid.
134
- */
135
- public function getPaginator($name, array $args = []);
136
-
137
- /**
138
- * Wait until a resource is in a particular state.
139
- *
140
- * @param string|callable $name Name of the waiter that defines the wait
141
- * configuration and conditions.
142
- * @param array $args Args to be used with each command executed
143
- * by the waiter. Waiter configuration options
144
- * can be provided in an associative array in
145
- * the @waiter key.
146
- * @return void
147
- * @throws \UnexpectedValueException if the waiter is invalid.
148
- */
149
- public function waitUntil($name, array $args = []);
150
-
151
- /**
152
- * Get a waiter that waits until a resource is in a particular state.
153
- *
154
- * Retrieving a waiter can be useful when you wish to wait asynchronously:
155
- *
156
- * $waiter = $client->getWaiter('foo', ['bar' => 'baz']);
157
- * $waiter->promise()->then(function () { echo 'Done!'; });
158
- *
159
- * @param string|callable $name Name of the waiter that defines the wait
160
- * configuration and conditions.
161
- * @param array $args Args to be used with each command executed
162
- * by the waiter. Waiter configuration options
163
- * can be provided in an associative array in
164
- * the @waiter key.
165
- * @return \Aws\Waiter
166
- * @throws \UnexpectedValueException if the waiter is invalid.
167
- */
168
- public function getWaiter($name, array $args = []);
169
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/AwsClientTrait.php DELETED
@@ -1,92 +0,0 @@
1
- <?php
2
- namespace Aws;
3
-
4
- use Aws\Api\Service;
5
-
6
- /**
7
- * A trait providing generic functionality for interacting with Amazon Web
8
- * Services. This is meant to be used in classes implementing
9
- * \Aws\AwsClientInterface
10
- */
11
- trait AwsClientTrait
12
- {
13
- public function getPaginator($name, array $args = [])
14
- {
15
- $config = $this->getApi()->getPaginatorConfig($name);
16
-
17
- return new ResultPaginator($this, $name, $args, $config);
18
- }
19
-
20
- public function getIterator($name, array $args = [])
21
- {
22
- $config = $this->getApi()->getPaginatorConfig($name);
23
- if (!$config['result_key']) {
24
- throw new \UnexpectedValueException(sprintf(
25
- 'There are no resources to iterate for the %s operation of %s',
26
- $name, $this->getApi()['serviceFullName']
27
- ));
28
- }
29
-
30
- $key = is_array($config['result_key'])
31
- ? $config['result_key'][0]
32
- : $config['result_key'];
33
-
34
- if ($config['output_token'] && $config['input_token']) {
35
- return $this->getPaginator($name, $args)->search($key);
36
- }
37
-
38
- $result = $this->execute($this->getCommand($name, $args))->search($key);
39
-
40
- return new \ArrayIterator((array) $result);
41
- }
42
-
43
- public function waitUntil($name, array $args = [])
44
- {
45
- return $this->getWaiter($name, $args)->promise()->wait();
46
- }
47
-
48
- public function getWaiter($name, array $args = [])
49
- {
50
- $config = isset($args['@waiter']) ? $args['@waiter'] : [];
51
- $config += $this->getApi()->getWaiterConfig($name);
52
-
53
- return new Waiter($this, $name, $args, $config);
54
- }
55
-
56
- public function execute(CommandInterface $command)
57
- {
58
- return $this->executeAsync($command)->wait();
59
- }
60
-
61
- public function executeAsync(CommandInterface $command)
62
- {
63
- $handler = $command->getHandlerList()->resolve();
64
- return $handler($command);
65
- }
66
-
67
- public function __call($name, array $args)
68
- {
69
- $params = isset($args[0]) ? $args[0] : [];
70
-
71
- if (substr($name, -5) === 'Async') {
72
- return $this->executeAsync(
73
- $this->getCommand(substr($name, 0, -5), $params)
74
- );
75
- }
76
-
77
- return $this->execute($this->getCommand($name, $params));
78
- }
79
-
80
- /**
81
- * @param string $name
82
- * @param array $args
83
- *
84
- * @return CommandInterface
85
- */
86
- abstract public function getCommand($name, array $args = []);
87
-
88
- /**
89
- * @return Service
90
- */
91
- abstract public function getApi();
92
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Batch/BatchClient.php DELETED
@@ -1,41 +0,0 @@
1
- <?php
2
- namespace Aws\Batch;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS Batch** service.
8
- * @method \Aws\Result cancelJob(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise cancelJobAsync(array $args = [])
10
- * @method \Aws\Result createComputeEnvironment(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise createComputeEnvironmentAsync(array $args = [])
12
- * @method \Aws\Result createJobQueue(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise createJobQueueAsync(array $args = [])
14
- * @method \Aws\Result deleteComputeEnvironment(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise deleteComputeEnvironmentAsync(array $args = [])
16
- * @method \Aws\Result deleteJobQueue(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise deleteJobQueueAsync(array $args = [])
18
- * @method \Aws\Result deregisterJobDefinition(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise deregisterJobDefinitionAsync(array $args = [])
20
- * @method \Aws\Result describeComputeEnvironments(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise describeComputeEnvironmentsAsync(array $args = [])
22
- * @method \Aws\Result describeJobDefinitions(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise describeJobDefinitionsAsync(array $args = [])
24
- * @method \Aws\Result describeJobQueues(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise describeJobQueuesAsync(array $args = [])
26
- * @method \Aws\Result describeJobs(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise describeJobsAsync(array $args = [])
28
- * @method \Aws\Result listJobs(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise listJobsAsync(array $args = [])
30
- * @method \Aws\Result registerJobDefinition(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise registerJobDefinitionAsync(array $args = [])
32
- * @method \Aws\Result submitJob(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise submitJobAsync(array $args = [])
34
- * @method \Aws\Result terminateJob(array $args = [])
35
- * @method \GuzzleHttp\Promise\Promise terminateJobAsync(array $args = [])
36
- * @method \Aws\Result updateComputeEnvironment(array $args = [])
37
- * @method \GuzzleHttp\Promise\Promise updateComputeEnvironmentAsync(array $args = [])
38
- * @method \Aws\Result updateJobQueue(array $args = [])
39
- * @method \GuzzleHttp\Promise\Promise updateJobQueueAsync(array $args = [])
40
- */
41
- class BatchClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Batch/Exception/BatchException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\Batch\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **AWS Batch** service.
8
- */
9
- class BatchException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Budgets/BudgetsClient.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
- namespace Aws\Budgets;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS Budgets** service.
8
- * @method \Aws\Result createBudget(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise createBudgetAsync(array $args = [])
10
- * @method \Aws\Result createNotification(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise createNotificationAsync(array $args = [])
12
- * @method \Aws\Result createSubscriber(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise createSubscriberAsync(array $args = [])
14
- * @method \Aws\Result deleteBudget(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise deleteBudgetAsync(array $args = [])
16
- * @method \Aws\Result deleteNotification(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise deleteNotificationAsync(array $args = [])
18
- * @method \Aws\Result deleteSubscriber(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise deleteSubscriberAsync(array $args = [])
20
- * @method \Aws\Result describeBudget(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise describeBudgetAsync(array $args = [])
22
- * @method \Aws\Result describeBudgets(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise describeBudgetsAsync(array $args = [])
24
- * @method \Aws\Result describeNotificationsForBudget(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise describeNotificationsForBudgetAsync(array $args = [])
26
- * @method \Aws\Result describeSubscribersForNotification(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise describeSubscribersForNotificationAsync(array $args = [])
28
- * @method \Aws\Result updateBudget(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise updateBudgetAsync(array $args = [])
30
- * @method \Aws\Result updateNotification(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise updateNotificationAsync(array $args = [])
32
- * @method \Aws\Result updateSubscriber(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise updateSubscriberAsync(array $args = [])
34
- */
35
- class BudgetsClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Budgets/Exception/BudgetsException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\Budgets\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **AWS Budgets** service.
8
- */
9
- class BudgetsException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CacheInterface.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
- namespace Aws;
3
-
4
- /**
5
- * Represents a simple cache interface.
6
- */
7
- interface CacheInterface
8
- {
9
- /**
10
- * Get a cache item by key.
11
- *
12
- * @param string $key Key to retrieve.
13
- *
14
- * @return mixed|null Returns the value or null if not found.
15
- */
16
- public function get($key);
17
-
18
- /**
19
- * Set a cache key value.
20
- *
21
- * @param string $key Key to set
22
- * @param mixed $value Value to set.
23
- * @param int $ttl Number of seconds the item is allowed to live. Set
24
- * to 0 to allow an unlimited lifetime.
25
- */
26
- public function set($key, $value, $ttl = 0);
27
-
28
- /**
29
- * Remove a cache key.
30
- *
31
- * @param string $key Key to remove.
32
- */
33
- public function remove($key);
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/ClientResolver.php DELETED
@@ -1,743 +0,0 @@
1
- <?php
2
- namespace Aws;
3
-
4
- use Aws\Api\Validator;
5
- use Aws\Api\ApiProvider;
6
- use Aws\Api\Service;
7
- use Aws\Credentials\Credentials;
8
- use Aws\Credentials\CredentialsInterface;
9
- use Aws\Endpoint\PartitionEndpointProvider;
10
- use Aws\Signature\SignatureProvider;
11
- use Aws\Endpoint\EndpointProvider;
12
- use Aws\Credentials\CredentialProvider;
13
- use InvalidArgumentException as IAE;
14
- use Psr\Http\Message\RequestInterface;
15
-
16
- /**
17
- * @internal Resolves a hash of client arguments to construct a client.
18
- */
19
- class ClientResolver
20
- {
21
- /** @var array */
22
- private $argDefinitions;
23
-
24
- /** @var array Map of types to a corresponding function */
25
- private static $typeMap = [
26
- 'resource' => 'is_resource',
27
- 'callable' => 'is_callable',
28
- 'int' => 'is_int',
29
- 'bool' => 'is_bool',
30
- 'string' => 'is_string',
31
- 'object' => 'is_object',
32
- 'array' => 'is_array',
33
- ];
34
-
35
- private static $defaultArgs = [
36
- 'service' => [
37
- 'type' => 'value',
38
- 'valid' => ['string'],
39
- 'doc' => 'Name of the service to utilize. This value will be supplied by default when using one of the SDK clients (e.g., Aws\\S3\\S3Client).',
40
- 'required' => true,
41
- 'internal' => true
42
- ],
43
- 'exception_class' => [
44
- 'type' => 'value',
45
- 'valid' => ['string'],
46
- 'doc' => 'Exception class to create when an error occurs.',
47
- 'default' => 'Aws\Exception\AwsException',
48
- 'internal' => true
49
- ],
50
- 'scheme' => [
51
- 'type' => 'value',
52
- 'valid' => ['string'],
53
- 'default' => 'https',
54
- 'doc' => 'URI scheme to use when connecting connect. The SDK will utilize "https" endpoints (i.e., utilize SSL/TLS connections) by default. You can attempt to connect to a service over an unencrypted "http" endpoint by setting ``scheme`` to "http".',
55
- ],
56
- 'endpoint' => [
57
- 'type' => 'value',
58
- 'valid' => ['string'],
59
- 'doc' => 'The full URI of the webservice. This is only required when connecting to a custom endpoint (e.g., a local version of S3).',
60
- 'fn' => [__CLASS__, '_apply_endpoint'],
61
- ],
62
- 'region' => [
63
- 'type' => 'value',
64
- 'valid' => ['string'],
65
- 'required' => [__CLASS__, '_missing_region'],
66
- 'doc' => 'Region to connect to. See http://docs.aws.amazon.com/general/latest/gr/rande.html for a list of available regions.',
67
- ],
68
- 'version' => [
69
- 'type' => 'value',
70
- 'valid' => ['string'],
71
- 'required' => [__CLASS__, '_missing_version'],
72
- 'doc' => 'The version of the webservice to utilize (e.g., 2006-03-01).',
73
- ],
74
- 'signature_provider' => [
75
- 'type' => 'value',
76
- 'valid' => ['callable'],
77
- 'doc' => 'A callable that accepts a signature version name (e.g., "v4"), a service name, and region, and returns a SignatureInterface object or null. This provider is used to create signers utilized by the client. See Aws\\Signature\\SignatureProvider for a list of built-in providers',
78
- 'default' => [__CLASS__, '_default_signature_provider'],
79
- ],
80
- 'api_provider' => [
81
- 'type' => 'value',
82
- 'valid' => ['callable'],
83
- 'doc' => 'An optional PHP callable that accepts a type, service, and version argument, and returns an array of corresponding configuration data. The type value can be one of api, waiter, or paginator.',
84
- 'fn' => [__CLASS__, '_apply_api_provider'],
85
- 'default' => [ApiProvider::class, 'defaultProvider'],
86
- ],
87
- 'endpoint_provider' => [
88
- 'type' => 'value',
89
- 'valid' => ['callable'],
90
- 'fn' => [__CLASS__, '_apply_endpoint_provider'],
91
- 'doc' => 'An optional PHP callable that accepts a hash of options including a "service" and "region" key and returns NULL or a hash of endpoint data, of which the "endpoint" key is required. See Aws\\Endpoint\\EndpointProvider for a list of built-in providers.',
92
- 'default' => [__CLASS__, '_default_endpoint_provider'],
93
- ],
94
- 'serializer' => [
95
- 'default' => [__CLASS__, '_default_serializer'],
96
- 'fn' => [__CLASS__, '_apply_serializer'],
97
- 'internal' => true,
98
- 'type' => 'value',
99
- 'valid' => ['callable'],
100
- ],
101
- 'signature_version' => [
102
- 'type' => 'config',
103
- 'valid' => ['string'],
104
- 'doc' => 'A string representing a custom signature version to use with a service (e.g., v4). Note that per/operation signature version MAY override this requested signature version.',
105
- 'default' => [__CLASS__, '_default_signature_version'],
106
- ],
107
- 'signing_name' => [
108
- 'type' => 'config',
109
- 'valid' => ['string'],
110
- 'doc' => 'A string representing a custom service name to be used when calculating a request signature.',
111
- 'default' => [__CLASS__, '_default_signing_name'],
112
- ],
113
- 'signing_region' => [
114
- 'type' => 'config',
115
- 'valid' => ['string'],
116
- 'doc' => 'A string representing a custom region name to be used when calculating a request signature.',
117
- 'default' => [__CLASS__, '_default_signing_region'],
118
- ],
119
- 'profile' => [
120
- 'type' => 'config',
121
- 'valid' => ['string'],
122
- 'doc' => 'Allows you to specify which profile to use when credentials are created from the AWS credentials file in your HOME directory. This setting overrides the AWS_PROFILE environment variable. Note: Specifying "profile" will cause the "credentials" key to be ignored.',
123
- 'fn' => [__CLASS__, '_apply_profile'],
124
- ],
125
- 'credentials' => [
126
- 'type' => 'value',
127
- 'valid' => [CredentialsInterface::class, CacheInterface::class, 'array', 'bool', 'callable'],
128
- 'doc' => 'Specifies the credentials used to sign requests. Provide an Aws\Credentials\CredentialsInterface object, an associative array of "key", "secret", and an optional "token" key, `false` to use null credentials, or a callable credentials provider used to create credentials or return null. See Aws\\Credentials\\CredentialProvider for a list of built-in credentials providers. If no credentials are provided, the SDK will attempt to load them from the environment.',
129
- 'fn' => [__CLASS__, '_apply_credentials'],
130
- 'default' => [CredentialProvider::class, 'defaultProvider'],
131
- ],
132
- 'stats' => [
133
- 'type' => 'value',
134
- 'valid' => ['bool', 'array'],
135
- 'default' => false,
136
- 'doc' => 'Set to true to gather transfer statistics on requests sent. Alternatively, you can provide an associative array with the following keys: retries: (bool) Set to false to disable reporting on retries attempted; http: (bool) Set to true to enable collecting statistics from lower level HTTP adapters (e.g., values returned in GuzzleHttp\TransferStats). HTTP handlers must support an http_stats_receiver option for this to have an effect; timer: (bool) Set to true to enable a command timer that reports the total wall clock time spent on an operation in seconds.',
137
- 'fn' => [__CLASS__, '_apply_stats'],
138
- ],
139
- 'retries' => [
140
- 'type' => 'value',
141
- 'valid' => ['int'],
142
- 'doc' => 'Configures the maximum number of allowed retries for a client (pass 0 to disable retries). ',
143
- 'fn' => [__CLASS__, '_apply_retries'],
144
- 'default' => 3,
145
- ],
146
- 'validate' => [
147
- 'type' => 'value',
148
- 'valid' => ['bool', 'array'],
149
- 'default' => true,
150
- 'doc' => 'Set to false to disable client-side parameter validation. Set to true to utilize default validation constraints. Set to an associative array of validation options to enable specific validation constraints.',
151
- 'fn' => [__CLASS__, '_apply_validate'],
152
- ],
153
- 'debug' => [
154
- 'type' => 'value',
155
- 'valid' => ['bool', 'array'],
156
- 'doc' => 'Set to true to display debug information when sending requests. Alternatively, you can provide an associative array with the following keys: logfn: (callable) Function that is invoked with log messages; stream_size: (int) When the size of a stream is greater than this number, the stream data will not be logged (set to "0" to not log any stream data); scrub_auth: (bool) Set to false to disable the scrubbing of auth data from the logged messages; http: (bool) Set to false to disable the "debug" feature of lower level HTTP adapters (e.g., verbose curl output).',
157
- 'fn' => [__CLASS__, '_apply_debug'],
158
- ],
159
- 'http' => [
160
- 'type' => 'value',
161
- 'valid' => ['array'],
162
- 'default' => [],
163
- 'doc' => 'Set to an array of SDK request options to apply to each request (e.g., proxy, verify, etc.).',
164
- ],
165
- 'http_handler' => [
166
- 'type' => 'value',
167
- 'valid' => ['callable'],
168
- 'doc' => 'An HTTP handler is a function that accepts a PSR-7 request object and returns a promise that is fulfilled with a PSR-7 response object or rejected with an array of exception data. NOTE: This option supersedes any provided "handler" option.',
169
- 'fn' => [__CLASS__, '_apply_http_handler']
170
- ],
171
- 'handler' => [
172
- 'type' => 'value',
173
- 'valid' => ['callable'],
174
- 'doc' => 'A handler that accepts a command object, request object and returns a promise that is fulfilled with an Aws\ResultInterface object or rejected with an Aws\Exception\AwsException. A handler does not accept a next handler as it is terminal and expected to fulfill a command. If no handler is provided, a default Guzzle handler will be utilized.',
175
- 'fn' => [__CLASS__, '_apply_handler'],
176
- 'default' => [__CLASS__, '_default_handler']
177
- ],
178
- 'ua_append' => [
179
- 'type' => 'value',
180
- 'valid' => ['string', 'array'],
181
- 'doc' => 'Provide a string or array of strings to send in the User-Agent header.',
182
- 'fn' => [__CLASS__, '_apply_user_agent'],
183
- 'default' => [],
184
- ],
185
- 'idempotency_auto_fill' => [
186
- 'type' => 'value',
187
- 'valid' => ['bool', 'callable'],
188
- 'doc' => 'Set to false to disable SDK to populate parameters that enabled \'idempotencyToken\' trait with a random UUID v4 value on your behalf. Using default value \'true\' still allows parameter value to be overwritten when provided. Note: auto-fill only works when cryptographically secure random bytes generator functions(random_bytes, openssl_random_pseudo_bytes or mcrypt_create_iv) can be found. You may also provide a callable source of random bytes.',
189
- 'default' => true,
190
- 'fn' => [__CLASS__, '_apply_idempotency_auto_fill']
191
- ],
192
- ];
193
-
194
- /**
195
- * Gets an array of default client arguments, each argument containing a
196
- * hash of the following:
197
- *
198
- * - type: (string, required) option type described as follows:
199
- * - value: The default option type.
200
- * - config: The provided value is made available in the client's
201
- * getConfig() method.
202
- * - valid: (array, required) Valid PHP types or class names. Note: null
203
- * is not an allowed type.
204
- * - required: (bool, callable) Whether or not the argument is required.
205
- * Provide a function that accepts an array of arguments and returns a
206
- * string to provide a custom error message.
207
- * - default: (mixed) The default value of the argument if not provided. If
208
- * a function is provided, then it will be invoked to provide a default
209
- * value. The function is provided the array of options and is expected
210
- * to return the default value of the option. The default value can be a
211
- * closure and can not be a callable string that is not part of the
212
- * defaultArgs array.
213
- * - doc: (string) The argument documentation string.
214
- * - fn: (callable) Function used to apply the argument. The function
215
- * accepts the provided value, array of arguments by reference, and an
216
- * event emitter.
217
- *
218
- * Note: Order is honored and important when applying arguments.
219
- *
220
- * @return array
221
- */
222
- public static function getDefaultArguments()
223
- {
224
- return self::$defaultArgs;
225
- }
226
-
227
- /**
228
- * @param array $argDefinitions Client arguments.
229
- */
230
- public function __construct(array $argDefinitions)
231
- {
232
- $this->argDefinitions = $argDefinitions;
233
- }
234
-
235
- /**
236
- * Resolves client configuration options and attached event listeners.
237
- * Check for missing keys in passed arguments
238
- *
239
- * @param array $args Provided constructor arguments.
240
- * @param HandlerList $list Handler list to augment.
241
- *
242
- * @return array Returns the array of provided options.
243
- * @throws \InvalidArgumentException
244
- * @see Aws\AwsClient::__construct for a list of available options.
245
- */
246
- public function resolve(array $args, HandlerList $list)
247
- {
248
- $args['config'] = [];
249
- foreach ($this->argDefinitions as $key => $a) {
250
- // Add defaults, validate required values, and skip if not set.
251
- if (!isset($args[$key])) {
252
- if (isset($a['default'])) {
253
- // Merge defaults in when not present.
254
- if (is_callable($a['default'])
255
- && (
256
- is_array($a['default'])
257
- || $a['default'] instanceof \Closure
258
- )
259
- ) {
260
- $args[$key] = $a['default']($args);
261
- } else {
262
- $args[$key] = $a['default'];
263
- }
264
- } elseif (empty($a['required'])) {
265
- continue;
266
- } else {
267
- $this->throwRequired($args);
268
- }
269
- }
270
-
271
- // Validate the types against the provided value.
272
- foreach ($a['valid'] as $check) {
273
- if (isset(self::$typeMap[$check])) {
274
- $fn = self::$typeMap[$check];
275
- if ($fn($args[$key])) {
276
- goto is_valid;
277
- }
278
- } elseif ($args[$key] instanceof $check) {
279
- goto is_valid;
280
- }
281
- }
282
-
283
- $this->invalidType($key, $args[$key]);
284
-
285
- // Apply the value
286
- is_valid:
287
- if (isset($a['fn'])) {
288
- $a['fn']($args[$key], $args, $list);
289
- }
290
-
291
- if ($a['type'] === 'config') {
292
- $args['config'][$key] = $args[$key];
293
- }
294
- }
295
-
296
- return $args;
297
- }
298
-
299
- /**
300
- * Creates a verbose error message for an invalid argument.
301
- *
302
- * @param string $name Name of the argument that is missing.
303
- * @param array $args Provided arguments
304
- * @param bool $useRequired Set to true to show the required fn text if
305
- * available instead of the documentation.
306
- * @return string
307
- */
308
- private function getArgMessage($name, $args = [], $useRequired = false)
309
- {
310
- $arg = $this->argDefinitions[$name];
311
- $msg = '';
312
- $modifiers = [];
313
- if (isset($arg['valid'])) {
314
- $modifiers[] = implode('|', $arg['valid']);
315
- }
316
- if (isset($arg['choice'])) {
317
- $modifiers[] = 'One of ' . implode(', ', $arg['choice']);
318
- }
319
- if ($modifiers) {
320
- $msg .= '(' . implode('; ', $modifiers) . ')';
321
- }
322
- $msg = wordwrap("{$name}: {$msg}", 75, "\n ");
323
-
324
- if ($useRequired && is_callable($arg['required'])) {
325
- $msg .= "\n\n ";
326
- $msg .= str_replace("\n", "\n ", call_user_func($arg['required'], $args));
327
- } elseif (isset($arg['doc'])) {
328
- $msg .= wordwrap("\n\n {$arg['doc']}", 75, "\n ");
329
- }
330
-
331
- return $msg;
332
- }
333
-
334
- /**
335
- * Throw when an invalid type is encountered.
336
- *
337
- * @param string $name Name of the value being validated.
338
- * @param mixed $provided The provided value.
339
- * @throws \InvalidArgumentException
340
- */
341
- private function invalidType($name, $provided)
342
- {
343
- $expected = implode('|', $this->argDefinitions[$name]['valid']);
344
- $msg = "Invalid configuration value "
345
- . "provided for \"{$name}\". Expected {$expected}, but got "
346
- . describe_type($provided) . "\n\n"
347
- . $this->getArgMessage($name);
348
- throw new IAE($msg);
349
- }
350
-
351
- /**
352
- * Throws an exception for missing required arguments.
353
- *
354
- * @param array $args Passed in arguments.
355
- * @throws \InvalidArgumentException
356
- */
357
- private function throwRequired(array $args)
358
- {
359
- $missing = [];
360
- foreach ($this->argDefinitions as $k => $a) {
361
- if (empty($a['required'])
362
- || isset($a['default'])
363
- || isset($args[$k])
364
- ) {
365
- continue;
366
- }
367
- $missing[] = $this->getArgMessage($k, $args, true);
368
- }
369
- $msg = "Missing required client configuration options: \n\n";
370
- $msg .= implode("\n\n", $missing);
371
- throw new IAE($msg);
372
- }
373
-
374
- public static function _apply_retries($value, array &$args, HandlerList $list)
375
- {
376
- if ($value) {
377
- $decider = RetryMiddleware::createDefaultDecider($value);
378
- $list->appendSign(
379
- Middleware::retry($decider, null, $args['stats']['retries']),
380
- 'retry'
381
- );
382
- }
383
- }
384
-
385
- public static function _apply_credentials($value, array &$args)
386
- {
387
- if (is_callable($value)) {
388
- return;
389
- }
390
-
391
- if ($value instanceof CredentialsInterface) {
392
- $args['credentials'] = CredentialProvider::fromCredentials($value);
393
- } elseif (is_array($value)
394
- && isset($value['key'])
395
- && isset($value['secret'])
396
- ) {
397
- $args['credentials'] = CredentialProvider::fromCredentials(
398
- new Credentials(
399
- $value['key'],
400
- $value['secret'],
401
- isset($value['token']) ? $value['token'] : null,
402
- isset($value['expires']) ? $value['expires'] : null
403
- )
404
- );
405
- } elseif ($value === false) {
406
- $args['credentials'] = CredentialProvider::fromCredentials(
407
- new Credentials('', '')
408
- );
409
- $args['config']['signature_version'] = 'anonymous';
410
- } elseif ($value instanceof CacheInterface) {
411
- $args['credentials'] = CredentialProvider::defaultProvider($args);
412
- } else {
413
- throw new IAE('Credentials must be an instance of '
414
- . 'Aws\Credentials\CredentialsInterface, an associative '
415
- . 'array that contains "key", "secret", and an optional "token" '
416
- . 'key-value pairs, a credentials provider function, or false.');
417
- }
418
- }
419
-
420
- public static function _apply_api_provider(callable $value, array &$args)
421
- {
422
- $api = new Service(
423
- ApiProvider::resolve(
424
- $value,
425
- 'api',
426
- $args['service'],
427
- $args['version']
428
- ),
429
- $value
430
- );
431
-
432
- if (
433
- empty($args['config']['signing_name'])
434
- && isset($api['metadata']['signingName'])
435
- ) {
436
- $args['config']['signing_name'] = $api['metadata']['signingName'];
437
- }
438
-
439
- $args['api'] = $api;
440
- $args['parser'] = Service::createParser($api);
441
- $args['error_parser'] = Service::createErrorParser($api->getProtocol());
442
- }
443
-
444
- public static function _apply_endpoint_provider(callable $value, array &$args)
445
- {
446
- if (!isset($args['endpoint'])) {
447
- $endpointPrefix = isset($args['api']['metadata']['endpointPrefix'])
448
- ? $args['api']['metadata']['endpointPrefix']
449
- : $args['service'];
450
-
451
- // Invoke the endpoint provider and throw if it does not resolve.
452
- $result = EndpointProvider::resolve($value, [
453
- 'service' => $endpointPrefix,
454
- 'region' => $args['region'],
455
- 'scheme' => $args['scheme']
456
- ]);
457
-
458
- $args['endpoint'] = $result['endpoint'];
459
-
460
- if (
461
- empty($args['config']['signature_version'])
462
- && isset($result['signatureVersion'])
463
- ) {
464
- $args['config']['signature_version']
465
- = $result['signatureVersion'];
466
- }
467
-
468
- if (
469
- empty($args['config']['signing_region'])
470
- && isset($result['signingRegion'])
471
- ) {
472
- $args['config']['signing_region'] = $result['signingRegion'];
473
- }
474
-
475
- if (
476
- empty($args['config']['signing_name'])
477
- && isset($result['signingName'])
478
- ) {
479
- $args['config']['signing_name'] = $result['signingName'];
480
- }
481
- }
482
- }
483
-
484
- public static function _apply_serializer($value, array &$args, HandlerList $list)
485
- {
486
- $list->prependBuild(Middleware::requestBuilder($value), 'builder');
487
- }
488
-
489
- public static function _apply_debug($value, array &$args, HandlerList $list)
490
- {
491
- if ($value !== false) {
492
- $list->interpose(new TraceMiddleware($value === true ? [] : $value));
493
- }
494
- }
495
-
496
- public static function _apply_stats($value, array &$args, HandlerList $list)
497
- {
498
- // Create an array of stat collectors that are disabled (set to false)
499
- // by default. If the user has passed in true, enable all stat
500
- // collectors.
501
- $defaults = array_fill_keys(
502
- ['http', 'retries', 'timer'],
503
- $value === true
504
- );
505
- $args['stats'] = is_array($value)
506
- ? array_replace($defaults, $value)
507
- : $defaults;
508
-
509
- if ($args['stats']['timer']) {
510
- $list->prependInit(Middleware::timer(), 'timer');
511
- }
512
- }
513
-
514
- public static function _apply_profile($_, array &$args)
515
- {
516
- $args['credentials'] = CredentialProvider::ini($args['profile']);
517
- }
518
-
519
- public static function _apply_validate($value, array &$args, HandlerList $list)
520
- {
521
- if ($value === false) {
522
- return;
523
- }
524
-
525
- $validator = $value === true
526
- ? new Validator()
527
- : new Validator($value);
528
- $list->appendValidate(
529
- Middleware::validation($args['api'], $validator),
530
- 'validation'
531
- );
532
- }
533
-
534
- public static function _apply_handler($value, array &$args, HandlerList $list)
535
- {
536
- $list->setHandler($value);
537
- }
538
-
539
- public static function _default_handler(array &$args)
540
- {
541
- return new WrappedHttpHandler(
542
- default_http_handler(),
543
- $args['parser'],
544
- $args['error_parser'],
545
- $args['exception_class'],
546
- $args['stats']['http']
547
- );
548
- }
549
-
550
- public static function _apply_http_handler($value, array &$args, HandlerList $list)
551
- {
552
- $args['handler'] = new WrappedHttpHandler(
553
- $value,
554
- $args['parser'],
555
- $args['error_parser'],
556
- $args['exception_class'],
557
- $args['stats']['http']
558
- );
559
- }
560
-
561
- public static function _apply_user_agent($value, array &$args, HandlerList $list)
562
- {
563
- if (!is_array($value)) {
564
- $value = [$value];
565
- }
566
-
567
- $value = array_map('strval', $value);
568
-
569
- if (defined('HHVM_VERSION')) {
570
- array_unshift($value, 'HHVM/' . HHVM_VERSION);
571
- }
572
- array_unshift($value, 'aws-sdk-php/' . Sdk::VERSION);
573
- $args['ua_append'] = $value;
574
-
575
- $list->appendBuild(static function (callable $handler) use ($value) {
576
- return function (
577
- CommandInterface $command,
578
- RequestInterface $request
579
- ) use ($handler, $value) {
580
- return $handler($command, $request->withHeader(
581
- 'User-Agent',
582
- implode(' ', array_merge(
583
- $value,
584
- $request->getHeader('User-Agent')
585
- ))
586
- ));
587
- };
588
- });
589
- }
590
-
591
- public static function _apply_endpoint($value, array &$args, HandlerList $list)
592
- {
593
- $parts = parse_url($value);
594
- if (empty($parts['scheme']) || empty($parts['host'])) {
595
- throw new IAE(
596
- 'Endpoints must be full URIs and include a scheme and host'
597
- );
598
- }
599
-
600
- $args['endpoint'] = $value;
601
- }
602
-
603
- public static function _apply_idempotency_auto_fill(
604
- $value,
605
- array &$args,
606
- HandlerList $list
607
- ) {
608
- $enabled = false;
609
- $generator = null;
610
-
611
-
612
- if (is_bool($value)) {
613
- $enabled = $value;
614
- } elseif (is_callable($value)) {
615
- $enabled = true;
616
- $generator = $value;
617
- }
618
-
619
- if ($enabled) {
620
- $list->prependInit(
621
- IdempotencyTokenMiddleware::wrap($args['api'], $generator),
622
- 'idempotency_auto_fill'
623
- );
624
- }
625
- }
626
-
627
- public static function _default_endpoint_provider(array $args)
628
- {
629
- return PartitionEndpointProvider::defaultProvider()
630
- ->getPartition($args['region'], $args['service']);
631
- }
632
-
633
- public static function _default_serializer(array $args)
634
- {
635
- return Service::createSerializer(
636
- $args['api'],
637
- $args['endpoint']
638
- );
639
- }
640
-
641
- public static function _default_signature_provider()
642
- {
643
- return SignatureProvider::defaultProvider();
644
- }
645
-
646
- public static function _default_signature_version(array &$args)
647
- {
648
- if (isset($args['config']['signature_version'])) {
649
- return $args['config']['signature_version'];
650
- }
651
-
652
- $args['__partition_result'] = isset($args['__partition_result'])
653
- ? isset($args['__partition_result'])
654
- : call_user_func(PartitionEndpointProvider::defaultProvider(), [
655
- 'service' => $args['service'],
656
- 'region' => $args['region'],
657
- ]);
658
-
659
- return isset($args['__partition_result']['signatureVersion'])
660
- ? $args['__partition_result']['signatureVersion']
661
- : $args['api']->getSignatureVersion();
662
- }
663
-
664
- public static function _default_signing_name(array &$args)
665
- {
666
- if (isset($args['config']['signing_name'])) {
667
- return $args['config']['signing_name'];
668
- }
669
-
670
- $args['__partition_result'] = isset($args['__partition_result'])
671
- ? isset($args['__partition_result'])
672
- : call_user_func(PartitionEndpointProvider::defaultProvider(), [
673
- 'service' => $args['service'],
674
- 'region' => $args['region'],
675
- ]);
676
-
677
- if (isset($args['__partition_result']['signingName'])) {
678
- return $args['__partition_result']['signingName'];
679
- }
680
-
681
- if ($signingName = $args['api']->getSigningName()) {
682
- return $signingName;
683
- }
684
-
685
- return $args['service'];
686
- }
687
-
688
- public static function _default_signing_region(array &$args)
689
- {
690
- if (isset($args['config']['signing_region'])) {
691
- return $args['config']['signing_region'];
692
- }
693
-
694
- $args['__partition_result'] = isset($args['__partition_result'])
695
- ? isset($args['__partition_result'])
696
- : call_user_func(PartitionEndpointProvider::defaultProvider(), [
697
- 'service' => $args['service'],
698
- 'region' => $args['region'],
699
- ]);
700
-
701
- return isset($args['__partition_result']['signingRegion'])
702
- ? $args['__partition_result']['signingRegion']
703
- : $args['region'];
704
- }
705
-
706
- public static function _missing_version(array $args)
707
- {
708
- $service = isset($args['service']) ? $args['service'] : '';
709
- $versions = ApiProvider::defaultProvider()->getVersions($service);
710
- $versions = implode("\n", array_map(function ($v) {
711
- return "* \"$v\"";
712
- }, $versions)) ?: '* (none found)';
713
-
714
- return <<<EOT
715
- A "version" configuration value is required. Specifying a version constraint
716
- ensures that your code will not be affected by a breaking change made to the
717
- service. For example, when using Amazon S3, you can lock your API version to
718
- "2006-03-01".
719
-
720
- Your build of the SDK has the following version(s) of "{$service}": {$versions}
721
-
722
- You may provide "latest" to the "version" configuration value to utilize the
723
- most recent available API version that your client's API provider can find.
724
- Note: Using 'latest' in a production application is not recommended.
725
-
726
- A list of available API versions can be found on each client's API documentation
727
- page: http://docs.aws.amazon.com/aws-sdk-php/v3/api/index.html. If you are
728
- unable to load a specific API version, then you may need to update your copy of
729
- the SDK.
730
- EOT;
731
- }
732
-
733
- public static function _missing_region(array $args)
734
- {
735
- $service = isset($args['service']) ? $args['service'] : '';
736
-
737
- return <<<EOT
738
- A "region" configuration value is required for the "{$service}" service
739
- (e.g., "us-west-2"). A list of available public regions and endpoints can be
740
- found at http://docs.aws.amazon.com/general/latest/gr/rande.html.
741
- EOT;
742
- }
743
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Cloud9/Cloud9Client.php DELETED
@@ -1,29 +0,0 @@
1
- <?php
2
- namespace Aws\Cloud9;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS Cloud9** service.
8
- * @method \Aws\Result createEnvironmentEC2(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise createEnvironmentEC2Async(array $args = [])
10
- * @method \Aws\Result createEnvironmentMembership(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise createEnvironmentMembershipAsync(array $args = [])
12
- * @method \Aws\Result deleteEnvironment(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise deleteEnvironmentAsync(array $args = [])
14
- * @method \Aws\Result deleteEnvironmentMembership(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise deleteEnvironmentMembershipAsync(array $args = [])
16
- * @method \Aws\Result describeEnvironmentMemberships(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise describeEnvironmentMembershipsAsync(array $args = [])
18
- * @method \Aws\Result describeEnvironmentStatus(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise describeEnvironmentStatusAsync(array $args = [])
20
- * @method \Aws\Result describeEnvironments(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise describeEnvironmentsAsync(array $args = [])
22
- * @method \Aws\Result listEnvironments(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise listEnvironmentsAsync(array $args = [])
24
- * @method \Aws\Result updateEnvironment(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise updateEnvironmentAsync(array $args = [])
26
- * @method \Aws\Result updateEnvironmentMembership(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise updateEnvironmentMembershipAsync(array $args = [])
28
- */
29
- class Cloud9Client extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Cloud9/Exception/Cloud9Exception.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\Cloud9\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **AWS Cloud9** service.
8
- */
9
- class Cloud9Exception extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudDirectory/CloudDirectoryClient.php DELETED
@@ -1,141 +0,0 @@
1
- <?php
2
- namespace Aws\CloudDirectory;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon CloudDirectory** service.
8
- * @method \Aws\Result addFacetToObject(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise addFacetToObjectAsync(array $args = [])
10
- * @method \Aws\Result applySchema(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise applySchemaAsync(array $args = [])
12
- * @method \Aws\Result attachObject(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise attachObjectAsync(array $args = [])
14
- * @method \Aws\Result attachPolicy(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise attachPolicyAsync(array $args = [])
16
- * @method \Aws\Result attachToIndex(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise attachToIndexAsync(array $args = [])
18
- * @method \Aws\Result attachTypedLink(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise attachTypedLinkAsync(array $args = [])
20
- * @method \Aws\Result batchRead(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise batchReadAsync(array $args = [])
22
- * @method \Aws\Result batchWrite(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise batchWriteAsync(array $args = [])
24
- * @method \Aws\Result createDirectory(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise createDirectoryAsync(array $args = [])
26
- * @method \Aws\Result createFacet(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise createFacetAsync(array $args = [])
28
- * @method \Aws\Result createIndex(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise createIndexAsync(array $args = [])
30
- * @method \Aws\Result createObject(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise createObjectAsync(array $args = [])
32
- * @method \Aws\Result createSchema(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise createSchemaAsync(array $args = [])
34
- * @method \Aws\Result createTypedLinkFacet(array $args = [])
35
- * @method \GuzzleHttp\Promise\Promise createTypedLinkFacetAsync(array $args = [])
36
- * @method \Aws\Result deleteDirectory(array $args = [])
37
- * @method \GuzzleHttp\Promise\Promise deleteDirectoryAsync(array $args = [])
38
- * @method \Aws\Result deleteFacet(array $args = [])
39
- * @method \GuzzleHttp\Promise\Promise deleteFacetAsync(array $args = [])
40
- * @method \Aws\Result deleteObject(array $args = [])
41
- * @method \GuzzleHttp\Promise\Promise deleteObjectAsync(array $args = [])
42
- * @method \Aws\Result deleteSchema(array $args = [])
43
- * @method \GuzzleHttp\Promise\Promise deleteSchemaAsync(array $args = [])
44
- * @method \Aws\Result deleteTypedLinkFacet(array $args = [])
45
- * @method \GuzzleHttp\Promise\Promise deleteTypedLinkFacetAsync(array $args = [])
46
- * @method \Aws\Result detachFromIndex(array $args = [])
47
- * @method \GuzzleHttp\Promise\Promise detachFromIndexAsync(array $args = [])
48
- * @method \Aws\Result detachObject(array $args = [])
49
- * @method \GuzzleHttp\Promise\Promise detachObjectAsync(array $args = [])
50
- * @method \Aws\Result detachPolicy(array $args = [])
51
- * @method \GuzzleHttp\Promise\Promise detachPolicyAsync(array $args = [])
52
- * @method \Aws\Result detachTypedLink(array $args = [])
53
- * @method \GuzzleHttp\Promise\Promise detachTypedLinkAsync(array $args = [])
54
- * @method \Aws\Result disableDirectory(array $args = [])
55
- * @method \GuzzleHttp\Promise\Promise disableDirectoryAsync(array $args = [])
56
- * @method \Aws\Result enableDirectory(array $args = [])
57
- * @method \GuzzleHttp\Promise\Promise enableDirectoryAsync(array $args = [])
58
- * @method \Aws\Result getAppliedSchemaVersion(array $args = [])
59
- * @method \GuzzleHttp\Promise\Promise getAppliedSchemaVersionAsync(array $args = [])
60
- * @method \Aws\Result getDirectory(array $args = [])
61
- * @method \GuzzleHttp\Promise\Promise getDirectoryAsync(array $args = [])
62
- * @method \Aws\Result getFacet(array $args = [])
63
- * @method \GuzzleHttp\Promise\Promise getFacetAsync(array $args = [])
64
- * @method \Aws\Result getLinkAttributes(array $args = [])
65
- * @method \GuzzleHttp\Promise\Promise getLinkAttributesAsync(array $args = [])
66
- * @method \Aws\Result getObjectAttributes(array $args = [])
67
- * @method \GuzzleHttp\Promise\Promise getObjectAttributesAsync(array $args = [])
68
- * @method \Aws\Result getObjectInformation(array $args = [])
69
- * @method \GuzzleHttp\Promise\Promise getObjectInformationAsync(array $args = [])
70
- * @method \Aws\Result getSchemaAsJson(array $args = [])
71
- * @method \GuzzleHttp\Promise\Promise getSchemaAsJsonAsync(array $args = [])
72
- * @method \Aws\Result getTypedLinkFacetInformation(array $args = [])
73
- * @method \GuzzleHttp\Promise\Promise getTypedLinkFacetInformationAsync(array $args = [])
74
- * @method \Aws\Result listAppliedSchemaArns(array $args = [])
75
- * @method \GuzzleHttp\Promise\Promise listAppliedSchemaArnsAsync(array $args = [])
76
- * @method \Aws\Result listAttachedIndices(array $args = [])
77
- * @method \GuzzleHttp\Promise\Promise listAttachedIndicesAsync(array $args = [])
78
- * @method \Aws\Result listDevelopmentSchemaArns(array $args = [])
79
- * @method \GuzzleHttp\Promise\Promise listDevelopmentSchemaArnsAsync(array $args = [])
80
- * @method \Aws\Result listDirectories(array $args = [])
81
- * @method \GuzzleHttp\Promise\Promise listDirectoriesAsync(array $args = [])
82
- * @method \Aws\Result listFacetAttributes(array $args = [])
83
- * @method \GuzzleHttp\Promise\Promise listFacetAttributesAsync(array $args = [])
84
- * @method \Aws\Result listFacetNames(array $args = [])
85
- * @method \GuzzleHttp\Promise\Promise listFacetNamesAsync(array $args = [])
86
- * @method \Aws\Result listIncomingTypedLinks(array $args = [])
87
- * @method \GuzzleHttp\Promise\Promise listIncomingTypedLinksAsync(array $args = [])
88
- * @method \Aws\Result listIndex(array $args = [])
89
- * @method \GuzzleHttp\Promise\Promise listIndexAsync(array $args = [])
90
- * @method \Aws\Result listObjectAttributes(array $args = [])
91
- * @method \GuzzleHttp\Promise\Promise listObjectAttributesAsync(array $args = [])
92
- * @method \Aws\Result listObjectChildren(array $args = [])
93
- * @method \GuzzleHttp\Promise\Promise listObjectChildrenAsync(array $args = [])
94
- * @method \Aws\Result listObjectParentPaths(array $args = [])
95
- * @method \GuzzleHttp\Promise\Promise listObjectParentPathsAsync(array $args = [])
96
- * @method \Aws\Result listObjectParents(array $args = [])
97
- * @method \GuzzleHttp\Promise\Promise listObjectParentsAsync(array $args = [])
98
- * @method \Aws\Result listObjectPolicies(array $args = [])
99
- * @method \GuzzleHttp\Promise\Promise listObjectPoliciesAsync(array $args = [])
100
- * @method \Aws\Result listOutgoingTypedLinks(array $args = [])
101
- * @method \GuzzleHttp\Promise\Promise listOutgoingTypedLinksAsync(array $args = [])
102
- * @method \Aws\Result listPolicyAttachments(array $args = [])
103
- * @method \GuzzleHttp\Promise\Promise listPolicyAttachmentsAsync(array $args = [])
104
- * @method \Aws\Result listPublishedSchemaArns(array $args = [])
105
- * @method \GuzzleHttp\Promise\Promise listPublishedSchemaArnsAsync(array $args = [])
106
- * @method \Aws\Result listTagsForResource(array $args = [])
107
- * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
108
- * @method \Aws\Result listTypedLinkFacetAttributes(array $args = [])
109
- * @method \GuzzleHttp\Promise\Promise listTypedLinkFacetAttributesAsync(array $args = [])
110
- * @method \Aws\Result listTypedLinkFacetNames(array $args = [])
111
- * @method \GuzzleHttp\Promise\Promise listTypedLinkFacetNamesAsync(array $args = [])
112
- * @method \Aws\Result lookupPolicy(array $args = [])
113
- * @method \GuzzleHttp\Promise\Promise lookupPolicyAsync(array $args = [])
114
- * @method \Aws\Result publishSchema(array $args = [])
115
- * @method \GuzzleHttp\Promise\Promise publishSchemaAsync(array $args = [])
116
- * @method \Aws\Result putSchemaFromJson(array $args = [])
117
- * @method \GuzzleHttp\Promise\Promise putSchemaFromJsonAsync(array $args = [])
118
- * @method \Aws\Result removeFacetFromObject(array $args = [])
119
- * @method \GuzzleHttp\Promise\Promise removeFacetFromObjectAsync(array $args = [])
120
- * @method \Aws\Result tagResource(array $args = [])
121
- * @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
122
- * @method \Aws\Result untagResource(array $args = [])
123
- * @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
124
- * @method \Aws\Result updateFacet(array $args = [])
125
- * @method \GuzzleHttp\Promise\Promise updateFacetAsync(array $args = [])
126
- * @method \Aws\Result updateLinkAttributes(array $args = [])
127
- * @method \GuzzleHttp\Promise\Promise updateLinkAttributesAsync(array $args = [])
128
- * @method \Aws\Result updateObjectAttributes(array $args = [])
129
- * @method \GuzzleHttp\Promise\Promise updateObjectAttributesAsync(array $args = [])
130
- * @method \Aws\Result updateSchema(array $args = [])
131
- * @method \GuzzleHttp\Promise\Promise updateSchemaAsync(array $args = [])
132
- * @method \Aws\Result updateTypedLinkFacet(array $args = [])
133
- * @method \GuzzleHttp\Promise\Promise updateTypedLinkFacetAsync(array $args = [])
134
- * @method \Aws\Result upgradeAppliedSchema(array $args = [])
135
- * @method \GuzzleHttp\Promise\Promise upgradeAppliedSchemaAsync(array $args = [])
136
- * @method \Aws\Result upgradePublishedSchema(array $args = [])
137
- * @method \GuzzleHttp\Promise\Promise upgradePublishedSchemaAsync(array $args = [])
138
- * @method \Aws\Result listManagedSchemaArns(array $args = []) (supported in versions 2017-01-11)
139
- * @method \GuzzleHttp\Promise\Promise listManagedSchemaArnsAsync(array $args = []) (supported in versions 2017-01-11)
140
- */
141
- class CloudDirectoryClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudDirectory/Exception/CloudDirectoryException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\CloudDirectory\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **Amazon CloudDirectory** service.
8
- */
9
- class CloudDirectoryException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudFormation/CloudFormationClient.php DELETED
@@ -1,92 +0,0 @@
1
- <?php
2
- namespace Aws\CloudFormation;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS CloudFormation** service.
8
- *
9
- * @method \Aws\Result cancelUpdateStack(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise cancelUpdateStackAsync(array $args = [])
11
- * @method \Aws\Result continueUpdateRollback(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise continueUpdateRollbackAsync(array $args = [])
13
- * @method \Aws\Result createChangeSet(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise createChangeSetAsync(array $args = [])
15
- * @method \Aws\Result createStack(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise createStackAsync(array $args = [])
17
- * @method \Aws\Result createStackInstances(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise createStackInstancesAsync(array $args = [])
19
- * @method \Aws\Result createStackSet(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise createStackSetAsync(array $args = [])
21
- * @method \Aws\Result deleteChangeSet(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise deleteChangeSetAsync(array $args = [])
23
- * @method \Aws\Result deleteStack(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise deleteStackAsync(array $args = [])
25
- * @method \Aws\Result deleteStackInstances(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise deleteStackInstancesAsync(array $args = [])
27
- * @method \Aws\Result deleteStackSet(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise deleteStackSetAsync(array $args = [])
29
- * @method \Aws\Result describeAccountLimits(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise describeAccountLimitsAsync(array $args = [])
31
- * @method \Aws\Result describeChangeSet(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise describeChangeSetAsync(array $args = [])
33
- * @method \Aws\Result describeStackEvents(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise describeStackEventsAsync(array $args = [])
35
- * @method \Aws\Result describeStackInstance(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise describeStackInstanceAsync(array $args = [])
37
- * @method \Aws\Result describeStackResource(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise describeStackResourceAsync(array $args = [])
39
- * @method \Aws\Result describeStackResources(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise describeStackResourcesAsync(array $args = [])
41
- * @method \Aws\Result describeStackSet(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise describeStackSetAsync(array $args = [])
43
- * @method \Aws\Result describeStackSetOperation(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise describeStackSetOperationAsync(array $args = [])
45
- * @method \Aws\Result describeStacks(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise describeStacksAsync(array $args = [])
47
- * @method \Aws\Result estimateTemplateCost(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise estimateTemplateCostAsync(array $args = [])
49
- * @method \Aws\Result executeChangeSet(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise executeChangeSetAsync(array $args = [])
51
- * @method \Aws\Result getStackPolicy(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise getStackPolicyAsync(array $args = [])
53
- * @method \Aws\Result getTemplate(array $args = [])
54
- * @method \GuzzleHttp\Promise\Promise getTemplateAsync(array $args = [])
55
- * @method \Aws\Result getTemplateSummary(array $args = [])
56
- * @method \GuzzleHttp\Promise\Promise getTemplateSummaryAsync(array $args = [])
57
- * @method \Aws\Result listChangeSets(array $args = [])
58
- * @method \GuzzleHttp\Promise\Promise listChangeSetsAsync(array $args = [])
59
- * @method \Aws\Result listExports(array $args = [])
60
- * @method \GuzzleHttp\Promise\Promise listExportsAsync(array $args = [])
61
- * @method \Aws\Result listImports(array $args = [])
62
- * @method \GuzzleHttp\Promise\Promise listImportsAsync(array $args = [])
63
- * @method \Aws\Result listStackInstances(array $args = [])
64
- * @method \GuzzleHttp\Promise\Promise listStackInstancesAsync(array $args = [])
65
- * @method \Aws\Result listStackResources(array $args = [])
66
- * @method \GuzzleHttp\Promise\Promise listStackResourcesAsync(array $args = [])
67
- * @method \Aws\Result listStackSetOperationResults(array $args = [])
68
- * @method \GuzzleHttp\Promise\Promise listStackSetOperationResultsAsync(array $args = [])
69
- * @method \Aws\Result listStackSetOperations(array $args = [])
70
- * @method \GuzzleHttp\Promise\Promise listStackSetOperationsAsync(array $args = [])
71
- * @method \Aws\Result listStackSets(array $args = [])
72
- * @method \GuzzleHttp\Promise\Promise listStackSetsAsync(array $args = [])
73
- * @method \Aws\Result listStacks(array $args = [])
74
- * @method \GuzzleHttp\Promise\Promise listStacksAsync(array $args = [])
75
- * @method \Aws\Result setStackPolicy(array $args = [])
76
- * @method \GuzzleHttp\Promise\Promise setStackPolicyAsync(array $args = [])
77
- * @method \Aws\Result signalResource(array $args = [])
78
- * @method \GuzzleHttp\Promise\Promise signalResourceAsync(array $args = [])
79
- * @method \Aws\Result stopStackSetOperation(array $args = [])
80
- * @method \GuzzleHttp\Promise\Promise stopStackSetOperationAsync(array $args = [])
81
- * @method \Aws\Result updateStack(array $args = [])
82
- * @method \GuzzleHttp\Promise\Promise updateStackAsync(array $args = [])
83
- * @method \Aws\Result updateStackInstances(array $args = [])
84
- * @method \GuzzleHttp\Promise\Promise updateStackInstancesAsync(array $args = [])
85
- * @method \Aws\Result updateStackSet(array $args = [])
86
- * @method \GuzzleHttp\Promise\Promise updateStackSetAsync(array $args = [])
87
- * @method \Aws\Result updateTerminationProtection(array $args = [])
88
- * @method \GuzzleHttp\Promise\Promise updateTerminationProtectionAsync(array $args = [])
89
- * @method \Aws\Result validateTemplate(array $args = [])
90
- * @method \GuzzleHttp\Promise\Promise validateTemplateAsync(array $args = [])
91
- */
92
- class CloudFormationClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudFormation/Exception/CloudFormationException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\CloudFormation\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the AWS CloudFormation service.
8
- */
9
- class CloudFormationException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudFront/CloudFrontClient.php DELETED
@@ -1,190 +0,0 @@
1
- <?php
2
- namespace Aws\CloudFront;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon CloudFront** service.
8
- *
9
- * @method \Aws\Result createCloudFrontOriginAccessIdentity(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise createCloudFrontOriginAccessIdentityAsync(array $args = [])
11
- * @method \Aws\Result createDistribution(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise createDistributionAsync(array $args = [])
13
- * @method \Aws\Result createInvalidation(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise createInvalidationAsync(array $args = [])
15
- * @method \Aws\Result createStreamingDistribution(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise createStreamingDistributionAsync(array $args = [])
17
- * @method \Aws\Result deleteCloudFrontOriginAccessIdentity(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise deleteCloudFrontOriginAccessIdentityAsync(array $args = [])
19
- * @method \Aws\Result deleteDistribution(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise deleteDistributionAsync(array $args = [])
21
- * @method \Aws\Result deleteStreamingDistribution(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise deleteStreamingDistributionAsync(array $args = [])
23
- * @method \Aws\Result getCloudFrontOriginAccessIdentity(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise getCloudFrontOriginAccessIdentityAsync(array $args = [])
25
- * @method \Aws\Result getCloudFrontOriginAccessIdentityConfig(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise getCloudFrontOriginAccessIdentityConfigAsync(array $args = [])
27
- * @method \Aws\Result getDistribution(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise getDistributionAsync(array $args = [])
29
- * @method \Aws\Result getDistributionConfig(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise getDistributionConfigAsync(array $args = [])
31
- * @method \Aws\Result getInvalidation(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise getInvalidationAsync(array $args = [])
33
- * @method \Aws\Result getStreamingDistribution(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise getStreamingDistributionAsync(array $args = [])
35
- * @method \Aws\Result getStreamingDistributionConfig(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise getStreamingDistributionConfigAsync(array $args = [])
37
- * @method \Aws\Result listCloudFrontOriginAccessIdentities(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise listCloudFrontOriginAccessIdentitiesAsync(array $args = [])
39
- * @method \Aws\Result listDistributions(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise listDistributionsAsync(array $args = [])
41
- * @method \Aws\Result listDistributionsByWebACLId(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise listDistributionsByWebACLIdAsync(array $args = [])
43
- * @method \Aws\Result listInvalidations(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise listInvalidationsAsync(array $args = [])
45
- * @method \Aws\Result listStreamingDistributions(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise listStreamingDistributionsAsync(array $args = [])
47
- * @method \Aws\Result updateCloudFrontOriginAccessIdentity(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise updateCloudFrontOriginAccessIdentityAsync(array $args = [])
49
- * @method \Aws\Result updateDistribution(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise updateDistributionAsync(array $args = [])
51
- * @method \Aws\Result updateStreamingDistribution(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise updateStreamingDistributionAsync(array $args = [])
53
- * @method \Aws\Result createDistributionWithTags(array $args = []) (supported in versions 2016-08-01, 2016-08-20, 2016-09-07, 2016-09-29, 2016-11-25, 2017-03-25, 2017-10-30, 2018-06-18)
54
- * @method \GuzzleHttp\Promise\Promise createDistributionWithTagsAsync(array $args = []) (supported in versions 2016-08-01, 2016-08-20, 2016-09-07, 2016-09-29, 2016-11-25, 2017-03-25, 2017-10-30, 2018-06-18)
55
- * @method \Aws\Result createStreamingDistributionWithTags(array $args = []) (supported in versions 2016-08-01, 2016-08-20, 2016-09-07, 2016-09-29, 2016-11-25, 2017-03-25, 2017-10-30, 2018-06-18)
56
- * @method \GuzzleHttp\Promise\Promise createStreamingDistributionWithTagsAsync(array $args = []) (supported in versions 2016-08-01, 2016-08-20, 2016-09-07, 2016-09-29, 2016-11-25, 2017-03-25, 2017-10-30, 2018-06-18)
57
- * @method \Aws\Result listTagsForResource(array $args = []) (supported in versions 2016-08-01, 2016-08-20, 2016-09-07, 2016-09-29, 2016-11-25, 2017-03-25, 2017-10-30, 2018-06-18)
58
- * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = []) (supported in versions 2016-08-01, 2016-08-20, 2016-09-07, 2016-09-29, 2016-11-25, 2017-03-25, 2017-10-30, 2018-06-18)
59
- * @method \Aws\Result tagResource(array $args = []) (supported in versions 2016-08-01, 2016-08-20, 2016-09-07, 2016-09-29, 2016-11-25, 2017-03-25, 2017-10-30, 2018-06-18)
60
- * @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = []) (supported in versions 2016-08-01, 2016-08-20, 2016-09-07, 2016-09-29, 2016-11-25, 2017-03-25, 2017-10-30, 2018-06-18)
61
- * @method \Aws\Result untagResource(array $args = []) (supported in versions 2016-08-01, 2016-08-20, 2016-09-07, 2016-09-29, 2016-11-25, 2017-03-25, 2017-10-30, 2018-06-18)
62
- * @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = []) (supported in versions 2016-08-01, 2016-08-20, 2016-09-07, 2016-09-29, 2016-11-25, 2017-03-25, 2017-10-30, 2018-06-18)
63
- * @method \Aws\Result deleteServiceLinkedRole(array $args = []) (supported in versions 2017-03-25)
64
- * @method \GuzzleHttp\Promise\Promise deleteServiceLinkedRoleAsync(array $args = []) (supported in versions 2017-03-25)
65
- * @method \Aws\Result createFieldLevelEncryptionConfig(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
66
- * @method \GuzzleHttp\Promise\Promise createFieldLevelEncryptionConfigAsync(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
67
- * @method \Aws\Result createFieldLevelEncryptionProfile(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
68
- * @method \GuzzleHttp\Promise\Promise createFieldLevelEncryptionProfileAsync(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
69
- * @method \Aws\Result createPublicKey(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
70
- * @method \GuzzleHttp\Promise\Promise createPublicKeyAsync(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
71
- * @method \Aws\Result deleteFieldLevelEncryptionConfig(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
72
- * @method \GuzzleHttp\Promise\Promise deleteFieldLevelEncryptionConfigAsync(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
73
- * @method \Aws\Result deleteFieldLevelEncryptionProfile(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
74
- * @method \GuzzleHttp\Promise\Promise deleteFieldLevelEncryptionProfileAsync(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
75
- * @method \Aws\Result deletePublicKey(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
76
- * @method \GuzzleHttp\Promise\Promise deletePublicKeyAsync(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
77
- * @method \Aws\Result getFieldLevelEncryption(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
78
- * @method \GuzzleHttp\Promise\Promise getFieldLevelEncryptionAsync(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
79
- * @method \Aws\Result getFieldLevelEncryptionConfig(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
80
- * @method \GuzzleHttp\Promise\Promise getFieldLevelEncryptionConfigAsync(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
81
- * @method \Aws\Result getFieldLevelEncryptionProfile(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
82
- * @method \GuzzleHttp\Promise\Promise getFieldLevelEncryptionProfileAsync(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
83
- * @method \Aws\Result getFieldLevelEncryptionProfileConfig(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
84
- * @method \GuzzleHttp\Promise\Promise getFieldLevelEncryptionProfileConfigAsync(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
85
- * @method \Aws\Result getPublicKey(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
86
- * @method \GuzzleHttp\Promise\Promise getPublicKeyAsync(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
87
- * @method \Aws\Result getPublicKeyConfig(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
88
- * @method \GuzzleHttp\Promise\Promise getPublicKeyConfigAsync(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
89
- * @method \Aws\Result listFieldLevelEncryptionConfigs(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
90
- * @method \GuzzleHttp\Promise\Promise listFieldLevelEncryptionConfigsAsync(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
91
- * @method \Aws\Result listFieldLevelEncryptionProfiles(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
92
- * @method \GuzzleHttp\Promise\Promise listFieldLevelEncryptionProfilesAsync(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
93
- * @method \Aws\Result listPublicKeys(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
94
- * @method \GuzzleHttp\Promise\Promise listPublicKeysAsync(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
95
- * @method \Aws\Result updateFieldLevelEncryptionConfig(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
96
- * @method \GuzzleHttp\Promise\Promise updateFieldLevelEncryptionConfigAsync(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
97
- * @method \Aws\Result updateFieldLevelEncryptionProfile(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
98
- * @method \GuzzleHttp\Promise\Promise updateFieldLevelEncryptionProfileAsync(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
99
- * @method \Aws\Result updatePublicKey(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
100
- * @method \GuzzleHttp\Promise\Promise updatePublicKeyAsync(array $args = []) (supported in versions 2017-10-30, 2018-06-18)
101
- */
102
- class CloudFrontClient extends AwsClient
103
- {
104
- /**
105
- * Create a signed Amazon CloudFront URL.
106
- *
107
- * This method accepts an array of configuration options:
108
- *
109
- * - url: (string) URL of the resource being signed (can include query
110
- * string and wildcards). For example: rtmp://s5c39gqb8ow64r.cloudfront.net/videos/mp3_name.mp3
111
- * http://d111111abcdef8.cloudfront.net/images/horizon.jpg?size=large&license=yes
112
- * - policy: (string) JSON policy. Use this option when creating a signed
113
- * URL for a custom policy.
114
- * - expires: (int) UTC Unix timestamp used when signing with a canned
115
- * policy. Not required when passing a custom 'policy' option.
116
- * - key_pair_id: (string) The ID of the key pair used to sign CloudFront
117
- * URLs for private distributions.
118
- * - private_key: (string) The filepath ot the private key used to sign
119
- * CloudFront URLs for private distributions.
120
- *
121
- * @param array $options Array of configuration options used when signing
122
- *
123
- * @return string Signed URL with authentication parameters
124
- * @throws \InvalidArgumentException if url, key_pair_id, or private_key
125
- * were not specified.
126
- * @link http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/WorkingWithStreamingDistributions.html
127
- */
128
- public function getSignedUrl(array $options)
129
- {
130
- foreach (['url', 'key_pair_id', 'private_key'] as $required) {
131
- if (!isset($options[$required])) {
132
- throw new \InvalidArgumentException("$required is required");
133
- }
134
- }
135
-
136
- $urlSigner = new UrlSigner(
137
- $options['key_pair_id'],
138
- $options['private_key']
139
- );
140
-
141
- return $urlSigner->getSignedUrl(
142
- $options['url'],
143
- isset($options['expires']) ? $options['expires'] : null,
144
- isset($options['policy']) ? $options['policy'] : null
145
- );
146
- }
147
-
148
- /**
149
- * Create a signed Amazon CloudFront cookie.
150
- *
151
- * This method accepts an array of configuration options:
152
- *
153
- * - url: (string) URL of the resource being signed (can include query
154
- * string and wildcards). For example: http://d111111abcdef8.cloudfront.net/images/horizon.jpg?size=large&license=yes
155
- * - policy: (string) JSON policy. Use this option when creating a signed
156
- * URL for a custom policy.
157
- * - expires: (int) UTC Unix timestamp used when signing with a canned
158
- * policy. Not required when passing a custom 'policy' option.
159
- * - key_pair_id: (string) The ID of the key pair used to sign CloudFront
160
- * URLs for private distributions.
161
- * - private_key: (string) The filepath ot the private key used to sign
162
- * CloudFront URLs for private distributions.
163
- *
164
- * @param array $options Array of configuration options used when signing
165
- *
166
- * @return array Key => value pairs of signed cookies to set
167
- * @throws \InvalidArgumentException if url, key_pair_id, or private_key
168
- * were not specified.
169
- * @link http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/WorkingWithStreamingDistributions.html
170
- */
171
- public function getSignedCookie(array $options)
172
- {
173
- foreach (['key_pair_id', 'private_key'] as $required) {
174
- if (!isset($options[$required])) {
175
- throw new \InvalidArgumentException("$required is required");
176
- }
177
- }
178
-
179
- $cookieSigner = new CookieSigner(
180
- $options['key_pair_id'],
181
- $options['private_key']
182
- );
183
-
184
- return $cookieSigner->getSignedCookie(
185
- isset($options['url']) ? $options['url'] : null,
186
- isset($options['expires']) ? $options['expires'] : null,
187
- isset($options['policy']) ? $options['policy'] : null
188
- );
189
- }
190
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudFront/CookieSigner.php DELETED
@@ -1,65 +0,0 @@
1
- <?php
2
- namespace Aws\CloudFront;
3
-
4
- class CookieSigner
5
- {
6
- /** @var Signer */
7
- private $signer;
8
-
9
- private static $schemes = [
10
- 'http' => true,
11
- 'https' => true,
12
- ];
13
-
14
- /**
15
- * @param $keyPairId string ID of the key pair
16
- * @param $privateKey string Path to the private key used for signing
17
- *
18
- * @throws \RuntimeException if the openssl extension is missing
19
- * @throws \InvalidArgumentException if the private key cannot be found.
20
- */
21
- public function __construct($keyPairId, $privateKey)
22
- {
23
- $this->signer = new Signer($keyPairId, $privateKey);
24
- }
25
-
26
- /**
27
- * Create a signed Amazon CloudFront Cookie.
28
- *
29
- * @param string $url URL to sign (can include query string
30
- * and wildcards). Not required
31
- * when passing a custom $policy.
32
- * @param string|integer|null $expires UTC Unix timestamp used when signing
33
- * with a canned policy. Not required
34
- * when passing a custom $policy.
35
- * @param string $policy JSON policy. Use this option when
36
- * creating a signed cookie for a custom
37
- * policy.
38
- *
39
- * @return array The authenticated cookie parameters
40
- * @throws \InvalidArgumentException if the URL provided is invalid
41
- * @link http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-signed-cookies.html
42
- */
43
- public function getSignedCookie($url = null, $expires = null, $policy = null)
44
- {
45
- if ($url) {
46
- $this->validateUrl($url);
47
- }
48
-
49
- $cookieParameters = [];
50
- $signature = $this->signer->getSignature($url, $expires, $policy);
51
- foreach ($signature as $key => $value) {
52
- $cookieParameters["CloudFront-$key"] = $value;
53
- }
54
-
55
- return $cookieParameters;
56
- }
57
-
58
- private function validateUrl($url)
59
- {
60
- $scheme = str_replace('*', '', explode('://', $url)[0]);
61
- if (empty(self::$schemes[strtolower($scheme)])) {
62
- throw new \InvalidArgumentException('Invalid or missing URI scheme');
63
- }
64
- }
65
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudFront/Exception/CloudFrontException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\CloudFront\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the Amazon CloudFront service.
8
- */
9
- class CloudFrontException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudFront/Signer.php DELETED
@@ -1,109 +0,0 @@
1
- <?php
2
- namespace Aws\CloudFront;
3
-
4
- /**
5
- * @internal
6
- */
7
- class Signer
8
- {
9
- private $keyPairId;
10
- private $pk;
11
-
12
- /**
13
- * A signer for creating the signature values used in CloudFront signed URLs
14
- * and signed cookies.
15
- *
16
- * @param $keyPairId string ID of the key pair
17
- * @param $privateKey string Path to the private key used for signing
18
- *
19
- * @throws \RuntimeException if the openssl extension is missing
20
- * @throws \InvalidArgumentException if the private key cannot be found.
21
- */
22
- public function __construct($keyPairId, $privateKey)
23
- {
24
- if (!extension_loaded('openssl')) {
25
- //@codeCoverageIgnoreStart
26
- throw new \RuntimeException('The openssl extension is required to '
27
- . 'sign CloudFront urls.');
28
- //@codeCoverageIgnoreEnd
29
- }
30
-
31
- $this->keyPairId = $keyPairId;
32
-
33
- if (!file_exists($privateKey)) {
34
- throw new \InvalidArgumentException("PK file not found: $privateKey");
35
- }
36
-
37
- $this->pk = file_get_contents($privateKey);
38
- }
39
-
40
-
41
- /**
42
- * Create the values used to construct signed URLs and cookies.
43
- *
44
- * @param string $resource The CloudFront resource to which
45
- * this signature will grant access.
46
- * Not used when a custom policy is
47
- * provided.
48
- * @param string|integer|null $expires UTC Unix timestamp used when
49
- * signing with a canned policy.
50
- * Not required when passing a
51
- * custom $policy.
52
- * @param string $policy JSON policy. Use this option when
53
- * creating a signature for a custom
54
- * policy.
55
- *
56
- * @return array The values needed to construct a signed URL or cookie
57
- * @throws \InvalidArgumentException when not provided either a policy or a
58
- * resource and a expires
59
- *
60
- * @link http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-signed-cookies.html
61
- */
62
- public function getSignature($resource = null, $expires = null, $policy = null)
63
- {
64
- $signatureHash = [];
65
- if ($policy) {
66
- $policy = preg_replace('/\s/s', '', $policy);
67
- $signatureHash['Policy'] = $this->encode($policy);
68
- } elseif ($resource && $expires) {
69
- $expires = (int) $expires; // Handle epoch passed as string
70
- $policy = $this->createCannedPolicy($resource, $expires);
71
- $signatureHash['Expires'] = $expires;
72
- } else {
73
- throw new \InvalidArgumentException('Either a policy or a resource'
74
- . ' and an expiration time must be provided.');
75
- }
76
-
77
- $signatureHash['Signature'] = $this->encode($this->sign($policy));
78
- $signatureHash['Key-Pair-Id'] = $this->keyPairId;
79
-
80
- return $signatureHash;
81
- }
82
-
83
- private function createCannedPolicy($resource, $expiration)
84
- {
85
- return json_encode([
86
- 'Statement' => [
87
- [
88
- 'Resource' => $resource,
89
- 'Condition' => [
90
- 'DateLessThan' => ['AWS:EpochTime' => $expiration],
91
- ],
92
- ],
93
- ],
94
- ], JSON_UNESCAPED_SLASHES);
95
- }
96
-
97
- private function sign($policy)
98
- {
99
- $signature = '';
100
- openssl_sign($policy, $signature, $this->pk);
101
-
102
- return $signature;
103
- }
104
-
105
- private function encode($policy)
106
- {
107
- return strtr(base64_encode($policy), '+=/', '-_~');
108
- }
109
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudFront/UrlSigner.php DELETED
@@ -1,119 +0,0 @@
1
- <?php
2
- namespace Aws\CloudFront;
3
-
4
- use GuzzleHttp\Psr7;
5
- use GuzzleHttp\Psr7\Uri;
6
- use Psr\Http\Message\UriInterface;
7
-
8
- /**
9
- * Creates signed URLs for Amazon CloudFront resources.
10
- */
11
- class UrlSigner
12
- {
13
- private $signer;
14
-
15
- /**
16
- * @param $keyPairId string ID of the key pair
17
- * @param $privateKey string Path to the private key used for signing
18
- *
19
- * @throws \RuntimeException if the openssl extension is missing
20
- * @throws \InvalidArgumentException if the private key cannot be found.
21
- */
22
- public function __construct($keyPairId, $privateKey)
23
- {
24
- $this->signer = new Signer($keyPairId, $privateKey);
25
- }
26
-
27
- /**
28
- * Create a signed Amazon CloudFront URL.
29
- *
30
- * Keep in mind that URLs meant for use in media/flash players may have
31
- * different requirements for URL formats (e.g. some require that the
32
- * extension be removed, some require the file name to be prefixed
33
- * - mp4:<path>, some require you to add "/cfx/st" into your URL).
34
- *
35
- * @param string $url URL to sign (can include query
36
- * string string and wildcards)
37
- * @param string|integer|null $expires UTC Unix timestamp used when signing
38
- * with a canned policy. Not required
39
- * when passing a custom $policy.
40
- * @param string $policy JSON policy. Use this option when
41
- * creating a signed URL for a custom
42
- * policy.
43
- *
44
- * @return string The file URL with authentication parameters
45
- * @throws \InvalidArgumentException if the URL provided is invalid
46
- * @link http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/WorkingWithStreamingDistributions.html
47
- */
48
- public function getSignedUrl($url, $expires = null, $policy = null)
49
- {
50
- // Determine the scheme of the url
51
- $urlSections = explode('://', $url);
52
-
53
- if (count($urlSections) < 2) {
54
- throw new \InvalidArgumentException("Invalid URL: {$url}");
55
- }
56
-
57
- // Get the real scheme by removing wildcards from the scheme
58
- $scheme = str_replace('*', '', $urlSections[0]);
59
- $uri = new Uri($scheme . '://' . $urlSections[1]);
60
- $query = Psr7\parse_query($uri->getQuery(), PHP_QUERY_RFC3986);
61
- $signature = $this->signer->getSignature(
62
- $this->createResource($scheme, (string) $uri),
63
- $expires,
64
- $policy
65
- );
66
- $uri = $uri->withQuery(
67
- http_build_query($query + $signature, null, '&', PHP_QUERY_RFC3986)
68
- );
69
-
70
- return $scheme === 'rtmp'
71
- ? $this->createRtmpUrl($uri)
72
- : (string) $uri;
73
- }
74
-
75
- private function createRtmpUrl(UriInterface $uri)
76
- {
77
- // Use a relative URL when creating Flash player URLs
78
- $result = ltrim($uri->getPath(), '/');
79
-
80
- if ($query = $uri->getQuery()) {
81
- $result .= '?' . $query;
82
- }
83
-
84
- return $result;
85
- }
86
-
87
- /**
88
- * @param $scheme
89
- * @param $url
90
- *
91
- * @return string
92
- */
93
- private function createResource($scheme, $url)
94
- {
95
- switch ($scheme) {
96
- case 'http':
97
- case 'http*':
98
- case 'https':
99
- return $url;
100
- case 'rtmp':
101
- $parts = parse_url($url);
102
- $pathParts = pathinfo($parts['path']);
103
- $resource = ltrim(
104
- $pathParts['dirname'] . '/' . $pathParts['basename'],
105
- '/'
106
- );
107
-
108
- // Add a query string if present.
109
- if (isset($parts['query'])) {
110
- $resource .= "?{$parts['query']}";
111
- }
112
-
113
- return $resource;
114
- }
115
-
116
- throw new \InvalidArgumentException("Invalid URI scheme: {$scheme}. "
117
- . "Scheme must be one of: http, https, or rtmp");
118
- }
119
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudHSMV2/CloudHSMV2Client.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
- namespace Aws\CloudHSMV2;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS CloudHSM V2** service.
8
- * @method \Aws\Result copyBackupToRegion(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise copyBackupToRegionAsync(array $args = [])
10
- * @method \Aws\Result createCluster(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise createClusterAsync(array $args = [])
12
- * @method \Aws\Result createHsm(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise createHsmAsync(array $args = [])
14
- * @method \Aws\Result deleteBackup(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise deleteBackupAsync(array $args = [])
16
- * @method \Aws\Result deleteCluster(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise deleteClusterAsync(array $args = [])
18
- * @method \Aws\Result deleteHsm(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise deleteHsmAsync(array $args = [])
20
- * @method \Aws\Result describeBackups(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise describeBackupsAsync(array $args = [])
22
- * @method \Aws\Result describeClusters(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise describeClustersAsync(array $args = [])
24
- * @method \Aws\Result initializeCluster(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise initializeClusterAsync(array $args = [])
26
- * @method \Aws\Result listTags(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise listTagsAsync(array $args = [])
28
- * @method \Aws\Result restoreBackup(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise restoreBackupAsync(array $args = [])
30
- * @method \Aws\Result tagResource(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
32
- * @method \Aws\Result untagResource(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
34
- */
35
- class CloudHSMV2Client extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudHSMV2/Exception/CloudHSMV2Exception.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\CloudHSMV2\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **AWS CloudHSM V2** service.
8
- */
9
- class CloudHSMV2Exception extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudHsm/CloudHsmClient.php DELETED
@@ -1,84 +0,0 @@
1
- <?php
2
- namespace Aws\CloudHsm;
3
-
4
- use Aws\Api\ApiProvider;
5
- use Aws\Api\DocModel;
6
- use Aws\Api\Service;
7
- use Aws\AwsClient;
8
-
9
- /**
10
- * This client is used to interact with **AWS CloudHSM**.
11
- *
12
- * @method \Aws\Result addTagsToResource(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise addTagsToResourceAsync(array $args = [])
14
- * @method \Aws\Result createHapg(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise createHapgAsync(array $args = [])
16
- * @method \Aws\Result createHsm(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise createHsmAsync(array $args = [])
18
- * @method \Aws\Result createLunaClient(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise createLunaClientAsync(array $args = [])
20
- * @method \Aws\Result deleteHapg(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise deleteHapgAsync(array $args = [])
22
- * @method \Aws\Result deleteHsm(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise deleteHsmAsync(array $args = [])
24
- * @method \Aws\Result deleteLunaClient(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise deleteLunaClientAsync(array $args = [])
26
- * @method \Aws\Result describeHapg(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise describeHapgAsync(array $args = [])
28
- * @method \Aws\Result describeHsm(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise describeHsmAsync(array $args = [])
30
- * @method \Aws\Result describeLunaClient(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise describeLunaClientAsync(array $args = [])
32
- * @method \Aws\Result getConfig(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise getConfigAsync(array $args = [])
34
- * @method \Aws\Result listAvailableZones(array $args = [])
35
- * @method \GuzzleHttp\Promise\Promise listAvailableZonesAsync(array $args = [])
36
- * @method \Aws\Result listHapgs(array $args = [])
37
- * @method \GuzzleHttp\Promise\Promise listHapgsAsync(array $args = [])
38
- * @method \Aws\Result listHsms(array $args = [])
39
- * @method \GuzzleHttp\Promise\Promise listHsmsAsync(array $args = [])
40
- * @method \Aws\Result listLunaClients(array $args = [])
41
- * @method \GuzzleHttp\Promise\Promise listLunaClientsAsync(array $args = [])
42
- * @method \Aws\Result listTagsForResource(array $args = [])
43
- * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
44
- * @method \Aws\Result modifyHapg(array $args = [])
45
- * @method \GuzzleHttp\Promise\Promise modifyHapgAsync(array $args = [])
46
- * @method \Aws\Result modifyHsm(array $args = [])
47
- * @method \GuzzleHttp\Promise\Promise modifyHsmAsync(array $args = [])
48
- * @method \Aws\Result modifyLunaClient(array $args = [])
49
- * @method \GuzzleHttp\Promise\Promise modifyLunaClientAsync(array $args = [])
50
- * @method \Aws\Result removeTagsFromResource(array $args = [])
51
- * @method \GuzzleHttp\Promise\Promise removeTagsFromResourceAsync(array $args = [])
52
- */
53
- class CloudHsmClient extends AwsClient
54
- {
55
- public function __call($name, array $args)
56
- {
57
- // Overcomes a naming collision with `AwsClient::getConfig`.
58
- if (lcfirst($name) === 'getConfigFiles') {
59
- $name = 'GetConfig';
60
- } elseif (lcfirst($name) === 'getConfigFilesAsync') {
61
- $name = 'GetConfigAsync';
62
- }
63
-
64
- return parent::__call($name, $args);
65
- }
66
-
67
- /**
68
- * @internal
69
- * @codeCoverageIgnore
70
- */
71
- public static function applyDocFilters(array $api, array $docs)
72
- {
73
- // Overcomes a naming collision with `AwsClient::getConfig`.
74
- $api['operations']['GetConfigFiles'] = $api['operations']['GetConfig'];
75
- $docs['operations']['GetConfigFiles'] = $docs['operations']['GetConfig'];
76
- unset($api['operations']['GetConfig'], $docs['operations']['GetConfig']);
77
- ksort($api['operations']);
78
-
79
- return [
80
- new Service($api, ApiProvider::defaultProvider()),
81
- new DocModel($docs)
82
- ];
83
- }
84
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudHsm/Exception/CloudHsmException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\CloudHsm\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * AWS CloudHSM exception.
8
- */
9
- class CloudHsmException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudSearch/CloudSearchClient.php DELETED
@@ -1,58 +0,0 @@
1
- <?php
2
- namespace Aws\CloudSearch;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon CloudSearch** service.
8
- *
9
- * @method \Aws\Result buildSuggesters(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise buildSuggestersAsync(array $args = [])
11
- * @method \Aws\Result createDomain(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise createDomainAsync(array $args = [])
13
- * @method \Aws\Result defineAnalysisScheme(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise defineAnalysisSchemeAsync(array $args = [])
15
- * @method \Aws\Result defineExpression(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise defineExpressionAsync(array $args = [])
17
- * @method \Aws\Result defineIndexField(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise defineIndexFieldAsync(array $args = [])
19
- * @method \Aws\Result defineSuggester(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise defineSuggesterAsync(array $args = [])
21
- * @method \Aws\Result deleteAnalysisScheme(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise deleteAnalysisSchemeAsync(array $args = [])
23
- * @method \Aws\Result deleteDomain(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise deleteDomainAsync(array $args = [])
25
- * @method \Aws\Result deleteExpression(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise deleteExpressionAsync(array $args = [])
27
- * @method \Aws\Result deleteIndexField(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise deleteIndexFieldAsync(array $args = [])
29
- * @method \Aws\Result deleteSuggester(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise deleteSuggesterAsync(array $args = [])
31
- * @method \Aws\Result describeAnalysisSchemes(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise describeAnalysisSchemesAsync(array $args = [])
33
- * @method \Aws\Result describeAvailabilityOptions(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise describeAvailabilityOptionsAsync(array $args = [])
35
- * @method \Aws\Result describeDomains(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise describeDomainsAsync(array $args = [])
37
- * @method \Aws\Result describeExpressions(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise describeExpressionsAsync(array $args = [])
39
- * @method \Aws\Result describeIndexFields(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise describeIndexFieldsAsync(array $args = [])
41
- * @method \Aws\Result describeScalingParameters(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise describeScalingParametersAsync(array $args = [])
43
- * @method \Aws\Result describeServiceAccessPolicies(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise describeServiceAccessPoliciesAsync(array $args = [])
45
- * @method \Aws\Result describeSuggesters(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise describeSuggestersAsync(array $args = [])
47
- * @method \Aws\Result indexDocuments(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise indexDocumentsAsync(array $args = [])
49
- * @method \Aws\Result listDomainNames(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise listDomainNamesAsync(array $args = [])
51
- * @method \Aws\Result updateAvailabilityOptions(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise updateAvailabilityOptionsAsync(array $args = [])
53
- * @method \Aws\Result updateScalingParameters(array $args = [])
54
- * @method \GuzzleHttp\Promise\Promise updateScalingParametersAsync(array $args = [])
55
- * @method \Aws\Result updateServiceAccessPolicies(array $args = [])
56
- * @method \GuzzleHttp\Promise\Promise updateServiceAccessPoliciesAsync(array $args = [])
57
- */
58
- class CloudSearchClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudSearch/Exception/CloudSearchException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\CloudSearch\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the Amazon CloudSearch service.
8
- */
9
- class CloudSearchException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudSearchDomain/CloudSearchDomainClient.php DELETED
@@ -1,84 +0,0 @@
1
- <?php
2
- namespace Aws\CloudSearchDomain;
3
-
4
- use Aws\AwsClient;
5
- use Aws\CommandInterface;
6
- use GuzzleHttp\Psr7\Uri;
7
- use Psr\Http\Message\RequestInterface;
8
- use GuzzleHttp\Psr7;
9
-
10
- /**
11
- * This client is used to search and upload documents to an **Amazon CloudSearch** Domain.
12
- *
13
- * @method \Aws\Result search(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise searchAsync(array $args = [])
15
- * @method \Aws\Result suggest(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise suggestAsync(array $args = [])
17
- * @method \Aws\Result uploadDocuments(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise uploadDocumentsAsync(array $args = [])
19
- */
20
- class CloudSearchDomainClient extends AwsClient
21
- {
22
- public function __construct(array $args)
23
- {
24
- parent::__construct($args);
25
- $list = $this->getHandlerList();
26
- $list->appendBuild($this->searchByPost(), 'cloudsearchdomain.search_by_POST');
27
- }
28
-
29
- public static function getArguments()
30
- {
31
- $args = parent::getArguments();
32
- $args['endpoint']['required'] = true;
33
- $args['region']['default'] = function (array $args) {
34
- // Determine the region from the provided endpoint.
35
- // (e.g. http://search-blah.{region}.cloudsearch.amazonaws.com)
36
- return explode('.', new Uri($args['endpoint']))[1];
37
- };
38
-
39
- return $args;
40
- }
41
-
42
- /**
43
- * Use POST for search command
44
- *
45
- * Useful when query string is too long
46
- */
47
- private function searchByPost()
48
- {
49
- return static function (callable $handler) {
50
- return function (
51
- CommandInterface $c,
52
- RequestInterface $r = null
53
- ) use ($handler) {
54
- if ($c->getName() !== 'Search') {
55
- return $handler($c, $r);
56
- }
57
- return $handler($c, self::convertGetToPost($r));
58
- };
59
- };
60
- }
61
-
62
- /**
63
- * Converts default GET request to a POST request
64
- *
65
- * Avoiding length restriction in query
66
- *
67
- * @param RequestInterface $r GET request to be converted
68
- * @return RequestInterface $req converted POST request
69
- */
70
- public static function convertGetToPost(RequestInterface $r)
71
- {
72
- if ($r->getMethod() === 'POST') {
73
- return $r;
74
- }
75
-
76
- $query = $r->getUri()->getQuery();
77
- $req = $r->withMethod('POST')
78
- ->withBody(Psr7\stream_for($query))
79
- ->withHeader('Content-Length', strlen($query))
80
- ->withHeader('Content-Type', 'application/x-www-form-urlencoded')
81
- ->withUri($r->getUri()->withQuery(''));
82
- return $req;
83
- }
84
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudSearchDomain/Exception/CloudSearchDomainException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\CloudSearchDomain\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with an Amazon CloudSearch Domain.
8
- */
9
- class CloudSearchDomainException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudTrail/CloudTrailClient.php DELETED
@@ -1,38 +0,0 @@
1
- <?php
2
- namespace Aws\CloudTrail;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS CloudTrail** service.
8
- *
9
- * @method \Aws\Result addTags(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise addTagsAsync(array $args = [])
11
- * @method \Aws\Result createTrail(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise createTrailAsync(array $args = [])
13
- * @method \Aws\Result deleteTrail(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise deleteTrailAsync(array $args = [])
15
- * @method \Aws\Result describeTrails(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise describeTrailsAsync(array $args = [])
17
- * @method \Aws\Result getEventSelectors(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise getEventSelectorsAsync(array $args = [])
19
- * @method \Aws\Result getTrailStatus(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise getTrailStatusAsync(array $args = [])
21
- * @method \Aws\Result listPublicKeys(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise listPublicKeysAsync(array $args = [])
23
- * @method \Aws\Result listTags(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise listTagsAsync(array $args = [])
25
- * @method \Aws\Result lookupEvents(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise lookupEventsAsync(array $args = [])
27
- * @method \Aws\Result putEventSelectors(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise putEventSelectorsAsync(array $args = [])
29
- * @method \Aws\Result removeTags(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise removeTagsAsync(array $args = [])
31
- * @method \Aws\Result startLogging(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise startLoggingAsync(array $args = [])
33
- * @method \Aws\Result stopLogging(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise stopLoggingAsync(array $args = [])
35
- * @method \Aws\Result updateTrail(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise updateTrailAsync(array $args = [])
37
- */
38
- class CloudTrailClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudTrail/Exception/CloudTrailException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\CloudTrail\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the AWS CloudTrail service.
8
- */
9
- class CloudTrailException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudTrail/LogFileIterator.php DELETED
@@ -1,324 +0,0 @@
1
- <?php
2
- namespace Aws\CloudTrail;
3
-
4
- use Aws\S3\S3Client;
5
- use Aws\CloudTrail\Exception\CloudTrailException;
6
-
7
- /**
8
- * The `Aws\CloudTrail\LogFileIterator` provides an easy way to iterate over
9
- * log file generated by AWS CloudTrail.
10
- *
11
- * CloudTrail log files contain data about your AWS API calls and are stored in
12
- * Amazon S3 at a predictable path based on a bucket name, a key prefix, an
13
- * account ID, a region, and date information. This class allows you to specify
14
- * options, including a date range, and emits each log file that match the
15
- * provided options.
16
- *
17
- * Yields an array containing the Amazon S3 bucket and key of the log file.
18
- */
19
- class LogFileIterator extends \IteratorIterator
20
- {
21
- // For internal use
22
- const DEFAULT_TRAIL_NAME = 'Default';
23
- const PREFIX_TEMPLATE = 'prefix/AWSLogs/account/CloudTrail/region/date/';
24
- const PREFIX_WILDCARD = '*';
25
-
26
- // Option names used internally or externally
27
- const TRAIL_NAME = 'trail_name';
28
- const KEY_PREFIX = 'key_prefix';
29
- const START_DATE = 'start_date';
30
- const END_DATE = 'end_date';
31
- const ACCOUNT_ID = 'account_id';
32
- const LOG_REGION = 'log_region';
33
-
34
- /** @var S3Client S3 client used to perform ListObjects operations */
35
- private $s3Client;
36
-
37
- /** @var string S3 bucket that contains the log files */
38
- private $s3BucketName;
39
-
40
- /**
41
- * Constructs a LogRecordIterator. This factory method is used if the name
42
- * of the S3 bucket containing your logs is not known. This factory method
43
- * uses a CloudTrail client and the trail name (or "Default") to find the
44
- * information about the trail necessary for constructing the
45
- * LogRecordIterator.
46
- *
47
- * @param S3Client $s3Client
48
- * @param CloudTrailClient $cloudTrailClient
49
- * @param array $options
50
- *
51
- * @return LogRecordIterator
52
- * @throws \InvalidArgumentException
53
- * @see LogRecordIterator::__contruct
54
- */
55
- public static function forTrail(
56
- S3Client $s3Client,
57
- CloudTrailClient $cloudTrailClient,
58
- array $options = []
59
- ) {
60
- $trailName = isset($options[self::TRAIL_NAME])
61
- ? $options[self::TRAIL_NAME]
62
- : self::DEFAULT_TRAIL_NAME;
63
-
64
- $s3BucketName = null;
65
-
66
- // Use the CloudTrail client to get information about the trail,
67
- // including the bucket name.
68
- try {
69
- $result = $cloudTrailClient->describeTrails([
70
- 'trailNameList' => [$trailName]
71
- ]);
72
- $s3BucketName = $result->search('trailList[0].S3BucketName');
73
- $options[self::KEY_PREFIX] = $result->search(
74
- 'trailList[0].S3KeyPrefix'
75
- );
76
- } catch (CloudTrailException $e) {
77
- // There was an error describing the trail
78
- }
79
-
80
- // If the bucket name is still unknown, then throw an exception
81
- if (!$s3BucketName) {
82
- $prev = isset($e) ? $e : null;
83
- throw new \InvalidArgumentException('The bucket name could not '
84
- . 'be determined from the trail.', 0, $prev);
85
- }
86
-
87
- return new self($s3Client, $s3BucketName, $options);
88
- }
89
-
90
- /**
91
- * Constructs a LogFileIterator using the specified options:
92
- *
93
- * - trail_name: The name of the trail that is generating our logs. If
94
- * none is provided, then "Default" will be used, since that is the name
95
- * of the trail created in the AWS Management Console.
96
- * - key_prefix: The S3 key prefix of your log files. This value will be
97
- * overwritten when using the `fromTrail()` method. However, if you are
98
- * using the constructor, then this value will be used.
99
- * - start_date: The timestamp of the beginning of date range of the log
100
- * records you want to read. You can pass this in as a `DateTime` object,
101
- * integer (unix timestamp), or a string compatible with `strtotime()`.
102
- * - end_date: The timestamp of the end of date range of the log records
103
- * you want to read. You can pass this in as a `DateTime` object, integer
104
- * (unix timestamp), or a string compatible with `strtotime()`.
105
- * - account_id: This is your AWS account ID, which is the 12-digit number
106
- * found on the *Account Identifiers* section of the *AWS Security
107
- * Credentials* page. See https://console.aws.amazon.com/iam/home?#security_credential
108
- * - log_region: Region of the services of the log records you want to read.
109
- *
110
- * @param S3Client $s3Client
111
- * @param string $s3BucketName
112
- * @param array $options
113
- */
114
- public function __construct(
115
- S3Client $s3Client,
116
- $s3BucketName,
117
- array $options = []
118
- ) {
119
- $this->s3Client = $s3Client;
120
- $this->s3BucketName = $s3BucketName;
121
- parent::__construct($this->buildListObjectsIterator($options));
122
- }
123
-
124
- /**
125
- * An override of the typical current behavior of \IteratorIterator to
126
- * format the output such that the bucket and key are returned in an array
127
- *
128
- * @return array|bool
129
- */
130
- public function current()
131
- {
132
- if ($object = parent::current()) {
133
- return [
134
- 'Bucket' => $this->s3BucketName,
135
- 'Key' => $object['Key']
136
- ];
137
- }
138
-
139
- return false;
140
- }
141
-
142
- /**
143
- * Constructs an S3 ListObjects iterator, optionally decorated with
144
- * FilterIterators, based on the provided options.
145
- *
146
- * @param array $options
147
- *
148
- * @return \Iterator
149
- */
150
- private function buildListObjectsIterator(array $options)
151
- {
152
- // Extract and normalize the date values from the options
153
- $startDate = isset($options[self::START_DATE])
154
- ? $this->normalizeDateValue($options[self::START_DATE])
155
- : null;
156
- $endDate = isset($options[self::END_DATE])
157
- ? $this->normalizeDateValue($options[self::END_DATE])
158
- : null;
159
-
160
- // Determine the parts of the key prefix of the log files being read
161
- $parts = [
162
- 'prefix' => isset($options[self::KEY_PREFIX])
163
- ? $options[self::KEY_PREFIX]
164
- : null,
165
- 'account' => isset($options[self::ACCOUNT_ID])
166
- ? $options[self::ACCOUNT_ID]
167
- : self::PREFIX_WILDCARD,
168
- 'region' => isset($options[self::LOG_REGION])
169
- ? $options[self::LOG_REGION]
170
- : self::PREFIX_WILDCARD,
171
- 'date' => $this->determineDateForPrefix($startDate, $endDate),
172
- ];
173
-
174
- // Determine the longest key prefix that can be used to retrieve all
175
- // of the relevant log files.
176
- $candidatePrefix = ltrim(strtr(self::PREFIX_TEMPLATE, $parts), '/');
177
- $logKeyPrefix = $candidatePrefix;
178
- $index = strpos($candidatePrefix, self::PREFIX_WILDCARD);
179
-
180
- if ($index !== false) {
181
- $logKeyPrefix = substr($candidatePrefix, 0, $index);
182
- }
183
-
184
- // Create an iterator that will emit all of the objects matching the
185
- // key prefix.
186
- $objectsIterator = $this->s3Client->getIterator('ListObjects', [
187
- 'Bucket' => $this->s3BucketName,
188
- 'Prefix' => $logKeyPrefix,
189
- ]);
190
-
191
- // Apply regex and/or date filters to the objects iterator to emit only
192
- // log files matching the options.
193
- $objectsIterator = $this->applyRegexFilter(
194
- $objectsIterator,
195
- $logKeyPrefix,
196
- $candidatePrefix
197
- );
198
-
199
- $objectsIterator = $this->applyDateFilter(
200
- $objectsIterator,
201
- $startDate,
202
- $endDate
203
- );
204
-
205
- return $objectsIterator;
206
- }
207
-
208
- /**
209
- * Normalizes a date value to a unix timestamp
210
- *
211
- * @param string|\DateTime|int $date
212
- *
213
- * @return int
214
- * @throws \InvalidArgumentException if the value cannot be converted to
215
- * a timestamp
216
- */
217
- private function normalizeDateValue($date)
218
- {
219
- if (is_string($date)) {
220
- $date = strtotime($date);
221
- } elseif ($date instanceof \DateTime) {
222
- $date = $date->format('U');
223
- } elseif (!is_int($date)) {
224
- throw new \InvalidArgumentException('Date values must be a '
225
- . 'string, an int, or a DateTime object.');
226
- }
227
-
228
- return $date;
229
- }
230
-
231
- /**
232
- * Uses the provided date values to determine the date portion of the prefix
233
- */
234
- private function determineDateForPrefix($startDate, $endDate)
235
- {
236
- // The default date value should look like "*/*/*" after joining
237
- $dateParts = array_fill_keys(['Y', 'm', 'd'], self::PREFIX_WILDCARD);
238
-
239
- // Narrow down the date by replacing the WILDCARDs with values if they
240
- // are the same for the start and end date.
241
- if ($startDate && $endDate) {
242
- foreach ($dateParts as $key => &$value) {
243
- $candidateValue = date($key, $startDate);
244
- if ($candidateValue === date($key, $endDate)) {
245
- $value = $candidateValue;
246
- } else {
247
- break;
248
- }
249
- }
250
- }
251
-
252
- return join('/', $dateParts);
253
- }
254
-
255
- /**
256
- * Applies a regex iterator filter that limits the ListObjects result set
257
- * based on the provided options.
258
- *
259
- * @param \Iterator $objectsIterator
260
- * @param string $logKeyPrefix
261
- * @param string $candidatePrefix
262
- *
263
- * @return \Iterator
264
- */
265
- private function applyRegexFilter(
266
- $objectsIterator,
267
- $logKeyPrefix,
268
- $candidatePrefix
269
- ) {
270
- // If the prefix and candidate prefix are not the same, then there were
271
- // WILDCARDs.
272
- if ($logKeyPrefix !== $candidatePrefix) {
273
- // Turn the candidate prefix into a regex by trimming and
274
- // converting WILDCARDs to regex notation.
275
- $regex = rtrim($candidatePrefix, '/' . self::PREFIX_WILDCARD) . '/';
276
- $regex = strtr($regex, [self::PREFIX_WILDCARD => '[^/]+']);
277
-
278
- // After trimming WILDCARDs or the end, if the regex is the same as
279
- // the prefix, then no regex is needed.
280
- if ($logKeyPrefix !== $regex) {
281
- // Apply a regex filter iterator to remove files that don't
282
- // match the provided options.
283
- $objectsIterator = new \CallbackFilterIterator(
284
- $objectsIterator,
285
- function ($object) use ($regex) {
286
- return preg_match("#{$regex}#", $object['Key']);
287
- }
288
- );
289
- }
290
- }
291
-
292
- return $objectsIterator;
293
- }
294
-
295
- /**
296
- * Applies an iterator filter to restrict the ListObjects result set to the
297
- * specified date range.
298
- *
299
- * @param \Iterator $objectsIterator
300
- * @param int $startDate
301
- * @param int $endDate
302
- *
303
- * @return \Iterator
304
- */
305
- private function applyDateFilter($objectsIterator, $startDate, $endDate)
306
- {
307
- // If either a start or end date was provided, filter out dates that
308
- // don't match the date range.
309
- if ($startDate || $endDate) {
310
- $fn = function ($object) use ($startDate, $endDate) {
311
- if (!preg_match('/[0-9]{8}T[0-9]{4}Z/', $object['Key'], $m)) {
312
- return false;
313
- }
314
- $date = strtotime($m[0]);
315
-
316
- return (!$startDate || $date >= $startDate)
317
- && (!$endDate || $date <= $endDate);
318
- };
319
- $objectsIterator = new \CallbackFilterIterator($objectsIterator, $fn);
320
- }
321
-
322
- return $objectsIterator;
323
- }
324
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudTrail/LogFileReader.php DELETED
@@ -1,55 +0,0 @@
1
- <?php
2
- namespace Aws\CloudTrail;
3
-
4
- use Aws\S3\S3Client;
5
-
6
- /**
7
- * This class provides an easy way to read log files generated by AWS
8
- * CloudTrail.
9
- *
10
- * CloudTrail log files contain data about your AWS API calls and are stored in
11
- * Amazon S3. The log files are gzipped and contain structured data in JSON
12
- * format. This class will automatically ungzip and decode the data, and return
13
- * the data as a array of log records
14
- */
15
- class LogFileReader
16
- {
17
- /** @var S3Client S3 client used to perform GetObject operations */
18
- private $s3Client;
19
-
20
- /**
21
- * @param S3Client $s3Client S3 client used to retrieve objects
22
- */
23
- public function __construct(S3Client $s3Client)
24
- {
25
- $this->s3Client = $s3Client;
26
- }
27
-
28
- /**
29
- * Downloads, unzips, and reads a CloudTrail log file from Amazon S3
30
- *
31
- * @param string $s3BucketName The bucket name of the log file in Amazon S3
32
- * @param string $logFileKey The key of the log file in Amazon S3
33
- *
34
- * @return array
35
- */
36
- public function read($s3BucketName, $logFileKey)
37
- {
38
- // Create a command for getting the log file object
39
- $command = $this->s3Client->getCommand('GetObject', [
40
- 'Bucket' => (string) $s3BucketName,
41
- 'Key' => (string) $logFileKey,
42
- 'ResponseContentEncoding' => 'x-gzip'
43
- ]);
44
-
45
- // Make sure gzip encoding header is sent and accepted in order to
46
- // inflate the response data.
47
- $command['@http']['headers']['Accept-Encoding'] = 'gzip';
48
-
49
- // Get the JSON response data and extract the log records
50
- $result = $this->s3Client->execute($command);
51
- $logData = json_decode($result['Body'], true);
52
-
53
- return isset($logData['Records']) ? $logData['Records'] : [];
54
- }
55
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudTrail/LogRecordIterator.php DELETED
@@ -1,187 +0,0 @@
1
- <?php
2
- namespace Aws\CloudTrail;
3
-
4
- use Aws\S3\S3Client;
5
-
6
- /**
7
- * The `Aws\CloudTrail\LogRecordIterator` provides an easy way to iterate over
8
- * log records from log files generated by AWS CloudTrail.
9
- *
10
- * CloudTrail log files contain data about your AWS API calls and are stored in
11
- * Amazon S3 at a predictable path based on a bucket name, a key prefix, an
12
- * account ID, a region, and date information. The files are gzipped and
13
- * contain structured data in JSON format. This class allows you to specify
14
- * options via its factory methods, including a date range, and emits each log
15
- * record from any log files that match the provided options.
16
- *
17
- * A log record containing data about an AWS API call is yielded for each
18
- * iteration on this object.
19
- */
20
- class LogRecordIterator implements \OuterIterator
21
- {
22
- /** @var LogFileReader */
23
- private $logFileReader;
24
-
25
- /** @var \Iterator */
26
- private $logFileIterator;
27
-
28
- /** @var array */
29
- private $records;
30
-
31
- /** @var int */
32
- private $recordIndex;
33
-
34
- /**
35
- * @param S3Client $s3Client
36
- * @param CloudTrailClient $cloudTrailClient
37
- * @param array $options
38
- *
39
- * @return LogRecordIterator
40
- */
41
- public static function forTrail(
42
- S3Client $s3Client,
43
- CloudTrailClient $cloudTrailClient,
44
- array $options = []
45
- ) {
46
- $logFileIterator = LogFileIterator::forTrail(
47
- $s3Client,
48
- $cloudTrailClient,
49
- $options
50
- );
51
-
52
- return new self(new LogFileReader($s3Client), $logFileIterator);
53
- }
54
-
55
- /**
56
- * @param S3Client $s3Client
57
- * @param string $s3BucketName
58
- * @param array $options
59
- *
60
- * @return LogRecordIterator
61
- */
62
- public static function forBucket(
63
- S3Client $s3Client,
64
- $s3BucketName,
65
- array $options = []
66
- ) {
67
- $logFileReader = new LogFileReader($s3Client);
68
- $iter = new LogFileIterator($s3Client, $s3BucketName, $options);
69
-
70
- return new self($logFileReader, $iter);
71
- }
72
-
73
- /**
74
- * @param S3Client $s3Client
75
- * @param string $s3BucketName
76
- * @param string $s3ObjectKey
77
- *
78
- * @return LogRecordIterator
79
- */
80
- public static function forFile(
81
- S3Client $s3Client,
82
- $s3BucketName,
83
- $s3ObjectKey
84
- ) {
85
- $logFileReader = new LogFileReader($s3Client);
86
- $logFileIterator = new \ArrayIterator([[
87
- 'Bucket' => $s3BucketName,
88
- 'Key' => $s3ObjectKey,
89
- ]]);
90
-
91
- return new self($logFileReader, $logFileIterator);
92
- }
93
-
94
- /**
95
- * @param LogFileReader $logFileReader
96
- * @param \Iterator $logFileIterator
97
- */
98
- public function __construct(
99
- LogFileReader $logFileReader,
100
- \Iterator $logFileIterator
101
- ) {
102
- $this->logFileReader = $logFileReader;
103
- $this->logFileIterator = $logFileIterator;
104
- $this->records = array();
105
- $this->recordIndex = 0;
106
- }
107
-
108
- /**
109
- * Returns the current log record as an array.
110
- *
111
- * @return array|false
112
- */
113
- public function current()
114
- {
115
- return $this->valid() ? $this->records[$this->recordIndex] : false;
116
- }
117
-
118
- public function next()
119
- {
120
- $this->recordIndex++;
121
-
122
- // If all the records have been exhausted, get more records from the
123
- // next log file.
124
- while (!$this->valid()) {
125
- $this->logFileIterator->next();
126
- $success = $this->loadRecordsFromCurrentLogFile();
127
- if (!$success) {
128
- // The objects iterator is exhausted as well, so stop trying
129
- break;
130
- }
131
- }
132
- }
133
-
134
- public function key()
135
- {
136
- if ($logFile = $this->logFileIterator->current()) {
137
- return $logFile['Key'] . '.' . $this->recordIndex;
138
- }
139
-
140
- return null;
141
- }
142
-
143
- public function valid()
144
- {
145
- return isset($this->records[$this->recordIndex]);
146
- }
147
-
148
- public function rewind()
149
- {
150
- $this->logFileIterator->rewind();
151
- $this->loadRecordsFromCurrentLogFile();
152
- }
153
-
154
- public function getInnerIterator()
155
- {
156
- return $this->logFileIterator;
157
- }
158
-
159
- /**
160
- * Examines the current file in the `logFileIterator` and attempts to read
161
- * it and load log records from it using the `logFileReader`. This method
162
- * expects that items pulled from the iterator will take the form:
163
- *
164
- * [
165
- * 'Bucket' => '...',
166
- * 'Key' => '...',
167
- * ]
168
- *
169
- * @return bool Returns `true` if records were loaded and `false` if no
170
- * records were found
171
- */
172
- private function loadRecordsFromCurrentLogFile()
173
- {
174
- $this->recordIndex = 0;
175
- $this->records = array();
176
-
177
- $logFile = $this->logFileIterator->current();
178
- if ($logFile && isset($logFile['Bucket']) && isset($logFile['Key'])) {
179
- $this->records = $this->logFileReader->read(
180
- $logFile['Bucket'],
181
- $logFile['Key']
182
- );
183
- }
184
-
185
- return (bool) $logFile;
186
- }
187
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudWatch/CloudWatchClient.php DELETED
@@ -1,44 +0,0 @@
1
- <?php
2
- namespace Aws\CloudWatch;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon CloudWatch** service.
8
- *
9
- * @method \Aws\Result deleteAlarms(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise deleteAlarmsAsync(array $args = [])
11
- * @method \Aws\Result deleteDashboards(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise deleteDashboardsAsync(array $args = [])
13
- * @method \Aws\Result describeAlarmHistory(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise describeAlarmHistoryAsync(array $args = [])
15
- * @method \Aws\Result describeAlarms(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise describeAlarmsAsync(array $args = [])
17
- * @method \Aws\Result describeAlarmsForMetric(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise describeAlarmsForMetricAsync(array $args = [])
19
- * @method \Aws\Result disableAlarmActions(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise disableAlarmActionsAsync(array $args = [])
21
- * @method \Aws\Result enableAlarmActions(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise enableAlarmActionsAsync(array $args = [])
23
- * @method \Aws\Result getDashboard(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise getDashboardAsync(array $args = [])
25
- * @method \Aws\Result getMetricData(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise getMetricDataAsync(array $args = [])
27
- * @method \Aws\Result getMetricStatistics(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise getMetricStatisticsAsync(array $args = [])
29
- * @method \Aws\Result getMetricWidgetImage(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise getMetricWidgetImageAsync(array $args = [])
31
- * @method \Aws\Result listDashboards(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise listDashboardsAsync(array $args = [])
33
- * @method \Aws\Result listMetrics(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise listMetricsAsync(array $args = [])
35
- * @method \Aws\Result putDashboard(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise putDashboardAsync(array $args = [])
37
- * @method \Aws\Result putMetricAlarm(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise putMetricAlarmAsync(array $args = [])
39
- * @method \Aws\Result putMetricData(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise putMetricDataAsync(array $args = [])
41
- * @method \Aws\Result setAlarmState(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise setAlarmStateAsync(array $args = [])
43
- */
44
- class CloudWatchClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudWatch/Exception/CloudWatchException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\CloudWatch\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the Amazon CloudWatch service.
8
- */
9
- class CloudWatchException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudWatchEvents/CloudWatchEventsClient.php DELETED
@@ -1,40 +0,0 @@
1
- <?php
2
- namespace Aws\CloudWatchEvents;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon CloudWatch Events** service.
8
- *
9
- * @method \Aws\Result deleteRule(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise deleteRuleAsync(array $args = [])
11
- * @method \Aws\Result describeEventBus(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise describeEventBusAsync(array $args = [])
13
- * @method \Aws\Result describeRule(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise describeRuleAsync(array $args = [])
15
- * @method \Aws\Result disableRule(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise disableRuleAsync(array $args = [])
17
- * @method \Aws\Result enableRule(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise enableRuleAsync(array $args = [])
19
- * @method \Aws\Result listRuleNamesByTarget(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise listRuleNamesByTargetAsync(array $args = [])
21
- * @method \Aws\Result listRules(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise listRulesAsync(array $args = [])
23
- * @method \Aws\Result listTargetsByRule(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise listTargetsByRuleAsync(array $args = [])
25
- * @method \Aws\Result putEvents(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise putEventsAsync(array $args = [])
27
- * @method \Aws\Result putPermission(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise putPermissionAsync(array $args = [])
29
- * @method \Aws\Result putRule(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise putRuleAsync(array $args = [])
31
- * @method \Aws\Result putTargets(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise putTargetsAsync(array $args = [])
33
- * @method \Aws\Result removePermission(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise removePermissionAsync(array $args = [])
35
- * @method \Aws\Result removeTargets(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise removeTargetsAsync(array $args = [])
37
- * @method \Aws\Result testEventPattern(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise testEventPatternAsync(array $args = [])
39
- */
40
- class CloudWatchEventsClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudWatchEvents/Exception/CloudWatchEventsException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\CloudWatchEvents\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **Amazon CloudWatch Events** service.
8
- */
9
- class CloudWatchEventsException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudWatchLogs/CloudWatchLogsClient.php DELETED
@@ -1,76 +0,0 @@
1
- <?php
2
- namespace Aws\CloudWatchLogs;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon CloudWatch Logs** service.
8
- *
9
- * @method \Aws\Result associateKmsKey(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise associateKmsKeyAsync(array $args = [])
11
- * @method \Aws\Result cancelExportTask(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise cancelExportTaskAsync(array $args = [])
13
- * @method \Aws\Result createExportTask(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise createExportTaskAsync(array $args = [])
15
- * @method \Aws\Result createLogGroup(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise createLogGroupAsync(array $args = [])
17
- * @method \Aws\Result createLogStream(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise createLogStreamAsync(array $args = [])
19
- * @method \Aws\Result deleteDestination(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise deleteDestinationAsync(array $args = [])
21
- * @method \Aws\Result deleteLogGroup(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise deleteLogGroupAsync(array $args = [])
23
- * @method \Aws\Result deleteLogStream(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise deleteLogStreamAsync(array $args = [])
25
- * @method \Aws\Result deleteMetricFilter(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise deleteMetricFilterAsync(array $args = [])
27
- * @method \Aws\Result deleteResourcePolicy(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise deleteResourcePolicyAsync(array $args = [])
29
- * @method \Aws\Result deleteRetentionPolicy(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise deleteRetentionPolicyAsync(array $args = [])
31
- * @method \Aws\Result deleteSubscriptionFilter(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise deleteSubscriptionFilterAsync(array $args = [])
33
- * @method \Aws\Result describeDestinations(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise describeDestinationsAsync(array $args = [])
35
- * @method \Aws\Result describeExportTasks(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise describeExportTasksAsync(array $args = [])
37
- * @method \Aws\Result describeLogGroups(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise describeLogGroupsAsync(array $args = [])
39
- * @method \Aws\Result describeLogStreams(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise describeLogStreamsAsync(array $args = [])
41
- * @method \Aws\Result describeMetricFilters(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise describeMetricFiltersAsync(array $args = [])
43
- * @method \Aws\Result describeResourcePolicies(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise describeResourcePoliciesAsync(array $args = [])
45
- * @method \Aws\Result describeSubscriptionFilters(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise describeSubscriptionFiltersAsync(array $args = [])
47
- * @method \Aws\Result disassociateKmsKey(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise disassociateKmsKeyAsync(array $args = [])
49
- * @method \Aws\Result filterLogEvents(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise filterLogEventsAsync(array $args = [])
51
- * @method \Aws\Result getLogEvents(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise getLogEventsAsync(array $args = [])
53
- * @method \Aws\Result listTagsLogGroup(array $args = [])
54
- * @method \GuzzleHttp\Promise\Promise listTagsLogGroupAsync(array $args = [])
55
- * @method \Aws\Result putDestination(array $args = [])
56
- * @method \GuzzleHttp\Promise\Promise putDestinationAsync(array $args = [])
57
- * @method \Aws\Result putDestinationPolicy(array $args = [])
58
- * @method \GuzzleHttp\Promise\Promise putDestinationPolicyAsync(array $args = [])
59
- * @method \Aws\Result putLogEvents(array $args = [])
60
- * @method \GuzzleHttp\Promise\Promise putLogEventsAsync(array $args = [])
61
- * @method \Aws\Result putMetricFilter(array $args = [])
62
- * @method \GuzzleHttp\Promise\Promise putMetricFilterAsync(array $args = [])
63
- * @method \Aws\Result putResourcePolicy(array $args = [])
64
- * @method \GuzzleHttp\Promise\Promise putResourcePolicyAsync(array $args = [])
65
- * @method \Aws\Result putRetentionPolicy(array $args = [])
66
- * @method \GuzzleHttp\Promise\Promise putRetentionPolicyAsync(array $args = [])
67
- * @method \Aws\Result putSubscriptionFilter(array $args = [])
68
- * @method \GuzzleHttp\Promise\Promise putSubscriptionFilterAsync(array $args = [])
69
- * @method \Aws\Result tagLogGroup(array $args = [])
70
- * @method \GuzzleHttp\Promise\Promise tagLogGroupAsync(array $args = [])
71
- * @method \Aws\Result testMetricFilter(array $args = [])
72
- * @method \GuzzleHttp\Promise\Promise testMetricFilterAsync(array $args = [])
73
- * @method \Aws\Result untagLogGroup(array $args = [])
74
- * @method \GuzzleHttp\Promise\Promise untagLogGroupAsync(array $args = [])
75
- */
76
- class CloudWatchLogsClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CloudWatchLogs/Exception/CloudWatchLogsException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\CloudWatchLogs\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the Amazon CloudWatch Logs service.
8
- */
9
- class CloudWatchLogsException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CodeBuild/CodeBuildClient.php DELETED
@@ -1,41 +0,0 @@
1
- <?php
2
- namespace Aws\CodeBuild;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS CodeBuild** service.
8
- * @method \Aws\Result batchDeleteBuilds(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise batchDeleteBuildsAsync(array $args = [])
10
- * @method \Aws\Result batchGetBuilds(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise batchGetBuildsAsync(array $args = [])
12
- * @method \Aws\Result batchGetProjects(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise batchGetProjectsAsync(array $args = [])
14
- * @method \Aws\Result createProject(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise createProjectAsync(array $args = [])
16
- * @method \Aws\Result createWebhook(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise createWebhookAsync(array $args = [])
18
- * @method \Aws\Result deleteProject(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise deleteProjectAsync(array $args = [])
20
- * @method \Aws\Result deleteWebhook(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise deleteWebhookAsync(array $args = [])
22
- * @method \Aws\Result invalidateProjectCache(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise invalidateProjectCacheAsync(array $args = [])
24
- * @method \Aws\Result listBuilds(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise listBuildsAsync(array $args = [])
26
- * @method \Aws\Result listBuildsForProject(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise listBuildsForProjectAsync(array $args = [])
28
- * @method \Aws\Result listCuratedEnvironmentImages(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise listCuratedEnvironmentImagesAsync(array $args = [])
30
- * @method \Aws\Result listProjects(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise listProjectsAsync(array $args = [])
32
- * @method \Aws\Result startBuild(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise startBuildAsync(array $args = [])
34
- * @method \Aws\Result stopBuild(array $args = [])
35
- * @method \GuzzleHttp\Promise\Promise stopBuildAsync(array $args = [])
36
- * @method \Aws\Result updateProject(array $args = [])
37
- * @method \GuzzleHttp\Promise\Promise updateProjectAsync(array $args = [])
38
- * @method \Aws\Result updateWebhook(array $args = [])
39
- * @method \GuzzleHttp\Promise\Promise updateWebhookAsync(array $args = [])
40
- */
41
- class CodeBuildClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CodeBuild/Exception/CodeBuildException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\CodeBuild\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **AWS CodeBuild** service.
8
- */
9
- class CodeBuildException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CodeCommit/CodeCommitClient.php DELETED
@@ -1,88 +0,0 @@
1
- <?php
2
- namespace Aws\CodeCommit;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS CodeCommit** service.
8
- *
9
- * @method \Aws\Result batchGetRepositories(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise batchGetRepositoriesAsync(array $args = [])
11
- * @method \Aws\Result createBranch(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise createBranchAsync(array $args = [])
13
- * @method \Aws\Result createPullRequest(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise createPullRequestAsync(array $args = [])
15
- * @method \Aws\Result createRepository(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise createRepositoryAsync(array $args = [])
17
- * @method \Aws\Result deleteBranch(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise deleteBranchAsync(array $args = [])
19
- * @method \Aws\Result deleteCommentContent(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise deleteCommentContentAsync(array $args = [])
21
- * @method \Aws\Result deleteFile(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise deleteFileAsync(array $args = [])
23
- * @method \Aws\Result deleteRepository(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise deleteRepositoryAsync(array $args = [])
25
- * @method \Aws\Result describePullRequestEvents(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise describePullRequestEventsAsync(array $args = [])
27
- * @method \Aws\Result getBlob(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise getBlobAsync(array $args = [])
29
- * @method \Aws\Result getBranch(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise getBranchAsync(array $args = [])
31
- * @method \Aws\Result getComment(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise getCommentAsync(array $args = [])
33
- * @method \Aws\Result getCommentsForComparedCommit(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise getCommentsForComparedCommitAsync(array $args = [])
35
- * @method \Aws\Result getCommentsForPullRequest(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise getCommentsForPullRequestAsync(array $args = [])
37
- * @method \Aws\Result getCommit(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise getCommitAsync(array $args = [])
39
- * @method \Aws\Result getDifferences(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise getDifferencesAsync(array $args = [])
41
- * @method \Aws\Result getFile(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise getFileAsync(array $args = [])
43
- * @method \Aws\Result getFolder(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise getFolderAsync(array $args = [])
45
- * @method \Aws\Result getMergeConflicts(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise getMergeConflictsAsync(array $args = [])
47
- * @method \Aws\Result getPullRequest(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise getPullRequestAsync(array $args = [])
49
- * @method \Aws\Result getRepository(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise getRepositoryAsync(array $args = [])
51
- * @method \Aws\Result getRepositoryTriggers(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise getRepositoryTriggersAsync(array $args = [])
53
- * @method \Aws\Result listBranches(array $args = [])
54
- * @method \GuzzleHttp\Promise\Promise listBranchesAsync(array $args = [])
55
- * @method \Aws\Result listPullRequests(array $args = [])
56
- * @method \GuzzleHttp\Promise\Promise listPullRequestsAsync(array $args = [])
57
- * @method \Aws\Result listRepositories(array $args = [])
58
- * @method \GuzzleHttp\Promise\Promise listRepositoriesAsync(array $args = [])
59
- * @method \Aws\Result mergePullRequestByFastForward(array $args = [])
60
- * @method \GuzzleHttp\Promise\Promise mergePullRequestByFastForwardAsync(array $args = [])
61
- * @method \Aws\Result postCommentForComparedCommit(array $args = [])
62
- * @method \GuzzleHttp\Promise\Promise postCommentForComparedCommitAsync(array $args = [])
63
- * @method \Aws\Result postCommentForPullRequest(array $args = [])
64
- * @method \GuzzleHttp\Promise\Promise postCommentForPullRequestAsync(array $args = [])
65
- * @method \Aws\Result postCommentReply(array $args = [])
66
- * @method \GuzzleHttp\Promise\Promise postCommentReplyAsync(array $args = [])
67
- * @method \Aws\Result putFile(array $args = [])
68
- * @method \GuzzleHttp\Promise\Promise putFileAsync(array $args = [])
69
- * @method \Aws\Result putRepositoryTriggers(array $args = [])
70
- * @method \GuzzleHttp\Promise\Promise putRepositoryTriggersAsync(array $args = [])
71
- * @method \Aws\Result testRepositoryTriggers(array $args = [])
72
- * @method \GuzzleHttp\Promise\Promise testRepositoryTriggersAsync(array $args = [])
73
- * @method \Aws\Result updateComment(array $args = [])
74
- * @method \GuzzleHttp\Promise\Promise updateCommentAsync(array $args = [])
75
- * @method \Aws\Result updateDefaultBranch(array $args = [])
76
- * @method \GuzzleHttp\Promise\Promise updateDefaultBranchAsync(array $args = [])
77
- * @method \Aws\Result updatePullRequestDescription(array $args = [])
78
- * @method \GuzzleHttp\Promise\Promise updatePullRequestDescriptionAsync(array $args = [])
79
- * @method \Aws\Result updatePullRequestStatus(array $args = [])
80
- * @method \GuzzleHttp\Promise\Promise updatePullRequestStatusAsync(array $args = [])
81
- * @method \Aws\Result updatePullRequestTitle(array $args = [])
82
- * @method \GuzzleHttp\Promise\Promise updatePullRequestTitleAsync(array $args = [])
83
- * @method \Aws\Result updateRepositoryDescription(array $args = [])
84
- * @method \GuzzleHttp\Promise\Promise updateRepositoryDescriptionAsync(array $args = [])
85
- * @method \Aws\Result updateRepositoryName(array $args = [])
86
- * @method \GuzzleHttp\Promise\Promise updateRepositoryNameAsync(array $args = [])
87
- */
88
- class CodeCommitClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CodeCommit/Exception/CodeCommitException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\CodeCommit\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **AWS CodeCommit** service.
8
- */
9
- class CodeCommitException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CodeDeploy/CodeDeployClient.php DELETED
@@ -1,90 +0,0 @@
1
- <?php
2
- namespace Aws\CodeDeploy;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with AWS CodeDeploy
8
- *
9
- * @method \Aws\Result addTagsToOnPremisesInstances(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise addTagsToOnPremisesInstancesAsync(array $args = [])
11
- * @method \Aws\Result batchGetApplicationRevisions(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise batchGetApplicationRevisionsAsync(array $args = [])
13
- * @method \Aws\Result batchGetApplications(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise batchGetApplicationsAsync(array $args = [])
15
- * @method \Aws\Result batchGetDeploymentGroups(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise batchGetDeploymentGroupsAsync(array $args = [])
17
- * @method \Aws\Result batchGetDeploymentInstances(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise batchGetDeploymentInstancesAsync(array $args = [])
19
- * @method \Aws\Result batchGetDeployments(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise batchGetDeploymentsAsync(array $args = [])
21
- * @method \Aws\Result batchGetOnPremisesInstances(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise batchGetOnPremisesInstancesAsync(array $args = [])
23
- * @method \Aws\Result continueDeployment(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise continueDeploymentAsync(array $args = [])
25
- * @method \Aws\Result createApplication(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise createApplicationAsync(array $args = [])
27
- * @method \Aws\Result createDeployment(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise createDeploymentAsync(array $args = [])
29
- * @method \Aws\Result createDeploymentConfig(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise createDeploymentConfigAsync(array $args = [])
31
- * @method \Aws\Result createDeploymentGroup(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise createDeploymentGroupAsync(array $args = [])
33
- * @method \Aws\Result deleteApplication(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise deleteApplicationAsync(array $args = [])
35
- * @method \Aws\Result deleteDeploymentConfig(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise deleteDeploymentConfigAsync(array $args = [])
37
- * @method \Aws\Result deleteDeploymentGroup(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise deleteDeploymentGroupAsync(array $args = [])
39
- * @method \Aws\Result deleteGitHubAccountToken(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise deleteGitHubAccountTokenAsync(array $args = [])
41
- * @method \Aws\Result deregisterOnPremisesInstance(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise deregisterOnPremisesInstanceAsync(array $args = [])
43
- * @method \Aws\Result getApplication(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise getApplicationAsync(array $args = [])
45
- * @method \Aws\Result getApplicationRevision(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise getApplicationRevisionAsync(array $args = [])
47
- * @method \Aws\Result getDeployment(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise getDeploymentAsync(array $args = [])
49
- * @method \Aws\Result getDeploymentConfig(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise getDeploymentConfigAsync(array $args = [])
51
- * @method \Aws\Result getDeploymentGroup(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise getDeploymentGroupAsync(array $args = [])
53
- * @method \Aws\Result getDeploymentInstance(array $args = [])
54
- * @method \GuzzleHttp\Promise\Promise getDeploymentInstanceAsync(array $args = [])
55
- * @method \Aws\Result getOnPremisesInstance(array $args = [])
56
- * @method \GuzzleHttp\Promise\Promise getOnPremisesInstanceAsync(array $args = [])
57
- * @method \Aws\Result listApplicationRevisions(array $args = [])
58
- * @method \GuzzleHttp\Promise\Promise listApplicationRevisionsAsync(array $args = [])
59
- * @method \Aws\Result listApplications(array $args = [])
60
- * @method \GuzzleHttp\Promise\Promise listApplicationsAsync(array $args = [])
61
- * @method \Aws\Result listDeploymentConfigs(array $args = [])
62
- * @method \GuzzleHttp\Promise\Promise listDeploymentConfigsAsync(array $args = [])
63
- * @method \Aws\Result listDeploymentGroups(array $args = [])
64
- * @method \GuzzleHttp\Promise\Promise listDeploymentGroupsAsync(array $args = [])
65
- * @method \Aws\Result listDeploymentInstances(array $args = [])
66
- * @method \GuzzleHttp\Promise\Promise listDeploymentInstancesAsync(array $args = [])
67
- * @method \Aws\Result listDeployments(array $args = [])
68
- * @method \GuzzleHttp\Promise\Promise listDeploymentsAsync(array $args = [])
69
- * @method \Aws\Result listGitHubAccountTokenNames(array $args = [])
70
- * @method \GuzzleHttp\Promise\Promise listGitHubAccountTokenNamesAsync(array $args = [])
71
- * @method \Aws\Result listOnPremisesInstances(array $args = [])
72
- * @method \GuzzleHttp\Promise\Promise listOnPremisesInstancesAsync(array $args = [])
73
- * @method \Aws\Result putLifecycleEventHookExecutionStatus(array $args = [])
74
- * @method \GuzzleHttp\Promise\Promise putLifecycleEventHookExecutionStatusAsync(array $args = [])
75
- * @method \Aws\Result registerApplicationRevision(array $args = [])
76
- * @method \GuzzleHttp\Promise\Promise registerApplicationRevisionAsync(array $args = [])
77
- * @method \Aws\Result registerOnPremisesInstance(array $args = [])
78
- * @method \GuzzleHttp\Promise\Promise registerOnPremisesInstanceAsync(array $args = [])
79
- * @method \Aws\Result removeTagsFromOnPremisesInstances(array $args = [])
80
- * @method \GuzzleHttp\Promise\Promise removeTagsFromOnPremisesInstancesAsync(array $args = [])
81
- * @method \Aws\Result skipWaitTimeForInstanceTermination(array $args = [])
82
- * @method \GuzzleHttp\Promise\Promise skipWaitTimeForInstanceTerminationAsync(array $args = [])
83
- * @method \Aws\Result stopDeployment(array $args = [])
84
- * @method \GuzzleHttp\Promise\Promise stopDeploymentAsync(array $args = [])
85
- * @method \Aws\Result updateApplication(array $args = [])
86
- * @method \GuzzleHttp\Promise\Promise updateApplicationAsync(array $args = [])
87
- * @method \Aws\Result updateDeploymentGroup(array $args = [])
88
- * @method \GuzzleHttp\Promise\Promise updateDeploymentGroupAsync(array $args = [])
89
- */
90
- class CodeDeployClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CodeDeploy/Exception/CodeDeployException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\CodeDeploy\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with AWS CodeDeploy.
8
- */
9
- class CodeDeployException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CodePipeline/CodePipelineClient.php DELETED
@@ -1,74 +0,0 @@
1
- <?php
2
- namespace Aws\CodePipeline;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon CodePipeline** service.
8
- *
9
- * @method \Aws\Result acknowledgeJob(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise acknowledgeJobAsync(array $args = [])
11
- * @method \Aws\Result acknowledgeThirdPartyJob(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise acknowledgeThirdPartyJobAsync(array $args = [])
13
- * @method \Aws\Result createCustomActionType(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise createCustomActionTypeAsync(array $args = [])
15
- * @method \Aws\Result createPipeline(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise createPipelineAsync(array $args = [])
17
- * @method \Aws\Result deleteCustomActionType(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise deleteCustomActionTypeAsync(array $args = [])
19
- * @method \Aws\Result deletePipeline(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise deletePipelineAsync(array $args = [])
21
- * @method \Aws\Result deleteWebhook(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise deleteWebhookAsync(array $args = [])
23
- * @method \Aws\Result deregisterWebhookWithThirdParty(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise deregisterWebhookWithThirdPartyAsync(array $args = [])
25
- * @method \Aws\Result disableStageTransition(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise disableStageTransitionAsync(array $args = [])
27
- * @method \Aws\Result enableStageTransition(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise enableStageTransitionAsync(array $args = [])
29
- * @method \Aws\Result getJobDetails(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise getJobDetailsAsync(array $args = [])
31
- * @method \Aws\Result getPipeline(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise getPipelineAsync(array $args = [])
33
- * @method \Aws\Result getPipelineExecution(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise getPipelineExecutionAsync(array $args = [])
35
- * @method \Aws\Result getPipelineState(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise getPipelineStateAsync(array $args = [])
37
- * @method \Aws\Result getThirdPartyJobDetails(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise getThirdPartyJobDetailsAsync(array $args = [])
39
- * @method \Aws\Result listActionTypes(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise listActionTypesAsync(array $args = [])
41
- * @method \Aws\Result listPipelineExecutions(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise listPipelineExecutionsAsync(array $args = [])
43
- * @method \Aws\Result listPipelines(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise listPipelinesAsync(array $args = [])
45
- * @method \Aws\Result listWebhooks(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise listWebhooksAsync(array $args = [])
47
- * @method \Aws\Result pollForJobs(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise pollForJobsAsync(array $args = [])
49
- * @method \Aws\Result pollForThirdPartyJobs(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise pollForThirdPartyJobsAsync(array $args = [])
51
- * @method \Aws\Result putActionRevision(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise putActionRevisionAsync(array $args = [])
53
- * @method \Aws\Result putApprovalResult(array $args = [])
54
- * @method \GuzzleHttp\Promise\Promise putApprovalResultAsync(array $args = [])
55
- * @method \Aws\Result putJobFailureResult(array $args = [])
56
- * @method \GuzzleHttp\Promise\Promise putJobFailureResultAsync(array $args = [])
57
- * @method \Aws\Result putJobSuccessResult(array $args = [])
58
- * @method \GuzzleHttp\Promise\Promise putJobSuccessResultAsync(array $args = [])
59
- * @method \Aws\Result putThirdPartyJobFailureResult(array $args = [])
60
- * @method \GuzzleHttp\Promise\Promise putThirdPartyJobFailureResultAsync(array $args = [])
61
- * @method \Aws\Result putThirdPartyJobSuccessResult(array $args = [])
62
- * @method \GuzzleHttp\Promise\Promise putThirdPartyJobSuccessResultAsync(array $args = [])
63
- * @method \Aws\Result putWebhook(array $args = [])
64
- * @method \GuzzleHttp\Promise\Promise putWebhookAsync(array $args = [])
65
- * @method \Aws\Result registerWebhookWithThirdParty(array $args = [])
66
- * @method \GuzzleHttp\Promise\Promise registerWebhookWithThirdPartyAsync(array $args = [])
67
- * @method \Aws\Result retryStageExecution(array $args = [])
68
- * @method \GuzzleHttp\Promise\Promise retryStageExecutionAsync(array $args = [])
69
- * @method \Aws\Result startPipelineExecution(array $args = [])
70
- * @method \GuzzleHttp\Promise\Promise startPipelineExecutionAsync(array $args = [])
71
- * @method \Aws\Result updatePipeline(array $args = [])
72
- * @method \GuzzleHttp\Promise\Promise updatePipelineAsync(array $args = [])
73
- */
74
- class CodePipelineClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CodePipeline/Exception/CodePipelineException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\CodePipeline\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the Amazon CodePipeline service.
8
- */
9
- class CodePipelineException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CodeStar/CodeStarClient.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
- namespace Aws\CodeStar;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS CodeStar** service.
8
- * @method \Aws\Result associateTeamMember(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise associateTeamMemberAsync(array $args = [])
10
- * @method \Aws\Result createProject(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise createProjectAsync(array $args = [])
12
- * @method \Aws\Result createUserProfile(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise createUserProfileAsync(array $args = [])
14
- * @method \Aws\Result deleteProject(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise deleteProjectAsync(array $args = [])
16
- * @method \Aws\Result deleteUserProfile(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise deleteUserProfileAsync(array $args = [])
18
- * @method \Aws\Result describeProject(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise describeProjectAsync(array $args = [])
20
- * @method \Aws\Result describeUserProfile(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise describeUserProfileAsync(array $args = [])
22
- * @method \Aws\Result disassociateTeamMember(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise disassociateTeamMemberAsync(array $args = [])
24
- * @method \Aws\Result listProjects(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise listProjectsAsync(array $args = [])
26
- * @method \Aws\Result listResources(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise listResourcesAsync(array $args = [])
28
- * @method \Aws\Result listTagsForProject(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise listTagsForProjectAsync(array $args = [])
30
- * @method \Aws\Result listTeamMembers(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise listTeamMembersAsync(array $args = [])
32
- * @method \Aws\Result listUserProfiles(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise listUserProfilesAsync(array $args = [])
34
- * @method \Aws\Result tagProject(array $args = [])
35
- * @method \GuzzleHttp\Promise\Promise tagProjectAsync(array $args = [])
36
- * @method \Aws\Result untagProject(array $args = [])
37
- * @method \GuzzleHttp\Promise\Promise untagProjectAsync(array $args = [])
38
- * @method \Aws\Result updateProject(array $args = [])
39
- * @method \GuzzleHttp\Promise\Promise updateProjectAsync(array $args = [])
40
- * @method \Aws\Result updateTeamMember(array $args = [])
41
- * @method \GuzzleHttp\Promise\Promise updateTeamMemberAsync(array $args = [])
42
- * @method \Aws\Result updateUserProfile(array $args = [])
43
- * @method \GuzzleHttp\Promise\Promise updateUserProfileAsync(array $args = [])
44
- */
45
- class CodeStarClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CodeStar/Exception/CodeStarException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\CodeStar\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **AWS CodeStar** service.
8
- */
9
- class CodeStarException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CognitoIdentity/CognitoIdentityClient.php DELETED
@@ -1,46 +0,0 @@
1
- <?php
2
- namespace Aws\CognitoIdentity;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon Cognito Identity** service.
8
- *
9
- * @method \Aws\Result createIdentityPool(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise createIdentityPoolAsync(array $args = [])
11
- * @method \Aws\Result deleteIdentities(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise deleteIdentitiesAsync(array $args = [])
13
- * @method \Aws\Result deleteIdentityPool(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise deleteIdentityPoolAsync(array $args = [])
15
- * @method \Aws\Result describeIdentity(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise describeIdentityAsync(array $args = [])
17
- * @method \Aws\Result describeIdentityPool(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise describeIdentityPoolAsync(array $args = [])
19
- * @method \Aws\Result getCredentialsForIdentity(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise getCredentialsForIdentityAsync(array $args = [])
21
- * @method \Aws\Result getId(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise getIdAsync(array $args = [])
23
- * @method \Aws\Result getIdentityPoolRoles(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise getIdentityPoolRolesAsync(array $args = [])
25
- * @method \Aws\Result getOpenIdToken(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise getOpenIdTokenAsync(array $args = [])
27
- * @method \Aws\Result getOpenIdTokenForDeveloperIdentity(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise getOpenIdTokenForDeveloperIdentityAsync(array $args = [])
29
- * @method \Aws\Result listIdentities(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise listIdentitiesAsync(array $args = [])
31
- * @method \Aws\Result listIdentityPools(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise listIdentityPoolsAsync(array $args = [])
33
- * @method \Aws\Result lookupDeveloperIdentity(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise lookupDeveloperIdentityAsync(array $args = [])
35
- * @method \Aws\Result mergeDeveloperIdentities(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise mergeDeveloperIdentitiesAsync(array $args = [])
37
- * @method \Aws\Result setIdentityPoolRoles(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise setIdentityPoolRolesAsync(array $args = [])
39
- * @method \Aws\Result unlinkDeveloperIdentity(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise unlinkDeveloperIdentityAsync(array $args = [])
41
- * @method \Aws\Result unlinkIdentity(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise unlinkIdentityAsync(array $args = [])
43
- * @method \Aws\Result updateIdentityPool(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise updateIdentityPoolAsync(array $args = [])
45
- */
46
- class CognitoIdentityClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CognitoIdentity/CognitoIdentityProvider.php DELETED
@@ -1,61 +0,0 @@
1
- <?php
2
- namespace Aws\CognitoIdentity;
3
-
4
- use Aws\Credentials\Credentials;
5
- use GuzzleHttp\Promise;
6
-
7
- class CognitoIdentityProvider
8
- {
9
- /** @var CognitoIdentityClient */
10
- private $client;
11
- /** @var string */
12
- private $identityPoolId;
13
- /** @var string|null */
14
- private $accountId;
15
- /** @var array */
16
- private $logins;
17
-
18
- public function __construct(
19
- $poolId,
20
- array $clientOptions,
21
- array $logins = [],
22
- $accountId = null
23
- ) {
24
- $this->identityPoolId = $poolId;
25
- $this->logins = $logins;
26
- $this->accountId = $accountId;
27
- $this->client = new CognitoIdentityClient($clientOptions + [
28
- 'credentials' => false,
29
- ]);
30
- }
31
-
32
- public function __invoke()
33
- {
34
- return Promise\coroutine(function () {
35
- $params = $this->logins ? ['Logins' => $this->logins] : [];
36
- $getIdParams = $params + ['IdentityPoolId' => $this->identityPoolId];
37
- if ($this->accountId) {
38
- $getIdParams['AccountId'] = $this->accountId;
39
- }
40
-
41
- $id = (yield $this->client->getId($getIdParams));
42
- $result = (yield $this->client->getCredentialsForIdentity([
43
- 'IdentityId' => $id['IdentityId'],
44
- ] + $params));
45
-
46
- yield new Credentials(
47
- $result['Credentials']['AccessKeyId'],
48
- $result['Credentials']['SecretKey'],
49
- $result['Credentials']['SessionToken'],
50
- (int) $result['Credentials']['Expiration']->format('U')
51
- );
52
- });
53
- }
54
-
55
- public function updateLogin($key, $value)
56
- {
57
- $this->logins[$key] = $value;
58
-
59
- return $this;
60
- }
61
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CognitoIdentity/Exception/CognitoIdentityException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\CognitoIdentity\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the Amazon Cognito Identity Logs service.
8
- */
9
- class CognitoIdentityException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CognitoIdentityProvider/CognitoIdentityProviderClient.php DELETED
@@ -1,200 +0,0 @@
1
- <?php
2
- namespace Aws\CognitoIdentityProvider;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon Cognito Identity Provider** service.
8
- *
9
- * @method \Aws\Result addCustomAttributes(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise addCustomAttributesAsync(array $args = [])
11
- * @method \Aws\Result adminAddUserToGroup(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise adminAddUserToGroupAsync(array $args = [])
13
- * @method \Aws\Result adminConfirmSignUp(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise adminConfirmSignUpAsync(array $args = [])
15
- * @method \Aws\Result adminCreateUser(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise adminCreateUserAsync(array $args = [])
17
- * @method \Aws\Result adminDeleteUser(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise adminDeleteUserAsync(array $args = [])
19
- * @method \Aws\Result adminDeleteUserAttributes(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise adminDeleteUserAttributesAsync(array $args = [])
21
- * @method \Aws\Result adminDisableProviderForUser(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise adminDisableProviderForUserAsync(array $args = [])
23
- * @method \Aws\Result adminDisableUser(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise adminDisableUserAsync(array $args = [])
25
- * @method \Aws\Result adminEnableUser(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise adminEnableUserAsync(array $args = [])
27
- * @method \Aws\Result adminForgetDevice(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise adminForgetDeviceAsync(array $args = [])
29
- * @method \Aws\Result adminGetDevice(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise adminGetDeviceAsync(array $args = [])
31
- * @method \Aws\Result adminGetUser(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise adminGetUserAsync(array $args = [])
33
- * @method \Aws\Result adminInitiateAuth(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise adminInitiateAuthAsync(array $args = [])
35
- * @method \Aws\Result adminLinkProviderForUser(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise adminLinkProviderForUserAsync(array $args = [])
37
- * @method \Aws\Result adminListDevices(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise adminListDevicesAsync(array $args = [])
39
- * @method \Aws\Result adminListGroupsForUser(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise adminListGroupsForUserAsync(array $args = [])
41
- * @method \Aws\Result adminListUserAuthEvents(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise adminListUserAuthEventsAsync(array $args = [])
43
- * @method \Aws\Result adminRemoveUserFromGroup(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise adminRemoveUserFromGroupAsync(array $args = [])
45
- * @method \Aws\Result adminResetUserPassword(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise adminResetUserPasswordAsync(array $args = [])
47
- * @method \Aws\Result adminRespondToAuthChallenge(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise adminRespondToAuthChallengeAsync(array $args = [])
49
- * @method \Aws\Result adminSetUserMFAPreference(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise adminSetUserMFAPreferenceAsync(array $args = [])
51
- * @method \Aws\Result adminSetUserSettings(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise adminSetUserSettingsAsync(array $args = [])
53
- * @method \Aws\Result adminUpdateAuthEventFeedback(array $args = [])
54
- * @method \GuzzleHttp\Promise\Promise adminUpdateAuthEventFeedbackAsync(array $args = [])
55
- * @method \Aws\Result adminUpdateDeviceStatus(array $args = [])
56
- * @method \GuzzleHttp\Promise\Promise adminUpdateDeviceStatusAsync(array $args = [])
57
- * @method \Aws\Result adminUpdateUserAttributes(array $args = [])
58
- * @method \GuzzleHttp\Promise\Promise adminUpdateUserAttributesAsync(array $args = [])
59
- * @method \Aws\Result adminUserGlobalSignOut(array $args = [])
60
- * @method \GuzzleHttp\Promise\Promise adminUserGlobalSignOutAsync(array $args = [])
61
- * @method \Aws\Result associateSoftwareToken(array $args = [])
62
- * @method \GuzzleHttp\Promise\Promise associateSoftwareTokenAsync(array $args = [])
63
- * @method \Aws\Result changePassword(array $args = [])
64
- * @method \GuzzleHttp\Promise\Promise changePasswordAsync(array $args = [])
65
- * @method \Aws\Result confirmDevice(array $args = [])
66
- * @method \GuzzleHttp\Promise\Promise confirmDeviceAsync(array $args = [])
67
- * @method \Aws\Result confirmForgotPassword(array $args = [])
68
- * @method \GuzzleHttp\Promise\Promise confirmForgotPasswordAsync(array $args = [])
69
- * @method \Aws\Result confirmSignUp(array $args = [])
70
- * @method \GuzzleHttp\Promise\Promise confirmSignUpAsync(array $args = [])
71
- * @method \Aws\Result createGroup(array $args = [])
72
- * @method \GuzzleHttp\Promise\Promise createGroupAsync(array $args = [])
73
- * @method \Aws\Result createIdentityProvider(array $args = [])
74
- * @method \GuzzleHttp\Promise\Promise createIdentityProviderAsync(array $args = [])
75
- * @method \Aws\Result createResourceServer(array $args = [])
76
- * @method \GuzzleHttp\Promise\Promise createResourceServerAsync(array $args = [])
77
- * @method \Aws\Result createUserImportJob(array $args = [])
78
- * @method \GuzzleHttp\Promise\Promise createUserImportJobAsync(array $args = [])
79
- * @method \Aws\Result createUserPool(array $args = [])
80
- * @method \GuzzleHttp\Promise\Promise createUserPoolAsync(array $args = [])
81
- * @method \Aws\Result createUserPoolClient(array $args = [])
82
- * @method \GuzzleHttp\Promise\Promise createUserPoolClientAsync(array $args = [])
83
- * @method \Aws\Result createUserPoolDomain(array $args = [])
84
- * @method \GuzzleHttp\Promise\Promise createUserPoolDomainAsync(array $args = [])
85
- * @method \Aws\Result deleteGroup(array $args = [])
86
- * @method \GuzzleHttp\Promise\Promise deleteGroupAsync(array $args = [])
87
- * @method \Aws\Result deleteIdentityProvider(array $args = [])
88
- * @method \GuzzleHttp\Promise\Promise deleteIdentityProviderAsync(array $args = [])
89
- * @method \Aws\Result deleteResourceServer(array $args = [])
90
- * @method \GuzzleHttp\Promise\Promise deleteResourceServerAsync(array $args = [])
91
- * @method \Aws\Result deleteUser(array $args = [])
92
- * @method \GuzzleHttp\Promise\Promise deleteUserAsync(array $args = [])
93
- * @method \Aws\Result deleteUserAttributes(array $args = [])
94
- * @method \GuzzleHttp\Promise\Promise deleteUserAttributesAsync(array $args = [])
95
- * @method \Aws\Result deleteUserPool(array $args = [])
96
- * @method \GuzzleHttp\Promise\Promise deleteUserPoolAsync(array $args = [])
97
- * @method \Aws\Result deleteUserPoolClient(array $args = [])
98
- * @method \GuzzleHttp\Promise\Promise deleteUserPoolClientAsync(array $args = [])
99
- * @method \Aws\Result deleteUserPoolDomain(array $args = [])
100
- * @method \GuzzleHttp\Promise\Promise deleteUserPoolDomainAsync(array $args = [])
101
- * @method \Aws\Result describeIdentityProvider(array $args = [])
102
- * @method \GuzzleHttp\Promise\Promise describeIdentityProviderAsync(array $args = [])
103
- * @method \Aws\Result describeResourceServer(array $args = [])
104
- * @method \GuzzleHttp\Promise\Promise describeResourceServerAsync(array $args = [])
105
- * @method \Aws\Result describeRiskConfiguration(array $args = [])
106
- * @method \GuzzleHttp\Promise\Promise describeRiskConfigurationAsync(array $args = [])
107
- * @method \Aws\Result describeUserImportJob(array $args = [])
108
- * @method \GuzzleHttp\Promise\Promise describeUserImportJobAsync(array $args = [])
109
- * @method \Aws\Result describeUserPool(array $args = [])
110
- * @method \GuzzleHttp\Promise\Promise describeUserPoolAsync(array $args = [])
111
- * @method \Aws\Result describeUserPoolClient(array $args = [])
112
- * @method \GuzzleHttp\Promise\Promise describeUserPoolClientAsync(array $args = [])
113
- * @method \Aws\Result describeUserPoolDomain(array $args = [])
114
- * @method \GuzzleHttp\Promise\Promise describeUserPoolDomainAsync(array $args = [])
115
- * @method \Aws\Result forgetDevice(array $args = [])
116
- * @method \GuzzleHttp\Promise\Promise forgetDeviceAsync(array $args = [])
117
- * @method \Aws\Result forgotPassword(array $args = [])
118
- * @method \GuzzleHttp\Promise\Promise forgotPasswordAsync(array $args = [])
119
- * @method \Aws\Result getCSVHeader(array $args = [])
120
- * @method \GuzzleHttp\Promise\Promise getCSVHeaderAsync(array $args = [])
121
- * @method \Aws\Result getDevice(array $args = [])
122
- * @method \GuzzleHttp\Promise\Promise getDeviceAsync(array $args = [])
123
- * @method \Aws\Result getGroup(array $args = [])
124
- * @method \GuzzleHttp\Promise\Promise getGroupAsync(array $args = [])
125
- * @method \Aws\Result getIdentityProviderByIdentifier(array $args = [])
126
- * @method \GuzzleHttp\Promise\Promise getIdentityProviderByIdentifierAsync(array $args = [])
127
- * @method \Aws\Result getSigningCertificate(array $args = [])
128
- * @method \GuzzleHttp\Promise\Promise getSigningCertificateAsync(array $args = [])
129
- * @method \Aws\Result getUICustomization(array $args = [])
130
- * @method \GuzzleHttp\Promise\Promise getUICustomizationAsync(array $args = [])
131
- * @method \Aws\Result getUser(array $args = [])
132
- * @method \GuzzleHttp\Promise\Promise getUserAsync(array $args = [])
133
- * @method \Aws\Result getUserAttributeVerificationCode(array $args = [])
134
- * @method \GuzzleHttp\Promise\Promise getUserAttributeVerificationCodeAsync(array $args = [])
135
- * @method \Aws\Result getUserPoolMfaConfig(array $args = [])
136
- * @method \GuzzleHttp\Promise\Promise getUserPoolMfaConfigAsync(array $args = [])
137
- * @method \Aws\Result globalSignOut(array $args = [])
138
- * @method \GuzzleHttp\Promise\Promise globalSignOutAsync(array $args = [])
139
- * @method \Aws\Result initiateAuth(array $args = [])
140
- * @method \GuzzleHttp\Promise\Promise initiateAuthAsync(array $args = [])
141
- * @method \Aws\Result listDevices(array $args = [])
142
- * @method \GuzzleHttp\Promise\Promise listDevicesAsync(array $args = [])
143
- * @method \Aws\Result listGroups(array $args = [])
144
- * @method \GuzzleHttp\Promise\Promise listGroupsAsync(array $args = [])
145
- * @method \Aws\Result listIdentityProviders(array $args = [])
146
- * @method \GuzzleHttp\Promise\Promise listIdentityProvidersAsync(array $args = [])
147
- * @method \Aws\Result listResourceServers(array $args = [])
148
- * @method \GuzzleHttp\Promise\Promise listResourceServersAsync(array $args = [])
149
- * @method \Aws\Result listUserImportJobs(array $args = [])
150
- * @method \GuzzleHttp\Promise\Promise listUserImportJobsAsync(array $args = [])
151
- * @method \Aws\Result listUserPoolClients(array $args = [])
152
- * @method \GuzzleHttp\Promise\Promise listUserPoolClientsAsync(array $args = [])
153
- * @method \Aws\Result listUserPools(array $args = [])
154
- * @method \GuzzleHttp\Promise\Promise listUserPoolsAsync(array $args = [])
155
- * @method \Aws\Result listUsers(array $args = [])
156
- * @method \GuzzleHttp\Promise\Promise listUsersAsync(array $args = [])
157
- * @method \Aws\Result listUsersInGroup(array $args = [])
158
- * @method \GuzzleHttp\Promise\Promise listUsersInGroupAsync(array $args = [])
159
- * @method \Aws\Result resendConfirmationCode(array $args = [])
160
- * @method \GuzzleHttp\Promise\Promise resendConfirmationCodeAsync(array $args = [])
161
- * @method \Aws\Result respondToAuthChallenge(array $args = [])
162
- * @method \GuzzleHttp\Promise\Promise respondToAuthChallengeAsync(array $args = [])
163
- * @method \Aws\Result setRiskConfiguration(array $args = [])
164
- * @method \GuzzleHttp\Promise\Promise setRiskConfigurationAsync(array $args = [])
165
- * @method \Aws\Result setUICustomization(array $args = [])
166
- * @method \GuzzleHttp\Promise\Promise setUICustomizationAsync(array $args = [])
167
- * @method \Aws\Result setUserMFAPreference(array $args = [])
168
- * @method \GuzzleHttp\Promise\Promise setUserMFAPreferenceAsync(array $args = [])
169
- * @method \Aws\Result setUserPoolMfaConfig(array $args = [])
170
- * @method \GuzzleHttp\Promise\Promise setUserPoolMfaConfigAsync(array $args = [])
171
- * @method \Aws\Result setUserSettings(array $args = [])
172
- * @method \GuzzleHttp\Promise\Promise setUserSettingsAsync(array $args = [])
173
- * @method \Aws\Result signUp(array $args = [])
174
- * @method \GuzzleHttp\Promise\Promise signUpAsync(array $args = [])
175
- * @method \Aws\Result startUserImportJob(array $args = [])
176
- * @method \GuzzleHttp\Promise\Promise startUserImportJobAsync(array $args = [])
177
- * @method \Aws\Result stopUserImportJob(array $args = [])
178
- * @method \GuzzleHttp\Promise\Promise stopUserImportJobAsync(array $args = [])
179
- * @method \Aws\Result updateAuthEventFeedback(array $args = [])
180
- * @method \GuzzleHttp\Promise\Promise updateAuthEventFeedbackAsync(array $args = [])
181
- * @method \Aws\Result updateDeviceStatus(array $args = [])
182
- * @method \GuzzleHttp\Promise\Promise updateDeviceStatusAsync(array $args = [])
183
- * @method \Aws\Result updateGroup(array $args = [])
184
- * @method \GuzzleHttp\Promise\Promise updateGroupAsync(array $args = [])
185
- * @method \Aws\Result updateIdentityProvider(array $args = [])
186
- * @method \GuzzleHttp\Promise\Promise updateIdentityProviderAsync(array $args = [])
187
- * @method \Aws\Result updateResourceServer(array $args = [])
188
- * @method \GuzzleHttp\Promise\Promise updateResourceServerAsync(array $args = [])
189
- * @method \Aws\Result updateUserAttributes(array $args = [])
190
- * @method \GuzzleHttp\Promise\Promise updateUserAttributesAsync(array $args = [])
191
- * @method \Aws\Result updateUserPool(array $args = [])
192
- * @method \GuzzleHttp\Promise\Promise updateUserPoolAsync(array $args = [])
193
- * @method \Aws\Result updateUserPoolClient(array $args = [])
194
- * @method \GuzzleHttp\Promise\Promise updateUserPoolClientAsync(array $args = [])
195
- * @method \Aws\Result verifySoftwareToken(array $args = [])
196
- * @method \GuzzleHttp\Promise\Promise verifySoftwareTokenAsync(array $args = [])
197
- * @method \Aws\Result verifyUserAttribute(array $args = [])
198
- * @method \GuzzleHttp\Promise\Promise verifyUserAttributeAsync(array $args = [])
199
- */
200
- class CognitoIdentityProviderClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CognitoIdentityProvider/Exception/CognitoIdentityProviderException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\CognitoIdentityProvider\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **Amazon Cognito Identity Provider** service.
8
- */
9
- class CognitoIdentityProviderException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CognitoSync/CognitoSyncClient.php DELETED
@@ -1,44 +0,0 @@
1
- <?php
2
- namespace Aws\CognitoSync;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon Cognito Sync** service.
8
- *
9
- * @method \Aws\Result bulkPublish(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise bulkPublishAsync(array $args = [])
11
- * @method \Aws\Result deleteDataset(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise deleteDatasetAsync(array $args = [])
13
- * @method \Aws\Result describeDataset(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise describeDatasetAsync(array $args = [])
15
- * @method \Aws\Result describeIdentityPoolUsage(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise describeIdentityPoolUsageAsync(array $args = [])
17
- * @method \Aws\Result describeIdentityUsage(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise describeIdentityUsageAsync(array $args = [])
19
- * @method \Aws\Result getBulkPublishDetails(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise getBulkPublishDetailsAsync(array $args = [])
21
- * @method \Aws\Result getCognitoEvents(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise getCognitoEventsAsync(array $args = [])
23
- * @method \Aws\Result getIdentityPoolConfiguration(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise getIdentityPoolConfigurationAsync(array $args = [])
25
- * @method \Aws\Result listDatasets(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise listDatasetsAsync(array $args = [])
27
- * @method \Aws\Result listIdentityPoolUsage(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise listIdentityPoolUsageAsync(array $args = [])
29
- * @method \Aws\Result listRecords(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise listRecordsAsync(array $args = [])
31
- * @method \Aws\Result registerDevice(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise registerDeviceAsync(array $args = [])
33
- * @method \Aws\Result setCognitoEvents(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise setCognitoEventsAsync(array $args = [])
35
- * @method \Aws\Result setIdentityPoolConfiguration(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise setIdentityPoolConfigurationAsync(array $args = [])
37
- * @method \Aws\Result subscribeToDataset(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise subscribeToDatasetAsync(array $args = [])
39
- * @method \Aws\Result unsubscribeFromDataset(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise unsubscribeFromDatasetAsync(array $args = [])
41
- * @method \Aws\Result updateRecords(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise updateRecordsAsync(array $args = [])
43
- */
44
- class CognitoSyncClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CognitoSync/Exception/CognitoSyncException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\CognitoSync\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the Amazon Cognito Sync service.
8
- */
9
- class CognitoSyncException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Command.php DELETED
@@ -1,62 +0,0 @@
1
- <?php
2
- namespace Aws;
3
-
4
- /**
5
- * AWS command object.
6
- */
7
- class Command implements CommandInterface
8
- {
9
- use HasDataTrait;
10
-
11
- /** @var string */
12
- private $name;
13
-
14
- /** @var HandlerList */
15
- private $handlerList;
16
-
17
- /**
18
- * Accepts an associative array of command options, including:
19
- *
20
- * - @http: (array) Associative array of transfer options.
21
- *
22
- * @param string $name Name of the command
23
- * @param array $args Arguments to pass to the command
24
- * @param HandlerList $list Handler list
25
- */
26
- public function __construct($name, array $args = [], HandlerList $list = null)
27
- {
28
- $this->name = $name;
29
- $this->data = $args;
30
- $this->handlerList = $list ?: new HandlerList();
31
-
32
- if (!isset($this->data['@http'])) {
33
- $this->data['@http'] = [];
34
- }
35
- }
36
-
37
- public function __clone()
38
- {
39
- $this->handlerList = clone $this->handlerList;
40
- }
41
-
42
- public function getName()
43
- {
44
- return $this->name;
45
- }
46
-
47
- public function hasParam($name)
48
- {
49
- return array_key_exists($name, $this->data);
50
- }
51
-
52
- public function getHandlerList()
53
- {
54
- return $this->handlerList;
55
- }
56
-
57
- /** @deprecated */
58
- public function get($name)
59
- {
60
- return $this[$name];
61
- }
62
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CommandInterface.php DELETED
@@ -1,42 +0,0 @@
1
- <?php
2
- namespace Aws;
3
-
4
- /**
5
- * A command object encapsulates the input parameters used to control the
6
- * creation of a HTTP request and processing of a HTTP response.
7
- *
8
- * Using the toArray() method will return the input parameters of the command
9
- * as an associative array.
10
- */
11
- interface CommandInterface extends \ArrayAccess, \Countable, \IteratorAggregate
12
- {
13
- /**
14
- * Converts the command parameters to an array
15
- *
16
- * @return array
17
- */
18
- public function toArray();
19
-
20
- /**
21
- * Get the name of the command
22
- *
23
- * @return string
24
- */
25
- public function getName();
26
-
27
- /**
28
- * Check if the command has a parameter by name.
29
- *
30
- * @param string $name Name of the parameter to check
31
- *
32
- * @return bool
33
- */
34
- public function hasParam($name);
35
-
36
- /**
37
- * Get the handler list used to transfer the command.
38
- *
39
- * @return HandlerList
40
- */
41
- public function getHandlerList();
42
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CommandPool.php DELETED
@@ -1,150 +0,0 @@
1
- <?php
2
- namespace Aws;
3
-
4
- use GuzzleHttp\Promise\PromisorInterface;
5
- use GuzzleHttp\Promise\EachPromise;
6
-
7
- /**
8
- * Sends and iterator of commands concurrently using a capped pool size.
9
- *
10
- * The pool will read command objects from an iterator until it is cancelled or
11
- * until the iterator is consumed.
12
- */
13
- class CommandPool implements PromisorInterface
14
- {
15
- /** @var EachPromise */
16
- private $each;
17
-
18
- /**
19
- * The CommandPool constructor accepts a hash of configuration options:
20
- *
21
- * - concurrency: (callable|int) Maximum number of commands to execute
22
- * concurrently. Provide a function to resize the pool dynamically. The
23
- * function will be provided the current number of pending requests and
24
- * is expected to return an integer representing the new pool size limit.
25
- * - before: (callable) function to invoke before sending each command. The
26
- * before function accepts the command and the key of the iterator of the
27
- * command. You can mutate the command as needed in the before function
28
- * before sending the command.
29
- * - fulfilled: (callable) Function to invoke when a promise is fulfilled.
30
- * The function is provided the result object, id of the iterator that the
31
- * result came from, and the aggregate promise that can be resolved/rejected
32
- * if you need to short-circuit the pool.
33
- * - rejected: (callable) Function to invoke when a promise is rejected.
34
- * The function is provided an AwsException object, id of the iterator that
35
- * the exception came from, and the aggregate promise that can be
36
- * resolved/rejected if you need to short-circuit the pool.
37
- * - preserve_iterator_keys: (bool) Retain the iterator key when generating
38
- * the commands.
39
- *
40
- * @param AwsClientInterface $client Client used to execute commands.
41
- * @param array|\Iterator $commands Iterable that yields commands.
42
- * @param array $config Associative array of options.
43
- */
44
- public function __construct(
45
- AwsClientInterface $client,
46
- $commands,
47
- array $config = []
48
- ) {
49
- if (!isset($config['concurrency'])) {
50
- $config['concurrency'] = 25;
51
- }
52
-
53
- $before = $this->getBefore($config);
54
- $mapFn = function ($commands) use ($client, $before, $config) {
55
- foreach ($commands as $key => $command) {
56
- if (!($command instanceof CommandInterface)) {
57
- throw new \InvalidArgumentException('Each value yielded by '
58
- . 'the iterator must be an Aws\CommandInterface.');
59
- }
60
- if ($before) {
61
- $before($command, $key);
62
- }
63
- if (!empty($config['preserve_iterator_keys'])) {
64
- yield $key => $client->executeAsync($command);
65
- } else {
66
- yield $client->executeAsync($command);
67
- }
68
- }
69
- };
70
-
71
- $this->each = new EachPromise($mapFn($commands), $config);
72
- }
73
-
74
- /**
75
- * @return \GuzzleHttp\Promise\PromiseInterface
76
- */
77
- public function promise()
78
- {
79
- return $this->each->promise();
80
- }
81
-
82
- /**
83
- * Executes a pool synchronously and aggregates the results of the pool
84
- * into an indexed array in the same order as the passed in array.
85
- *
86
- * @param AwsClientInterface $client Client used to execute commands.
87
- * @param mixed $commands Iterable that yields commands.
88
- * @param array $config Configuration options.
89
- *
90
- * @return array
91
- * @see \Aws\CommandPool::__construct for available configuration options.
92
- */
93
- public static function batch(
94
- AwsClientInterface $client,
95
- $commands,
96
- array $config = []
97
- ) {
98
- $results = [];
99
- self::cmpCallback($config, 'fulfilled', $results);
100
- self::cmpCallback($config, 'rejected', $results);
101
-
102
- return (new self($client, $commands, $config))
103
- ->promise()
104
- ->then(static function () use (&$results) {
105
- ksort($results);
106
- return $results;
107
- })
108
- ->wait();
109
- }
110
-
111
- /**
112
- * @return callable
113
- */
114
- private function getBefore(array $config)
115
- {
116
- if (!isset($config['before'])) {
117
- return null;
118
- }
119
-
120
- if (is_callable($config['before'])) {
121
- return $config['before'];
122
- }
123
-
124
- throw new \InvalidArgumentException('before must be callable');
125
- }
126
-
127
- /**
128
- * Adds an onFulfilled or onRejected callback that aggregates results into
129
- * an array. If a callback is already present, it is replaced with the
130
- * composed function.
131
- *
132
- * @param array $config
133
- * @param $name
134
- * @param array $results
135
- */
136
- private static function cmpCallback(array &$config, $name, array &$results)
137
- {
138
- if (!isset($config[$name])) {
139
- $config[$name] = function ($v, $k) use (&$results) {
140
- $results[$k] = $v;
141
- };
142
- } else {
143
- $currentFn = $config[$name];
144
- $config[$name] = function ($v, $k) use (&$results, $currentFn) {
145
- $currentFn($v, $k);
146
- $results[$k] = $v;
147
- };
148
- }
149
- }
150
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Comprehend/ComprehendClient.php DELETED
@@ -1,67 +0,0 @@
1
- <?php
2
- namespace Aws\Comprehend;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon Comprehend** service.
8
- * @method \Aws\Result batchDetectDominantLanguage(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise batchDetectDominantLanguageAsync(array $args = [])
10
- * @method \Aws\Result batchDetectEntities(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise batchDetectEntitiesAsync(array $args = [])
12
- * @method \Aws\Result batchDetectKeyPhrases(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise batchDetectKeyPhrasesAsync(array $args = [])
14
- * @method \Aws\Result batchDetectSentiment(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise batchDetectSentimentAsync(array $args = [])
16
- * @method \Aws\Result batchDetectSyntax(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise batchDetectSyntaxAsync(array $args = [])
18
- * @method \Aws\Result describeDominantLanguageDetectionJob(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise describeDominantLanguageDetectionJobAsync(array $args = [])
20
- * @method \Aws\Result describeEntitiesDetectionJob(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise describeEntitiesDetectionJobAsync(array $args = [])
22
- * @method \Aws\Result describeKeyPhrasesDetectionJob(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise describeKeyPhrasesDetectionJobAsync(array $args = [])
24
- * @method \Aws\Result describeSentimentDetectionJob(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise describeSentimentDetectionJobAsync(array $args = [])
26
- * @method \Aws\Result describeTopicsDetectionJob(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise describeTopicsDetectionJobAsync(array $args = [])
28
- * @method \Aws\Result detectDominantLanguage(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise detectDominantLanguageAsync(array $args = [])
30
- * @method \Aws\Result detectEntities(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise detectEntitiesAsync(array $args = [])
32
- * @method \Aws\Result detectKeyPhrases(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise detectKeyPhrasesAsync(array $args = [])
34
- * @method \Aws\Result detectSentiment(array $args = [])
35
- * @method \GuzzleHttp\Promise\Promise detectSentimentAsync(array $args = [])
36
- * @method \Aws\Result detectSyntax(array $args = [])
37
- * @method \GuzzleHttp\Promise\Promise detectSyntaxAsync(array $args = [])
38
- * @method \Aws\Result listDominantLanguageDetectionJobs(array $args = [])
39
- * @method \GuzzleHttp\Promise\Promise listDominantLanguageDetectionJobsAsync(array $args = [])
40
- * @method \Aws\Result listEntitiesDetectionJobs(array $args = [])
41
- * @method \GuzzleHttp\Promise\Promise listEntitiesDetectionJobsAsync(array $args = [])
42
- * @method \Aws\Result listKeyPhrasesDetectionJobs(array $args = [])
43
- * @method \GuzzleHttp\Promise\Promise listKeyPhrasesDetectionJobsAsync(array $args = [])
44
- * @method \Aws\Result listSentimentDetectionJobs(array $args = [])
45
- * @method \GuzzleHttp\Promise\Promise listSentimentDetectionJobsAsync(array $args = [])
46
- * @method \Aws\Result listTopicsDetectionJobs(array $args = [])
47
- * @method \GuzzleHttp\Promise\Promise listTopicsDetectionJobsAsync(array $args = [])
48
- * @method \Aws\Result startDominantLanguageDetectionJob(array $args = [])
49
- * @method \GuzzleHttp\Promise\Promise startDominantLanguageDetectionJobAsync(array $args = [])
50
- * @method \Aws\Result startEntitiesDetectionJob(array $args = [])
51
- * @method \GuzzleHttp\Promise\Promise startEntitiesDetectionJobAsync(array $args = [])
52
- * @method \Aws\Result startKeyPhrasesDetectionJob(array $args = [])
53
- * @method \GuzzleHttp\Promise\Promise startKeyPhrasesDetectionJobAsync(array $args = [])
54
- * @method \Aws\Result startSentimentDetectionJob(array $args = [])
55
- * @method \GuzzleHttp\Promise\Promise startSentimentDetectionJobAsync(array $args = [])
56
- * @method \Aws\Result startTopicsDetectionJob(array $args = [])
57
- * @method \GuzzleHttp\Promise\Promise startTopicsDetectionJobAsync(array $args = [])
58
- * @method \Aws\Result stopDominantLanguageDetectionJob(array $args = [])
59
- * @method \GuzzleHttp\Promise\Promise stopDominantLanguageDetectionJobAsync(array $args = [])
60
- * @method \Aws\Result stopEntitiesDetectionJob(array $args = [])
61
- * @method \GuzzleHttp\Promise\Promise stopEntitiesDetectionJobAsync(array $args = [])
62
- * @method \Aws\Result stopKeyPhrasesDetectionJob(array $args = [])
63
- * @method \GuzzleHttp\Promise\Promise stopKeyPhrasesDetectionJobAsync(array $args = [])
64
- * @method \Aws\Result stopSentimentDetectionJob(array $args = [])
65
- * @method \GuzzleHttp\Promise\Promise stopSentimentDetectionJobAsync(array $args = [])
66
- */
67
- class ComprehendClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Comprehend/Exception/ComprehendException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\Comprehend\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **Amazon Comprehend** service.
8
- */
9
- class ComprehendException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/ConfigService/ConfigServiceClient.php DELETED
@@ -1,96 +0,0 @@
1
- <?php
2
- namespace Aws\ConfigService;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with AWS Config.
8
- *
9
- * @method \Aws\Result batchGetResourceConfig(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise batchGetResourceConfigAsync(array $args = [])
11
- * @method \Aws\Result deleteAggregationAuthorization(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise deleteAggregationAuthorizationAsync(array $args = [])
13
- * @method \Aws\Result deleteConfigRule(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise deleteConfigRuleAsync(array $args = [])
15
- * @method \Aws\Result deleteConfigurationAggregator(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise deleteConfigurationAggregatorAsync(array $args = [])
17
- * @method \Aws\Result deleteConfigurationRecorder(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise deleteConfigurationRecorderAsync(array $args = [])
19
- * @method \Aws\Result deleteDeliveryChannel(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise deleteDeliveryChannelAsync(array $args = [])
21
- * @method \Aws\Result deleteEvaluationResults(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise deleteEvaluationResultsAsync(array $args = [])
23
- * @method \Aws\Result deletePendingAggregationRequest(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise deletePendingAggregationRequestAsync(array $args = [])
25
- * @method \Aws\Result deleteRetentionConfiguration(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise deleteRetentionConfigurationAsync(array $args = [])
27
- * @method \Aws\Result deliverConfigSnapshot(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise deliverConfigSnapshotAsync(array $args = [])
29
- * @method \Aws\Result describeAggregateComplianceByConfigRules(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise describeAggregateComplianceByConfigRulesAsync(array $args = [])
31
- * @method \Aws\Result describeAggregationAuthorizations(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise describeAggregationAuthorizationsAsync(array $args = [])
33
- * @method \Aws\Result describeComplianceByConfigRule(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise describeComplianceByConfigRuleAsync(array $args = [])
35
- * @method \Aws\Result describeComplianceByResource(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise describeComplianceByResourceAsync(array $args = [])
37
- * @method \Aws\Result describeConfigRuleEvaluationStatus(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise describeConfigRuleEvaluationStatusAsync(array $args = [])
39
- * @method \Aws\Result describeConfigRules(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise describeConfigRulesAsync(array $args = [])
41
- * @method \Aws\Result describeConfigurationAggregatorSourcesStatus(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise describeConfigurationAggregatorSourcesStatusAsync(array $args = [])
43
- * @method \Aws\Result describeConfigurationAggregators(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise describeConfigurationAggregatorsAsync(array $args = [])
45
- * @method \Aws\Result describeConfigurationRecorderStatus(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise describeConfigurationRecorderStatusAsync(array $args = [])
47
- * @method \Aws\Result describeConfigurationRecorders(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise describeConfigurationRecordersAsync(array $args = [])
49
- * @method \Aws\Result describeDeliveryChannelStatus(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise describeDeliveryChannelStatusAsync(array $args = [])
51
- * @method \Aws\Result describeDeliveryChannels(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise describeDeliveryChannelsAsync(array $args = [])
53
- * @method \Aws\Result describePendingAggregationRequests(array $args = [])
54
- * @method \GuzzleHttp\Promise\Promise describePendingAggregationRequestsAsync(array $args = [])
55
- * @method \Aws\Result describeRetentionConfigurations(array $args = [])
56
- * @method \GuzzleHttp\Promise\Promise describeRetentionConfigurationsAsync(array $args = [])
57
- * @method \Aws\Result getAggregateComplianceDetailsByConfigRule(array $args = [])
58
- * @method \GuzzleHttp\Promise\Promise getAggregateComplianceDetailsByConfigRuleAsync(array $args = [])
59
- * @method \Aws\Result getAggregateConfigRuleComplianceSummary(array $args = [])
60
- * @method \GuzzleHttp\Promise\Promise getAggregateConfigRuleComplianceSummaryAsync(array $args = [])
61
- * @method \Aws\Result getComplianceDetailsByConfigRule(array $args = [])
62
- * @method \GuzzleHttp\Promise\Promise getComplianceDetailsByConfigRuleAsync(array $args = [])
63
- * @method \Aws\Result getComplianceDetailsByResource(array $args = [])
64
- * @method \GuzzleHttp\Promise\Promise getComplianceDetailsByResourceAsync(array $args = [])
65
- * @method \Aws\Result getComplianceSummaryByConfigRule(array $args = [])
66
- * @method \GuzzleHttp\Promise\Promise getComplianceSummaryByConfigRuleAsync(array $args = [])
67
- * @method \Aws\Result getComplianceSummaryByResourceType(array $args = [])
68
- * @method \GuzzleHttp\Promise\Promise getComplianceSummaryByResourceTypeAsync(array $args = [])
69
- * @method \Aws\Result getDiscoveredResourceCounts(array $args = [])
70
- * @method \GuzzleHttp\Promise\Promise getDiscoveredResourceCountsAsync(array $args = [])
71
- * @method \Aws\Result getResourceConfigHistory(array $args = [])
72
- * @method \GuzzleHttp\Promise\Promise getResourceConfigHistoryAsync(array $args = [])
73
- * @method \Aws\Result listDiscoveredResources(array $args = [])
74
- * @method \GuzzleHttp\Promise\Promise listDiscoveredResourcesAsync(array $args = [])
75
- * @method \Aws\Result putAggregationAuthorization(array $args = [])
76
- * @method \GuzzleHttp\Promise\Promise putAggregationAuthorizationAsync(array $args = [])
77
- * @method \Aws\Result putConfigRule(array $args = [])
78
- * @method \GuzzleHttp\Promise\Promise putConfigRuleAsync(array $args = [])
79
- * @method \Aws\Result putConfigurationAggregator(array $args = [])
80
- * @method \GuzzleHttp\Promise\Promise putConfigurationAggregatorAsync(array $args = [])
81
- * @method \Aws\Result putConfigurationRecorder(array $args = [])
82
- * @method \GuzzleHttp\Promise\Promise putConfigurationRecorderAsync(array $args = [])
83
- * @method \Aws\Result putDeliveryChannel(array $args = [])
84
- * @method \GuzzleHttp\Promise\Promise putDeliveryChannelAsync(array $args = [])
85
- * @method \Aws\Result putEvaluations(array $args = [])
86
- * @method \GuzzleHttp\Promise\Promise putEvaluationsAsync(array $args = [])
87
- * @method \Aws\Result putRetentionConfiguration(array $args = [])
88
- * @method \GuzzleHttp\Promise\Promise putRetentionConfigurationAsync(array $args = [])
89
- * @method \Aws\Result startConfigRulesEvaluation(array $args = [])
90
- * @method \GuzzleHttp\Promise\Promise startConfigRulesEvaluationAsync(array $args = [])
91
- * @method \Aws\Result startConfigurationRecorder(array $args = [])
92
- * @method \GuzzleHttp\Promise\Promise startConfigurationRecorderAsync(array $args = [])
93
- * @method \Aws\Result stopConfigurationRecorder(array $args = [])
94
- * @method \GuzzleHttp\Promise\Promise stopConfigurationRecorderAsync(array $args = [])
95
- */
96
- class ConfigServiceClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/ConfigService/Exception/ConfigServiceException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\ConfigService\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the AWS Config service.
8
- */
9
- class ConfigServiceException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Connect/ConnectClient.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
- namespace Aws\Connect;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon Connect Service** service.
8
- * @method \Aws\Result createUser(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise createUserAsync(array $args = [])
10
- * @method \Aws\Result deleteUser(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise deleteUserAsync(array $args = [])
12
- * @method \Aws\Result describeUser(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise describeUserAsync(array $args = [])
14
- * @method \Aws\Result describeUserHierarchyGroup(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise describeUserHierarchyGroupAsync(array $args = [])
16
- * @method \Aws\Result describeUserHierarchyStructure(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise describeUserHierarchyStructureAsync(array $args = [])
18
- * @method \Aws\Result getCurrentMetricData(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise getCurrentMetricDataAsync(array $args = [])
20
- * @method \Aws\Result getFederationToken(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise getFederationTokenAsync(array $args = [])
22
- * @method \Aws\Result getMetricData(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise getMetricDataAsync(array $args = [])
24
- * @method \Aws\Result listRoutingProfiles(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise listRoutingProfilesAsync(array $args = [])
26
- * @method \Aws\Result listSecurityProfiles(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise listSecurityProfilesAsync(array $args = [])
28
- * @method \Aws\Result listUserHierarchyGroups(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise listUserHierarchyGroupsAsync(array $args = [])
30
- * @method \Aws\Result listUsers(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise listUsersAsync(array $args = [])
32
- * @method \Aws\Result startOutboundVoiceContact(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise startOutboundVoiceContactAsync(array $args = [])
34
- * @method \Aws\Result stopContact(array $args = [])
35
- * @method \GuzzleHttp\Promise\Promise stopContactAsync(array $args = [])
36
- * @method \Aws\Result updateContactAttributes(array $args = [])
37
- * @method \GuzzleHttp\Promise\Promise updateContactAttributesAsync(array $args = [])
38
- * @method \Aws\Result updateUserHierarchy(array $args = [])
39
- * @method \GuzzleHttp\Promise\Promise updateUserHierarchyAsync(array $args = [])
40
- * @method \Aws\Result updateUserIdentityInfo(array $args = [])
41
- * @method \GuzzleHttp\Promise\Promise updateUserIdentityInfoAsync(array $args = [])
42
- * @method \Aws\Result updateUserPhoneConfig(array $args = [])
43
- * @method \GuzzleHttp\Promise\Promise updateUserPhoneConfigAsync(array $args = [])
44
- * @method \Aws\Result updateUserRoutingProfile(array $args = [])
45
- * @method \GuzzleHttp\Promise\Promise updateUserRoutingProfileAsync(array $args = [])
46
- * @method \Aws\Result updateUserSecurityProfiles(array $args = [])
47
- * @method \GuzzleHttp\Promise\Promise updateUserSecurityProfilesAsync(array $args = [])
48
- */
49
- class ConnectClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Connect/Exception/ConnectException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\Connect\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **Amazon Connect Service** service.
8
- */
9
- class ConnectException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CostExplorer/CostExplorerClient.php DELETED
@@ -1,21 +0,0 @@
1
- <?php
2
- namespace Aws\CostExplorer;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS Cost Explorer Service** service.
8
- * @method \Aws\Result getCostAndUsage(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise getCostAndUsageAsync(array $args = [])
10
- * @method \Aws\Result getDimensionValues(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise getDimensionValuesAsync(array $args = [])
12
- * @method \Aws\Result getReservationCoverage(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise getReservationCoverageAsync(array $args = [])
14
- * @method \Aws\Result getReservationPurchaseRecommendation(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise getReservationPurchaseRecommendationAsync(array $args = [])
16
- * @method \Aws\Result getReservationUtilization(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise getReservationUtilizationAsync(array $args = [])
18
- * @method \Aws\Result getTags(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise getTagsAsync(array $args = [])
20
- */
21
- class CostExplorerClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CostExplorer/Exception/CostExplorerException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\CostExplorer\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **AWS Cost Explorer Service** service.
8
- */
9
- class CostExplorerException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CostandUsageReportService/CostandUsageReportServiceClient.php DELETED
@@ -1,15 +0,0 @@
1
- <?php
2
- namespace Aws\CostandUsageReportService;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS Cost and Usage Report Service** service.
8
- * @method \Aws\Result deleteReportDefinition(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise deleteReportDefinitionAsync(array $args = [])
10
- * @method \Aws\Result describeReportDefinitions(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise describeReportDefinitionsAsync(array $args = [])
12
- * @method \Aws\Result putReportDefinition(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise putReportDefinitionAsync(array $args = [])
14
- */
15
- class CostandUsageReportServiceClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/CostandUsageReportService/Exception/CostandUsageReportServiceException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\CostandUsageReportService\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **AWS Cost and Usage Report Service** service.
8
- */
9
- class CostandUsageReportServiceException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Credentials/AssumeRoleCredentialProvider.php DELETED
@@ -1,64 +0,0 @@
1
- <?php
2
- namespace Aws\Credentials;
3
-
4
- use Aws\Exception\CredentialsException;
5
- use Aws\Result;
6
- use Aws\Sts\StsClient;
7
- use GuzzleHttp\Promise\PromiseInterface;
8
-
9
- /**
10
- * Credential provider that provides credentials via assuming a role
11
- * More Information, see: http://docs.aws.amazon.com/aws-sdk-php/v3/api/api-sts-2011-06-15.html#assumerole
12
- */
13
- class AssumeRoleCredentialProvider
14
- {
15
- const ERROR_MSG = "Missing required 'AssumeRoleCredentialProvider' configuration option: ";
16
-
17
- /** @var StsClient */
18
- private $client;
19
-
20
- /** @var array */
21
- private $assumeRoleParams;
22
-
23
- /**
24
- * The constructor requires following configure parameters:
25
- * - client: a StsClient
26
- * - assume_role_params: Parameters used to make assumeRole call
27
- *
28
- * @param array $config Configuration options
29
- * @throws \InvalidArgumentException
30
- */
31
- public function __construct(array $config = [])
32
- {
33
- if (!isset($config['assume_role_params'])) {
34
- throw new \InvalidArgumentException(self::ERROR_MSG . "'assume_role_params'.");
35
- }
36
-
37
- if (!isset($config['client'])) {
38
- throw new \InvalidArgumentException(self::ERROR_MSG . "'client'.");
39
- }
40
-
41
- $this->client = $config['client'];
42
- $this->assumeRoleParams = $config['assume_role_params'];
43
- }
44
-
45
- /**
46
- * Loads assume role credentials.
47
- *
48
- * @return PromiseInterface
49
- */
50
- public function __invoke()
51
- {
52
- $client = $this->client;
53
- return $client->assumeRoleAsync($this->assumeRoleParams)
54
- ->then(function (Result $result) {
55
- return $this->client->createCredentials($result);
56
- })->otherwise(function (\RuntimeException $exception) {
57
- throw new CredentialsException(
58
- "Error in retrieving assume role credentials.",
59
- 0,
60
- $exception
61
- );
62
- });
63
- }
64
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Credentials/CredentialProvider.php DELETED
@@ -1,396 +0,0 @@
1
- <?php
2
- namespace Aws\Credentials;
3
-
4
- use Aws;
5
- use Aws\CacheInterface;
6
- use Aws\Exception\CredentialsException;
7
- use GuzzleHttp\Promise;
8
-
9
- /**
10
- * Credential providers are functions that accept no arguments and return a
11
- * promise that is fulfilled with an {@see \Aws\Credentials\CredentialsInterface}
12
- * or rejected with an {@see \Aws\Exception\CredentialsException}.
13
- *
14
- * <code>
15
- * use Aws\Credentials\CredentialProvider;
16
- * $provider = CredentialProvider::defaultProvider();
17
- * // Returns a CredentialsInterface or throws.
18
- * $creds = $provider()->wait();
19
- * </code>
20
- *
21
- * Credential providers can be composed to create credentials using conditional
22
- * logic that can create different credentials in different environments. You
23
- * can compose multiple providers into a single provider using
24
- * {@see Aws\Credentials\CredentialProvider::chain}. This function accepts
25
- * providers as variadic arguments and returns a new function that will invoke
26
- * each provider until a successful set of credentials is returned.
27
- *
28
- * <code>
29
- * // First try an INI file at this location.
30
- * $a = CredentialProvider::ini(null, '/path/to/file.ini');
31
- * // Then try an INI file at this location.
32
- * $b = CredentialProvider::ini(null, '/path/to/other-file.ini');
33
- * // Then try loading from environment variables.
34
- * $c = CredentialProvider::env();
35
- * // Combine the three providers together.
36
- * $composed = CredentialProvider::chain($a, $b, $c);
37
- * // Returns a promise that is fulfilled with credentials or throws.
38
- * $promise = $composed();
39
- * // Wait on the credentials to resolve.
40
- * $creds = $promise->wait();
41
- * </code>
42
- */
43
- class CredentialProvider
44
- {
45
- const ENV_KEY = 'AWS_ACCESS_KEY_ID';
46
- const ENV_SECRET = 'AWS_SECRET_ACCESS_KEY';
47
- const ENV_SESSION = 'AWS_SESSION_TOKEN';
48
- const ENV_PROFILE = 'AWS_PROFILE';
49
-
50
- /**
51
- * Create a default credential provider that first checks for environment
52
- * variables, then checks for the "default" profile in ~/.aws/credentials,
53
- * then checks for "profile default" profile in ~/.aws/config (which is
54
- * the default profile of AWS CLI), then tries to make a GET Request to
55
- * fetch credentials if Ecs environment variable is presented, and finally
56
- * checks for EC2 instance profile credentials.
57
- *
58
- * This provider is automatically wrapped in a memoize function that caches
59
- * previously provided credentials.
60
- *
61
- * @param array $config Optional array of ecs/instance profile credentials
62
- * provider options.
63
- *
64
- * @return callable
65
- */
66
- public static function defaultProvider(array $config = [])
67
- {
68
- $localCredentialProviders = self::localCredentialProviders();
69
- $remoteCredentialProviders = self::remoteCredentialProviders($config);
70
-
71
- return self::memoize(
72
- call_user_func_array(
73
- 'self::chain',
74
- array_merge($localCredentialProviders, $remoteCredentialProviders)
75
- )
76
- );
77
- }
78
-
79
- /**
80
- * Create a credential provider function from a set of static credentials.
81
- *
82
- * @param CredentialsInterface $creds
83
- *
84
- * @return callable
85
- */
86
- public static function fromCredentials(CredentialsInterface $creds)
87
- {
88
- $promise = Promise\promise_for($creds);
89
-
90
- return function () use ($promise) {
91
- return $promise;
92
- };
93
- }
94
-
95
- /**
96
- * Creates an aggregate credentials provider that invokes the provided
97
- * variadic providers one after the other until a provider returns
98
- * credentials.
99
- *
100
- * @return callable
101
- */
102
- public static function chain()
103
- {
104
- $links = func_get_args();
105
- if (empty($links)) {
106
- throw new \InvalidArgumentException('No providers in chain');
107
- }
108
-
109
- return function () use ($links) {
110
- /** @var callable $parent */
111
- $parent = array_shift($links);
112
- $promise = $parent();
113
- while ($next = array_shift($links)) {
114
- $promise = $promise->otherwise($next);
115
- }
116
- return $promise;
117
- };
118
- }
119
-
120
- /**
121
- * Wraps a credential provider and caches previously provided credentials.
122
- *
123
- * Ensures that cached credentials are refreshed when they expire.
124
- *
125
- * @param callable $provider Credentials provider function to wrap.
126
- *
127
- * @return callable
128
- */
129
- public static function memoize(callable $provider)
130
- {
131
- return function () use ($provider) {
132
- static $result;
133
- static $isConstant;
134
-
135
- // Constant credentials will be returned constantly.
136
- if ($isConstant) {
137
- return $result;
138
- }
139
-
140
- // Create the initial promise that will be used as the cached value
141
- // until it expires.
142
- if (null === $result) {
143
- $result = $provider();
144
- }
145
-
146
- // Return credentials that could expire and refresh when needed.
147
- return $result
148
- ->then(function (CredentialsInterface $creds) use ($provider, &$isConstant, &$result) {
149
- // Determine if these are constant credentials.
150
- if (!$creds->getExpiration()) {
151
- $isConstant = true;
152
- return $creds;
153
- }
154
-
155
- // Refresh expired credentials.
156
- if (!$creds->isExpired()) {
157
- return $creds;
158
- }
159
- // Refresh the result and forward the promise.
160
- return $result = $provider();
161
- });
162
- };
163
- }
164
-
165
- /**
166
- * Wraps a credential provider and saves provided credentials in an
167
- * instance of Aws\CacheInterface. Forwards calls when no credentials found
168
- * in cache and updates cache with the results.
169
- *
170
- * Defaults to using a simple file-based cache when none provided.
171
- *
172
- * @param callable $provider Credentials provider function to wrap
173
- * @param CacheInterface $cache Cache to store credentials
174
- * @param string|null $cacheKey (optional) Cache key to use
175
- *
176
- * @return callable
177
- */
178
- public static function cache(
179
- callable $provider,
180
- CacheInterface $cache,
181
- $cacheKey = null
182
- ) {
183
- $cacheKey = $cacheKey ?: 'aws_cached_credentials';
184
-
185
- return function () use ($provider, $cache, $cacheKey) {
186
- $found = $cache->get($cacheKey);
187
- if ($found instanceof CredentialsInterface && !$found->isExpired()) {
188
- return Promise\promise_for($found);
189
- }
190
-
191
- return $provider()
192
- ->then(function (CredentialsInterface $creds) use (
193
- $cache,
194
- $cacheKey
195
- ) {
196
- $cache->set(
197
- $cacheKey,
198
- $creds,
199
- null === $creds->getExpiration() ?
200
- 0 : $creds->getExpiration() - time()
201
- );
202
-
203
- return $creds;
204
- });
205
- };
206
- }
207
-
208
- /**
209
- * Provider that creates credentials from environment variables
210
- * AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN.
211
- *
212
- * @return callable
213
- */
214
- public static function env()
215
- {
216
- return function () {
217
- // Use credentials from environment variables, if available
218
- $key = getenv(self::ENV_KEY);
219
- $secret = getenv(self::ENV_SECRET);
220
- if ($key && $secret) {
221
- return Promise\promise_for(
222
- new Credentials($key, $secret, getenv(self::ENV_SESSION) ?: NULL)
223
- );
224
- }
225
-
226
- return self::reject('Could not find environment variable '
227
- . 'credentials in ' . self::ENV_KEY . '/' . self::ENV_SECRET);
228
- };
229
- }
230
-
231
- /**
232
- * Credential provider that creates credentials using instance profile
233
- * credentials.
234
- *
235
- * @param array $config Array of configuration data.
236
- *
237
- * @return InstanceProfileProvider
238
- * @see Aws\Credentials\InstanceProfileProvider for $config details.
239
- */
240
- public static function instanceProfile(array $config = [])
241
- {
242
- return new InstanceProfileProvider($config);
243
- }
244
-
245
- /**
246
- * Credential provider that creates credentials using
247
- * ecs credentials by a GET request, whose uri is specified
248
- * by environment variable
249
- *
250
- * @param array $config Array of configuration data.
251
- *
252
- * @return EcsCredentialProvider
253
- * @see Aws\Credentials\EcsCredentialProvider for $config details.
254
- */
255
- public static function ecsCredentials(array $config = [])
256
- {
257
- return new EcsCredentialProvider($config);
258
- }
259
-
260
- /**
261
- * Credential provider that creates credentials using assume role
262
- *
263
- * @param array $config Array of configuration data
264
- * @return callable
265
- * @see Aws\Credentials\AssumeRoleCredentialProvider for $config details.
266
- */
267
- public static function assumeRole(array $config=[])
268
- {
269
- return new AssumeRoleCredentialProvider($config);
270
- }
271
-
272
- /**
273
- * Credentials provider that creates credentials using an ini file stored
274
- * in the current user's home directory.
275
- *
276
- * @param string|null $profile Profile to use. If not specified will use
277
- * the "default" profile in "~/.aws/credentials".
278
- * @param string|null $filename If provided, uses a custom filename rather
279
- * than looking in the home directory.
280
- *
281
- * @return callable
282
- */
283
- public static function ini($profile = null, $filename = null)
284
- {
285
- $filename = $filename ?: (self::getHomeDir() . '/.aws/credentials');
286
- $profile = $profile ?: (getenv(self::ENV_PROFILE) ?: 'default');
287
-
288
- return function () use ($profile, $filename) {
289
- if (!is_readable($filename)) {
290
- return self::reject("Cannot read credentials from $filename");
291
- }
292
- $data = parse_ini_file($filename, true, INI_SCANNER_RAW);
293
- if ($data === false) {
294
- return self::reject("Invalid credentials file: $filename");
295
- }
296
- if (!isset($data[$profile])) {
297
- return self::reject("'$profile' not found in credentials file");
298
- }
299
- if (!isset($data[$profile]['aws_access_key_id'])
300
- || !isset($data[$profile]['aws_secret_access_key'])
301
- ) {
302
- return self::reject("No credentials present in INI profile "
303
- . "'$profile' ($filename)");
304
- }
305
-
306
- if (empty($data[$profile]['aws_session_token'])) {
307
- $data[$profile]['aws_session_token']
308
- = isset($data[$profile]['aws_security_token'])
309
- ? $data[$profile]['aws_security_token']
310
- : null;
311
- }
312
-
313
- return Promise\promise_for(
314
- new Credentials(
315
- $data[$profile]['aws_access_key_id'],
316
- $data[$profile]['aws_secret_access_key'],
317
- $data[$profile]['aws_session_token']
318
- )
319
- );
320
- };
321
- }
322
-
323
- /**
324
- * Local credential providers returns a list of local credential providers
325
- * in following order:
326
- * - credentials from environment variables
327
- * - 'default' profile in '.aws/credentials' file
328
- * - 'profile default' profile in '.aws/config' file
329
- *
330
- * @return array
331
- */
332
- private static function localCredentialProviders()
333
- {
334
- return [
335
- self::env(),
336
- self::ini(),
337
- self::ini('profile default', self::getHomeDir() . '/.aws/config')
338
- ];
339
- }
340
-
341
- /**
342
- * Remote credential providers returns a list of credentials providers
343
- * for the remote endpoints such as EC2 or ECS Roles.
344
- *
345
- * @param array $config Array of configuration data.
346
- *
347
- * @return array
348
- * @see Aws\Credentials\InstanceProfileProvider for $config details.
349
- * @see Aws\Credentials\EcsCredentialProvider for $config details.
350
- */
351
- private static function remoteCredentialProviders(array $config = [])
352
- {
353
- if (!empty(getenv(EcsCredentialProvider::ENV_URI))) {
354
- $providers['ecs'] = self::ecsCredentials($config);
355
- }
356
- $providers['instance'] = self::instanceProfile($config);
357
-
358
- if (isset($config['credentials'])
359
- && $config['credentials'] instanceof CacheInterface
360
- ) {
361
- foreach ($providers as $key => $provider) {
362
- $providers[$key] = self::cache(
363
- $provider,
364
- $config['credentials'],
365
- 'aws_cached_' . $key . '_credentials'
366
- );
367
- }
368
- }
369
-
370
- return $providers;
371
- }
372
-
373
- /**
374
- * Gets the environment's HOME directory if available.
375
- *
376
- * @return null|string
377
- */
378
- private static function getHomeDir()
379
- {
380
- // On Linux/Unix-like systems, use the HOME environment variable
381
- if ($homeDir = getenv('HOME')) {
382
- return $homeDir;
383
- }
384
-
385
- // Get the HOMEDRIVE and HOMEPATH values for Windows hosts
386
- $homeDrive = getenv('HOMEDRIVE');
387
- $homePath = getenv('HOMEPATH');
388
-
389
- return ($homeDrive && $homePath) ? $homeDrive . $homePath : null;
390
- }
391
-
392
- private static function reject($msg)
393
- {
394
- return new Promise\RejectedPromise(new CredentialsException($msg));
395
- }
396
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Credentials/Credentials.php DELETED
@@ -1,91 +0,0 @@
1
- <?php
2
- namespace Aws\Credentials;
3
-
4
- /**
5
- * Basic implementation of the AWS Credentials interface that allows callers to
6
- * pass in the AWS Access Key and AWS Secret Access Key in the constructor.
7
- */
8
- class Credentials implements CredentialsInterface, \Serializable
9
- {
10
- private $key;
11
- private $secret;
12
- private $token;
13
- private $expires;
14
-
15
- /**
16
- * Constructs a new BasicAWSCredentials object, with the specified AWS
17
- * access key and AWS secret key
18
- *
19
- * @param string $key AWS access key ID
20
- * @param string $secret AWS secret access key
21
- * @param string $token Security token to use
22
- * @param int $expires UNIX timestamp for when credentials expire
23
- */
24
- public function __construct($key, $secret, $token = null, $expires = null)
25
- {
26
- $this->key = trim($key);
27
- $this->secret = trim($secret);
28
- $this->token = $token;
29
- $this->expires = $expires;
30
- }
31
-
32
- public static function __set_state(array $state)
33
- {
34
- return new self(
35
- $state['key'],
36
- $state['secret'],
37
- $state['token'],
38
- $state['expires']
39
- );
40
- }
41
-
42
- public function getAccessKeyId()
43
- {
44
- return $this->key;
45
- }
46
-
47
- public function getSecretKey()
48
- {
49
- return $this->secret;
50
- }
51
-
52
- public function getSecurityToken()
53
- {
54
- return $this->token;
55
- }
56
-
57
- public function getExpiration()
58
- {
59
- return $this->expires;
60
- }
61
-
62
- public function isExpired()
63
- {
64
- return $this->expires !== null && time() >= $this->expires;
65
- }
66
-
67
- public function toArray()
68
- {
69
- return [
70
- 'key' => $this->key,
71
- 'secret' => $this->secret,
72
- 'token' => $this->token,
73
- 'expires' => $this->expires
74
- ];
75
- }
76
-
77
- public function serialize()
78
- {
79
- return json_encode($this->toArray());
80
- }
81
-
82
- public function unserialize($serialized)
83
- {
84
- $data = json_decode($serialized, true);
85
-
86
- $this->key = $data['key'];
87
- $this->secret = $data['secret'];
88
- $this->token = $data['token'];
89
- $this->expires = $data['expires'];
90
- }
91
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Credentials/CredentialsInterface.php DELETED
@@ -1,52 +0,0 @@
1
- <?php
2
- namespace Aws\Credentials;
3
-
4
- /**
5
- * Provides access to the AWS credentials used for accessing AWS services: AWS
6
- * access key ID, secret access key, and security token. These credentials are
7
- * used to securely sign requests to AWS services.
8
- */
9
- interface CredentialsInterface
10
- {
11
- /**
12
- * Returns the AWS access key ID for this credentials object.
13
- *
14
- * @return string
15
- */
16
- public function getAccessKeyId();
17
-
18
- /**
19
- * Returns the AWS secret access key for this credentials object.
20
- *
21
- * @return string
22
- */
23
- public function getSecretKey();
24
-
25
- /**
26
- * Get the associated security token if available
27
- *
28
- * @return string|null
29
- */
30
- public function getSecurityToken();
31
-
32
- /**
33
- * Get the UNIX timestamp in which the credentials will expire
34
- *
35
- * @return int|null
36
- */
37
- public function getExpiration();
38
-
39
- /**
40
- * Check if the credentials are expired
41
- *
42
- * @return bool
43
- */
44
- public function isExpired();
45
-
46
- /**
47
- * Converts the credentials to an associative array.
48
- *
49
- * @return array
50
- */
51
- public function toArray();
52
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Credentials/EcsCredentialProvider.php DELETED
@@ -1,88 +0,0 @@
1
- <?php
2
- namespace Aws\Credentials;
3
-
4
- use Aws\Exception\CredentialsException;
5
- use GuzzleHttp\Psr7\Request;
6
- use GuzzleHttp\Promise\PromiseInterface;
7
- use Psr\Http\Message\ResponseInterface;
8
-
9
- /**
10
- * Credential provider that fetches credentials with GET request.
11
- * ECS environment variable is used in constructing request URI.
12
- */
13
- class EcsCredentialProvider
14
- {
15
- const SERVER_URI = 'http://169.254.170.2';
16
- const ENV_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI";
17
-
18
- /** @var callable */
19
- private $client;
20
-
21
- /**
22
- * The constructor accepts following options:
23
- * - timeout: (optional) Connection timeout, in seconds, default 1.0
24
- * - client: An EcsClient to make request from
25
- *
26
- * @param array $config Configuration options
27
- */
28
- public function __construct(array $config = [])
29
- {
30
- $this->timeout = isset($config['timeout']) ? $config['timeout'] : 1.0;
31
- $this->client = isset($config['client'])
32
- ? $config['client']
33
- : \Aws\default_http_handler();
34
- }
35
-
36
- /**
37
- * Load ECS credentials
38
- *
39
- * @return PromiseInterface
40
- */
41
- public function __invoke()
42
- {
43
- $client = $this->client;
44
- $request = new Request('GET', self::getEcsUri());
45
- return $client(
46
- $request,
47
- [
48
- 'timeout' => $this->timeout,
49
- 'proxy' => '',
50
- ]
51
- )->then(function (ResponseInterface $response) {
52
- $result = $this->decodeResult((string) $response->getBody());
53
- return new Credentials(
54
- $result['AccessKeyId'],
55
- $result['SecretAccessKey'],
56
- $result['Token'],
57
- strtotime($result['Expiration'])
58
- );
59
- })->otherwise(function ($reason) {
60
- $reason = is_array($reason) ? $reason['exception'] : $reason;
61
- $msg = $reason->getMessage();
62
- throw new CredentialsException(
63
- "Error retrieving credential from ECS ($msg)"
64
- );
65
- });
66
- }
67
-
68
- /**
69
- * Fetch credential URI from ECS environment variable
70
- *
71
- * @return string Returns ECS URI
72
- */
73
- private function getEcsUri()
74
- {
75
- $creds_uri = getenv(self::ENV_URI);
76
- return self::SERVER_URI . $creds_uri;
77
- }
78
-
79
- private function decodeResult($response)
80
- {
81
- $result = json_decode($response, true);
82
-
83
- if (!isset($result['AccessKeyId'])) {
84
- throw new CredentialsException('Unexpected ECS credential value');
85
- }
86
- return $result;
87
- }
88
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Credentials/InstanceProfileProvider.php DELETED
@@ -1,111 +0,0 @@
1
- <?php
2
- namespace Aws\Credentials;
3
-
4
- use Aws\Exception\CredentialsException;
5
- use GuzzleHttp\Promise;
6
- use GuzzleHttp\Psr7\Request;
7
- use GuzzleHttp\Promise\PromiseInterface;
8
- use Psr\Http\Message\ResponseInterface;
9
-
10
- /**
11
- * Credential provider that provides credentials from the EC2 metadata server.
12
- */
13
- class InstanceProfileProvider
14
- {
15
- const SERVER_URI = 'http://169.254.169.254/latest/';
16
- const CRED_PATH = 'meta-data/iam/security-credentials/';
17
-
18
- const ENV_DISABLE = 'AWS_EC2_METADATA_DISABLED';
19
-
20
- /** @var string */
21
- private $profile;
22
-
23
- /** @var callable */
24
- private $client;
25
-
26
- /**
27
- * The constructor accepts the following options:
28
- *
29
- * - timeout: Connection timeout, in seconds.
30
- * - profile: Optional EC2 profile name, if known.
31
- *
32
- * @param array $config Configuration options.
33
- */
34
- public function __construct(array $config = [])
35
- {
36
- $this->timeout = isset($config['timeout']) ? $config['timeout'] : 1.0;
37
- $this->profile = isset($config['profile']) ? $config['profile'] : null;
38
- $this->client = isset($config['client'])
39
- ? $config['client'] // internal use only
40
- : \Aws\default_http_handler();
41
- }
42
-
43
- /**
44
- * Loads instance profile credentials.
45
- *
46
- * @return PromiseInterface
47
- */
48
- public function __invoke()
49
- {
50
- return Promise\coroutine(function () {
51
- if (!$this->profile) {
52
- $this->profile = (yield $this->request(self::CRED_PATH));
53
- }
54
- $json = (yield $this->request(self::CRED_PATH . $this->profile));
55
- $result = $this->decodeResult($json);
56
- yield new Credentials(
57
- $result['AccessKeyId'],
58
- $result['SecretAccessKey'],
59
- $result['Token'],
60
- strtotime($result['Expiration'])
61
- );
62
- });
63
- }
64
-
65
- /**
66
- * @param string $url
67
- * @return PromiseInterface Returns a promise that is fulfilled with the
68
- * body of the response as a string.
69
- */
70
- private function request($url)
71
- {
72
- $disabled = getenv(self::ENV_DISABLE) ?: false;
73
- if (strcasecmp($disabled, 'true') === 0) {
74
- throw new CredentialsException(
75
- $this->createErrorMessage('EC2 metadata server access disabled')
76
- );
77
- }
78
-
79
- $fn = $this->client;
80
- $request = new Request('GET', self::SERVER_URI . $url);
81
-
82
- return $fn($request, ['timeout' => $this->timeout])
83
- ->then(function (ResponseInterface $response) {
84
- return (string) $response->getBody();
85
- })->otherwise(function (array $reason) {
86
- $reason = $reason['exception'];
87
- $msg = $reason->getMessage();
88
- throw new CredentialsException(
89
- $this->createErrorMessage($msg)
90
- );
91
- });
92
- }
93
-
94
- private function createErrorMessage($previous)
95
- {
96
- return "Error retrieving credentials from the instance profile "
97
- . "metadata server. ({$previous})";
98
- }
99
-
100
- private function decodeResult($response)
101
- {
102
- $result = json_decode($response, true);
103
-
104
- if ($result['Code'] !== 'Success') {
105
- throw new CredentialsException('Unexpected instance profile '
106
- . 'response code: ' . $result['Code']);
107
- }
108
-
109
- return $result;
110
- }
111
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Crypto/AbstractCryptoClient.php DELETED
@@ -1,113 +0,0 @@
1
- <?php
2
- namespace Aws\Crypto;
3
-
4
- use Aws\Crypto\Cipher\CipherMethod;
5
- use Aws\Crypto\Cipher\Cbc;
6
- use GuzzleHttp\Psr7\Stream;
7
-
8
- /**
9
- * @internal
10
- */
11
- abstract class AbstractCryptoClient
12
- {
13
- public static $supportedCiphers = ['cbc', 'gcm'];
14
-
15
- /**
16
- * Returns if the passed cipher name is supported for encryption by the SDK.
17
- *
18
- * @param string $cipherName The name of a cipher to verify is registered.
19
- *
20
- * @return bool If the cipher passed is in our supported list.
21
- */
22
- public static function isSupportedCipher($cipherName)
23
- {
24
- return in_array($cipherName, self::$supportedCiphers);
25
- }
26
-
27
- /**
28
- * Returns an identifier recognizable by `openssl_*` functions, such as
29
- * `aes-256-cbc` or `aes-128-ctr`.
30
- *
31
- * @param string $cipherName Name of the cipher being used for encrypting
32
- * or decrypting.
33
- * @param int $keySize Size of the encryption key, in bits, that will be
34
- * used.
35
- *
36
- * @return string
37
- */
38
- abstract protected function getCipherOpenSslName($cipherName, $keySize);
39
-
40
- /**
41
- * Constructs a CipherMethod for the given name, initialized with the other
42
- * data passed for use in encrypting or decrypting.
43
- *
44
- * @param string $cipherName Name of the cipher to generate for encrypting.
45
- * @param string $iv Base Initialization Vector for the cipher.
46
- * @param int $keySize Size of the encryption key, in bits, that will be
47
- * used.
48
- *
49
- * @return CipherMethod
50
- *
51
- * @internal
52
- */
53
- abstract protected function buildCipherMethod($cipherName, $iv, $keySize);
54
-
55
- /**
56
- * Performs a reverse lookup to get the openssl_* cipher name from the
57
- * AESName passed in from the MetadataEnvelope.
58
- *
59
- * @param $aesName
60
- *
61
- * @return string
62
- *
63
- * @internal
64
- */
65
- abstract protected function getCipherFromAesName($aesName);
66
-
67
- /**
68
- * Dependency to provide an interface for building an encryption stream for
69
- * data given cipher details, metadata, and materials to do so.
70
- *
71
- * @param Stream $plaintext Plain-text data to be encrypted using the
72
- * materials, algorithm, and data provided.
73
- * @param array $cipherOptions Options for use in determining the cipher to
74
- * be used for encrypting data.
75
- * @param MaterialsProvider $provider A provider to supply and encrypt
76
- * materials used in encryption.
77
- * @param MetadataEnvelope $envelope A storage envelope for encryption
78
- * metadata to be added to.
79
- *
80
- * @return AesStreamInterface
81
- *
82
- * @internal
83
- */
84
- abstract public function encrypt(
85
- Stream $plaintext,
86
- array $cipherOptions,
87
- MaterialsProvider $provider,
88
- MetadataEnvelope $envelope
89
- );
90
-
91
- /**
92
- * Dependency to provide an interface for building a decryption stream for
93
- * cipher text given metadata and materials to do so.
94
- *
95
- * @param string $cipherText Plain-text data to be decrypted using the
96
- * materials, algorithm, and data provided.
97
- * @param MaterialsProvider $provider A provider to supply and encrypt
98
- * materials used in encryption.
99
- * @param MetadataEnvelope $envelope A storage envelope for encryption
100
- * metadata to be read from.
101
- * @param array $cipherOptions Additional verification options.
102
- *
103
- * @return AesStreamInterface
104
- *
105
- * @internal
106
- */
107
- abstract public function decrypt(
108
- $cipherText,
109
- MaterialsProvider $provider,
110
- MetadataEnvelope $envelope,
111
- array $cipherOptions = []
112
- );
113
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Crypto/AesDecryptingStream.php DELETED
@@ -1,144 +0,0 @@
1
- <?php
2
- namespace Aws\Crypto;
3
-
4
- use GuzzleHttp\Psr7\StreamDecoratorTrait;
5
- use \LogicException;
6
- use Psr\Http\Message\StreamInterface;
7
- use Aws\Crypto\Cipher\CipherMethod;
8
-
9
- /**
10
- * @internal Represents a stream of data to be decrypted with passed cipher.
11
- */
12
- class AesDecryptingStream implements AesStreamInterface
13
- {
14
- const BLOCK_SIZE = 16; // 128 bits
15
-
16
- use StreamDecoratorTrait;
17
-
18
- /**
19
- * @var string
20
- */
21
- private $buffer = '';
22
-
23
- /**
24
- * @var CipherMethod
25
- */
26
- private $cipherMethod;
27
-
28
- /**
29
- * @var string
30
- */
31
- private $key;
32
-
33
- /**
34
- * @var StreamInterface
35
- */
36
- private $stream;
37
-
38
- /**
39
- * @param StreamInterface $cipherText
40
- * @param string $key
41
- * @param CipherMethod $cipherMethod
42
- */
43
- public function __construct(
44
- StreamInterface $cipherText,
45
- $key,
46
- CipherMethod $cipherMethod
47
- ) {
48
- $this->stream = $cipherText;
49
- $this->key = $key;
50
- $this->cipherMethod = clone $cipherMethod;
51
- }
52
-
53
- public function getOpenSslName()
54
- {
55
- return $this->cipherMethod->getOpenSslName();
56
- }
57
-
58
- public function getAesName()
59
- {
60
- return $this->cipherMethod->getAesName();
61
- }
62
-
63
- public function getCurrentIv()
64
- {
65
- return $this->cipherMethod->getCurrentIv();
66
- }
67
-
68
- public function getSize()
69
- {
70
- $plainTextSize = $this->stream->getSize();
71
-
72
- if ($this->cipherMethod->requiresPadding()) {
73
- // PKCS7 padding requires that between 1 and self::BLOCK_SIZE be
74
- // added to the plaintext to make it an even number of blocks. The
75
- // plaintext is between strlen($cipherText) - self::BLOCK_SIZE and
76
- // strlen($cipherText) - 1
77
- return null;
78
- }
79
-
80
- return $plainTextSize;
81
- }
82
-
83
- public function isWritable()
84
- {
85
- return false;
86
- }
87
-
88
- public function read($length)
89
- {
90
- if ($length > strlen($this->buffer)) {
91
- $this->buffer .= $this->decryptBlock(
92
- self::BLOCK_SIZE * ceil(($length - strlen($this->buffer)) / self::BLOCK_SIZE)
93
- );
94
- }
95
-
96
- $data = substr($this->buffer, 0, $length);
97
- $this->buffer = substr($this->buffer, $length);
98
-
99
- return $data ? $data : '';
100
- }
101
-
102
- public function seek($offset, $whence = SEEK_SET)
103
- {
104
- if ($offset === 0 && $whence === SEEK_SET) {
105
- $this->buffer = '';
106
- $this->cipherMethod->seek(0, SEEK_SET);
107
- $this->stream->seek(0, SEEK_SET);
108
- } else {
109
- throw new LogicException('AES encryption streams only support being'
110
- . ' rewound, not arbitrary seeking.');
111
- }
112
- }
113
-
114
- private function decryptBlock($length)
115
- {
116
- if ($this->stream->eof()) {
117
- return '';
118
- }
119
-
120
- $cipherText = '';
121
- do {
122
- $cipherText .= $this->stream->read($length - strlen($cipherText));
123
- } while (strlen($cipherText) < $length && !$this->stream->eof());
124
-
125
- $options = OPENSSL_RAW_DATA;
126
- if (!$this->stream->eof()
127
- && $this->stream->getSize() !== $this->stream->tell()
128
- ) {
129
- $options |= OPENSSL_ZERO_PADDING;
130
- }
131
-
132
- $plaintext = openssl_decrypt(
133
- $cipherText,
134
- $this->cipherMethod->getOpenSslName(),
135
- $this->key,
136
- $options,
137
- $this->cipherMethod->getCurrentIv()
138
- );
139
-
140
- $this->cipherMethod->update($cipherText);
141
-
142
- return $plaintext;
143
- }
144
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Crypto/AesEncryptingStream.php DELETED
@@ -1,150 +0,0 @@
1
- <?php
2
- namespace Aws\Crypto;
3
-
4
- use GuzzleHttp\Psr7\StreamDecoratorTrait;
5
- use \LogicException;
6
- use Psr\Http\Message\StreamInterface;
7
- use Aws\Crypto\Cipher\CipherMethod;
8
-
9
- /**
10
- * @internal Represents a stream of data to be encrypted with a passed cipher.
11
- */
12
- class AesEncryptingStream implements AesStreamInterface
13
- {
14
- const BLOCK_SIZE = 16; // 128 bits
15
-
16
- use StreamDecoratorTrait;
17
-
18
- /**
19
- * @var string
20
- */
21
- private $buffer = '';
22
-
23
- /**
24
- * @var CipherMethod
25
- */
26
- private $cipherMethod;
27
-
28
- /**
29
- * @var string
30
- */
31
- private $key;
32
-
33
- /**
34
- * @var StreamInterface
35
- */
36
- private $stream;
37
-
38
- /**
39
- * @param StreamInterface $plainText
40
- * @param string $key
41
- * @param CipherMethod $cipherMethod
42
- */
43
- public function __construct(
44
- StreamInterface $plainText,
45
- $key,
46
- CipherMethod $cipherMethod
47
- ) {
48
- $this->stream = $plainText;
49
- $this->key = $key;
50
- $this->cipherMethod = clone $cipherMethod;
51
- }
52
-
53
- public function getOpenSslName()
54
- {
55
- return $this->cipherMethod->getOpenSslName();
56
- }
57
-
58
- public function getAesName()
59
- {
60
- return $this->cipherMethod->getAesName();
61
- }
62
-
63
- public function getCurrentIv()
64
- {
65
- return $this->cipherMethod->getCurrentIv();
66
- }
67
-
68
- public function getSize()
69
- {
70
- $plainTextSize = $this->stream->getSize();
71
-
72
- if ($this->cipherMethod->requiresPadding() && $plainTextSize !== null) {
73
- // PKCS7 padding requires that between 1 and self::BLOCK_SIZE be
74
- // added to the plaintext to make it an even number of blocks.
75
- $padding = self::BLOCK_SIZE - $plainTextSize % self::BLOCK_SIZE;
76
- return $plainTextSize + $padding;
77
- }
78
-
79
- return $plainTextSize;
80
- }
81
-
82
- public function isWritable()
83
- {
84
- return false;
85
- }
86
-
87
- public function read($length)
88
- {
89
- if ($length > strlen($this->buffer)) {
90
- $this->buffer .= $this->encryptBlock(
91
- self::BLOCK_SIZE * ceil(($length - strlen($this->buffer)) / self::BLOCK_SIZE)
92
- );
93
- }
94
-
95
- $data = substr($this->buffer, 0, $length);
96
- $this->buffer = substr($this->buffer, $length);
97
-
98
- return $data ? $data : '';
99
- }
100
-
101
- public function seek($offset, $whence = SEEK_SET)
102
- {
103
- if ($whence === SEEK_CUR) {
104
- $offset = $this->tell() + $offset;
105
- $whence = SEEK_SET;
106
- }
107
-
108
- if ($whence === SEEK_SET) {
109
- $this->buffer = '';
110
- $wholeBlockOffset
111
- = (int) ($offset / self::BLOCK_SIZE) * self::BLOCK_SIZE;
112
- $this->stream->seek($wholeBlockOffset);
113
- $this->cipherMethod->seek($wholeBlockOffset);
114
- $this->read($offset - $wholeBlockOffset);
115
- } else {
116
- throw new LogicException('Unrecognized whence.');
117
- }
118
- }
119
-
120
- private function encryptBlock($length)
121
- {
122
- if ($this->stream->eof()) {
123
- return '';
124
- }
125
-
126
- $plainText = '';
127
- do {
128
- $plainText .= $this->stream->read($length - strlen($plainText));
129
- } while (strlen($plainText) < $length && !$this->stream->eof());
130
-
131
- $options = OPENSSL_RAW_DATA;
132
- if (!$this->stream->eof()
133
- || $this->stream->getSize() !== $this->stream->tell()
134
- ) {
135
- $options |= OPENSSL_ZERO_PADDING;
136
- }
137
-
138
- $cipherText = openssl_encrypt(
139
- $plainText,
140
- $this->cipherMethod->getOpenSslName(),
141
- $this->key,
142
- $options,
143
- $this->cipherMethod->getCurrentIv()
144
- );
145
-
146
- $this->cipherMethod->update($cipherText);
147
-
148
- return $cipherText;
149
- }
150
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Crypto/AesGcmDecryptingStream.php DELETED
@@ -1,95 +0,0 @@
1
- <?php
2
- namespace Aws\Crypto;
3
-
4
- use GuzzleHttp\Psr7;
5
- use GuzzleHttp\Psr7\StreamDecoratorTrait;
6
- use Psr\Http\Message\StreamInterface;
7
- use \RuntimeException;
8
-
9
- /**
10
- * @internal Represents a stream of data to be gcm decrypted.
11
- */
12
- class AesGcmDecryptingStream implements AesStreamInterface
13
- {
14
- use StreamDecoratorTrait;
15
-
16
- private $aad;
17
-
18
- private $initializationVector;
19
-
20
- private $key;
21
-
22
- private $keySize;
23
-
24
- private $cipherText;
25
-
26
- private $tag;
27
-
28
- private $tagLength;
29
-
30
- /**
31
- * @param StreamInterface $cipherText
32
- * @param string $key
33
- * @param string $initializationVector
34
- * @param string $tag
35
- * @param string $aad
36
- * @param int $tagLength
37
- * @param int $keySize
38
- */
39
- public function __construct(
40
- StreamInterface $cipherText,
41
- $key,
42
- $initializationVector,
43
- $tag,
44
- $aad = '',
45
- $tagLength = 128,
46
- $keySize = 256
47
- ) {
48
- if (version_compare(PHP_VERSION, '7.1', '<')) {
49
- throw new RuntimeException(
50
- 'AES-GCM decryption is only supported in PHP 7.1 or greater'
51
- );
52
- }
53
-
54
- $this->cipherText = $cipherText;
55
- $this->key = $key;
56
- $this->initializationVector = $initializationVector;
57
- $this->tag = $tag;
58
- $this->aad = $aad;
59
- $this->tagLength = $tagLength;
60
- $this->keySize = $keySize;
61
- }
62
-
63
- public function getOpenSslName()
64
- {
65
- return "aes-{$this->keySize}-gcm";
66
- }
67
-
68
- public function getAesName()
69
- {
70
- return 'AES/GCM/NoPadding';
71
- }
72
-
73
- public function getCurrentIv()
74
- {
75
- return $this->initializationVector;
76
- }
77
-
78
- public function createStream()
79
- {
80
- return Psr7\stream_for(openssl_decrypt(
81
- (string) $this->cipherText,
82
- $this->getOpenSslName(),
83
- $this->key,
84
- OPENSSL_RAW_DATA,
85
- $this->initializationVector,
86
- $this->tag,
87
- $this->aad
88
- ));
89
- }
90
-
91
- public function isWritable()
92
- {
93
- return false;
94
- }
95
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Crypto/AesGcmEncryptingStream.php DELETED
@@ -1,101 +0,0 @@
1
- <?php
2
- namespace Aws\Crypto;
3
-
4
- use GuzzleHttp\Psr7;
5
- use GuzzleHttp\Psr7\StreamDecoratorTrait;
6
- use Psr\Http\Message\StreamInterface;
7
- use \RuntimeException;
8
-
9
- /**
10
- * @internal Represents a stream of data to be gcm encrypted.
11
- */
12
- class AesGcmEncryptingStream implements AesStreamInterface
13
- {
14
- use StreamDecoratorTrait;
15
-
16
- private $aad;
17
-
18
- private $initializationVector;
19
-
20
- private $key;
21
-
22
- private $keySize;
23
-
24
- private $plaintext;
25
-
26
- private $tag = '';
27
-
28
- private $tagLength;
29
-
30
- /**
31
- * @param StreamInterface $plaintext
32
- * @param string $key
33
- * @param string $initializationVector
34
- * @param string $aad
35
- * @param int $tagLength
36
- * @param int $keySize
37
- */
38
- public function __construct(
39
- StreamInterface $plaintext,
40
- $key,
41
- $initializationVector,
42
- $aad = '',
43
- $tagLength = 16,
44
- $keySize = 256
45
- ) {
46
- if (version_compare(PHP_VERSION, '7.1', '<')) {
47
- throw new RuntimeException(
48
- 'AES-GCM decryption is only supported in PHP 7.1 or greater'
49
- );
50
- }
51
-
52
- $this->plaintext = $plaintext;
53
- $this->key = $key;
54
- $this->initializationVector = $initializationVector;
55
- $this->aad = $aad;
56
- $this->tagLength = $tagLength;
57
- $this->keySize = $keySize;
58
- }
59
-
60
- public function getOpenSslName()
61
- {
62
- return "aes-{$this->keySize}-gcm";
63
- }
64
-
65
- public function getAesName()
66
- {
67
- return 'AES/GCM/NoPadding';
68
- }
69
-
70
- public function getCurrentIv()
71
- {
72
- return $this->initializationVector;
73
- }
74
-
75
- public function createStream()
76
- {
77
- return Psr7\stream_for(openssl_encrypt(
78
- (string) $this->plaintext,
79
- $this->getOpenSslName(),
80
- $this->key,
81
- OPENSSL_RAW_DATA,
82
- $this->initializationVector,
83
- $this->tag,
84
- $this->aad,
85
- $this->tagLength
86
- ));
87
- }
88
-
89
- /**
90
- * @return string
91
- */
92
- public function getTag()
93
- {
94
- return $this->tag;
95
- }
96
-
97
- public function isWritable()
98
- {
99
- return false;
100
- }
101
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Crypto/AesStreamInterface.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
- namespace Aws\Crypto;
3
-
4
- use Psr\Http\Message\StreamInterface;
5
-
6
- interface AesStreamInterface extends StreamInterface
7
- {
8
- /**
9
- * Returns an identifier recognizable by `openssl_*` functions, such as
10
- * `aes-256-cbc` or `aes-128-ctr`.
11
- *
12
- * @return string
13
- */
14
- public function getOpenSslName();
15
-
16
- /**
17
- * Returns an AES recognizable name, such as 'AES/GCM/NoPadding'.
18
- *
19
- * @return string
20
- */
21
- public function getAesName();
22
-
23
- /**
24
- * Returns the IV that should be used to initialize the next block in
25
- * encrypt or decrypt.
26
- *
27
- * @return string
28
- */
29
- public function getCurrentIv();
30
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Crypto/Cipher/Cbc.php DELETED
@@ -1,82 +0,0 @@
1
- <?php
2
- namespace Aws\Crypto\Cipher;
3
-
4
- use \InvalidArgumentException;
5
- use \LogicException;
6
-
7
- /**
8
- * An implementation of the CBC cipher for use with an AesEncryptingStream or
9
- * AesDecrypting stream.
10
- */
11
- class Cbc implements CipherMethod
12
- {
13
- const BLOCK_SIZE = 16;
14
-
15
- /**
16
- * @var string
17
- */
18
- private $baseIv;
19
-
20
- /**
21
- * @var string
22
- */
23
- private $iv;
24
-
25
- /**
26
- * @var int
27
- */
28
- private $keySize;
29
-
30
- /**
31
- * @param string $iv Base Initialization Vector for the cipher.
32
- * @param int $keySize Size of the encryption key, in bits, that will be
33
- * used.
34
- *
35
- * @throws InvalidArgumentException Thrown if the passed iv does not match
36
- * the iv length required by the cipher.
37
- */
38
- public function __construct($iv, $keySize = 256)
39
- {
40
- $this->baseIv = $this->iv = $iv;
41
- $this->keySize = $keySize;
42
-
43
- if (strlen($iv) !== openssl_cipher_iv_length($this->getOpenSslName())) {
44
- throw new InvalidArgumentException('Invalid initialization vector');
45
- }
46
- }
47
-
48
- public function getOpenSslName()
49
- {
50
- return "aes-{$this->keySize}-cbc";
51
- }
52
-
53
- public function getAesName()
54
- {
55
- return 'AES/CBC/PKCS5Padding';
56
- }
57
-
58
- public function getCurrentIv()
59
- {
60
- return $this->iv;
61
- }
62
-
63
- public function requiresPadding()
64
- {
65
- return true;
66
- }
67
-
68
- public function seek($offset, $whence = SEEK_SET)
69
- {
70
- if ($offset === 0 && $whence === SEEK_SET) {
71
- $this->iv = $this->baseIv;
72
- } else {
73
- throw new LogicException('CBC initialization only support being'
74
- . ' rewound, not arbitrary seeking.');
75
- }
76
- }
77
-
78
- public function update($cipherTextBlock)
79
- {
80
- $this->iv = substr($cipherTextBlock, self::BLOCK_SIZE * -1);
81
- }
82
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Crypto/Cipher/CipherBuilderTrait.php DELETED
@@ -1,70 +0,0 @@
1
- <?php
2
- namespace Aws\Crypto\Cipher;
3
-
4
- trait CipherBuilderTrait
5
- {
6
- /**
7
- * Returns an identifier recognizable by `openssl_*` functions, such as
8
- * `aes-256-cbc` or `aes-128-ctr`.
9
- *
10
- * @param string $cipherName Name of the cipher being used for encrypting
11
- * or decrypting.
12
- * @param int $keySize Size of the encryption key, in bits, that will be
13
- * used.
14
- *
15
- * @return string
16
- */
17
- protected function getCipherOpenSslName($cipherName, $keySize)
18
- {
19
- return "aes-{$keySize}-{$cipherName}";
20
- }
21
-
22
- /**
23
- * Constructs a CipherMethod for the given name, initialized with the other
24
- * data passed for use in encrypting or decrypting.
25
- *
26
- * @param string $cipherName Name of the cipher to generate for encrypting.
27
- * @param string $iv Base Initialization Vector for the cipher.
28
- * @param int $keySize Size of the encryption key, in bits, that will be
29
- * used.
30
- *
31
- * @return CipherMethod
32
- *
33
- * @internal
34
- */
35
- protected function buildCipherMethod($cipherName, $iv, $keySize)
36
- {
37
- switch ($cipherName) {
38
- case 'cbc':
39
- return new Cbc(
40
- $iv,
41
- $keySize
42
- );
43
- default:
44
- return null;
45
- }
46
- }
47
-
48
- /**
49
- * Performs a reverse lookup to get the openssl_* cipher name from the
50
- * AESName passed in from the MetadataEnvelope.
51
- *
52
- * @param $aesName
53
- *
54
- * @return string
55
- *
56
- * @internal
57
- */
58
- protected function getCipherFromAesName($aesName)
59
- {
60
- switch ($aesName) {
61
- case 'AES/GCM/NoPadding':
62
- return 'gcm';
63
- case 'AES/CBC/PKCS5Padding':
64
- return 'cbc';
65
- default:
66
- throw new \RuntimeException('Unrecognized or unsupported'
67
- . ' AESName for reverse lookup.');
68
- }
69
- }
70
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Crypto/Cipher/CipherMethod.php DELETED
@@ -1,59 +0,0 @@
1
- <?php
2
- namespace Aws\Crypto\Cipher;
3
-
4
- interface CipherMethod
5
- {
6
- /**
7
- * Returns an identifier recognizable by `openssl_*` functions, such as
8
- * `aes-256-cbc` or `aes-128-ctr`.
9
- *
10
- * @return string
11
- */
12
- public function getOpenSslName();
13
-
14
- /**
15
- * Returns an AES recognizable name, such as 'AES/GCM/NoPadding'.
16
- *
17
- * @return string
18
- */
19
- public function getAesName();
20
-
21
- /**
22
- * Returns the IV that should be used to initialize the next block in
23
- * encrypt or decrypt.
24
- *
25
- * @return string
26
- */
27
- public function getCurrentIv();
28
-
29
- /**
30
- * Indicates whether the cipher method used with this IV requires padding
31
- * the final block to make sure the plaintext is evenly divisible by the
32
- * block size.
33
- *
34
- * @return boolean
35
- */
36
- public function requiresPadding();
37
-
38
- /**
39
- * Adjust the return of this::getCurrentIv to reflect a seek performed on
40
- * the encryption stream using this IV object.
41
- *
42
- * @param int $offset
43
- * @param int $whence
44
- *
45
- * @throws LogicException Thrown if the requested seek is not supported by
46
- * this IV implementation. For example, a CBC IV
47
- * only supports a full rewind ($offset === 0 &&
48
- * $whence === SEEK_SET)
49
- */
50
- public function seek($offset, $whence = SEEK_SET);
51
-
52
- /**
53
- * Take account of the last cipher text block to adjust the return of
54
- * this::getCurrentIv
55
- *
56
- * @param string $cipherTextBlock
57
- */
58
- public function update($cipherTextBlock);
59
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Crypto/DecryptionTrait.php DELETED
@@ -1,179 +0,0 @@
1
- <?php
2
- namespace Aws\Crypto;
3
-
4
- use GuzzleHttp\Psr7;
5
- use GuzzleHttp\Psr7\LimitStream;
6
-
7
- trait DecryptionTrait
8
- {
9
- /**
10
- * Dependency to reverse lookup the openssl_* cipher name from the AESName
11
- * in the MetadataEnvelope.
12
- *
13
- * @param $aesName
14
- *
15
- * @return string
16
- *
17
- * @internal
18
- */
19
- abstract protected function getCipherFromAesName($aesName);
20
-
21
- /**
22
- * Dependency to generate a CipherMethod from a set of inputs for loading
23
- * in to an AesDecryptingStream.
24
- *
25
- * @param string $cipherName Name of the cipher to generate for decrypting.
26
- * @param string $iv Base Initialization Vector for the cipher.
27
- * @param int $keySize Size of the encryption key, in bits, that will be
28
- * used.
29
- *
30
- * @return Cipher\CipherMethod
31
- *
32
- * @internal
33
- */
34
- abstract protected function buildCipherMethod($cipherName, $iv, $keySize);
35
-
36
- /**
37
- * Builds an AesStreamInterface using cipher options loaded from the
38
- * MetadataEnvelope and MaterialsProvider.
39
- *
40
- * @param string $cipherText Plain-text data to be encrypted using the
41
- * materials, algorithm, and data provided.
42
- * @param MaterialsProvider $provider A provider to supply and encrypt
43
- * materials used in encryption.
44
- * @param MetadataEnvelope $envelope A storage envelope for encryption
45
- * metadata to be read from.
46
- * @param array $cipherOptions Additional verification options.
47
- *
48
- * @return AesStreamInterface
49
- *
50
- * @throws \InvalidArgumentException Thrown when a value in $cipherOptions
51
- * is not valid.
52
- *
53
- * @internal
54
- */
55
- protected function decrypt(
56
- $cipherText,
57
- MaterialsProvider $provider,
58
- MetadataEnvelope $envelope,
59
- array $cipherOptions = []
60
- ) {
61
- $cipherOptions['Iv'] = base64_decode(
62
- $envelope[MetadataEnvelope::IV_HEADER]
63
- );
64
-
65
- $cipherOptions['TagLength'] =
66
- $envelope[MetadataEnvelope::CRYPTO_TAG_LENGTH_HEADER] / 8;
67
-
68
- $cek = $provider->decryptCek(
69
- base64_decode(
70
- $envelope[MetadataEnvelope::CONTENT_KEY_V2_HEADER]
71
- ),
72
- json_decode(
73
- $envelope[MetadataEnvelope::MATERIALS_DESCRIPTION_HEADER],
74
- true
75
- )
76
- );
77
- $cipherOptions['KeySize'] = strlen($cek) * 8;
78
- $cipherOptions['Cipher'] = $this->getCipherFromAesName(
79
- $envelope[MetadataEnvelope::CONTENT_CRYPTO_SCHEME_HEADER]
80
- );
81
-
82
- $decryptionSteam = $this->getDecryptingStream(
83
- $cipherText,
84
- $cek,
85
- $cipherOptions
86
- );
87
- unset($cek);
88
-
89
- return $decryptionSteam;
90
- }
91
-
92
- private function getTagFromCiphertextStream(
93
- Psr7\Stream $cipherText,
94
- $tagLength
95
- ) {
96
- $cipherTextSize = $cipherText->getSize();
97
- if ($cipherTextSize == null || $cipherTextSize <= 0) {
98
- throw new \RuntimeException('Cannot decrypt a stream of unknown'
99
- . ' size.');
100
- }
101
- return (string) new LimitStream(
102
- $cipherText,
103
- $tagLength,
104
- $cipherTextSize - $tagLength
105
- );
106
- }
107
-
108
- private function getStrippedCiphertextStream(
109
- Psr7\Stream $cipherText,
110
- $tagLength
111
- ) {
112
- $cipherTextSize = $cipherText->getSize();
113
- if ($cipherTextSize == null || $cipherTextSize <= 0) {
114
- throw new \RuntimeException('Cannot decrypt a stream of unknown'
115
- . ' size.');
116
- }
117
- return new LimitStream(
118
- $cipherText,
119
- $cipherTextSize - $tagLength,
120
- 0
121
- );
122
- }
123
-
124
- /**
125
- * Generates a stream that wraps the cipher text with the proper cipher and
126
- * uses the content encryption key (CEK) to decrypt the data when read.
127
- *
128
- * @param string $cipherText Plain-text data to be encrypted using the
129
- * materials, algorithm, and data provided.
130
- * @param string $cek A content encryption key for use by the stream for
131
- * encrypting the plaintext data.
132
- * @param array $cipherOptions Options for use in determining the cipher to
133
- * be used for encrypting data.
134
- *
135
- * @return AesStreamInterface
136
- *
137
- * @internal
138
- */
139
- protected function getDecryptingStream(
140
- $cipherText,
141
- $cek,
142
- $cipherOptions
143
- ) {
144
- $cipherTextStream = Psr7\stream_for($cipherText);
145
- switch ($cipherOptions['Cipher']) {
146
- case 'gcm':
147
- $cipherOptions['Tag'] = $this->getTagFromCiphertextStream(
148
- $cipherTextStream,
149
- $cipherOptions['TagLength']
150
- );
151
-
152
- return new AesGcmDecryptingStream(
153
- $this->getStrippedCiphertextStream(
154
- $cipherTextStream,
155
- $cipherOptions['TagLength']
156
- ),
157
- $cek,
158
- $cipherOptions['Iv'],
159
- $cipherOptions['Tag'],
160
- $cipherOptions['Aad'] = isset($cipherOptions['Aad'])
161
- ? $cipherOptions['Aad']
162
- : null,
163
- $cipherOptions['TagLength'] ?: null,
164
- $cipherOptions['KeySize']
165
- );
166
- default:
167
- $cipherMethod = $this->buildCipherMethod(
168
- $cipherOptions['Cipher'],
169
- $cipherOptions['Iv'],
170
- $cipherOptions['KeySize']
171
- );
172
- return new AesDecryptingStream(
173
- $cipherTextStream,
174
- $cek,
175
- $cipherMethod
176
- );
177
- }
178
- }
179
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Crypto/EncryptionTrait.php DELETED
@@ -1,186 +0,0 @@
1
- <?php
2
- namespace Aws\Crypto;
3
-
4
- use GuzzleHttp\Psr7;
5
- use GuzzleHttp\Psr7\AppendStream;
6
- use GuzzleHttp\Psr7\Stream;
7
-
8
- trait EncryptionTrait
9
- {
10
- private static $allowedOptions = [
11
- 'Cipher' => true,
12
- 'KeySize' => true,
13
- 'Aad' => true,
14
- ];
15
-
16
- /**
17
- * Dependency to generate a CipherMethod from a set of inputs for loading
18
- * in to an AesEncryptingStream.
19
- *
20
- * @param string $cipherName Name of the cipher to generate for encrypting.
21
- * @param string $iv Base Initialization Vector for the cipher.
22
- * @param int $keySize Size of the encryption key, in bits, that will be
23
- * used.
24
- *
25
- * @return Cipher\CipherMethod
26
- *
27
- * @internal
28
- */
29
- abstract protected function buildCipherMethod($cipherName, $iv, $keySize);
30
-
31
- /**
32
- * Builds an AesStreamInterface and populates encryption metadata into the
33
- * supplied envelope.
34
- *
35
- * @param Stream $plaintext Plain-text data to be encrypted using the
36
- * materials, algorithm, and data provided.
37
- * @param array $cipherOptions Options for use in determining the cipher to
38
- * be used for encrypting data.
39
- * @param MaterialsProvider $provider A provider to supply and encrypt
40
- * materials used in encryption.
41
- * @param MetadataEnvelope $envelope A storage envelope for encryption
42
- * metadata to be added to.
43
- *
44
- * @return AesStreamInterface
45
- *
46
- * @throws \InvalidArgumentException Thrown when a value in $cipherOptions
47
- * is not valid.
48
- *
49
- * @internal
50
- */
51
- protected function encrypt(
52
- Stream $plaintext,
53
- array $cipherOptions,
54
- MaterialsProvider $provider,
55
- MetadataEnvelope $envelope
56
- ) {
57
- $materialsDescription = $provider->getMaterialsDescription();
58
-
59
- $cipherOptions = array_intersect_key(
60
- $cipherOptions,
61
- self::$allowedOptions
62
- );
63
-
64
- if (empty($cipherOptions['Cipher'])) {
65
- throw new \InvalidArgumentException('An encryption cipher must be'
66
- . ' specified in the "cipher_options".');
67
- }
68
-
69
- if (!self::isSupportedCipher($cipherOptions['Cipher'])) {
70
- throw new \InvalidArgumentException('The cipher requested is not'
71
- . ' supported by the SDK.');
72
- }
73
-
74
- if (empty($cipherOptions['KeySize'])) {
75
- $cipherOptions['KeySize'] = 256;
76
- }
77
- if (!is_int($cipherOptions['KeySize'])) {
78
- throw new \InvalidArgumentException('The cipher "KeySize" must be'
79
- . ' an integer.');
80
- }
81
-
82
- if (!MaterialsProvider::isSupportedKeySize(
83
- $cipherOptions['KeySize']
84
- )) {
85
- throw new \InvalidArgumentException('The cipher "KeySize" requested'
86
- . ' is not supported by AES (128, 192, or 256).');
87
- }
88
-
89
- $cipherOptions['Iv'] = $provider->generateIv(
90
- $this->getCipherOpenSslName(
91
- $cipherOptions['Cipher'],
92
- $cipherOptions['KeySize']
93
- )
94
- );
95
-
96
- $cek = $provider->generateCek($cipherOptions['KeySize']);
97
-
98
- list($encryptingStream, $aesName) = $this->getEncryptingStream(
99
- $plaintext,
100
- $cek,
101
- $cipherOptions
102
- );
103
-
104
- // Populate envelope data
105
- $envelope[MetadataEnvelope::CONTENT_KEY_V2_HEADER] =
106
- $provider->encryptCek(
107
- $cek,
108
- $materialsDescription
109
- );
110
- unset($cek);
111
-
112
- $envelope[MetadataEnvelope::IV_HEADER] =
113
- base64_encode($cipherOptions['Iv']);
114
- $envelope[MetadataEnvelope::KEY_WRAP_ALGORITHM_HEADER] =
115
- $provider->getWrapAlgorithmName();
116
- $envelope[MetadataEnvelope::CONTENT_CRYPTO_SCHEME_HEADER] = $aesName;
117
- $envelope[MetadataEnvelope::UNENCRYPTED_CONTENT_LENGTH_HEADER] =
118
- strlen($plaintext);
119
- $envelope[MetadataEnvelope::UNENCRYPTED_CONTENT_MD5_HEADER] =
120
- base64_encode(md5($plaintext));
121
- $envelope[MetadataEnvelope::MATERIALS_DESCRIPTION_HEADER] =
122
- json_encode($materialsDescription);
123
- if (!empty($cipherOptions['Tag'])) {
124
- $envelope[MetadataEnvelope::CRYPTO_TAG_LENGTH_HEADER] =
125
- strlen($cipherOptions['Tag']) * 8;
126
- }
127
-
128
- return $encryptingStream;
129
- }
130
-
131
- /**
132
- * Generates a stream that wraps the plaintext with the proper cipher and
133
- * uses the content encryption key (CEK) to encrypt the data when read.
134
- *
135
- * @param Stream $plaintext Plain-text data to be encrypted using the
136
- * materials, algorithm, and data provided.
137
- * @param string $cek A content encryption key for use by the stream for
138
- * encrypting the plaintext data.
139
- * @param array $cipherOptions Options for use in determining the cipher to
140
- * be used for encrypting data.
141
- *
142
- * @return [AesStreamInterface, string]
143
- *
144
- * @internal
145
- */
146
- protected function getEncryptingStream(
147
- Stream $plaintext,
148
- $cek,
149
- &$cipherOptions
150
- ) {
151
- switch ($cipherOptions['Cipher']) {
152
- case 'gcm':
153
- $cipherOptions['TagLength'] = 16;
154
-
155
- $cipherTextStream = new AesGcmEncryptingStream(
156
- $plaintext,
157
- $cek,
158
- $cipherOptions['Iv'],
159
- $cipherOptions['Aad'] = isset($cipherOptions['Aad'])
160
- ? $cipherOptions['Aad']
161
- : null,
162
- $cipherOptions['TagLength'],
163
- $cipherOptions['KeySize']
164
- );
165
-
166
- $appendStream = new AppendStream([
167
- $cipherTextStream->createStream()
168
- ]);
169
- $cipherOptions['Tag'] = $cipherTextStream->getTag();
170
- $appendStream->addStream(Psr7\stream_for($cipherOptions['Tag']));
171
- return [$appendStream, $cipherTextStream->getAesName()];
172
- default:
173
- $cipherMethod = $this->buildCipherMethod(
174
- $cipherOptions['Cipher'],
175
- $cipherOptions['Iv'],
176
- $cipherOptions['KeySize']
177
- );
178
- $cipherTextStream = new AesEncryptingStream(
179
- $plaintext,
180
- $cek,
181
- $cipherMethod
182
- );
183
- return [$cipherTextStream, $cipherTextStream->getAesName()];
184
- }
185
- }
186
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Crypto/KmsMaterialsProvider.php DELETED
@@ -1,108 +0,0 @@
1
- <?php
2
- namespace Aws\Crypto;
3
-
4
- use Aws\Kms\KmsClient;
5
-
6
- /**
7
- * Uses KMS to supply materials for encrypting and decrypting data.
8
- */
9
- class KmsMaterialsProvider extends MaterialsProvider
10
- {
11
- private $kmsClient;
12
- private $kmsKeyId;
13
-
14
- /**
15
- * @param KmsClient $kmsClient A KMS Client for use encrypting and
16
- * decrypting keys.
17
- * @param string $kmsKeyId The private KMS key id to be used for encrypting
18
- * and decrypting keys.
19
- */
20
- public function __construct(
21
- KmsClient $kmsClient,
22
- $kmsKeyId = null
23
- ) {
24
- $this->kmsClient = $kmsClient;
25
- $this->kmsKeyId = $kmsKeyId;
26
- }
27
-
28
- public function fromDecryptionEnvelope(MetadataEnvelope $envelope)
29
- {
30
- if (empty($envelope[MetadataEnvelope::MATERIALS_DESCRIPTION_HEADER])) {
31
- throw new \RuntimeException('Not able to detect kms_cmk_id from an'
32
- . ' empty materials description.');
33
- }
34
-
35
- $materialsDescription = json_decode(
36
- $envelope[MetadataEnvelope::MATERIALS_DESCRIPTION_HEADER],
37
- true
38
- );
39
- if (empty($materialsDescription['kms_cmk_id'])) {
40
- throw new \RuntimeException('Not able to detect kms_cmk_id from kms'
41
- . ' materials description.');
42
- }
43
-
44
- return new KmsMaterialsProvider(
45
- $this->kmsClient,
46
- $materialsDescription['kms_cmk_id']
47
- );
48
- }
49
-
50
- /**
51
- * The KMS key id for use in matching this Provider to its keys,
52
- * consistently with other SDKs as 'kms_cmk_id'.
53
- *
54
- * @return array
55
- */
56
- public function getMaterialsDescription()
57
- {
58
- return ['kms_cmk_id' => $this->kmsKeyId];
59
- }
60
-
61
- public function getWrapAlgorithmName()
62
- {
63
- return 'kms';
64
- }
65
-
66
- /**
67
- * Takes a content encryption key (CEK) and description to return an encrypted
68
- * key by using KMS' Encrypt API.
69
- *
70
- * @param string $unencryptedCek Key for use in encrypting other data
71
- * that itself needs to be encrypted by the
72
- * Provider.
73
- * @param string $materialDescription Material Description for use in
74
- * encrypting the $cek.
75
- *
76
- * @return string
77
- */
78
- public function encryptCek($unencryptedCek, $materialDescription)
79
- {
80
- $encryptedDataKey = $this->kmsClient->encrypt([
81
- 'Plaintext' => $unencryptedCek,
82
- 'KeyId' => $this->kmsKeyId,
83
- 'EncryptionContext' => $materialDescription
84
- ]);
85
- return base64_encode($encryptedDataKey['CiphertextBlob']);
86
- }
87
-
88
- /**
89
- * Takes an encrypted content encryption key (CEK) and material description
90
- * for use decrypting the key by using KMS' Decrypt API.
91
- *
92
- * @param string $encryptedCek Encrypted key to be decrypted by the Provider
93
- * for use decrypting other data.
94
- * @param string $materialDescription Material Description for use in
95
- * encrypting the $cek.
96
- *
97
- * @return string
98
- */
99
- public function decryptCek($encryptedCek, $materialDescription)
100
- {
101
- $result = $this->kmsClient->decrypt([
102
- 'CiphertextBlob' => $encryptedCek,
103
- 'EncryptionContext' => $materialDescription
104
- ]);
105
-
106
- return $result['Plaintext'];
107
- }
108
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Crypto/MaterialsProvider.php DELETED
@@ -1,105 +0,0 @@
1
- <?php
2
- namespace Aws\Crypto;
3
-
4
- abstract class MaterialsProvider
5
- {
6
- private static $supportedKeySizes = [
7
- 128 => true,
8
- 192 => true,
9
- 256 => true,
10
- ];
11
-
12
- /**
13
- * Returns if the requested size is supported by AES.
14
- *
15
- * @param int $keySize Size of the requested key in bits.
16
- *
17
- * @return bool
18
- */
19
- public static function isSupportedKeySize($keySize)
20
- {
21
- return isset(self::$supportedKeySizes[$keySize]);
22
- }
23
-
24
- /**
25
- * Performs further initialization of the MaterialsProvider based on the
26
- * data inside the MetadataEnvelope.
27
- *
28
- * @param MetadataEnvelope $envelope A storage envelope for encryption
29
- * metadata to be read from.
30
- *
31
- * @return MaterialsProvider
32
- *
33
- * @throws \RuntimeException Thrown when there is an empty or improperly
34
- * formed materials description in the envelope.
35
- *
36
- * @internal
37
- */
38
- abstract public function fromDecryptionEnvelope(MetadataEnvelope $envelope);
39
-
40
- /**
41
- * Returns the material description for this Provider so it can be verified
42
- * by encryption mechanisms.
43
- *
44
- * @return string
45
- */
46
- abstract public function getMaterialsDescription();
47
-
48
- /**
49
- * Returns the wrap algorithm name for this Provider.
50
- *
51
- * @return string
52
- */
53
- abstract public function getWrapAlgorithmName();
54
-
55
- /**
56
- * Takes a content encryption key (CEK) and description to return an
57
- * encrypted key according to the Provider's specifications.
58
- *
59
- * @param string $unencryptedCek Key for use in encrypting other data
60
- * that itself needs to be encrypted by the
61
- * Provider.
62
- * @param string $materialDescription Material Description for use in
63
- * encrypting the $cek.
64
- *
65
- * @return string
66
- */
67
- abstract public function encryptCek($unencryptedCek, $materialDescription);
68
-
69
- /**
70
- * Takes an encrypted content encryption key (CEK) and material description
71
- * for use decrypting the key according to the Provider's specifications.
72
- *
73
- * @param string $encryptedCek Encrypted key to be decrypted by the Provider
74
- * for use decrypting other data.
75
- * @param string $materialDescription Material Description for use in
76
- * encrypting the $cek.
77
- *
78
- * @return string
79
- */
80
- abstract public function decryptCek($encryptedCek, $materialDescription);
81
-
82
- /**
83
- * @param string $keySize Length of a cipher key in bits for generating a
84
- * random content encryption key (CEK).
85
- *
86
- * @return string
87
- */
88
- public function generateCek($keySize)
89
- {
90
- return openssl_random_pseudo_bytes($keySize / 8);
91
- }
92
-
93
- /**
94
- * @param string $openSslName Cipher OpenSSL name to use for generating
95
- * an initialization vector.
96
- *
97
- * @return string
98
- */
99
- public function generateIv($openSslName)
100
- {
101
- return openssl_random_pseudo_bytes(
102
- openssl_cipher_iv_length($openSslName)
103
- );
104
- }
105
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Crypto/MetadataEnvelope.php DELETED
@@ -1,57 +0,0 @@
1
- <?php
2
- namespace Aws\Crypto;
3
-
4
- use Aws\HasDataTrait;
5
- use \ArrayAccess;
6
- use \IteratorAggregate;
7
- use \InvalidArgumentException;
8
- use \JsonSerializable;
9
-
10
- /**
11
- * Stores encryption metadata for reading and writing.
12
- *
13
- * @internal
14
- */
15
- class MetadataEnvelope implements ArrayAccess, IteratorAggregate, JsonSerializable
16
- {
17
- use HasDataTrait;
18
-
19
- const CONTENT_KEY_V2_HEADER = 'x-amz-key-v2';
20
- const IV_HEADER = 'x-amz-iv';
21
- const MATERIALS_DESCRIPTION_HEADER = 'x-amz-matdesc';
22
- const KEY_WRAP_ALGORITHM_HEADER = 'x-amz-wrap-alg';
23
- const CONTENT_CRYPTO_SCHEME_HEADER = 'x-amz-cek-alg';
24
- const CRYPTO_TAG_LENGTH_HEADER = 'x-amz-tag-len';
25
- const UNENCRYPTED_CONTENT_MD5_HEADER = 'x-amz-unencrypted-content-md5';
26
- const UNENCRYPTED_CONTENT_LENGTH_HEADER = 'x-amz-unencrypted-content-length';
27
-
28
- private static $constants = [];
29
-
30
- public static function getConstantValues()
31
- {
32
- if (empty(self::$constants)) {
33
- $reflection = new \ReflectionClass(static::class);
34
- foreach (array_values($reflection->getConstants()) as $constant) {
35
- self::$constants[$constant] = true;
36
- }
37
- }
38
-
39
- return array_keys(self::$constants);
40
- }
41
-
42
- public function offsetSet($name, $value)
43
- {
44
- $constants = self::getConstantValues();
45
- if (is_null($name) || !in_array($name, $constants)) {
46
- throw new InvalidArgumentException('MetadataEnvelope fields must'
47
- . ' must match a predefined offset; use the header constants.');
48
- }
49
-
50
- $this->data[$name] = $value;
51
- }
52
-
53
- public function jsonSerialize()
54
- {
55
- return $this->data;
56
- }
57
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Crypto/MetadataStrategyInterface.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
- namespace Aws\Crypto;
3
-
4
- interface MetadataStrategyInterface
5
- {
6
- /**
7
- * Places the information in the MetadataEnvelope to the strategy specific
8
- * location. Populates the PutObject arguments with any information
9
- * necessary for loading.
10
- *
11
- * @param MetadataEnvelope $envelope Encryption data to save according to
12
- * the strategy.
13
- * @param array $args Starting arguments for PutObject.
14
- *
15
- * @return array Updated arguments for PutObject.
16
- */
17
- public function save(MetadataEnvelope $envelope, array $args);
18
-
19
- /**
20
- * Generates a MetadataEnvelope according to the specific strategy using the
21
- * passed arguments.
22
- *
23
- * @param array $args Arguments from Command and Result that contains
24
- * S3 Object information, relevant headers, and command
25
- * configuration.
26
- *
27
- * @return MetadataEnvelope
28
- */
29
- public function load(array $args);
30
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DAX/DAXClient.php DELETED
@@ -1,51 +0,0 @@
1
- <?php
2
- namespace Aws\DAX;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon DynamoDB Accelerator (DAX)** service.
8
- * @method \Aws\Result createCluster(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise createClusterAsync(array $args = [])
10
- * @method \Aws\Result createParameterGroup(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise createParameterGroupAsync(array $args = [])
12
- * @method \Aws\Result createSubnetGroup(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise createSubnetGroupAsync(array $args = [])
14
- * @method \Aws\Result decreaseReplicationFactor(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise decreaseReplicationFactorAsync(array $args = [])
16
- * @method \Aws\Result deleteCluster(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise deleteClusterAsync(array $args = [])
18
- * @method \Aws\Result deleteParameterGroup(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise deleteParameterGroupAsync(array $args = [])
20
- * @method \Aws\Result deleteSubnetGroup(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise deleteSubnetGroupAsync(array $args = [])
22
- * @method \Aws\Result describeClusters(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise describeClustersAsync(array $args = [])
24
- * @method \Aws\Result describeDefaultParameters(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise describeDefaultParametersAsync(array $args = [])
26
- * @method \Aws\Result describeEvents(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise describeEventsAsync(array $args = [])
28
- * @method \Aws\Result describeParameterGroups(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise describeParameterGroupsAsync(array $args = [])
30
- * @method \Aws\Result describeParameters(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise describeParametersAsync(array $args = [])
32
- * @method \Aws\Result describeSubnetGroups(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise describeSubnetGroupsAsync(array $args = [])
34
- * @method \Aws\Result increaseReplicationFactor(array $args = [])
35
- * @method \GuzzleHttp\Promise\Promise increaseReplicationFactorAsync(array $args = [])
36
- * @method \Aws\Result listTags(array $args = [])
37
- * @method \GuzzleHttp\Promise\Promise listTagsAsync(array $args = [])
38
- * @method \Aws\Result rebootNode(array $args = [])
39
- * @method \GuzzleHttp\Promise\Promise rebootNodeAsync(array $args = [])
40
- * @method \Aws\Result tagResource(array $args = [])
41
- * @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
42
- * @method \Aws\Result untagResource(array $args = [])
43
- * @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
44
- * @method \Aws\Result updateCluster(array $args = [])
45
- * @method \GuzzleHttp\Promise\Promise updateClusterAsync(array $args = [])
46
- * @method \Aws\Result updateParameterGroup(array $args = [])
47
- * @method \GuzzleHttp\Promise\Promise updateParameterGroupAsync(array $args = [])
48
- * @method \Aws\Result updateSubnetGroup(array $args = [])
49
- * @method \GuzzleHttp\Promise\Promise updateSubnetGroupAsync(array $args = [])
50
- */
51
- class DAXClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DAX/Exception/DAXException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\DAX\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **Amazon DynamoDB Accelerator (DAX)** service.
8
- */
9
- class DAXException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DLM/DLMClient.php DELETED
@@ -1,19 +0,0 @@
1
- <?php
2
- namespace Aws\DLM;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon Data Lifecycle Manager** service.
8
- * @method \Aws\Result createLifecyclePolicy(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise createLifecyclePolicyAsync(array $args = [])
10
- * @method \Aws\Result deleteLifecyclePolicy(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise deleteLifecyclePolicyAsync(array $args = [])
12
- * @method \Aws\Result getLifecyclePolicies(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise getLifecyclePoliciesAsync(array $args = [])
14
- * @method \Aws\Result getLifecyclePolicy(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise getLifecyclePolicyAsync(array $args = [])
16
- * @method \Aws\Result updateLifecyclePolicy(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise updateLifecyclePolicyAsync(array $args = [])
18
- */
19
- class DLMClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DLM/Exception/DLMException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\DLM\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **Amazon Data Lifecycle Manager** service.
8
- */
9
- class DLMException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DataPipeline/DataPipelineClient.php DELETED
@@ -1,48 +0,0 @@
1
- <?php
2
- namespace Aws\DataPipeline;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS Data Pipeline** service.
8
- *
9
- * @method \Aws\Result activatePipeline(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise activatePipelineAsync(array $args = [])
11
- * @method \Aws\Result addTags(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise addTagsAsync(array $args = [])
13
- * @method \Aws\Result createPipeline(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise createPipelineAsync(array $args = [])
15
- * @method \Aws\Result deactivatePipeline(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise deactivatePipelineAsync(array $args = [])
17
- * @method \Aws\Result deletePipeline(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise deletePipelineAsync(array $args = [])
19
- * @method \Aws\Result describeObjects(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise describeObjectsAsync(array $args = [])
21
- * @method \Aws\Result describePipelines(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise describePipelinesAsync(array $args = [])
23
- * @method \Aws\Result evaluateExpression(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise evaluateExpressionAsync(array $args = [])
25
- * @method \Aws\Result getPipelineDefinition(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise getPipelineDefinitionAsync(array $args = [])
27
- * @method \Aws\Result listPipelines(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise listPipelinesAsync(array $args = [])
29
- * @method \Aws\Result pollForTask(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise pollForTaskAsync(array $args = [])
31
- * @method \Aws\Result putPipelineDefinition(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise putPipelineDefinitionAsync(array $args = [])
33
- * @method \Aws\Result queryObjects(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise queryObjectsAsync(array $args = [])
35
- * @method \Aws\Result removeTags(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise removeTagsAsync(array $args = [])
37
- * @method \Aws\Result reportTaskProgress(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise reportTaskProgressAsync(array $args = [])
39
- * @method \Aws\Result reportTaskRunnerHeartbeat(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise reportTaskRunnerHeartbeatAsync(array $args = [])
41
- * @method \Aws\Result setStatus(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise setStatusAsync(array $args = [])
43
- * @method \Aws\Result setTaskStatus(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise setTaskStatusAsync(array $args = [])
45
- * @method \Aws\Result validatePipelineDefinition(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise validatePipelineDefinitionAsync(array $args = [])
47
- */
48
- class DataPipelineClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DataPipeline/Exception/DataPipelineException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\DataPipeline\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the AWS Data Pipeline service.
8
- */
9
- class DataPipelineException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DatabaseMigrationService/DatabaseMigrationServiceClient.php DELETED
@@ -1,97 +0,0 @@
1
- <?php
2
- namespace Aws\DatabaseMigrationService;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS Database Migration Service** service.
8
- * @method \Aws\Result addTagsToResource(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise addTagsToResourceAsync(array $args = [])
10
- * @method \Aws\Result createEndpoint(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise createEndpointAsync(array $args = [])
12
- * @method \Aws\Result createEventSubscription(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise createEventSubscriptionAsync(array $args = [])
14
- * @method \Aws\Result createReplicationInstance(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise createReplicationInstanceAsync(array $args = [])
16
- * @method \Aws\Result createReplicationSubnetGroup(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise createReplicationSubnetGroupAsync(array $args = [])
18
- * @method \Aws\Result createReplicationTask(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise createReplicationTaskAsync(array $args = [])
20
- * @method \Aws\Result deleteCertificate(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise deleteCertificateAsync(array $args = [])
22
- * @method \Aws\Result deleteEndpoint(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise deleteEndpointAsync(array $args = [])
24
- * @method \Aws\Result deleteEventSubscription(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise deleteEventSubscriptionAsync(array $args = [])
26
- * @method \Aws\Result deleteReplicationInstance(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise deleteReplicationInstanceAsync(array $args = [])
28
- * @method \Aws\Result deleteReplicationSubnetGroup(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise deleteReplicationSubnetGroupAsync(array $args = [])
30
- * @method \Aws\Result deleteReplicationTask(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise deleteReplicationTaskAsync(array $args = [])
32
- * @method \Aws\Result describeAccountAttributes(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise describeAccountAttributesAsync(array $args = [])
34
- * @method \Aws\Result describeCertificates(array $args = [])
35
- * @method \GuzzleHttp\Promise\Promise describeCertificatesAsync(array $args = [])
36
- * @method \Aws\Result describeConnections(array $args = [])
37
- * @method \GuzzleHttp\Promise\Promise describeConnectionsAsync(array $args = [])
38
- * @method \Aws\Result describeEndpointTypes(array $args = [])
39
- * @method \GuzzleHttp\Promise\Promise describeEndpointTypesAsync(array $args = [])
40
- * @method \Aws\Result describeEndpoints(array $args = [])
41
- * @method \GuzzleHttp\Promise\Promise describeEndpointsAsync(array $args = [])
42
- * @method \Aws\Result describeEventCategories(array $args = [])
43
- * @method \GuzzleHttp\Promise\Promise describeEventCategoriesAsync(array $args = [])
44
- * @method \Aws\Result describeEventSubscriptions(array $args = [])
45
- * @method \GuzzleHttp\Promise\Promise describeEventSubscriptionsAsync(array $args = [])
46
- * @method \Aws\Result describeEvents(array $args = [])
47
- * @method \GuzzleHttp\Promise\Promise describeEventsAsync(array $args = [])
48
- * @method \Aws\Result describeOrderableReplicationInstances(array $args = [])
49
- * @method \GuzzleHttp\Promise\Promise describeOrderableReplicationInstancesAsync(array $args = [])
50
- * @method \Aws\Result describeRefreshSchemasStatus(array $args = [])
51
- * @method \GuzzleHttp\Promise\Promise describeRefreshSchemasStatusAsync(array $args = [])
52
- * @method \Aws\Result describeReplicationInstanceTaskLogs(array $args = [])
53
- * @method \GuzzleHttp\Promise\Promise describeReplicationInstanceTaskLogsAsync(array $args = [])
54
- * @method \Aws\Result describeReplicationInstances(array $args = [])
55
- * @method \GuzzleHttp\Promise\Promise describeReplicationInstancesAsync(array $args = [])
56
- * @method \Aws\Result describeReplicationSubnetGroups(array $args = [])
57
- * @method \GuzzleHttp\Promise\Promise describeReplicationSubnetGroupsAsync(array $args = [])
58
- * @method \Aws\Result describeReplicationTaskAssessmentResults(array $args = [])
59
- * @method \GuzzleHttp\Promise\Promise describeReplicationTaskAssessmentResultsAsync(array $args = [])
60
- * @method \Aws\Result describeReplicationTasks(array $args = [])
61
- * @method \GuzzleHttp\Promise\Promise describeReplicationTasksAsync(array $args = [])
62
- * @method \Aws\Result describeSchemas(array $args = [])
63
- * @method \GuzzleHttp\Promise\Promise describeSchemasAsync(array $args = [])
64
- * @method \Aws\Result describeTableStatistics(array $args = [])
65
- * @method \GuzzleHttp\Promise\Promise describeTableStatisticsAsync(array $args = [])
66
- * @method \Aws\Result importCertificate(array $args = [])
67
- * @method \GuzzleHttp\Promise\Promise importCertificateAsync(array $args = [])
68
- * @method \Aws\Result listTagsForResource(array $args = [])
69
- * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
70
- * @method \Aws\Result modifyEndpoint(array $args = [])
71
- * @method \GuzzleHttp\Promise\Promise modifyEndpointAsync(array $args = [])
72
- * @method \Aws\Result modifyEventSubscription(array $args = [])
73
- * @method \GuzzleHttp\Promise\Promise modifyEventSubscriptionAsync(array $args = [])
74
- * @method \Aws\Result modifyReplicationInstance(array $args = [])
75
- * @method \GuzzleHttp\Promise\Promise modifyReplicationInstanceAsync(array $args = [])
76
- * @method \Aws\Result modifyReplicationSubnetGroup(array $args = [])
77
- * @method \GuzzleHttp\Promise\Promise modifyReplicationSubnetGroupAsync(array $args = [])
78
- * @method \Aws\Result modifyReplicationTask(array $args = [])
79
- * @method \GuzzleHttp\Promise\Promise modifyReplicationTaskAsync(array $args = [])
80
- * @method \Aws\Result rebootReplicationInstance(array $args = [])
81
- * @method \GuzzleHttp\Promise\Promise rebootReplicationInstanceAsync(array $args = [])
82
- * @method \Aws\Result refreshSchemas(array $args = [])
83
- * @method \GuzzleHttp\Promise\Promise refreshSchemasAsync(array $args = [])
84
- * @method \Aws\Result reloadTables(array $args = [])
85
- * @method \GuzzleHttp\Promise\Promise reloadTablesAsync(array $args = [])
86
- * @method \Aws\Result removeTagsFromResource(array $args = [])
87
- * @method \GuzzleHttp\Promise\Promise removeTagsFromResourceAsync(array $args = [])
88
- * @method \Aws\Result startReplicationTask(array $args = [])
89
- * @method \GuzzleHttp\Promise\Promise startReplicationTaskAsync(array $args = [])
90
- * @method \Aws\Result startReplicationTaskAssessment(array $args = [])
91
- * @method \GuzzleHttp\Promise\Promise startReplicationTaskAssessmentAsync(array $args = [])
92
- * @method \Aws\Result stopReplicationTask(array $args = [])
93
- * @method \GuzzleHttp\Promise\Promise stopReplicationTaskAsync(array $args = [])
94
- * @method \Aws\Result testConnection(array $args = [])
95
- * @method \GuzzleHttp\Promise\Promise testConnectionAsync(array $args = [])
96
- */
97
- class DatabaseMigrationServiceClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DatabaseMigrationService/Exception/DatabaseMigrationServiceException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\DatabaseMigrationService\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **AWS Database Migration Service** service.
8
- */
9
- class DatabaseMigrationServiceException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DeviceFarm/DeviceFarmClient.php DELETED
@@ -1,138 +0,0 @@
1
- <?php
2
- namespace Aws\DeviceFarm;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon DeviceFarm** service.
8
- *
9
- * @method \Aws\Result createDevicePool(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise createDevicePoolAsync(array $args = [])
11
- * @method \Aws\Result createInstanceProfile(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise createInstanceProfileAsync(array $args = [])
13
- * @method \Aws\Result createNetworkProfile(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise createNetworkProfileAsync(array $args = [])
15
- * @method \Aws\Result createProject(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise createProjectAsync(array $args = [])
17
- * @method \Aws\Result createRemoteAccessSession(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise createRemoteAccessSessionAsync(array $args = [])
19
- * @method \Aws\Result createUpload(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise createUploadAsync(array $args = [])
21
- * @method \Aws\Result createVPCEConfiguration(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise createVPCEConfigurationAsync(array $args = [])
23
- * @method \Aws\Result deleteDevicePool(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise deleteDevicePoolAsync(array $args = [])
25
- * @method \Aws\Result deleteInstanceProfile(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise deleteInstanceProfileAsync(array $args = [])
27
- * @method \Aws\Result deleteNetworkProfile(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise deleteNetworkProfileAsync(array $args = [])
29
- * @method \Aws\Result deleteProject(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise deleteProjectAsync(array $args = [])
31
- * @method \Aws\Result deleteRemoteAccessSession(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise deleteRemoteAccessSessionAsync(array $args = [])
33
- * @method \Aws\Result deleteRun(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise deleteRunAsync(array $args = [])
35
- * @method \Aws\Result deleteUpload(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise deleteUploadAsync(array $args = [])
37
- * @method \Aws\Result deleteVPCEConfiguration(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise deleteVPCEConfigurationAsync(array $args = [])
39
- * @method \Aws\Result getAccountSettings(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise getAccountSettingsAsync(array $args = [])
41
- * @method \Aws\Result getDevice(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise getDeviceAsync(array $args = [])
43
- * @method \Aws\Result getDeviceInstance(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise getDeviceInstanceAsync(array $args = [])
45
- * @method \Aws\Result getDevicePool(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise getDevicePoolAsync(array $args = [])
47
- * @method \Aws\Result getDevicePoolCompatibility(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise getDevicePoolCompatibilityAsync(array $args = [])
49
- * @method \Aws\Result getInstanceProfile(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise getInstanceProfileAsync(array $args = [])
51
- * @method \Aws\Result getJob(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise getJobAsync(array $args = [])
53
- * @method \Aws\Result getNetworkProfile(array $args = [])
54
- * @method \GuzzleHttp\Promise\Promise getNetworkProfileAsync(array $args = [])
55
- * @method \Aws\Result getOfferingStatus(array $args = [])
56
- * @method \GuzzleHttp\Promise\Promise getOfferingStatusAsync(array $args = [])
57
- * @method \Aws\Result getProject(array $args = [])
58
- * @method \GuzzleHttp\Promise\Promise getProjectAsync(array $args = [])
59
- * @method \Aws\Result getRemoteAccessSession(array $args = [])
60
- * @method \GuzzleHttp\Promise\Promise getRemoteAccessSessionAsync(array $args = [])
61
- * @method \Aws\Result getRun(array $args = [])
62
- * @method \GuzzleHttp\Promise\Promise getRunAsync(array $args = [])
63
- * @method \Aws\Result getSuite(array $args = [])
64
- * @method \GuzzleHttp\Promise\Promise getSuiteAsync(array $args = [])
65
- * @method \Aws\Result getTest(array $args = [])
66
- * @method \GuzzleHttp\Promise\Promise getTestAsync(array $args = [])
67
- * @method \Aws\Result getUpload(array $args = [])
68
- * @method \GuzzleHttp\Promise\Promise getUploadAsync(array $args = [])
69
- * @method \Aws\Result getVPCEConfiguration(array $args = [])
70
- * @method \GuzzleHttp\Promise\Promise getVPCEConfigurationAsync(array $args = [])
71
- * @method \Aws\Result installToRemoteAccessSession(array $args = [])
72
- * @method \GuzzleHttp\Promise\Promise installToRemoteAccessSessionAsync(array $args = [])
73
- * @method \Aws\Result listArtifacts(array $args = [])
74
- * @method \GuzzleHttp\Promise\Promise listArtifactsAsync(array $args = [])
75
- * @method \Aws\Result listDeviceInstances(array $args = [])
76
- * @method \GuzzleHttp\Promise\Promise listDeviceInstancesAsync(array $args = [])
77
- * @method \Aws\Result listDevicePools(array $args = [])
78
- * @method \GuzzleHttp\Promise\Promise listDevicePoolsAsync(array $args = [])
79
- * @method \Aws\Result listDevices(array $args = [])
80
- * @method \GuzzleHttp\Promise\Promise listDevicesAsync(array $args = [])
81
- * @method \Aws\Result listInstanceProfiles(array $args = [])
82
- * @method \GuzzleHttp\Promise\Promise listInstanceProfilesAsync(array $args = [])
83
- * @method \Aws\Result listJobs(array $args = [])
84
- * @method \GuzzleHttp\Promise\Promise listJobsAsync(array $args = [])
85
- * @method \Aws\Result listNetworkProfiles(array $args = [])
86
- * @method \GuzzleHttp\Promise\Promise listNetworkProfilesAsync(array $args = [])
87
- * @method \Aws\Result listOfferingPromotions(array $args = [])
88
- * @method \GuzzleHttp\Promise\Promise listOfferingPromotionsAsync(array $args = [])
89
- * @method \Aws\Result listOfferingTransactions(array $args = [])
90
- * @method \GuzzleHttp\Promise\Promise listOfferingTransactionsAsync(array $args = [])
91
- * @method \Aws\Result listOfferings(array $args = [])
92
- * @method \GuzzleHttp\Promise\Promise listOfferingsAsync(array $args = [])
93
- * @method \Aws\Result listProjects(array $args = [])
94
- * @method \GuzzleHttp\Promise\Promise listProjectsAsync(array $args = [])
95
- * @method \Aws\Result listRemoteAccessSessions(array $args = [])
96
- * @method \GuzzleHttp\Promise\Promise listRemoteAccessSessionsAsync(array $args = [])
97
- * @method \Aws\Result listRuns(array $args = [])
98
- * @method \GuzzleHttp\Promise\Promise listRunsAsync(array $args = [])
99
- * @method \Aws\Result listSamples(array $args = [])
100
- * @method \GuzzleHttp\Promise\Promise listSamplesAsync(array $args = [])
101
- * @method \Aws\Result listSuites(array $args = [])
102
- * @method \GuzzleHttp\Promise\Promise listSuitesAsync(array $args = [])
103
- * @method \Aws\Result listTests(array $args = [])
104
- * @method \GuzzleHttp\Promise\Promise listTestsAsync(array $args = [])
105
- * @method \Aws\Result listUniqueProblems(array $args = [])
106
- * @method \GuzzleHttp\Promise\Promise listUniqueProblemsAsync(array $args = [])
107
- * @method \Aws\Result listUploads(array $args = [])
108
- * @method \GuzzleHttp\Promise\Promise listUploadsAsync(array $args = [])
109
- * @method \Aws\Result listVPCEConfigurations(array $args = [])
110
- * @method \GuzzleHttp\Promise\Promise listVPCEConfigurationsAsync(array $args = [])
111
- * @method \Aws\Result purchaseOffering(array $args = [])
112
- * @method \GuzzleHttp\Promise\Promise purchaseOfferingAsync(array $args = [])
113
- * @method \Aws\Result renewOffering(array $args = [])
114
- * @method \GuzzleHttp\Promise\Promise renewOfferingAsync(array $args = [])
115
- * @method \Aws\Result scheduleRun(array $args = [])
116
- * @method \GuzzleHttp\Promise\Promise scheduleRunAsync(array $args = [])
117
- * @method \Aws\Result stopJob(array $args = [])
118
- * @method \GuzzleHttp\Promise\Promise stopJobAsync(array $args = [])
119
- * @method \Aws\Result stopRemoteAccessSession(array $args = [])
120
- * @method \GuzzleHttp\Promise\Promise stopRemoteAccessSessionAsync(array $args = [])
121
- * @method \Aws\Result stopRun(array $args = [])
122
- * @method \GuzzleHttp\Promise\Promise stopRunAsync(array $args = [])
123
- * @method \Aws\Result updateDeviceInstance(array $args = [])
124
- * @method \GuzzleHttp\Promise\Promise updateDeviceInstanceAsync(array $args = [])
125
- * @method \Aws\Result updateDevicePool(array $args = [])
126
- * @method \GuzzleHttp\Promise\Promise updateDevicePoolAsync(array $args = [])
127
- * @method \Aws\Result updateInstanceProfile(array $args = [])
128
- * @method \GuzzleHttp\Promise\Promise updateInstanceProfileAsync(array $args = [])
129
- * @method \Aws\Result updateNetworkProfile(array $args = [])
130
- * @method \GuzzleHttp\Promise\Promise updateNetworkProfileAsync(array $args = [])
131
- * @method \Aws\Result updateProject(array $args = [])
132
- * @method \GuzzleHttp\Promise\Promise updateProjectAsync(array $args = [])
133
- * @method \Aws\Result updateUpload(array $args = [])
134
- * @method \GuzzleHttp\Promise\Promise updateUploadAsync(array $args = [])
135
- * @method \Aws\Result updateVPCEConfiguration(array $args = [])
136
- * @method \GuzzleHttp\Promise\Promise updateVPCEConfigurationAsync(array $args = [])
137
- */
138
- class DeviceFarmClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DeviceFarm/Exception/DeviceFarmException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\DeviceFarm\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the Amazon DeviceFarm service.
8
- */
9
- class DeviceFarmException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DirectConnect/DirectConnectClient.php DELETED
@@ -1,98 +0,0 @@
1
- <?php
2
- namespace Aws\DirectConnect;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS Direct Connect** service.
8
- *
9
- * @method \Aws\Result allocateConnectionOnInterconnect(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise allocateConnectionOnInterconnectAsync(array $args = [])
11
- * @method \Aws\Result allocateHostedConnection(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise allocateHostedConnectionAsync(array $args = [])
13
- * @method \Aws\Result allocatePrivateVirtualInterface(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise allocatePrivateVirtualInterfaceAsync(array $args = [])
15
- * @method \Aws\Result allocatePublicVirtualInterface(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise allocatePublicVirtualInterfaceAsync(array $args = [])
17
- * @method \Aws\Result associateConnectionWithLag(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise associateConnectionWithLagAsync(array $args = [])
19
- * @method \Aws\Result associateHostedConnection(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise associateHostedConnectionAsync(array $args = [])
21
- * @method \Aws\Result associateVirtualInterface(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise associateVirtualInterfaceAsync(array $args = [])
23
- * @method \Aws\Result confirmConnection(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise confirmConnectionAsync(array $args = [])
25
- * @method \Aws\Result confirmPrivateVirtualInterface(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise confirmPrivateVirtualInterfaceAsync(array $args = [])
27
- * @method \Aws\Result confirmPublicVirtualInterface(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise confirmPublicVirtualInterfaceAsync(array $args = [])
29
- * @method \Aws\Result createBGPPeer(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise createBGPPeerAsync(array $args = [])
31
- * @method \Aws\Result createConnection(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise createConnectionAsync(array $args = [])
33
- * @method \Aws\Result createDirectConnectGateway(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise createDirectConnectGatewayAsync(array $args = [])
35
- * @method \Aws\Result createDirectConnectGatewayAssociation(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise createDirectConnectGatewayAssociationAsync(array $args = [])
37
- * @method \Aws\Result createInterconnect(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise createInterconnectAsync(array $args = [])
39
- * @method \Aws\Result createLag(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise createLagAsync(array $args = [])
41
- * @method \Aws\Result createPrivateVirtualInterface(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise createPrivateVirtualInterfaceAsync(array $args = [])
43
- * @method \Aws\Result createPublicVirtualInterface(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise createPublicVirtualInterfaceAsync(array $args = [])
45
- * @method \Aws\Result deleteBGPPeer(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise deleteBGPPeerAsync(array $args = [])
47
- * @method \Aws\Result deleteConnection(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise deleteConnectionAsync(array $args = [])
49
- * @method \Aws\Result deleteDirectConnectGateway(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise deleteDirectConnectGatewayAsync(array $args = [])
51
- * @method \Aws\Result deleteDirectConnectGatewayAssociation(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise deleteDirectConnectGatewayAssociationAsync(array $args = [])
53
- * @method \Aws\Result deleteInterconnect(array $args = [])
54
- * @method \GuzzleHttp\Promise\Promise deleteInterconnectAsync(array $args = [])
55
- * @method \Aws\Result deleteLag(array $args = [])
56
- * @method \GuzzleHttp\Promise\Promise deleteLagAsync(array $args = [])
57
- * @method \Aws\Result deleteVirtualInterface(array $args = [])
58
- * @method \GuzzleHttp\Promise\Promise deleteVirtualInterfaceAsync(array $args = [])
59
- * @method \Aws\Result describeConnectionLoa(array $args = [])
60
- * @method \GuzzleHttp\Promise\Promise describeConnectionLoaAsync(array $args = [])
61
- * @method \Aws\Result describeConnections(array $args = [])
62
- * @method \GuzzleHttp\Promise\Promise describeConnectionsAsync(array $args = [])
63
- * @method \Aws\Result describeConnectionsOnInterconnect(array $args = [])
64
- * @method \GuzzleHttp\Promise\Promise describeConnectionsOnInterconnectAsync(array $args = [])
65
- * @method \Aws\Result describeDirectConnectGatewayAssociations(array $args = [])
66
- * @method \GuzzleHttp\Promise\Promise describeDirectConnectGatewayAssociationsAsync(array $args = [])
67
- * @method \Aws\Result describeDirectConnectGatewayAttachments(array $args = [])
68
- * @method \GuzzleHttp\Promise\Promise describeDirectConnectGatewayAttachmentsAsync(array $args = [])
69
- * @method \Aws\Result describeDirectConnectGateways(array $args = [])
70
- * @method \GuzzleHttp\Promise\Promise describeDirectConnectGatewaysAsync(array $args = [])
71
- * @method \Aws\Result describeHostedConnections(array $args = [])
72
- * @method \GuzzleHttp\Promise\Promise describeHostedConnectionsAsync(array $args = [])
73
- * @method \Aws\Result describeInterconnectLoa(array $args = [])
74
- * @method \GuzzleHttp\Promise\Promise describeInterconnectLoaAsync(array $args = [])
75
- * @method \Aws\Result describeInterconnects(array $args = [])
76
- * @method \GuzzleHttp\Promise\Promise describeInterconnectsAsync(array $args = [])
77
- * @method \Aws\Result describeLags(array $args = [])
78
- * @method \GuzzleHttp\Promise\Promise describeLagsAsync(array $args = [])
79
- * @method \Aws\Result describeLoa(array $args = [])
80
- * @method \GuzzleHttp\Promise\Promise describeLoaAsync(array $args = [])
81
- * @method \Aws\Result describeLocations(array $args = [])
82
- * @method \GuzzleHttp\Promise\Promise describeLocationsAsync(array $args = [])
83
- * @method \Aws\Result describeTags(array $args = [])
84
- * @method \GuzzleHttp\Promise\Promise describeTagsAsync(array $args = [])
85
- * @method \Aws\Result describeVirtualGateways(array $args = [])
86
- * @method \GuzzleHttp\Promise\Promise describeVirtualGatewaysAsync(array $args = [])
87
- * @method \Aws\Result describeVirtualInterfaces(array $args = [])
88
- * @method \GuzzleHttp\Promise\Promise describeVirtualInterfacesAsync(array $args = [])
89
- * @method \Aws\Result disassociateConnectionFromLag(array $args = [])
90
- * @method \GuzzleHttp\Promise\Promise disassociateConnectionFromLagAsync(array $args = [])
91
- * @method \Aws\Result tagResource(array $args = [])
92
- * @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
93
- * @method \Aws\Result untagResource(array $args = [])
94
- * @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
95
- * @method \Aws\Result updateLag(array $args = [])
96
- * @method \GuzzleHttp\Promise\Promise updateLagAsync(array $args = [])
97
- */
98
- class DirectConnectClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DirectConnect/Exception/DirectConnectException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\DirectConnect\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the AWS Direct Connect service.
8
- */
9
- class DirectConnectException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DirectoryService/DirectoryServiceClient.php DELETED
@@ -1,108 +0,0 @@
1
- <?php
2
- namespace Aws\DirectoryService;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * AWS Directory Service client
8
- *
9
- * @method \Aws\Result acceptSharedDirectory(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise acceptSharedDirectoryAsync(array $args = [])
11
- * @method \Aws\Result addIpRoutes(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise addIpRoutesAsync(array $args = [])
13
- * @method \Aws\Result addTagsToResource(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise addTagsToResourceAsync(array $args = [])
15
- * @method \Aws\Result cancelSchemaExtension(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise cancelSchemaExtensionAsync(array $args = [])
17
- * @method \Aws\Result connectDirectory(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise connectDirectoryAsync(array $args = [])
19
- * @method \Aws\Result createAlias(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise createAliasAsync(array $args = [])
21
- * @method \Aws\Result createComputer(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise createComputerAsync(array $args = [])
23
- * @method \Aws\Result createConditionalForwarder(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise createConditionalForwarderAsync(array $args = [])
25
- * @method \Aws\Result createDirectory(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise createDirectoryAsync(array $args = [])
27
- * @method \Aws\Result createLogSubscription(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise createLogSubscriptionAsync(array $args = [])
29
- * @method \Aws\Result createMicrosoftAD(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise createMicrosoftADAsync(array $args = [])
31
- * @method \Aws\Result createSnapshot(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise createSnapshotAsync(array $args = [])
33
- * @method \Aws\Result createTrust(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise createTrustAsync(array $args = [])
35
- * @method \Aws\Result deleteConditionalForwarder(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise deleteConditionalForwarderAsync(array $args = [])
37
- * @method \Aws\Result deleteDirectory(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise deleteDirectoryAsync(array $args = [])
39
- * @method \Aws\Result deleteLogSubscription(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise deleteLogSubscriptionAsync(array $args = [])
41
- * @method \Aws\Result deleteSnapshot(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise deleteSnapshotAsync(array $args = [])
43
- * @method \Aws\Result deleteTrust(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise deleteTrustAsync(array $args = [])
45
- * @method \Aws\Result deregisterEventTopic(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise deregisterEventTopicAsync(array $args = [])
47
- * @method \Aws\Result describeConditionalForwarders(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise describeConditionalForwardersAsync(array $args = [])
49
- * @method \Aws\Result describeDirectories(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise describeDirectoriesAsync(array $args = [])
51
- * @method \Aws\Result describeDomainControllers(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise describeDomainControllersAsync(array $args = [])
53
- * @method \Aws\Result describeEventTopics(array $args = [])
54
- * @method \GuzzleHttp\Promise\Promise describeEventTopicsAsync(array $args = [])
55
- * @method \Aws\Result describeSharedDirectories(array $args = [])
56
- * @method \GuzzleHttp\Promise\Promise describeSharedDirectoriesAsync(array $args = [])
57
- * @method \Aws\Result describeSnapshots(array $args = [])
58
- * @method \GuzzleHttp\Promise\Promise describeSnapshotsAsync(array $args = [])
59
- * @method \Aws\Result describeTrusts(array $args = [])
60
- * @method \GuzzleHttp\Promise\Promise describeTrustsAsync(array $args = [])
61
- * @method \Aws\Result disableRadius(array $args = [])
62
- * @method \GuzzleHttp\Promise\Promise disableRadiusAsync(array $args = [])
63
- * @method \Aws\Result disableSso(array $args = [])
64
- * @method \GuzzleHttp\Promise\Promise disableSsoAsync(array $args = [])
65
- * @method \Aws\Result enableRadius(array $args = [])
66
- * @method \GuzzleHttp\Promise\Promise enableRadiusAsync(array $args = [])
67
- * @method \Aws\Result enableSso(array $args = [])
68
- * @method \GuzzleHttp\Promise\Promise enableSsoAsync(array $args = [])
69
- * @method \Aws\Result getDirectoryLimits(array $args = [])
70
- * @method \GuzzleHttp\Promise\Promise getDirectoryLimitsAsync(array $args = [])
71
- * @method \Aws\Result getSnapshotLimits(array $args = [])
72
- * @method \GuzzleHttp\Promise\Promise getSnapshotLimitsAsync(array $args = [])
73
- * @method \Aws\Result listIpRoutes(array $args = [])
74
- * @method \GuzzleHttp\Promise\Promise listIpRoutesAsync(array $args = [])
75
- * @method \Aws\Result listLogSubscriptions(array $args = [])
76
- * @method \GuzzleHttp\Promise\Promise listLogSubscriptionsAsync(array $args = [])
77
- * @method \Aws\Result listSchemaExtensions(array $args = [])
78
- * @method \GuzzleHttp\Promise\Promise listSchemaExtensionsAsync(array $args = [])
79
- * @method \Aws\Result listTagsForResource(array $args = [])
80
- * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
81
- * @method \Aws\Result registerEventTopic(array $args = [])
82
- * @method \GuzzleHttp\Promise\Promise registerEventTopicAsync(array $args = [])
83
- * @method \Aws\Result rejectSharedDirectory(array $args = [])
84
- * @method \GuzzleHttp\Promise\Promise rejectSharedDirectoryAsync(array $args = [])
85
- * @method \Aws\Result removeIpRoutes(array $args = [])
86
- * @method \GuzzleHttp\Promise\Promise removeIpRoutesAsync(array $args = [])
87
- * @method \Aws\Result removeTagsFromResource(array $args = [])
88
- * @method \GuzzleHttp\Promise\Promise removeTagsFromResourceAsync(array $args = [])
89
- * @method \Aws\Result resetUserPassword(array $args = [])
90
- * @method \GuzzleHttp\Promise\Promise resetUserPasswordAsync(array $args = [])
91
- * @method \Aws\Result restoreFromSnapshot(array $args = [])
92
- * @method \GuzzleHttp\Promise\Promise restoreFromSnapshotAsync(array $args = [])
93
- * @method \Aws\Result shareDirectory(array $args = [])
94
- * @method \GuzzleHttp\Promise\Promise shareDirectoryAsync(array $args = [])
95
- * @method \Aws\Result startSchemaExtension(array $args = [])
96
- * @method \GuzzleHttp\Promise\Promise startSchemaExtensionAsync(array $args = [])
97
- * @method \Aws\Result unshareDirectory(array $args = [])
98
- * @method \GuzzleHttp\Promise\Promise unshareDirectoryAsync(array $args = [])
99
- * @method \Aws\Result updateConditionalForwarder(array $args = [])
100
- * @method \GuzzleHttp\Promise\Promise updateConditionalForwarderAsync(array $args = [])
101
- * @method \Aws\Result updateNumberOfDomainControllers(array $args = [])
102
- * @method \GuzzleHttp\Promise\Promise updateNumberOfDomainControllersAsync(array $args = [])
103
- * @method \Aws\Result updateRadius(array $args = [])
104
- * @method \GuzzleHttp\Promise\Promise updateRadiusAsync(array $args = [])
105
- * @method \Aws\Result verifyTrust(array $args = [])
106
- * @method \GuzzleHttp\Promise\Promise verifyTrustAsync(array $args = [])
107
- */
108
- class DirectoryServiceClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DirectoryService/Exception/DirectoryServiceException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\DirectoryService\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * AWS Directory Service Exception
8
- */
9
- class DirectoryServiceException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DoctrineCacheAdapter.php DELETED
@@ -1,55 +0,0 @@
1
- <?php
2
- namespace Aws;
3
-
4
- use Doctrine\Common\Cache\Cache;
5
-
6
- class DoctrineCacheAdapter implements CacheInterface, Cache
7
- {
8
- /** @var Cache */
9
- private $cache;
10
-
11
- public function __construct(Cache $cache)
12
- {
13
- $this->cache = $cache;
14
- }
15
-
16
- public function get($key)
17
- {
18
- return $this->cache->fetch($key);
19
- }
20
-
21
- public function fetch($key)
22
- {
23
- return $this->get($key);
24
- }
25
-
26
- public function set($key, $value, $ttl = 0)
27
- {
28
- return $this->cache->save($key, $value, $ttl);
29
- }
30
-
31
- public function save($key, $value, $ttl = 0)
32
- {
33
- return $this->set($key, $value, $ttl);
34
- }
35
-
36
- public function remove($key)
37
- {
38
- return $this->cache->delete($key);
39
- }
40
-
41
- public function delete($key)
42
- {
43
- return $this->remove($key);
44
- }
45
-
46
- public function contains($key)
47
- {
48
- return $this->cache->contains($key);
49
- }
50
-
51
- public function getStats()
52
- {
53
- return $this->cache->getStats();
54
- }
55
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DynamoDb/BinaryValue.php DELETED
@@ -1,36 +0,0 @@
1
- <?php
2
- namespace Aws\DynamoDb;
3
-
4
- use GuzzleHttp\Psr7;
5
-
6
- /**
7
- * Special object to represent a DynamoDB binary (B) value.
8
- */
9
- class BinaryValue implements \JsonSerializable
10
- {
11
- /** @var string Binary value. */
12
- private $value;
13
-
14
- /**
15
- * @param mixed $value A binary value compatible with Guzzle streams.
16
- *
17
- * @see GuzzleHttp\Stream\Stream::factory
18
- */
19
- public function __construct($value)
20
- {
21
- if (!is_string($value)) {
22
- $value = Psr7\stream_for($value);
23
- }
24
- $this->value = (string) $value;
25
- }
26
-
27
- public function jsonSerialize()
28
- {
29
- return $this->value;
30
- }
31
-
32
- public function __toString()
33
- {
34
- return $this->value;
35
- }
36
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DynamoDb/DynamoDbClient.php DELETED
@@ -1,140 +0,0 @@
1
- <?php
2
- namespace Aws\DynamoDb;
3
-
4
- use Aws\Api\Parser\Crc32ValidatingParser;
5
- use Aws\AwsClient;
6
- use Aws\ClientResolver;
7
- use Aws\HandlerList;
8
- use Aws\Middleware;
9
- use Aws\RetryMiddleware;
10
-
11
- /**
12
- * This client is used to interact with the **Amazon DynamoDB** service.
13
- *
14
- * @method \Aws\Result batchGetItem(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise batchGetItemAsync(array $args = [])
16
- * @method \Aws\Result batchWriteItem(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise batchWriteItemAsync(array $args = [])
18
- * @method \Aws\Result createTable(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise createTableAsync(array $args = [])
20
- * @method \Aws\Result deleteItem(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise deleteItemAsync(array $args = [])
22
- * @method \Aws\Result deleteTable(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise deleteTableAsync(array $args = [])
24
- * @method \Aws\Result describeTable(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise describeTableAsync(array $args = [])
26
- * @method \Aws\Result getItem(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise getItemAsync(array $args = [])
28
- * @method \Aws\Result listTables(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise listTablesAsync(array $args = [])
30
- * @method \Aws\Result putItem(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise putItemAsync(array $args = [])
32
- * @method \Aws\Result query(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise queryAsync(array $args = [])
34
- * @method \Aws\Result scan(array $args = [])
35
- * @method \GuzzleHttp\Promise\Promise scanAsync(array $args = [])
36
- * @method \Aws\Result updateItem(array $args = [])
37
- * @method \GuzzleHttp\Promise\Promise updateItemAsync(array $args = [])
38
- * @method \Aws\Result updateTable(array $args = [])
39
- * @method \GuzzleHttp\Promise\Promise updateTableAsync(array $args = [])
40
- * @method \Aws\Result createBackup(array $args = []) (supported in versions 2012-08-10)
41
- * @method \GuzzleHttp\Promise\Promise createBackupAsync(array $args = []) (supported in versions 2012-08-10)
42
- * @method \Aws\Result createGlobalTable(array $args = []) (supported in versions 2012-08-10)
43
- * @method \GuzzleHttp\Promise\Promise createGlobalTableAsync(array $args = []) (supported in versions 2012-08-10)
44
- * @method \Aws\Result deleteBackup(array $args = []) (supported in versions 2012-08-10)
45
- * @method \GuzzleHttp\Promise\Promise deleteBackupAsync(array $args = []) (supported in versions 2012-08-10)
46
- * @method \Aws\Result describeBackup(array $args = []) (supported in versions 2012-08-10)
47
- * @method \GuzzleHttp\Promise\Promise describeBackupAsync(array $args = []) (supported in versions 2012-08-10)
48
- * @method \Aws\Result describeContinuousBackups(array $args = []) (supported in versions 2012-08-10)
49
- * @method \GuzzleHttp\Promise\Promise describeContinuousBackupsAsync(array $args = []) (supported in versions 2012-08-10)
50
- * @method \Aws\Result describeEndpoints(array $args = []) (supported in versions 2012-08-10)
51
- * @method \GuzzleHttp\Promise\Promise describeEndpointsAsync(array $args = []) (supported in versions 2012-08-10)
52
- * @method \Aws\Result describeGlobalTable(array $args = []) (supported in versions 2012-08-10)
53
- * @method \GuzzleHttp\Promise\Promise describeGlobalTableAsync(array $args = []) (supported in versions 2012-08-10)
54
- * @method \Aws\Result describeGlobalTableSettings(array $args = []) (supported in versions 2012-08-10)
55
- * @method \GuzzleHttp\Promise\Promise describeGlobalTableSettingsAsync(array $args = []) (supported in versions 2012-08-10)
56
- * @method \Aws\Result describeLimits(array $args = []) (supported in versions 2012-08-10)
57
- * @method \GuzzleHttp\Promise\Promise describeLimitsAsync(array $args = []) (supported in versions 2012-08-10)
58
- * @method \Aws\Result describeTimeToLive(array $args = []) (supported in versions 2012-08-10)
59
- * @method \GuzzleHttp\Promise\Promise describeTimeToLiveAsync(array $args = []) (supported in versions 2012-08-10)
60
- * @method \Aws\Result listBackups(array $args = []) (supported in versions 2012-08-10)
61
- * @method \GuzzleHttp\Promise\Promise listBackupsAsync(array $args = []) (supported in versions 2012-08-10)
62
- * @method \Aws\Result listGlobalTables(array $args = []) (supported in versions 2012-08-10)
63
- * @method \GuzzleHttp\Promise\Promise listGlobalTablesAsync(array $args = []) (supported in versions 2012-08-10)
64
- * @method \Aws\Result listTagsOfResource(array $args = []) (supported in versions 2012-08-10)
65
- * @method \GuzzleHttp\Promise\Promise listTagsOfResourceAsync(array $args = []) (supported in versions 2012-08-10)
66
- * @method \Aws\Result restoreTableFromBackup(array $args = []) (supported in versions 2012-08-10)
67
- * @method \GuzzleHttp\Promise\Promise restoreTableFromBackupAsync(array $args = []) (supported in versions 2012-08-10)
68
- * @method \Aws\Result restoreTableToPointInTime(array $args = []) (supported in versions 2012-08-10)
69
- * @method \GuzzleHttp\Promise\Promise restoreTableToPointInTimeAsync(array $args = []) (supported in versions 2012-08-10)
70
- * @method \Aws\Result tagResource(array $args = []) (supported in versions 2012-08-10)
71
- * @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = []) (supported in versions 2012-08-10)
72
- * @method \Aws\Result untagResource(array $args = []) (supported in versions 2012-08-10)
73
- * @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = []) (supported in versions 2012-08-10)
74
- * @method \Aws\Result updateContinuousBackups(array $args = []) (supported in versions 2012-08-10)
75
- * @method \GuzzleHttp\Promise\Promise updateContinuousBackupsAsync(array $args = []) (supported in versions 2012-08-10)
76
- * @method \Aws\Result updateGlobalTable(array $args = []) (supported in versions 2012-08-10)
77
- * @method \GuzzleHttp\Promise\Promise updateGlobalTableAsync(array $args = []) (supported in versions 2012-08-10)
78
- * @method \Aws\Result updateGlobalTableSettings(array $args = []) (supported in versions 2012-08-10)
79
- * @method \GuzzleHttp\Promise\Promise updateGlobalTableSettingsAsync(array $args = []) (supported in versions 2012-08-10)
80
- * @method \Aws\Result updateTimeToLive(array $args = []) (supported in versions 2012-08-10)
81
- * @method \GuzzleHttp\Promise\Promise updateTimeToLiveAsync(array $args = []) (supported in versions 2012-08-10)
82
- */
83
- class DynamoDbClient extends AwsClient
84
- {
85
- public static function getArguments()
86
- {
87
- $args = parent::getArguments();
88
- $args['retries']['default'] = 10;
89
- $args['retries']['fn'] = [__CLASS__, '_applyRetryConfig'];
90
- $args['api_provider']['fn'] = [__CLASS__, '_applyApiProvider'];
91
-
92
- return $args;
93
- }
94
-
95
- /**
96
- * Convenience method for instantiating and registering the DynamoDB
97
- * Session handler with this DynamoDB client object.
98
- *
99
- * @param array $config Array of options for the session handler factory
100
- *
101
- * @return SessionHandler
102
- */
103
- public function registerSessionHandler(array $config = [])
104
- {
105
- $handler = SessionHandler::fromClient($this, $config);
106
- $handler->register();
107
-
108
- return $handler;
109
- }
110
-
111
- /** @internal */
112
- public static function _applyRetryConfig($value, array &$args, HandlerList $list)
113
- {
114
- if (!$value) {
115
- return;
116
- }
117
-
118
- $list->appendSign(
119
- Middleware::retry(
120
- RetryMiddleware::createDefaultDecider($value),
121
- function ($retries) {
122
- return $retries
123
- ? RetryMiddleware::exponentialDelay($retries) / 2
124
- : 0;
125
- },
126
- isset($args['stats']['retries'])
127
- ? (bool) $args['stats']['retries']
128
- : false
129
- ),
130
- 'retry'
131
- );
132
- }
133
-
134
- /** @internal */
135
- public static function _applyApiProvider($value, array &$args, HandlerList $list)
136
- {
137
- ClientResolver::_apply_api_provider($value, $args, $list);
138
- $args['parser'] = new Crc32ValidatingParser($args['parser']);
139
- }
140
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DynamoDb/Exception/DynamoDbException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\DynamoDb\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the Amazon DynamoDB service.
8
- */
9
- class DynamoDbException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DynamoDb/LockingSessionConnection.php DELETED
@@ -1,62 +0,0 @@
1
- <?php
2
- namespace Aws\DynamoDb;
3
-
4
- use Aws\DynamoDb\Exception\DynamoDbException;
5
-
6
- /**
7
- * The locking connection adds locking logic to the read operation.
8
- */
9
- class LockingSessionConnection extends StandardSessionConnection
10
- {
11
- public function __construct(DynamoDbClient $client, array $config = [])
12
- {
13
- parent::__construct($client, $config + [
14
- 'max_lock_wait_time' => 10,
15
- 'min_lock_retry_microtime' => 10000,
16
- 'max_lock_retry_microtime' => 50000,
17
- ]);
18
- }
19
-
20
- /**
21
- * {@inheritdoc}
22
- * Retries the request until the lock can be acquired
23
- */
24
- public function read($id)
25
- {
26
- // Create the params for the UpdateItem operation so that a lock can be
27
- // set and item returned (via ReturnValues) in a one, atomic operation.
28
- $params = [
29
- 'TableName' => $this->config['table_name'],
30
- 'Key' => $this->formatKey($id),
31
- 'Expected' => ['lock' => ['Exists' => false]],
32
- 'AttributeUpdates' => ['lock' => ['Value' => ['N' => '1']]],
33
- 'ReturnValues' => 'ALL_NEW',
34
- ];
35
-
36
- // Acquire the lock and fetch the item data.
37
- $timeout = time() + $this->config['max_lock_wait_time'];
38
- while (true) {
39
- try {
40
- $item = [];
41
- $result = $this->client->updateItem($params);
42
- if (isset($result['Attributes'])) {
43
- foreach ($result['Attributes'] as $key => $value) {
44
- $item[$key] = current($value);
45
- }
46
- }
47
- return $item;
48
- } catch (DynamoDbException $e) {
49
- if ($e->getAwsErrorCode() === 'ConditionalCheckFailedException'
50
- && time() < $timeout
51
- ) {
52
- usleep(rand(
53
- $this->config['min_lock_retry_microtime'],
54
- $this->config['max_lock_retry_microtime']
55
- ));
56
- } else {
57
- break;
58
- }
59
- }
60
- }
61
- }
62
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DynamoDb/Marshaler.php DELETED
@@ -1,324 +0,0 @@
1
- <?php
2
- namespace Aws\DynamoDb;
3
-
4
- use Psr\Http\Message\StreamInterface;
5
-
6
- /**
7
- * Marshals and unmarshals JSON documents and PHP arrays into DynamoDB items.
8
- */
9
- class Marshaler
10
- {
11
- /** @var array Default options to merge into provided options. */
12
- private static $defaultOptions = [
13
- 'ignore_invalid' => false,
14
- 'nullify_invalid' => false,
15
- 'wrap_numbers' => false,
16
- ];
17
-
18
- /** @var array Marshaler options. */
19
- private $options;
20
-
21
- /**
22
- * Instantiates a DynamoDB Marshaler.
23
- *
24
- * The following options are valid.
25
- *
26
- * - ignore_invalid: (bool) Set to `true` if invalid values should be
27
- * ignored (i.e., not included) during marshaling.
28
- * - nullify_invalid: (bool) Set to `true` if invalid values should be set
29
- * to null.
30
- * - wrap_numbers: (bool) Set to `true` to wrap numbers with `NumberValue`
31
- * objects during unmarshaling to preserve the precision.
32
- *
33
- * @param array $options Marshaler options
34
- */
35
- public function __construct(array $options = [])
36
- {
37
- $this->options = $options + self::$defaultOptions;
38
- }
39
-
40
- /**
41
- * Creates a special object to represent a DynamoDB binary (B) value.
42
- *
43
- * This helps disambiguate binary values from string (S) values.
44
- *
45
- * @param mixed $value A binary value compatible with Guzzle streams.
46
- *
47
- * @return BinaryValue
48
- * @see GuzzleHttp\Stream\Stream::factory
49
- */
50
- public function binary($value)
51
- {
52
- return new BinaryValue($value);
53
- }
54
-
55
- /**
56
- * Creates a special object to represent a DynamoDB number (N) value.
57
- *
58
- * This helps maintain the precision of large integer/float in PHP.
59
- *
60
- * @param string|int|float $value A number value.
61
- *
62
- * @return NumberValue
63
- */
64
- public function number($value)
65
- {
66
- return new NumberValue($value);
67
- }
68
-
69
- /**
70
- * Creates a special object to represent a DynamoDB set (SS/NS/BS) value.
71
- *
72
- * This helps disambiguate set values from list (L) values.
73
- *
74
- * @param array $values The values of the set.
75
- *
76
- * @return SetValue
77
- *
78
- */
79
- public function set(array $values)
80
- {
81
- return new SetValue($values);
82
- }
83
-
84
- /**
85
- * Marshal a JSON document from a string to a DynamoDB item.
86
- *
87
- * The result is an array formatted in the proper parameter structure
88
- * required by the DynamoDB API for items.
89
- *
90
- * @param string $json A valid JSON document.
91
- *
92
- * @return array Item formatted for DynamoDB.
93
- * @throws \InvalidArgumentException if the JSON is invalid.
94
- */
95
- public function marshalJson($json)
96
- {
97
- $data = json_decode($json);
98
- if (!($data instanceof \stdClass)) {
99
- throw new \InvalidArgumentException(
100
- 'The JSON document must be valid and be an object at its root.'
101
- );
102
- }
103
-
104
- return current($this->marshalValue($data));
105
- }
106
-
107
- /**
108
- * Marshal a native PHP array of data to a DynamoDB item.
109
- *
110
- * The result is an array formatted in the proper parameter structure
111
- * required by the DynamoDB API for items.
112
- *
113
- * @param array|\stdClass $item An associative array of data.
114
- *
115
- * @return array Item formatted for DynamoDB.
116
- */
117
- public function marshalItem($item)
118
- {
119
- return current($this->marshalValue($item));
120
- }
121
-
122
- /**
123
- * Marshal a native PHP value into a DynamoDB attribute value.
124
- *
125
- * The result is an associative array that is formatted in the proper
126
- * `[TYPE => VALUE]` parameter structure required by the DynamoDB API.
127
- *
128
- * @param mixed $value A scalar, array, or `stdClass` value.
129
- *
130
- * @return array Attribute formatted for DynamoDB.
131
- * @throws \UnexpectedValueException if the value cannot be marshaled.
132
- */
133
- public function marshalValue($value)
134
- {
135
- $type = gettype($value);
136
-
137
- // Handle string values.
138
- if ($type === 'string') {
139
- if ($value === '') {
140
- return $this->handleInvalid('empty strings are invalid');
141
- }
142
-
143
- return ['S' => $value];
144
- }
145
-
146
- // Handle number values.
147
- if ($type === 'integer'
148
- || $type === 'double'
149
- || $value instanceof NumberValue
150
- ) {
151
- return ['N' => (string) $value];
152
- }
153
-
154
- // Handle boolean values.
155
- if ($type === 'boolean') {
156
- return ['BOOL' => $value];
157
- }
158
-
159
- // Handle null values.
160
- if ($type === 'NULL') {
161
- return ['NULL' => true];
162
- }
163
-
164
- // Handle set values.
165
- if ($value instanceof SetValue) {
166
- if (count($value) === 0) {
167
- return $this->handleInvalid('empty sets are invalid');
168
- }
169
- $previousType = null;
170
- $data = [];
171
- foreach ($value as $v) {
172
- $marshaled = $this->marshalValue($v);
173
- $setType = key($marshaled);
174
- if (!$previousType) {
175
- $previousType = $setType;
176
- } elseif ($setType !== $previousType) {
177
- return $this->handleInvalid('sets must be uniform in type');
178
- }
179
- $data[] = current($marshaled);
180
- }
181
-
182
- return [$previousType . 'S' => array_values(array_unique($data))];
183
- }
184
-
185
- // Handle list and map values.
186
- $dbType = 'L';
187
- if ($value instanceof \stdClass) {
188
- $type = 'array';
189
- $dbType = 'M';
190
- }
191
- if ($type === 'array' || $value instanceof \Traversable) {
192
- $data = [];
193
- $index = 0;
194
- foreach ($value as $k => $v) {
195
- if ($v = $this->marshalValue($v)) {
196
- $data[$k] = $v;
197
- if ($dbType === 'L' && (!is_int($k) || $k != $index++)) {
198
- $dbType = 'M';
199
- }
200
- }
201
- }
202
- return [$dbType => $data];
203
- }
204
-
205
- // Handle binary values.
206
- if (is_resource($value) || $value instanceof StreamInterface) {
207
- $value = $this->binary($value);
208
- }
209
- if ($value instanceof BinaryValue) {
210
- return ['B' => (string) $value];
211
- }
212
-
213
- // Handle invalid values.
214
- return $this->handleInvalid('encountered unexpected value');
215
- }
216
-
217
- /**
218
- * Unmarshal a document (item) from a DynamoDB operation result into a JSON
219
- * document string.
220
- *
221
- * @param array $data Item/document from a DynamoDB result.
222
- * @param int $jsonEncodeFlags Flags to use with `json_encode()`.
223
- *
224
- * @return string
225
- */
226
- public function unmarshalJson(array $data, $jsonEncodeFlags = 0)
227
- {
228
- return json_encode(
229
- $this->unmarshalValue(['M' => $data], true),
230
- $jsonEncodeFlags
231
- );
232
- }
233
-
234
- /**
235
- * Unmarshal an item from a DynamoDB operation result into a native PHP
236
- * array. If you set $mapAsObject to true, then a stdClass value will be
237
- * returned instead.
238
- *
239
- * @param array $data Item from a DynamoDB result.
240
- * @param bool $mapAsObject Whether maps should be represented as stdClass.
241
- *
242
- * @return array|\stdClass
243
- */
244
- public function unmarshalItem(array $data, $mapAsObject = false)
245
- {
246
- return $this->unmarshalValue(['M' => $data], $mapAsObject);
247
- }
248
-
249
- /**
250
- * Unmarshal a value from a DynamoDB operation result into a native PHP
251
- * value. Will return a scalar, array, or (if you set $mapAsObject to true)
252
- * stdClass value.
253
- *
254
- * @param array $value Value from a DynamoDB result.
255
- * @param bool $mapAsObject Whether maps should be represented as stdClass.
256
- *
257
- * @return mixed
258
- * @throws \UnexpectedValueException
259
- */
260
- public function unmarshalValue(array $value, $mapAsObject = false)
261
- {
262
- $type = key($value);
263
- $value = $value[$type];
264
- switch ($type) {
265
- case 'S':
266
- case 'BOOL':
267
- return $value;
268
- case 'NULL':
269
- return null;
270
- case 'N':
271
- if ($this->options['wrap_numbers']) {
272
- return new NumberValue($value);
273
- }
274
-
275
- // Use type coercion to unmarshal numbers to int/float.
276
- return $value + 0;
277
- case 'M':
278
- if ($mapAsObject) {
279
- $data = new \stdClass;
280
- foreach ($value as $k => $v) {
281
- $data->$k = $this->unmarshalValue($v, $mapAsObject);
282
- }
283
- return $data;
284
- }
285
- // NOBREAK: Unmarshal M the same way as L, for arrays.
286
- case 'L':
287
- foreach ($value as $k => $v) {
288
- $value[$k] = $this->unmarshalValue($v, $mapAsObject);
289
- }
290
- return $value;
291
- case 'B':
292
- return new BinaryValue($value);
293
- case 'SS':
294
- case 'NS':
295
- case 'BS':
296
- foreach ($value as $k => $v) {
297
- $value[$k] = $this->unmarshalValue([$type[0] => $v]);
298
- }
299
- return new SetValue($value);
300
- }
301
-
302
- throw new \UnexpectedValueException("Unexpected type: {$type}.");
303
- }
304
-
305
- /**
306
- * Handle invalid value based on marshaler configuration.
307
- *
308
- * @param string $message Error message
309
- *
310
- * @return array|null
311
- */
312
- private function handleInvalid($message)
313
- {
314
- if ($this->options['ignore_invalid']) {
315
- return null;
316
- }
317
-
318
- if ($this->options['nullify_invalid']) {
319
- return ['NULL' => true];
320
- }
321
-
322
- throw new \UnexpectedValueException("Marshaling error: {$message}.");
323
- }
324
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DynamoDb/NumberValue.php DELETED
@@ -1,29 +0,0 @@
1
- <?php
2
- namespace Aws\DynamoDb;
3
-
4
- /**
5
- * Special object to represent a DynamoDB Number (N) value.
6
- */
7
- class NumberValue implements \JsonSerializable
8
- {
9
- /** @var string Number value. */
10
- private $value;
11
-
12
- /**
13
- * @param string|int|float $value A number value.
14
- */
15
- public function __construct($value)
16
- {
17
- $this->value = (string) $value;
18
- }
19
-
20
- public function jsonSerialize()
21
- {
22
- return $this->value;
23
- }
24
-
25
- public function __toString()
26
- {
27
- return $this->value;
28
- }
29
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DynamoDb/SessionConnectionInterface.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
- namespace Aws\DynamoDb;
3
-
4
- /**
5
- * The session connection provides the underlying logic for interacting with
6
- * Amazon DynamoDB and performs all of the reading and writing operations.
7
- */
8
- interface SessionConnectionInterface
9
- {
10
- /**
11
- * Reads session data from DynamoDB
12
- *
13
- * @param string $id Session ID
14
- *
15
- * @return array
16
- */
17
- public function read($id);
18
-
19
- /**
20
- * Writes session data to DynamoDB
21
- *
22
- * @param string $id Session ID
23
- * @param string $data Serialized session data
24
- * @param bool $isChanged Whether or not the data has changed
25
- *
26
- * @return bool
27
- */
28
- public function write($id, $data, $isChanged);
29
-
30
- /**
31
- * Deletes session record from DynamoDB
32
- *
33
- * @param string $id Session ID
34
- *
35
- * @return bool
36
- */
37
- public function delete($id);
38
-
39
- /**
40
- * Performs garbage collection on the sessions stored in the DynamoDB
41
- *
42
- * @return bool
43
- */
44
- public function deleteExpired();
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DynamoDb/SessionHandler.php DELETED
@@ -1,227 +0,0 @@
1
- <?php
2
- namespace Aws\DynamoDb;
3
-
4
- /**
5
- * Provides an interface for using Amazon DynamoDB as a session store by hooking
6
- * into PHP's session handler hooks. Once registered, You may use the native
7
- * `$_SESSION` superglobal and session functions, and the sessions will be
8
- * stored automatically in DynamoDB. DynamoDB is a great session storage
9
- * solution due to its speed, scalability, and fault tolerance.
10
- *
11
- * For maximum performance, we recommend that you keep the size of your sessions
12
- * small. Locking is disabled by default, since it can drive up latencies and
13
- * costs under high traffic. Only turn it on if you need it.
14
- *
15
- * By far, the most expensive operation is garbage collection. Therefore, we
16
- * encourage you to carefully consider your session garbage collection strategy.
17
- * Note: the DynamoDB Session Handler does not allow garbage collection to be
18
- * triggered randomly. You must run garbage collection manually or through other
19
- * automated means using a cron job or similar scheduling technique.
20
- */
21
- class SessionHandler implements \SessionHandlerInterface
22
- {
23
- /** @var SessionConnectionInterface Session save logic.*/
24
- private $connection;
25
-
26
- /** @var string Session save path. */
27
- private $savePath;
28
-
29
- /** @var string Session name. */
30
- private $sessionName;
31
-
32
- /** @var string The last known session ID */
33
- private $openSessionId = '';
34
-
35
- /** @var string Stores serialized data for tracking changes. */
36
- private $dataRead = '';
37
-
38
- /** @var bool Keeps track of whether the session has been written. */
39
- private $sessionWritten = false;
40
-
41
- /**
42
- * Creates a new DynamoDB Session Handler.
43
- *
44
- * The configuration array accepts the following array keys and values:
45
- * - table_name: Name of table to store the sessions.
46
- * - hash_key: Name of hash key in table. Default: "id".
47
- * - session_lifetime: Lifetime of inactive sessions expiration.
48
- * - consistent_read: Whether or not to use consistent reads.
49
- * - batch_config: Batch options used for garbage collection.
50
- * - locking: Whether or not to use session locking.
51
- * - max_lock_wait_time: Max time (s) to wait for lock acquisition.
52
- * - min_lock_retry_microtime: Min time (µs) to wait between lock attempts.
53
- * - max_lock_retry_microtime: Max time (µs) to wait between lock attempts.
54
- *
55
- * @param DynamoDbClient $client Client for doing DynamoDB operations
56
- * @param array $config Configuration for the Session Handler
57
- *
58
- * @return SessionHandler
59
- */
60
- public static function fromClient(DynamoDbClient $client, array $config = [])
61
- {
62
- $config += ['locking' => false];
63
- if ($config['locking']) {
64
- $connection = new LockingSessionConnection($client, $config);
65
- } else {
66
- $connection = new StandardSessionConnection($client, $config);
67
- }
68
-
69
- return new static($connection);
70
- }
71
-
72
- /**
73
- * @param SessionConnectionInterface $connection
74
- */
75
- public function __construct(SessionConnectionInterface $connection)
76
- {
77
- $this->connection = $connection;
78
- }
79
-
80
- /**
81
- * Register the DynamoDB session handler.
82
- *
83
- * @return bool Whether or not the handler was registered.
84
- * @codeCoverageIgnore
85
- */
86
- public function register()
87
- {
88
- return session_set_save_handler($this, true);
89
- }
90
-
91
- /**
92
- * Open a session for writing. Triggered by session_start().
93
- *
94
- * @param string $savePath Session save path.
95
- * @param string $sessionName Session name.
96
- *
97
- * @return bool Whether or not the operation succeeded.
98
- */
99
- public function open($savePath, $sessionName)
100
- {
101
- $this->savePath = $savePath;
102
- $this->sessionName = $sessionName;
103
-
104
- return true;
105
- }
106
-
107
- /**
108
- * Close a session from writing.
109
- *
110
- * @return bool Success
111
- */
112
- public function close()
113
- {
114
- $id = session_id();
115
- // Make sure the session is unlocked and the expiration time is updated,
116
- // even if the write did not occur
117
- if ($this->openSessionId !== $id || !$this->sessionWritten) {
118
- $result = $this->connection->write($this->formatId($id), '', false);
119
- $this->sessionWritten = (bool) $result;
120
- }
121
-
122
- return $this->sessionWritten;
123
- }
124
-
125
- /**
126
- * Read a session stored in DynamoDB.
127
- *
128
- * @param string $id Session ID.
129
- *
130
- * @return string Session data.
131
- */
132
- public function read($id)
133
- {
134
- $this->openSessionId = $id;
135
- // PHP expects an empty string to be returned from this method if no
136
- // data is retrieved
137
- $this->dataRead = '';
138
-
139
- // Get session data using the selected locking strategy
140
- $item = $this->connection->read($this->formatId($id));
141
-
142
- // Return the data if it is not expired. If it is expired, remove it
143
- if (isset($item['expires']) && isset($item['data'])) {
144
- $this->dataRead = $item['data'];
145
- if ($item['expires'] <= time()) {
146
- $this->dataRead = '';
147
- $this->destroy($id);
148
- }
149
- }
150
-
151
- return $this->dataRead;
152
- }
153
-
154
- /**
155
- * Write a session to DynamoDB.
156
- *
157
- * @param string $id Session ID.
158
- * @param string $data Serialized session data to write.
159
- *
160
- * @return bool Whether or not the operation succeeded.
161
- */
162
- public function write($id, $data)
163
- {
164
- $changed = $id !== $this->openSessionId
165
- || $data !== $this->dataRead;
166
- $this->openSessionId = $id;
167
-
168
- // Write the session data using the selected locking strategy
169
- $this->sessionWritten = $this->connection
170
- ->write($this->formatId($id), $data, $changed);
171
-
172
- return $this->sessionWritten;
173
- }
174
-
175
- /**
176
- * Delete a session stored in DynamoDB.
177
- *
178
- * @param string $id Session ID.
179
- *
180
- * @return bool Whether or not the operation succeeded.
181
- */
182
- public function destroy($id)
183
- {
184
- $this->openSessionId = $id;
185
- // Delete the session data using the selected locking strategy
186
- $this->sessionWritten
187
- = $this->connection->delete($this->formatId($id));
188
-
189
- return $this->sessionWritten;
190
- }
191
-
192
- /**
193
- * Satisfies the session handler interface, but does nothing. To do garbage
194
- * collection, you must manually call the garbageCollect() method.
195
- *
196
- * @param int $maxLifetime Ignored.
197
- *
198
- * @return bool Whether or not the operation succeeded.
199
- * @codeCoverageIgnore
200
- */
201
- public function gc($maxLifetime)
202
- {
203
- // Garbage collection for a DynamoDB table must be triggered manually.
204
- return true;
205
- }
206
-
207
- /**
208
- * Triggers garbage collection on expired sessions.
209
- * @codeCoverageIgnore
210
- */
211
- public function garbageCollect()
212
- {
213
- $this->connection->deleteExpired();
214
- }
215
-
216
- /**
217
- * Prepend the session ID with the session name.
218
- *
219
- * @param string $id The session ID.
220
- *
221
- * @return string Prepared session ID.
222
- */
223
- private function formatId($id)
224
- {
225
- return trim($this->sessionName . '_' . $id, '_');
226
- }
227
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DynamoDb/SetValue.php DELETED
@@ -1,44 +0,0 @@
1
- <?php
2
- namespace Aws\DynamoDb;
3
-
4
- /**
5
- * Special object to represent a DynamoDB set (SS/NS/BS) value.
6
- */
7
- class SetValue implements \JsonSerializable, \Countable, \IteratorAggregate
8
- {
9
- /** @var array Values in the set as provided. */
10
- private $values;
11
-
12
- /**
13
- * @param array $values Values in the set.
14
- */
15
- public function __construct(array $values)
16
- {
17
- $this->values = $values;
18
- }
19
-
20
- /**
21
- * Get the values formatted for PHP and JSON.
22
- *
23
- * @return array
24
- */
25
- public function toArray()
26
- {
27
- return $this->values;
28
- }
29
-
30
- public function count()
31
- {
32
- return count($this->values);
33
- }
34
-
35
- public function getIterator()
36
- {
37
- return new \ArrayIterator($this->values);
38
- }
39
-
40
- public function jsonSerialize()
41
- {
42
- return $this->toArray();
43
- }
44
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DynamoDb/StandardSessionConnection.php DELETED
@@ -1,149 +0,0 @@
1
- <?php
2
- namespace Aws\DynamoDb;
3
-
4
- use Aws\DynamoDb\Exception\DynamoDbException;
5
-
6
- /**
7
- * The standard connection performs the read and write operations to DynamoDB.
8
- */
9
- class StandardSessionConnection implements SessionConnectionInterface
10
- {
11
- /** @var DynamoDbClient The DynamoDB client */
12
- protected $client;
13
-
14
- /** @var array The session handler config options */
15
- protected $config;
16
-
17
- /**
18
- * @param DynamoDbClient $client DynamoDB client
19
- * @param array $config Session handler config
20
- */
21
- public function __construct(DynamoDbClient $client, array $config = [])
22
- {
23
- $this->client = $client;
24
- $this->config = $config + [
25
- 'table_name' => 'sessions',
26
- 'hash_key' => 'id',
27
- 'session_lifetime' => (int) ini_get('session.gc_maxlifetime'),
28
- 'consistent_read' => true,
29
- 'batch_config' => [],
30
- ];
31
- }
32
-
33
- public function read($id)
34
- {
35
- $item = [];
36
- try {
37
- // Execute a GetItem command to retrieve the item.
38
- $result = $this->client->getItem([
39
- 'TableName' => $this->config['table_name'],
40
- 'Key' => $this->formatKey($id),
41
- 'ConsistentRead' => (bool) $this->config['consistent_read'],
42
- ]);
43
-
44
- // Get the item values
45
- $result = isset($result['Item']) ? $result['Item'] : [];
46
- foreach ($result as $key => $value) {
47
- $item[$key] = current($value);
48
- }
49
- } catch (DynamoDbException $e) {
50
- // Could not retrieve item, so return nothing.
51
- }
52
-
53
- return $item;
54
- }
55
-
56
- public function write($id, $data, $isChanged)
57
- {
58
- // Prepare the attributes
59
- $expires = time() + $this->config['session_lifetime'];
60
- $attributes = [
61
- 'expires' => ['Value' => ['N' => (string) $expires]],
62
- 'lock' => ['Action' => 'DELETE'],
63
- ];
64
- if ($isChanged) {
65
- if ($data != '') {
66
- $attributes['data'] = ['Value' => ['S' => $data]];
67
- } else {
68
- $attributes['data'] = ['Action' => 'DELETE'];
69
- }
70
- }
71
-
72
- // Perform the UpdateItem command
73
- try {
74
- return (bool) $this->client->updateItem([
75
- 'TableName' => $this->config['table_name'],
76
- 'Key' => $this->formatKey($id),
77
- 'AttributeUpdates' => $attributes,
78
- ]);
79
- } catch (DynamoDbException $e) {
80
- return $this->triggerError("Error writing session $id: {$e->getMessage()}");
81
- }
82
- }
83
-
84
- public function delete($id)
85
- {
86
- try {
87
- return (bool) $this->client->deleteItem([
88
- 'TableName' => $this->config['table_name'],
89
- 'Key' => $this->formatKey($id),
90
- ]);
91
- } catch (DynamoDbException $e) {
92
- return $this->triggerError("Error deleting session $id: {$e->getMessage()}");
93
- }
94
- }
95
-
96
- public function deleteExpired()
97
- {
98
- // Create a Scan iterator for finding expired session items
99
- $scan = $this->client->getPaginator('Scan', [
100
- 'TableName' => $this->config['table_name'],
101
- 'AttributesToGet' => [$this->config['hash_key']],
102
- 'ScanFilter' => [
103
- 'expires' => [
104
- 'ComparisonOperator' => 'LT',
105
- 'AttributeValueList' => [['N' => (string) time()]],
106
- ],
107
- 'lock' => [
108
- 'ComparisonOperator' => 'NULL',
109
- ]
110
- ],
111
- ]);
112
-
113
- // Create a WriteRequestBatch for deleting the expired items
114
- $batch = new WriteRequestBatch($this->client, $this->config['batch_config']);
115
-
116
- // Perform Scan and BatchWriteItem (delete) operations as needed
117
- foreach ($scan->search('Items') as $item) {
118
- $batch->delete(
119
- [$this->config['hash_key'] => $item[$this->config['hash_key']]],
120
- $this->config['table_name']
121
- );
122
- }
123
-
124
- // Delete any remaining items that were not auto-flushed
125
- $batch->flush();
126
- }
127
-
128
- /**
129
- * @param string $key
130
- *
131
- * @return array
132
- */
133
- protected function formatKey($key)
134
- {
135
- return [$this->config['hash_key'] => ['S' => $key]];
136
- }
137
-
138
- /**
139
- * @param string $error
140
- *
141
- * @return bool
142
- */
143
- protected function triggerError($error)
144
- {
145
- trigger_error($error, E_USER_WARNING);
146
-
147
- return false;
148
- }
149
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DynamoDb/WriteRequestBatch.php DELETED
@@ -1,266 +0,0 @@
1
- <?php
2
- namespace Aws\DynamoDb;
3
-
4
- use Aws\CommandInterface;
5
- use Aws\CommandPool;
6
- use Aws\Exception\AwsException;
7
- use Aws\ResultInterface;
8
-
9
- /**
10
- * The WriteRequestBatch is an object that is capable of efficiently sending
11
- * DynamoDB BatchWriteItem requests from queued up put and delete item requests.
12
- * requests. The batch attempts to send the requests with the fewest requests
13
- * to DynamoDB as possible and also re-queues any unprocessed items to ensure
14
- * that all items are sent.
15
- */
16
- class WriteRequestBatch
17
- {
18
- /** @var DynamoDbClient DynamoDB client used to perform write operations. */
19
- private $client;
20
-
21
- /** @var array Configuration options for the batch. */
22
- private $config;
23
-
24
- /** @var array Queue of pending put/delete requests in the batch. */
25
- private $queue;
26
-
27
- /**
28
- * Creates a WriteRequestBatch object that is capable of efficiently sending
29
- * DynamoDB BatchWriteItem requests from queued up Put and Delete requests.
30
- *
31
- * @param DynamoDbClient $client DynamoDB client used to send batches.
32
- * @param array $config Batch configuration options.
33
- * - table: (string) DynamoDB table used by the batch, this can be
34
- * overridden for each individual put() or delete() call.
35
- * - batch_size: (int) The size of each batch (default: 25). The batch
36
- * size must be between 2 and 25. If you are sending batches of large
37
- * items, you may consider lowering the batch size, otherwise, you
38
- * should use 25.
39
- * - pool_size: (int) This number dictates how many BatchWriteItem
40
- * requests you would like to do in parallel. For example, if the
41
- * "batch_size" is 25, and "pool_size" is 3, then you would send 3
42
- * BatchWriteItem requests at a time, each with 25 items. Please keep
43
- * your throughput in mind when choosing the "pool_size" option.
44
- * - autoflush: (bool) This option allows the batch to automatically
45
- * flush once there are enough items (i.e., "batch_size" * "pool_size")
46
- * in the queue. This defaults to true, so you must set this to false
47
- * to stop autoflush.
48
- * - before: (callable) Executed before every BatchWriteItem operation.
49
- * It should accept an \Aws\CommandInterface object as its argument.
50
- * - error: Executed if an error was encountered executing a,
51
- * BatchWriteItem operation, otherwise errors are ignored. It should
52
- * accept an \Aws\Exception\AwsException as its argument.
53
- *
54
- * @throws \InvalidArgumentException if the batch size is not between 2 and 25.
55
- */
56
- public function __construct(DynamoDbClient $client, array $config = [])
57
- {
58
- // Apply defaults
59
- $config += [
60
- 'table' => null,
61
- 'batch_size' => 25,
62
- 'pool_size' => 1,
63
- 'autoflush' => true,
64
- 'before' => null,
65
- 'error' => null
66
- ];
67
-
68
- // Ensure the batch size is valid
69
- if ($config['batch_size'] > 25 || $config['batch_size'] < 2) {
70
- throw new \InvalidArgumentException('"batch_size" must be between 2 and 25.');
71
- }
72
-
73
- // Ensure the callbacks are valid
74
- if ($config['before'] && !is_callable($config['before'])) {
75
- throw new \InvalidArgumentException('"before" must be callable.');
76
- }
77
- if ($config['error'] && !is_callable($config['error'])) {
78
- throw new \InvalidArgumentException('"error" must be callable.');
79
- }
80
-
81
- // If autoflush is enabled, set the threshold
82
- if ($config['autoflush']) {
83
- $config['threshold'] = $config['batch_size'] * $config['pool_size'];
84
- }
85
-
86
- $this->client = $client;
87
- $this->config = $config;
88
- $this->queue = [];
89
- }
90
-
91
- /**
92
- * Adds a put item request to the batch.
93
- *
94
- * @param array $item Data for an item to put. Format:
95
- * [
96
- * 'attribute1' => ['type' => 'value'],
97
- * 'attribute2' => ['type' => 'value'],
98
- * ...
99
- * ]
100
- * @param string|null $table The name of the table. This must be specified
101
- * unless the "table" option was provided in the
102
- * config of the WriteRequestBatch.
103
- *
104
- * @return $this
105
- */
106
- public function put(array $item, $table = null)
107
- {
108
- $this->queue[] = [
109
- 'table' => $this->determineTable($table),
110
- 'data' => ['PutRequest' => ['Item' => $item]],
111
- ];
112
-
113
- $this->autoFlush();
114
-
115
- return $this;
116
- }
117
-
118
- /**
119
- * Adds a delete item request to the batch.
120
- *
121
- * @param array $key Key of an item to delete. Format:
122
- * [
123
- * 'key1' => ['type' => 'value'],
124
- * ...
125
- * ]
126
- * @param string|null $table The name of the table. This must be specified
127
- * unless the "table" option was provided in the
128
- * config of the WriteRequestBatch.
129
- *
130
- * @return $this
131
- */
132
- public function delete(array $key, $table = null)
133
- {
134
- $this->queue[] = [
135
- 'table' => $this->determineTable($table),
136
- 'data' => ['DeleteRequest' => ['Key' => $key]],
137
- ];
138
-
139
- $this->autoFlush();
140
-
141
- return $this;
142
- }
143
-
144
- /**
145
- * Flushes the batch by combining all the queued put and delete requests
146
- * into BatchWriteItem commands and executing them. Unprocessed items are
147
- * automatically re-queued.
148
- *
149
- * @param bool $untilEmpty If true, flushing will continue until the queue
150
- * is completely empty. This will make sure that
151
- * unprocessed items are all eventually sent.
152
- *
153
- * @return $this
154
- */
155
- public function flush($untilEmpty = true)
156
- {
157
- // Send BatchWriteItem requests until the queue is empty
158
- $keepFlushing = true;
159
- while ($this->queue && $keepFlushing) {
160
- $commands = $this->prepareCommands();
161
- $pool = new CommandPool($this->client, $commands, [
162
- 'before' => $this->config['before'],
163
- 'concurrency' => $this->config['pool_size'],
164
- 'fulfilled' => function (ResultInterface $result) {
165
- // Re-queue any unprocessed items
166
- if ($result->hasKey('UnprocessedItems')) {
167
- $this->retryUnprocessed($result['UnprocessedItems']);
168
- }
169
- },
170
- 'rejected' => function ($reason) {
171
- if ($reason instanceof AwsException) {
172
- $code = $reason->getAwsErrorCode();
173
- if ($code === 'ProvisionedThroughputExceededException') {
174
- $this->retryUnprocessed($reason->getCommand()['RequestItems']);
175
- } elseif (is_callable($this->config['error'])) {
176
- $this->config['error']($reason);
177
- }
178
- }
179
- }
180
- ]);
181
- $pool->promise()->wait();
182
- $keepFlushing = (bool) $untilEmpty;
183
- }
184
-
185
- return $this;
186
- }
187
-
188
- /**
189
- * Creates BatchWriteItem commands from the items in the queue.
190
- *
191
- * @return CommandInterface[]
192
- */
193
- private function prepareCommands()
194
- {
195
- // Chunk the queue into batches
196
- $batches = array_chunk($this->queue, $this->config['batch_size']);
197
- $this->queue = [];
198
-
199
- // Create BatchWriteItem commands for each batch
200
- $commands = [];
201
- foreach ($batches as $batch) {
202
- $requests = [];
203
- foreach ($batch as $item) {
204
- if (!isset($requests[$item['table']])) {
205
- $requests[$item['table']] = [];
206
- }
207
- $requests[$item['table']][] = $item['data'];
208
- }
209
- $commands[] = $this->client->getCommand(
210
- 'BatchWriteItem',
211
- ['RequestItems' => $requests]
212
- );
213
- }
214
-
215
- return $commands;
216
- }
217
-
218
- /**
219
- * Re-queues unprocessed results with the correct data.
220
- *
221
- * @param array $unprocessed Unprocessed items from a result.
222
- */
223
- private function retryUnprocessed(array $unprocessed)
224
- {
225
- foreach ($unprocessed as $table => $requests) {
226
- foreach ($requests as $request) {
227
- $this->queue[] = [
228
- 'table' => $table,
229
- 'data' => $request,
230
- ];
231
- }
232
- }
233
- }
234
-
235
- /**
236
- * If autoflush is enabled and the threshold is met, flush the batch
237
- */
238
- private function autoFlush()
239
- {
240
- if ($this->config['autoflush']
241
- && count($this->queue) >= $this->config['threshold']
242
- ) {
243
- // Flush only once. Unprocessed items are handled in a later flush.
244
- $this->flush(false);
245
- }
246
- }
247
-
248
- /**
249
- * Determine the table name by looking at what was provided and what the
250
- * WriteRequestBatch was originally configured with.
251
- *
252
- * @param string|null $table The table name.
253
- *
254
- * @return string
255
- * @throws \RuntimeException if there was no table specified.
256
- */
257
- private function determineTable($table)
258
- {
259
- $table = $table ?: $this->config['table'];
260
- if (!$table) {
261
- throw new \RuntimeException('There was no table specified.');
262
- }
263
-
264
- return $table;
265
- }
266
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DynamoDbStreams/DynamoDbStreamsClient.php DELETED
@@ -1,29 +0,0 @@
1
- <?php
2
- namespace Aws\DynamoDbStreams;
3
-
4
- use Aws\AwsClient;
5
- use Aws\DynamoDb\DynamoDbClient;
6
-
7
- /**
8
- * This client is used to interact with the **Amazon DynamoDb Streams** service.
9
- *
10
- * @method \Aws\Result describeStream(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise describeStreamAsync(array $args = [])
12
- * @method \Aws\Result getRecords(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise getRecordsAsync(array $args = [])
14
- * @method \Aws\Result getShardIterator(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise getShardIteratorAsync(array $args = [])
16
- * @method \Aws\Result listStreams(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise listStreamsAsync(array $args = [])
18
- */
19
- class DynamoDbStreamsClient extends AwsClient
20
- {
21
- public static function getArguments()
22
- {
23
- $args = parent::getArguments();
24
- $args['retries']['default'] = 11;
25
- $args['retries']['fn'] = [DynamoDbClient::class, '_applyRetryConfig'];
26
-
27
- return $args;
28
- }
29
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/DynamoDbStreams/Exception/DynamoDbStreamsException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\DynamoDbStreams\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the Amazon DynamoDB Streams service.
8
- */
9
- class DynamoDbStreamsException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/EKS/EKSClient.php DELETED
@@ -1,17 +0,0 @@
1
- <?php
2
- namespace Aws\EKS;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon Elastic Container Service for Kubernetes** service.
8
- * @method \Aws\Result createCluster(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise createClusterAsync(array $args = [])
10
- * @method \Aws\Result deleteCluster(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise deleteClusterAsync(array $args = [])
12
- * @method \Aws\Result describeCluster(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise describeClusterAsync(array $args = [])
14
- * @method \Aws\Result listClusters(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise listClustersAsync(array $args = [])
16
- */
17
- class EKSClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/EKS/Exception/EKSException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\EKS\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **Amazon Elastic Container Service for Kubernetes** service.
8
- */
9
- class EKSException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Ec2/Ec2Client.php DELETED
@@ -1,606 +0,0 @@
1
- <?php
2
- namespace Aws\Ec2;
3
-
4
- use Aws\AwsClient;
5
- use Aws\Api\Service;
6
- use Aws\Api\DocModel;
7
- use Aws\Api\ApiProvider;
8
- use Aws\PresignUrlMiddleware;
9
-
10
- /**
11
- * Client used to interact with Amazon EC2.
12
- *
13
- * @method \Aws\Result acceptVpcPeeringConnection(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise acceptVpcPeeringConnectionAsync(array $args = [])
15
- * @method \Aws\Result allocateAddress(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise allocateAddressAsync(array $args = [])
17
- * @method \Aws\Result allocateHosts(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise allocateHostsAsync(array $args = [])
19
- * @method \Aws\Result assignPrivateIpAddresses(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise assignPrivateIpAddressesAsync(array $args = [])
21
- * @method \Aws\Result associateAddress(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise associateAddressAsync(array $args = [])
23
- * @method \Aws\Result associateDhcpOptions(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise associateDhcpOptionsAsync(array $args = [])
25
- * @method \Aws\Result associateRouteTable(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise associateRouteTableAsync(array $args = [])
27
- * @method \Aws\Result attachClassicLinkVpc(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise attachClassicLinkVpcAsync(array $args = [])
29
- * @method \Aws\Result attachInternetGateway(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise attachInternetGatewayAsync(array $args = [])
31
- * @method \Aws\Result attachNetworkInterface(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise attachNetworkInterfaceAsync(array $args = [])
33
- * @method \Aws\Result attachVolume(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise attachVolumeAsync(array $args = [])
35
- * @method \Aws\Result attachVpnGateway(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise attachVpnGatewayAsync(array $args = [])
37
- * @method \Aws\Result authorizeSecurityGroupEgress(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise authorizeSecurityGroupEgressAsync(array $args = [])
39
- * @method \Aws\Result authorizeSecurityGroupIngress(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise authorizeSecurityGroupIngressAsync(array $args = [])
41
- * @method \Aws\Result bundleInstance(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise bundleInstanceAsync(array $args = [])
43
- * @method \Aws\Result cancelBundleTask(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise cancelBundleTaskAsync(array $args = [])
45
- * @method \Aws\Result cancelConversionTask(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise cancelConversionTaskAsync(array $args = [])
47
- * @method \Aws\Result cancelExportTask(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise cancelExportTaskAsync(array $args = [])
49
- * @method \Aws\Result cancelImportTask(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise cancelImportTaskAsync(array $args = [])
51
- * @method \Aws\Result cancelReservedInstancesListing(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise cancelReservedInstancesListingAsync(array $args = [])
53
- * @method \Aws\Result cancelSpotFleetRequests(array $args = [])
54
- * @method \GuzzleHttp\Promise\Promise cancelSpotFleetRequestsAsync(array $args = [])
55
- * @method \Aws\Result cancelSpotInstanceRequests(array $args = [])
56
- * @method \GuzzleHttp\Promise\Promise cancelSpotInstanceRequestsAsync(array $args = [])
57
- * @method \Aws\Result confirmProductInstance(array $args = [])
58
- * @method \GuzzleHttp\Promise\Promise confirmProductInstanceAsync(array $args = [])
59
- * @method \Aws\Result copyImage(array $args = [])
60
- * @method \GuzzleHttp\Promise\Promise copyImageAsync(array $args = [])
61
- * @method \Aws\Result copySnapshot(array $args = [])
62
- * @method \GuzzleHttp\Promise\Promise copySnapshotAsync(array $args = [])
63
- * @method \Aws\Result createCustomerGateway(array $args = [])
64
- * @method \GuzzleHttp\Promise\Promise createCustomerGatewayAsync(array $args = [])
65
- * @method \Aws\Result createDhcpOptions(array $args = [])
66
- * @method \GuzzleHttp\Promise\Promise createDhcpOptionsAsync(array $args = [])
67
- * @method \Aws\Result createFlowLogs(array $args = [])
68
- * @method \GuzzleHttp\Promise\Promise createFlowLogsAsync(array $args = [])
69
- * @method \Aws\Result createImage(array $args = [])
70
- * @method \GuzzleHttp\Promise\Promise createImageAsync(array $args = [])
71
- * @method \Aws\Result createInstanceExportTask(array $args = [])
72
- * @method \GuzzleHttp\Promise\Promise createInstanceExportTaskAsync(array $args = [])
73
- * @method \Aws\Result createInternetGateway(array $args = [])
74
- * @method \GuzzleHttp\Promise\Promise createInternetGatewayAsync(array $args = [])
75
- * @method \Aws\Result createKeyPair(array $args = [])
76
- * @method \GuzzleHttp\Promise\Promise createKeyPairAsync(array $args = [])
77
- * @method \Aws\Result createNatGateway(array $args = [])
78
- * @method \GuzzleHttp\Promise\Promise createNatGatewayAsync(array $args = [])
79
- * @method \Aws\Result createNetworkAcl(array $args = [])
80
- * @method \GuzzleHttp\Promise\Promise createNetworkAclAsync(array $args = [])
81
- * @method \Aws\Result createNetworkAclEntry(array $args = [])
82
- * @method \GuzzleHttp\Promise\Promise createNetworkAclEntryAsync(array $args = [])
83
- * @method \Aws\Result createNetworkInterface(array $args = [])
84
- * @method \GuzzleHttp\Promise\Promise createNetworkInterfaceAsync(array $args = [])
85
- * @method \Aws\Result createPlacementGroup(array $args = [])
86
- * @method \GuzzleHttp\Promise\Promise createPlacementGroupAsync(array $args = [])
87
- * @method \Aws\Result createReservedInstancesListing(array $args = [])
88
- * @method \GuzzleHttp\Promise\Promise createReservedInstancesListingAsync(array $args = [])
89
- * @method \Aws\Result createRoute(array $args = [])
90
- * @method \GuzzleHttp\Promise\Promise createRouteAsync(array $args = [])
91
- * @method \Aws\Result createRouteTable(array $args = [])
92
- * @method \GuzzleHttp\Promise\Promise createRouteTableAsync(array $args = [])
93
- * @method \Aws\Result createSecurityGroup(array $args = [])
94
- * @method \GuzzleHttp\Promise\Promise createSecurityGroupAsync(array $args = [])
95
- * @method \Aws\Result createSnapshot(array $args = [])
96
- * @method \GuzzleHttp\Promise\Promise createSnapshotAsync(array $args = [])
97
- * @method \Aws\Result createSpotDatafeedSubscription(array $args = [])
98
- * @method \GuzzleHttp\Promise\Promise createSpotDatafeedSubscriptionAsync(array $args = [])
99
- * @method \Aws\Result createSubnet(array $args = [])
100
- * @method \GuzzleHttp\Promise\Promise createSubnetAsync(array $args = [])
101
- * @method \Aws\Result createTags(array $args = [])
102
- * @method \GuzzleHttp\Promise\Promise createTagsAsync(array $args = [])
103
- * @method \Aws\Result createVolume(array $args = [])
104
- * @method \GuzzleHttp\Promise\Promise createVolumeAsync(array $args = [])
105
- * @method \Aws\Result createVpc(array $args = [])
106
- * @method \GuzzleHttp\Promise\Promise createVpcAsync(array $args = [])
107
- * @method \Aws\Result createVpcEndpoint(array $args = [])
108
- * @method \GuzzleHttp\Promise\Promise createVpcEndpointAsync(array $args = [])
109
- * @method \Aws\Result createVpcPeeringConnection(array $args = [])
110
- * @method \GuzzleHttp\Promise\Promise createVpcPeeringConnectionAsync(array $args = [])
111
- * @method \Aws\Result createVpnConnection(array $args = [])
112
- * @method \GuzzleHttp\Promise\Promise createVpnConnectionAsync(array $args = [])
113
- * @method \Aws\Result createVpnConnectionRoute(array $args = [])
114
- * @method \GuzzleHttp\Promise\Promise createVpnConnectionRouteAsync(array $args = [])
115
- * @method \Aws\Result createVpnGateway(array $args = [])
116
- * @method \GuzzleHttp\Promise\Promise createVpnGatewayAsync(array $args = [])
117
- * @method \Aws\Result deleteCustomerGateway(array $args = [])
118
- * @method \GuzzleHttp\Promise\Promise deleteCustomerGatewayAsync(array $args = [])
119
- * @method \Aws\Result deleteDhcpOptions(array $args = [])
120
- * @method \GuzzleHttp\Promise\Promise deleteDhcpOptionsAsync(array $args = [])
121
- * @method \Aws\Result deleteFlowLogs(array $args = [])
122
- * @method \GuzzleHttp\Promise\Promise deleteFlowLogsAsync(array $args = [])
123
- * @method \Aws\Result deleteInternetGateway(array $args = [])
124
- * @method \GuzzleHttp\Promise\Promise deleteInternetGatewayAsync(array $args = [])
125
- * @method \Aws\Result deleteKeyPair(array $args = [])
126
- * @method \GuzzleHttp\Promise\Promise deleteKeyPairAsync(array $args = [])
127
- * @method \Aws\Result deleteNatGateway(array $args = [])
128
- * @method \GuzzleHttp\Promise\Promise deleteNatGatewayAsync(array $args = [])
129
- * @method \Aws\Result deleteNetworkAcl(array $args = [])
130
- * @method \GuzzleHttp\Promise\Promise deleteNetworkAclAsync(array $args = [])
131
- * @method \Aws\Result deleteNetworkAclEntry(array $args = [])
132
- * @method \GuzzleHttp\Promise\Promise deleteNetworkAclEntryAsync(array $args = [])
133
- * @method \Aws\Result deleteNetworkInterface(array $args = [])
134
- * @method \GuzzleHttp\Promise\Promise deleteNetworkInterfaceAsync(array $args = [])
135
- * @method \Aws\Result deletePlacementGroup(array $args = [])
136
- * @method \GuzzleHttp\Promise\Promise deletePlacementGroupAsync(array $args = [])
137
- * @method \Aws\Result deleteRoute(array $args = [])
138
- * @method \GuzzleHttp\Promise\Promise deleteRouteAsync(array $args = [])
139
- * @method \Aws\Result deleteRouteTable(array $args = [])
140
- * @method \GuzzleHttp\Promise\Promise deleteRouteTableAsync(array $args = [])
141
- * @method \Aws\Result deleteSecurityGroup(array $args = [])
142
- * @method \GuzzleHttp\Promise\Promise deleteSecurityGroupAsync(array $args = [])
143
- * @method \Aws\Result deleteSnapshot(array $args = [])
144
- * @method \GuzzleHttp\Promise\Promise deleteSnapshotAsync(array $args = [])
145
- * @method \Aws\Result deleteSpotDatafeedSubscription(array $args = [])
146
- * @method \GuzzleHttp\Promise\Promise deleteSpotDatafeedSubscriptionAsync(array $args = [])
147
- * @method \Aws\Result deleteSubnet(array $args = [])
148
- * @method \GuzzleHttp\Promise\Promise deleteSubnetAsync(array $args = [])
149
- * @method \Aws\Result deleteTags(array $args = [])
150
- * @method \GuzzleHttp\Promise\Promise deleteTagsAsync(array $args = [])
151
- * @method \Aws\Result deleteVolume(array $args = [])
152
- * @method \GuzzleHttp\Promise\Promise deleteVolumeAsync(array $args = [])
153
- * @method \Aws\Result deleteVpc(array $args = [])
154
- * @method \GuzzleHttp\Promise\Promise deleteVpcAsync(array $args = [])
155
- * @method \Aws\Result deleteVpcEndpoints(array $args = [])
156
- * @method \GuzzleHttp\Promise\Promise deleteVpcEndpointsAsync(array $args = [])
157
- * @method \Aws\Result deleteVpcPeeringConnection(array $args = [])
158
- * @method \GuzzleHttp\Promise\Promise deleteVpcPeeringConnectionAsync(array $args = [])
159
- * @method \Aws\Result deleteVpnConnection(array $args = [])
160
- * @method \GuzzleHttp\Promise\Promise deleteVpnConnectionAsync(array $args = [])
161
- * @method \Aws\Result deleteVpnConnectionRoute(array $args = [])
162
- * @method \GuzzleHttp\Promise\Promise deleteVpnConnectionRouteAsync(array $args = [])
163
- * @method \Aws\Result deleteVpnGateway(array $args = [])
164
- * @method \GuzzleHttp\Promise\Promise deleteVpnGatewayAsync(array $args = [])
165
- * @method \Aws\Result deregisterImage(array $args = [])
166
- * @method \GuzzleHttp\Promise\Promise deregisterImageAsync(array $args = [])
167
- * @method \Aws\Result describeAccountAttributes(array $args = [])
168
- * @method \GuzzleHttp\Promise\Promise describeAccountAttributesAsync(array $args = [])
169
- * @method \Aws\Result describeAddresses(array $args = [])
170
- * @method \GuzzleHttp\Promise\Promise describeAddressesAsync(array $args = [])
171
- * @method \Aws\Result describeAvailabilityZones(array $args = [])
172
- * @method \GuzzleHttp\Promise\Promise describeAvailabilityZonesAsync(array $args = [])
173
- * @method \Aws\Result describeBundleTasks(array $args = [])
174
- * @method \GuzzleHttp\Promise\Promise describeBundleTasksAsync(array $args = [])
175
- * @method \Aws\Result describeClassicLinkInstances(array $args = [])
176
- * @method \GuzzleHttp\Promise\Promise describeClassicLinkInstancesAsync(array $args = [])
177
- * @method \Aws\Result describeConversionTasks(array $args = [])
178
- * @method \GuzzleHttp\Promise\Promise describeConversionTasksAsync(array $args = [])
179
- * @method \Aws\Result describeCustomerGateways(array $args = [])
180
- * @method \GuzzleHttp\Promise\Promise describeCustomerGatewaysAsync(array $args = [])
181
- * @method \Aws\Result describeDhcpOptions(array $args = [])
182
- * @method \GuzzleHttp\Promise\Promise describeDhcpOptionsAsync(array $args = [])
183
- * @method \Aws\Result describeExportTasks(array $args = [])
184
- * @method \GuzzleHttp\Promise\Promise describeExportTasksAsync(array $args = [])
185
- * @method \Aws\Result describeFlowLogs(array $args = [])
186
- * @method \GuzzleHttp\Promise\Promise describeFlowLogsAsync(array $args = [])
187
- * @method \Aws\Result describeHosts(array $args = [])
188
- * @method \GuzzleHttp\Promise\Promise describeHostsAsync(array $args = [])
189
- * @method \Aws\Result describeIdFormat(array $args = [])
190
- * @method \GuzzleHttp\Promise\Promise describeIdFormatAsync(array $args = [])
191
- * @method \Aws\Result describeImageAttribute(array $args = [])
192
- * @method \GuzzleHttp\Promise\Promise describeImageAttributeAsync(array $args = [])
193
- * @method \Aws\Result describeImages(array $args = [])
194
- * @method \GuzzleHttp\Promise\Promise describeImagesAsync(array $args = [])
195
- * @method \Aws\Result describeImportImageTasks(array $args = [])
196
- * @method \GuzzleHttp\Promise\Promise describeImportImageTasksAsync(array $args = [])
197
- * @method \Aws\Result describeImportSnapshotTasks(array $args = [])
198
- * @method \GuzzleHttp\Promise\Promise describeImportSnapshotTasksAsync(array $args = [])
199
- * @method \Aws\Result describeInstanceAttribute(array $args = [])
200
- * @method \GuzzleHttp\Promise\Promise describeInstanceAttributeAsync(array $args = [])
201
- * @method \Aws\Result describeInstanceStatus(array $args = [])
202
- * @method \GuzzleHttp\Promise\Promise describeInstanceStatusAsync(array $args = [])
203
- * @method \Aws\Result describeInstances(array $args = [])
204
- * @method \GuzzleHttp\Promise\Promise describeInstancesAsync(array $args = [])
205
- * @method \Aws\Result describeInternetGateways(array $args = [])
206
- * @method \GuzzleHttp\Promise\Promise describeInternetGatewaysAsync(array $args = [])
207
- * @method \Aws\Result describeKeyPairs(array $args = [])
208
- * @method \GuzzleHttp\Promise\Promise describeKeyPairsAsync(array $args = [])
209
- * @method \Aws\Result describeMovingAddresses(array $args = [])
210
- * @method \GuzzleHttp\Promise\Promise describeMovingAddressesAsync(array $args = [])
211
- * @method \Aws\Result describeNatGateways(array $args = [])
212
- * @method \GuzzleHttp\Promise\Promise describeNatGatewaysAsync(array $args = [])
213
- * @method \Aws\Result describeNetworkAcls(array $args = [])
214
- * @method \GuzzleHttp\Promise\Promise describeNetworkAclsAsync(array $args = [])
215
- * @method \Aws\Result describeNetworkInterfaceAttribute(array $args = [])
216
- * @method \GuzzleHttp\Promise\Promise describeNetworkInterfaceAttributeAsync(array $args = [])
217
- * @method \Aws\Result describeNetworkInterfaces(array $args = [])
218
- * @method \GuzzleHttp\Promise\Promise describeNetworkInterfacesAsync(array $args = [])
219
- * @method \Aws\Result describePlacementGroups(array $args = [])
220
- * @method \GuzzleHttp\Promise\Promise describePlacementGroupsAsync(array $args = [])
221
- * @method \Aws\Result describePrefixLists(array $args = [])
222
- * @method \GuzzleHttp\Promise\Promise describePrefixListsAsync(array $args = [])
223
- * @method \Aws\Result describeRegions(array $args = [])
224
- * @method \GuzzleHttp\Promise\Promise describeRegionsAsync(array $args = [])
225
- * @method \Aws\Result describeReservedInstances(array $args = [])
226
- * @method \GuzzleHttp\Promise\Promise describeReservedInstancesAsync(array $args = [])
227
- * @method \Aws\Result describeReservedInstancesListings(array $args = [])
228
- * @method \GuzzleHttp\Promise\Promise describeReservedInstancesListingsAsync(array $args = [])
229
- * @method \Aws\Result describeReservedInstancesModifications(array $args = [])
230
- * @method \GuzzleHttp\Promise\Promise describeReservedInstancesModificationsAsync(array $args = [])
231
- * @method \Aws\Result describeReservedInstancesOfferings(array $args = [])
232
- * @method \GuzzleHttp\Promise\Promise describeReservedInstancesOfferingsAsync(array $args = [])
233
- * @method \Aws\Result describeRouteTables(array $args = [])
234
- * @method \GuzzleHttp\Promise\Promise describeRouteTablesAsync(array $args = [])
235
- * @method \Aws\Result describeScheduledInstanceAvailability(array $args = [])
236
- * @method \GuzzleHttp\Promise\Promise describeScheduledInstanceAvailabilityAsync(array $args = [])
237
- * @method \Aws\Result describeScheduledInstances(array $args = [])
238
- * @method \GuzzleHttp\Promise\Promise describeScheduledInstancesAsync(array $args = [])
239
- * @method \Aws\Result describeSecurityGroupReferences(array $args = [])
240
- * @method \GuzzleHttp\Promise\Promise describeSecurityGroupReferencesAsync(array $args = [])
241
- * @method \Aws\Result describeSecurityGroups(array $args = [])
242
- * @method \GuzzleHttp\Promise\Promise describeSecurityGroupsAsync(array $args = [])
243
- * @method \Aws\Result describeSnapshotAttribute(array $args = [])
244
- * @method \GuzzleHttp\Promise\Promise describeSnapshotAttributeAsync(array $args = [])
245
- * @method \Aws\Result describeSnapshots(array $args = [])
246
- * @method \GuzzleHttp\Promise\Promise describeSnapshotsAsync(array $args = [])
247
- * @method \Aws\Result describeSpotDatafeedSubscription(array $args = [])
248
- * @method \GuzzleHttp\Promise\Promise describeSpotDatafeedSubscriptionAsync(array $args = [])
249
- * @method \Aws\Result describeSpotFleetInstances(array $args = [])
250
- * @method \GuzzleHttp\Promise\Promise describeSpotFleetInstancesAsync(array $args = [])
251
- * @method \Aws\Result describeSpotFleetRequestHistory(array $args = [])
252
- * @method \GuzzleHttp\Promise\Promise describeSpotFleetRequestHistoryAsync(array $args = [])
253
- * @method \Aws\Result describeSpotFleetRequests(array $args = [])
254
- * @method \GuzzleHttp\Promise\Promise describeSpotFleetRequestsAsync(array $args = [])
255
- * @method \Aws\Result describeSpotInstanceRequests(array $args = [])
256
- * @method \GuzzleHttp\Promise\Promise describeSpotInstanceRequestsAsync(array $args = [])
257
- * @method \Aws\Result describeSpotPriceHistory(array $args = [])
258
- * @method \GuzzleHttp\Promise\Promise describeSpotPriceHistoryAsync(array $args = [])
259
- * @method \Aws\Result describeStaleSecurityGroups(array $args = [])
260
- * @method \GuzzleHttp\Promise\Promise describeStaleSecurityGroupsAsync(array $args = [])
261
- * @method \Aws\Result describeSubnets(array $args = [])
262
- * @method \GuzzleHttp\Promise\Promise describeSubnetsAsync(array $args = [])
263
- * @method \Aws\Result describeTags(array $args = [])
264
- * @method \GuzzleHttp\Promise\Promise describeTagsAsync(array $args = [])
265
- * @method \Aws\Result describeVolumeAttribute(array $args = [])
266
- * @method \GuzzleHttp\Promise\Promise describeVolumeAttributeAsync(array $args = [])
267
- * @method \Aws\Result describeVolumeStatus(array $args = [])
268
- * @method \GuzzleHttp\Promise\Promise describeVolumeStatusAsync(array $args = [])
269
- * @method \Aws\Result describeVolumes(array $args = [])
270
- * @method \GuzzleHttp\Promise\Promise describeVolumesAsync(array $args = [])
271
- * @method \Aws\Result describeVpcAttribute(array $args = [])
272
- * @method \GuzzleHttp\Promise\Promise describeVpcAttributeAsync(array $args = [])
273
- * @method \Aws\Result describeVpcClassicLink(array $args = [])
274
- * @method \GuzzleHttp\Promise\Promise describeVpcClassicLinkAsync(array $args = [])
275
- * @method \Aws\Result describeVpcClassicLinkDnsSupport(array $args = [])
276
- * @method \GuzzleHttp\Promise\Promise describeVpcClassicLinkDnsSupportAsync(array $args = [])
277
- * @method \Aws\Result describeVpcEndpointServices(array $args = [])
278
- * @method \GuzzleHttp\Promise\Promise describeVpcEndpointServicesAsync(array $args = [])
279
- * @method \Aws\Result describeVpcEndpoints(array $args = [])
280
- * @method \GuzzleHttp\Promise\Promise describeVpcEndpointsAsync(array $args = [])
281
- * @method \Aws\Result describeVpcPeeringConnections(array $args = [])
282
- * @method \GuzzleHttp\Promise\Promise describeVpcPeeringConnectionsAsync(array $args = [])
283
- * @method \Aws\Result describeVpcs(array $args = [])
284
- * @method \GuzzleHttp\Promise\Promise describeVpcsAsync(array $args = [])
285
- * @method \Aws\Result describeVpnConnections(array $args = [])
286
- * @method \GuzzleHttp\Promise\Promise describeVpnConnectionsAsync(array $args = [])
287
- * @method \Aws\Result describeVpnGateways(array $args = [])
288
- * @method \GuzzleHttp\Promise\Promise describeVpnGatewaysAsync(array $args = [])
289
- * @method \Aws\Result detachClassicLinkVpc(array $args = [])
290
- * @method \GuzzleHttp\Promise\Promise detachClassicLinkVpcAsync(array $args = [])
291
- * @method \Aws\Result detachInternetGateway(array $args = [])
292
- * @method \GuzzleHttp\Promise\Promise detachInternetGatewayAsync(array $args = [])
293
- * @method \Aws\Result detachNetworkInterface(array $args = [])
294
- * @method \GuzzleHttp\Promise\Promise detachNetworkInterfaceAsync(array $args = [])
295
- * @method \Aws\Result detachVolume(array $args = [])
296
- * @method \GuzzleHttp\Promise\Promise detachVolumeAsync(array $args = [])
297
- * @method \Aws\Result detachVpnGateway(array $args = [])
298
- * @method \GuzzleHttp\Promise\Promise detachVpnGatewayAsync(array $args = [])
299
- * @method \Aws\Result disableVgwRoutePropagation(array $args = [])
300
- * @method \GuzzleHttp\Promise\Promise disableVgwRoutePropagationAsync(array $args = [])
301
- * @method \Aws\Result disableVpcClassicLink(array $args = [])
302
- * @method \GuzzleHttp\Promise\Promise disableVpcClassicLinkAsync(array $args = [])
303
- * @method \Aws\Result disableVpcClassicLinkDnsSupport(array $args = [])
304
- * @method \GuzzleHttp\Promise\Promise disableVpcClassicLinkDnsSupportAsync(array $args = [])
305
- * @method \Aws\Result disassociateAddress(array $args = [])
306
- * @method \GuzzleHttp\Promise\Promise disassociateAddressAsync(array $args = [])
307
- * @method \Aws\Result disassociateRouteTable(array $args = [])
308
- * @method \GuzzleHttp\Promise\Promise disassociateRouteTableAsync(array $args = [])
309
- * @method \Aws\Result enableVgwRoutePropagation(array $args = [])
310
- * @method \GuzzleHttp\Promise\Promise enableVgwRoutePropagationAsync(array $args = [])
311
- * @method \Aws\Result enableVolumeIO(array $args = [])
312
- * @method \GuzzleHttp\Promise\Promise enableVolumeIOAsync(array $args = [])
313
- * @method \Aws\Result enableVpcClassicLink(array $args = [])
314
- * @method \GuzzleHttp\Promise\Promise enableVpcClassicLinkAsync(array $args = [])
315
- * @method \Aws\Result enableVpcClassicLinkDnsSupport(array $args = [])
316
- * @method \GuzzleHttp\Promise\Promise enableVpcClassicLinkDnsSupportAsync(array $args = [])
317
- * @method \Aws\Result getConsoleOutput(array $args = [])
318
- * @method \GuzzleHttp\Promise\Promise getConsoleOutputAsync(array $args = [])
319
- * @method \Aws\Result getConsoleScreenshot(array $args = [])
320
- * @method \GuzzleHttp\Promise\Promise getConsoleScreenshotAsync(array $args = [])
321
- * @method \Aws\Result getPasswordData(array $args = [])
322
- * @method \GuzzleHttp\Promise\Promise getPasswordDataAsync(array $args = [])
323
- * @method \Aws\Result importImage(array $args = [])
324
- * @method \GuzzleHttp\Promise\Promise importImageAsync(array $args = [])
325
- * @method \Aws\Result importInstance(array $args = [])
326
- * @method \GuzzleHttp\Promise\Promise importInstanceAsync(array $args = [])
327
- * @method \Aws\Result importKeyPair(array $args = [])
328
- * @method \GuzzleHttp\Promise\Promise importKeyPairAsync(array $args = [])
329
- * @method \Aws\Result importSnapshot(array $args = [])
330
- * @method \GuzzleHttp\Promise\Promise importSnapshotAsync(array $args = [])
331
- * @method \Aws\Result importVolume(array $args = [])
332
- * @method \GuzzleHttp\Promise\Promise importVolumeAsync(array $args = [])
333
- * @method \Aws\Result modifyHosts(array $args = [])
334
- * @method \GuzzleHttp\Promise\Promise modifyHostsAsync(array $args = [])
335
- * @method \Aws\Result modifyIdFormat(array $args = [])
336
- * @method \GuzzleHttp\Promise\Promise modifyIdFormatAsync(array $args = [])
337
- * @method \Aws\Result modifyImageAttribute(array $args = [])
338
- * @method \GuzzleHttp\Promise\Promise modifyImageAttributeAsync(array $args = [])
339
- * @method \Aws\Result modifyInstanceAttribute(array $args = [])
340
- * @method \GuzzleHttp\Promise\Promise modifyInstanceAttributeAsync(array $args = [])
341
- * @method \Aws\Result modifyInstancePlacement(array $args = [])
342
- * @method \GuzzleHttp\Promise\Promise modifyInstancePlacementAsync(array $args = [])
343
- * @method \Aws\Result modifyNetworkInterfaceAttribute(array $args = [])
344
- * @method \GuzzleHttp\Promise\Promise modifyNetworkInterfaceAttributeAsync(array $args = [])
345
- * @method \Aws\Result modifyReservedInstances(array $args = [])
346
- * @method \GuzzleHttp\Promise\Promise modifyReservedInstancesAsync(array $args = [])
347
- * @method \Aws\Result modifySnapshotAttribute(array $args = [])
348
- * @method \GuzzleHttp\Promise\Promise modifySnapshotAttributeAsync(array $args = [])
349
- * @method \Aws\Result modifySpotFleetRequest(array $args = [])
350
- * @method \GuzzleHttp\Promise\Promise modifySpotFleetRequestAsync(array $args = [])
351
- * @method \Aws\Result modifySubnetAttribute(array $args = [])
352
- * @method \GuzzleHttp\Promise\Promise modifySubnetAttributeAsync(array $args = [])
353
- * @method \Aws\Result modifyVolumeAttribute(array $args = [])
354
- * @method \GuzzleHttp\Promise\Promise modifyVolumeAttributeAsync(array $args = [])
355
- * @method \Aws\Result modifyVpcAttribute(array $args = [])
356
- * @method \GuzzleHttp\Promise\Promise modifyVpcAttributeAsync(array $args = [])
357
- * @method \Aws\Result modifyVpcEndpoint(array $args = [])
358
- * @method \GuzzleHttp\Promise\Promise modifyVpcEndpointAsync(array $args = [])
359
- * @method \Aws\Result modifyVpcPeeringConnectionOptions(array $args = [])
360
- * @method \GuzzleHttp\Promise\Promise modifyVpcPeeringConnectionOptionsAsync(array $args = [])
361
- * @method \Aws\Result monitorInstances(array $args = [])
362
- * @method \GuzzleHttp\Promise\Promise monitorInstancesAsync(array $args = [])
363
- * @method \Aws\Result moveAddressToVpc(array $args = [])
364
- * @method \GuzzleHttp\Promise\Promise moveAddressToVpcAsync(array $args = [])
365
- * @method \Aws\Result purchaseReservedInstancesOffering(array $args = [])
366
- * @method \GuzzleHttp\Promise\Promise purchaseReservedInstancesOfferingAsync(array $args = [])
367
- * @method \Aws\Result purchaseScheduledInstances(array $args = [])
368
- * @method \GuzzleHttp\Promise\Promise purchaseScheduledInstancesAsync(array $args = [])
369
- * @method \Aws\Result rebootInstances(array $args = [])
370
- * @method \GuzzleHttp\Promise\Promise rebootInstancesAsync(array $args = [])
371
- * @method \Aws\Result registerImage(array $args = [])
372
- * @method \GuzzleHttp\Promise\Promise registerImageAsync(array $args = [])
373
- * @method \Aws\Result rejectVpcPeeringConnection(array $args = [])
374
- * @method \GuzzleHttp\Promise\Promise rejectVpcPeeringConnectionAsync(array $args = [])
375
- * @method \Aws\Result releaseAddress(array $args = [])
376
- * @method \GuzzleHttp\Promise\Promise releaseAddressAsync(array $args = [])
377
- * @method \Aws\Result releaseHosts(array $args = [])
378
- * @method \GuzzleHttp\Promise\Promise releaseHostsAsync(array $args = [])
379
- * @method \Aws\Result replaceNetworkAclAssociation(array $args = [])
380
- * @method \GuzzleHttp\Promise\Promise replaceNetworkAclAssociationAsync(array $args = [])
381
- * @method \Aws\Result replaceNetworkAclEntry(array $args = [])
382
- * @method \GuzzleHttp\Promise\Promise replaceNetworkAclEntryAsync(array $args = [])
383
- * @method \Aws\Result replaceRoute(array $args = [])
384
- * @method \GuzzleHttp\Promise\Promise replaceRouteAsync(array $args = [])
385
- * @method \Aws\Result replaceRouteTableAssociation(array $args = [])
386
- * @method \GuzzleHttp\Promise\Promise replaceRouteTableAssociationAsync(array $args = [])
387
- * @method \Aws\Result reportInstanceStatus(array $args = [])
388
- * @method \GuzzleHttp\Promise\Promise reportInstanceStatusAsync(array $args = [])
389
- * @method \Aws\Result requestSpotFleet(array $args = [])
390
- * @method \GuzzleHttp\Promise\Promise requestSpotFleetAsync(array $args = [])
391
- * @method \Aws\Result requestSpotInstances(array $args = [])
392
- * @method \GuzzleHttp\Promise\Promise requestSpotInstancesAsync(array $args = [])
393
- * @method \Aws\Result resetImageAttribute(array $args = [])
394
- * @method \GuzzleHttp\Promise\Promise resetImageAttributeAsync(array $args = [])
395
- * @method \Aws\Result resetInstanceAttribute(array $args = [])
396
- * @method \GuzzleHttp\Promise\Promise resetInstanceAttributeAsync(array $args = [])
397
- * @method \Aws\Result resetNetworkInterfaceAttribute(array $args = [])
398
- * @method \GuzzleHttp\Promise\Promise resetNetworkInterfaceAttributeAsync(array $args = [])
399
- * @method \Aws\Result resetSnapshotAttribute(array $args = [])
400
- * @method \GuzzleHttp\Promise\Promise resetSnapshotAttributeAsync(array $args = [])
401
- * @method \Aws\Result restoreAddressToClassic(array $args = [])
402
- * @method \GuzzleHttp\Promise\Promise restoreAddressToClassicAsync(array $args = [])
403
- * @method \Aws\Result revokeSecurityGroupEgress(array $args = [])
404
- * @method \GuzzleHttp\Promise\Promise revokeSecurityGroupEgressAsync(array $args = [])
405
- * @method \Aws\Result revokeSecurityGroupIngress(array $args = [])
406
- * @method \GuzzleHttp\Promise\Promise revokeSecurityGroupIngressAsync(array $args = [])
407
- * @method \Aws\Result runInstances(array $args = [])
408
- * @method \GuzzleHttp\Promise\Promise runInstancesAsync(array $args = [])
409
- * @method \Aws\Result runScheduledInstances(array $args = [])
410
- * @method \GuzzleHttp\Promise\Promise runScheduledInstancesAsync(array $args = [])
411
- * @method \Aws\Result startInstances(array $args = [])
412
- * @method \GuzzleHttp\Promise\Promise startInstancesAsync(array $args = [])
413
- * @method \Aws\Result stopInstances(array $args = [])
414
- * @method \GuzzleHttp\Promise\Promise stopInstancesAsync(array $args = [])
415
- * @method \Aws\Result terminateInstances(array $args = [])
416
- * @method \GuzzleHttp\Promise\Promise terminateInstancesAsync(array $args = [])
417
- * @method \Aws\Result unassignPrivateIpAddresses(array $args = [])
418
- * @method \GuzzleHttp\Promise\Promise unassignPrivateIpAddressesAsync(array $args = [])
419
- * @method \Aws\Result unmonitorInstances(array $args = [])
420
- * @method \GuzzleHttp\Promise\Promise unmonitorInstancesAsync(array $args = [])
421
- * @method \Aws\Result describeHostReservationOfferings(array $args = []) (supported in versions 2016-04-01, 2016-09-15, 2016-11-15)
422
- * @method \GuzzleHttp\Promise\Promise describeHostReservationOfferingsAsync(array $args = []) (supported in versions 2016-04-01, 2016-09-15, 2016-11-15)
423
- * @method \Aws\Result describeHostReservations(array $args = []) (supported in versions 2016-04-01, 2016-09-15, 2016-11-15)
424
- * @method \GuzzleHttp\Promise\Promise describeHostReservationsAsync(array $args = []) (supported in versions 2016-04-01, 2016-09-15, 2016-11-15)
425
- * @method \Aws\Result describeIdentityIdFormat(array $args = []) (supported in versions 2016-04-01, 2016-09-15, 2016-11-15)
426
- * @method \GuzzleHttp\Promise\Promise describeIdentityIdFormatAsync(array $args = []) (supported in versions 2016-04-01, 2016-09-15, 2016-11-15)
427
- * @method \Aws\Result getHostReservationPurchasePreview(array $args = []) (supported in versions 2016-04-01, 2016-09-15, 2016-11-15)
428
- * @method \GuzzleHttp\Promise\Promise getHostReservationPurchasePreviewAsync(array $args = []) (supported in versions 2016-04-01, 2016-09-15, 2016-11-15)
429
- * @method \Aws\Result modifyIdentityIdFormat(array $args = []) (supported in versions 2016-04-01, 2016-09-15, 2016-11-15)
430
- * @method \GuzzleHttp\Promise\Promise modifyIdentityIdFormatAsync(array $args = []) (supported in versions 2016-04-01, 2016-09-15, 2016-11-15)
431
- * @method \Aws\Result purchaseHostReservation(array $args = []) (supported in versions 2016-04-01, 2016-09-15, 2016-11-15)
432
- * @method \GuzzleHttp\Promise\Promise purchaseHostReservationAsync(array $args = []) (supported in versions 2016-04-01, 2016-09-15, 2016-11-15)
433
- * @method \Aws\Result acceptReservedInstancesExchangeQuote(array $args = []) (supported in versions 2016-09-15, 2016-11-15)
434
- * @method \GuzzleHttp\Promise\Promise acceptReservedInstancesExchangeQuoteAsync(array $args = []) (supported in versions 2016-09-15, 2016-11-15)
435
- * @method \Aws\Result getReservedInstancesExchangeQuote(array $args = []) (supported in versions 2016-09-15, 2016-11-15)
436
- * @method \GuzzleHttp\Promise\Promise getReservedInstancesExchangeQuoteAsync(array $args = []) (supported in versions 2016-09-15, 2016-11-15)
437
- * @method \Aws\Result acceptVpcEndpointConnections(array $args = []) (supported in versions 2016-11-15)
438
- * @method \GuzzleHttp\Promise\Promise acceptVpcEndpointConnectionsAsync(array $args = []) (supported in versions 2016-11-15)
439
- * @method \Aws\Result assignIpv6Addresses(array $args = []) (supported in versions 2016-11-15)
440
- * @method \GuzzleHttp\Promise\Promise assignIpv6AddressesAsync(array $args = []) (supported in versions 2016-11-15)
441
- * @method \Aws\Result associateIamInstanceProfile(array $args = []) (supported in versions 2016-11-15)
442
- * @method \GuzzleHttp\Promise\Promise associateIamInstanceProfileAsync(array $args = []) (supported in versions 2016-11-15)
443
- * @method \Aws\Result associateSubnetCidrBlock(array $args = []) (supported in versions 2016-11-15)
444
- * @method \GuzzleHttp\Promise\Promise associateSubnetCidrBlockAsync(array $args = []) (supported in versions 2016-11-15)
445
- * @method \Aws\Result associateVpcCidrBlock(array $args = []) (supported in versions 2016-11-15)
446
- * @method \GuzzleHttp\Promise\Promise associateVpcCidrBlockAsync(array $args = []) (supported in versions 2016-11-15)
447
- * @method \Aws\Result copyFpgaImage(array $args = []) (supported in versions 2016-11-15)
448
- * @method \GuzzleHttp\Promise\Promise copyFpgaImageAsync(array $args = []) (supported in versions 2016-11-15)
449
- * @method \Aws\Result createDefaultSubnet(array $args = []) (supported in versions 2016-11-15)
450
- * @method \GuzzleHttp\Promise\Promise createDefaultSubnetAsync(array $args = []) (supported in versions 2016-11-15)
451
- * @method \Aws\Result createDefaultVpc(array $args = []) (supported in versions 2016-11-15)
452
- * @method \GuzzleHttp\Promise\Promise createDefaultVpcAsync(array $args = []) (supported in versions 2016-11-15)
453
- * @method \Aws\Result createEgressOnlyInternetGateway(array $args = []) (supported in versions 2016-11-15)
454
- * @method \GuzzleHttp\Promise\Promise createEgressOnlyInternetGatewayAsync(array $args = []) (supported in versions 2016-11-15)
455
- * @method \Aws\Result createFleet(array $args = []) (supported in versions 2016-11-15)
456
- * @method \GuzzleHttp\Promise\Promise createFleetAsync(array $args = []) (supported in versions 2016-11-15)
457
- * @method \Aws\Result createFpgaImage(array $args = []) (supported in versions 2016-11-15)
458
- * @method \GuzzleHttp\Promise\Promise createFpgaImageAsync(array $args = []) (supported in versions 2016-11-15)
459
- * @method \Aws\Result createLaunchTemplate(array $args = []) (supported in versions 2016-11-15)
460
- * @method \GuzzleHttp\Promise\Promise createLaunchTemplateAsync(array $args = []) (supported in versions 2016-11-15)
461
- * @method \Aws\Result createLaunchTemplateVersion(array $args = []) (supported in versions 2016-11-15)
462
- * @method \GuzzleHttp\Promise\Promise createLaunchTemplateVersionAsync(array $args = []) (supported in versions 2016-11-15)
463
- * @method \Aws\Result createNetworkInterfacePermission(array $args = []) (supported in versions 2016-11-15)
464
- * @method \GuzzleHttp\Promise\Promise createNetworkInterfacePermissionAsync(array $args = []) (supported in versions 2016-11-15)
465
- * @method \Aws\Result createVpcEndpointConnectionNotification(array $args = []) (supported in versions 2016-11-15)
466
- * @method \GuzzleHttp\Promise\Promise createVpcEndpointConnectionNotificationAsync(array $args = []) (supported in versions 2016-11-15)
467
- * @method \Aws\Result createVpcEndpointServiceConfiguration(array $args = []) (supported in versions 2016-11-15)
468
- * @method \GuzzleHttp\Promise\Promise createVpcEndpointServiceConfigurationAsync(array $args = []) (supported in versions 2016-11-15)
469
- * @method \Aws\Result deleteEgressOnlyInternetGateway(array $args = []) (supported in versions 2016-11-15)
470
- * @method \GuzzleHttp\Promise\Promise deleteEgressOnlyInternetGatewayAsync(array $args = []) (supported in versions 2016-11-15)
471
- * @method \Aws\Result deleteFleets(array $args = []) (supported in versions 2016-11-15)
472
- * @method \GuzzleHttp\Promise\Promise deleteFleetsAsync(array $args = []) (supported in versions 2016-11-15)
473
- * @method \Aws\Result deleteFpgaImage(array $args = []) (supported in versions 2016-11-15)
474
- * @method \GuzzleHttp\Promise\Promise deleteFpgaImageAsync(array $args = []) (supported in versions 2016-11-15)
475
- * @method \Aws\Result deleteLaunchTemplate(array $args = []) (supported in versions 2016-11-15)
476
- * @method \GuzzleHttp\Promise\Promise deleteLaunchTemplateAsync(array $args = []) (supported in versions 2016-11-15)
477
- * @method \Aws\Result deleteLaunchTemplateVersions(array $args = []) (supported in versions 2016-11-15)
478
- * @method \GuzzleHttp\Promise\Promise deleteLaunchTemplateVersionsAsync(array $args = []) (supported in versions 2016-11-15)
479
- * @method \Aws\Result deleteNetworkInterfacePermission(array $args = []) (supported in versions 2016-11-15)
480
- * @method \GuzzleHttp\Promise\Promise deleteNetworkInterfacePermissionAsync(array $args = []) (supported in versions 2016-11-15)
481
- * @method \Aws\Result deleteVpcEndpointConnectionNotifications(array $args = []) (supported in versions 2016-11-15)
482
- * @method \GuzzleHttp\Promise\Promise deleteVpcEndpointConnectionNotificationsAsync(array $args = []) (supported in versions 2016-11-15)
483
- * @method \Aws\Result deleteVpcEndpointServiceConfigurations(array $args = []) (supported in versions 2016-11-15)
484
- * @method \GuzzleHttp\Promise\Promise deleteVpcEndpointServiceConfigurationsAsync(array $args = []) (supported in versions 2016-11-15)
485
- * @method \Aws\Result describeAggregateIdFormat(array $args = []) (supported in versions 2016-11-15)
486
- * @method \GuzzleHttp\Promise\Promise describeAggregateIdFormatAsync(array $args = []) (supported in versions 2016-11-15)
487
- * @method \Aws\Result describeEgressOnlyInternetGateways(array $args = []) (supported in versions 2016-11-15)
488
- * @method \GuzzleHttp\Promise\Promise describeEgressOnlyInternetGatewaysAsync(array $args = []) (supported in versions 2016-11-15)
489
- * @method \Aws\Result describeElasticGpus(array $args = []) (supported in versions 2016-11-15)
490
- * @method \GuzzleHttp\Promise\Promise describeElasticGpusAsync(array $args = []) (supported in versions 2016-11-15)
491
- * @method \Aws\Result describeFleetHistory(array $args = []) (supported in versions 2016-11-15)
492
- * @method \GuzzleHttp\Promise\Promise describeFleetHistoryAsync(array $args = []) (supported in versions 2016-11-15)
493
- * @method \Aws\Result describeFleetInstances(array $args = []) (supported in versions 2016-11-15)
494
- * @method \GuzzleHttp\Promise\Promise describeFleetInstancesAsync(array $args = []) (supported in versions 2016-11-15)
495
- * @method \Aws\Result describeFleets(array $args = []) (supported in versions 2016-11-15)
496
- * @method \GuzzleHttp\Promise\Promise describeFleetsAsync(array $args = []) (supported in versions 2016-11-15)
497
- * @method \Aws\Result describeFpgaImageAttribute(array $args = []) (supported in versions 2016-11-15)
498
- * @method \GuzzleHttp\Promise\Promise describeFpgaImageAttributeAsync(array $args = []) (supported in versions 2016-11-15)
499
- * @method \Aws\Result describeFpgaImages(array $args = []) (supported in versions 2016-11-15)
500
- * @method \GuzzleHttp\Promise\Promise describeFpgaImagesAsync(array $args = []) (supported in versions 2016-11-15)
501
- * @method \Aws\Result describeIamInstanceProfileAssociations(array $args = []) (supported in versions 2016-11-15)
502
- * @method \GuzzleHttp\Promise\Promise describeIamInstanceProfileAssociationsAsync(array $args = []) (supported in versions 2016-11-15)
503
- * @method \Aws\Result describeInstanceCreditSpecifications(array $args = []) (supported in versions 2016-11-15)
504
- * @method \GuzzleHttp\Promise\Promise describeInstanceCreditSpecificationsAsync(array $args = []) (supported in versions 2016-11-15)
505
- * @method \Aws\Result describeLaunchTemplateVersions(array $args = []) (supported in versions 2016-11-15)
506
- * @method \GuzzleHttp\Promise\Promise describeLaunchTemplateVersionsAsync(array $args = []) (supported in versions 2016-11-15)
507
- * @method \Aws\Result describeLaunchTemplates(array $args = []) (supported in versions 2016-11-15)
508
- * @method \GuzzleHttp\Promise\Promise describeLaunchTemplatesAsync(array $args = []) (supported in versions 2016-11-15)
509
- * @method \Aws\Result describeNetworkInterfacePermissions(array $args = []) (supported in versions 2016-11-15)
510
- * @method \GuzzleHttp\Promise\Promise describeNetworkInterfacePermissionsAsync(array $args = []) (supported in versions 2016-11-15)
511
- * @method \Aws\Result describePrincipalIdFormat(array $args = []) (supported in versions 2016-11-15)
512
- * @method \GuzzleHttp\Promise\Promise describePrincipalIdFormatAsync(array $args = []) (supported in versions 2016-11-15)
513
- * @method \Aws\Result describeVolumesModifications(array $args = []) (supported in versions 2016-11-15)
514
- * @method \GuzzleHttp\Promise\Promise describeVolumesModificationsAsync(array $args = []) (supported in versions 2016-11-15)
515
- * @method \Aws\Result describeVpcEndpointConnectionNotifications(array $args = []) (supported in versions 2016-11-15)
516
- * @method \GuzzleHttp\Promise\Promise describeVpcEndpointConnectionNotificationsAsync(array $args = []) (supported in versions 2016-11-15)
517
- * @method \Aws\Result describeVpcEndpointConnections(array $args = []) (supported in versions 2016-11-15)
518
- * @method \GuzzleHttp\Promise\Promise describeVpcEndpointConnectionsAsync(array $args = []) (supported in versions 2016-11-15)
519
- * @method \Aws\Result describeVpcEndpointServiceConfigurations(array $args = []) (supported in versions 2016-11-15)
520
- * @method \GuzzleHttp\Promise\Promise describeVpcEndpointServiceConfigurationsAsync(array $args = []) (supported in versions 2016-11-15)
521
- * @method \Aws\Result describeVpcEndpointServicePermissions(array $args = []) (supported in versions 2016-11-15)
522
- * @method \GuzzleHttp\Promise\Promise describeVpcEndpointServicePermissionsAsync(array $args = []) (supported in versions 2016-11-15)
523
- * @method \Aws\Result disassociateIamInstanceProfile(array $args = []) (supported in versions 2016-11-15)
524
- * @method \GuzzleHttp\Promise\Promise disassociateIamInstanceProfileAsync(array $args = []) (supported in versions 2016-11-15)
525
- * @method \Aws\Result disassociateSubnetCidrBlock(array $args = []) (supported in versions 2016-11-15)
526
- * @method \GuzzleHttp\Promise\Promise disassociateSubnetCidrBlockAsync(array $args = []) (supported in versions 2016-11-15)
527
- * @method \Aws\Result disassociateVpcCidrBlock(array $args = []) (supported in versions 2016-11-15)
528
- * @method \GuzzleHttp\Promise\Promise disassociateVpcCidrBlockAsync(array $args = []) (supported in versions 2016-11-15)
529
- * @method \Aws\Result getLaunchTemplateData(array $args = []) (supported in versions 2016-11-15)
530
- * @method \GuzzleHttp\Promise\Promise getLaunchTemplateDataAsync(array $args = []) (supported in versions 2016-11-15)
531
- * @method \Aws\Result modifyFleet(array $args = []) (supported in versions 2016-11-15)
532
- * @method \GuzzleHttp\Promise\Promise modifyFleetAsync(array $args = []) (supported in versions 2016-11-15)
533
- * @method \Aws\Result modifyFpgaImageAttribute(array $args = []) (supported in versions 2016-11-15)
534
- * @method \GuzzleHttp\Promise\Promise modifyFpgaImageAttributeAsync(array $args = []) (supported in versions 2016-11-15)
535
- * @method \Aws\Result modifyInstanceCreditSpecification(array $args = []) (supported in versions 2016-11-15)
536
- * @method \GuzzleHttp\Promise\Promise modifyInstanceCreditSpecificationAsync(array $args = []) (supported in versions 2016-11-15)
537
- * @method \Aws\Result modifyLaunchTemplate(array $args = []) (supported in versions 2016-11-15)
538
- * @method \GuzzleHttp\Promise\Promise modifyLaunchTemplateAsync(array $args = []) (supported in versions 2016-11-15)
539
- * @method \Aws\Result modifyVolume(array $args = []) (supported in versions 2016-11-15)
540
- * @method \GuzzleHttp\Promise\Promise modifyVolumeAsync(array $args = []) (supported in versions 2016-11-15)
541
- * @method \Aws\Result modifyVpcEndpointConnectionNotification(array $args = []) (supported in versions 2016-11-15)
542
- * @method \GuzzleHttp\Promise\Promise modifyVpcEndpointConnectionNotificationAsync(array $args = []) (supported in versions 2016-11-15)
543
- * @method \Aws\Result modifyVpcEndpointServiceConfiguration(array $args = []) (supported in versions 2016-11-15)
544
- * @method \GuzzleHttp\Promise\Promise modifyVpcEndpointServiceConfigurationAsync(array $args = []) (supported in versions 2016-11-15)
545
- * @method \Aws\Result modifyVpcEndpointServicePermissions(array $args = []) (supported in versions 2016-11-15)
546
- * @method \GuzzleHttp\Promise\Promise modifyVpcEndpointServicePermissionsAsync(array $args = []) (supported in versions 2016-11-15)
547
- * @method \Aws\Result modifyVpcTenancy(array $args = []) (supported in versions 2016-11-15)
548
- * @method \GuzzleHttp\Promise\Promise modifyVpcTenancyAsync(array $args = []) (supported in versions 2016-11-15)
549
- * @method \Aws\Result rejectVpcEndpointConnections(array $args = []) (supported in versions 2016-11-15)
550
- * @method \GuzzleHttp\Promise\Promise rejectVpcEndpointConnectionsAsync(array $args = []) (supported in versions 2016-11-15)
551
- * @method \Aws\Result replaceIamInstanceProfileAssociation(array $args = []) (supported in versions 2016-11-15)
552
- * @method \GuzzleHttp\Promise\Promise replaceIamInstanceProfileAssociationAsync(array $args = []) (supported in versions 2016-11-15)
553
- * @method \Aws\Result resetFpgaImageAttribute(array $args = []) (supported in versions 2016-11-15)
554
- * @method \GuzzleHttp\Promise\Promise resetFpgaImageAttributeAsync(array $args = []) (supported in versions 2016-11-15)
555
- * @method \Aws\Result unassignIpv6Addresses(array $args = []) (supported in versions 2016-11-15)
556
- * @method \GuzzleHttp\Promise\Promise unassignIpv6AddressesAsync(array $args = []) (supported in versions 2016-11-15)
557
- * @method \Aws\Result updateSecurityGroupRuleDescriptionsEgress(array $args = []) (supported in versions 2016-11-15)
558
- * @method \GuzzleHttp\Promise\Promise updateSecurityGroupRuleDescriptionsEgressAsync(array $args = []) (supported in versions 2016-11-15)
559
- * @method \Aws\Result updateSecurityGroupRuleDescriptionsIngress(array $args = []) (supported in versions 2016-11-15)
560
- * @method \GuzzleHttp\Promise\Promise updateSecurityGroupRuleDescriptionsIngressAsync(array $args = []) (supported in versions 2016-11-15)
561
- */
562
- class Ec2Client extends AwsClient
563
- {
564
- public function __construct(array $args)
565
- {
566
- $args['with_resolved'] = function (array $args) {
567
- $this->getHandlerList()->appendInit(
568
- PresignUrlMiddleware::wrap(
569
- $this,
570
- $args['endpoint_provider'],
571
- [
572
- 'operations' => [
573
- 'CopySnapshot',
574
- ],
575
- 'service' => 'ec2',
576
- 'presign_param' => 'PresignedUrl',
577
- ]
578
- ),
579
- 'ec2.copy_snapshot'
580
- );
581
- };
582
-
583
- parent::__construct($args);
584
- }
585
-
586
- /**
587
- * @internal
588
- * @codeCoverageIgnore
589
- */
590
- public static function applyDocFilters(array $api, array $docs)
591
- {
592
- // Several copy snapshot parameters are optional.
593
- $docs['shapes']['String']['refs']['CopySnapshotRequest$PresignedUrl']
594
- = '<div class="alert alert-info">The SDK will compute this value '
595
- . 'for you on your behalf.</div>';
596
- $docs['shapes']['String']['refs']['CopySnapshotRequest$DestinationRegion']
597
- = '<div class="alert alert-info">The SDK will populate this '
598
- . 'parameter on your behalf using the configured region value of '
599
- . 'the client.</div>';
600
-
601
- return [
602
- new Service($api, ApiProvider::defaultProvider()),
603
- new DocModel($docs)
604
- ];
605
- }
606
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Ec2/Exception/Ec2Exception.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\Ec2\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the Amazon Elastic Compute Cloud service.
8
- */
9
- class Ec2Exception extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Ecr/EcrClient.php DELETED
@@ -1,54 +0,0 @@
1
- <?php
2
- namespace Aws\Ecr;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon EC2 Container Registry** service.
8
- *
9
- * @method \Aws\Result batchCheckLayerAvailability(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise batchCheckLayerAvailabilityAsync(array $args = [])
11
- * @method \Aws\Result batchDeleteImage(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise batchDeleteImageAsync(array $args = [])
13
- * @method \Aws\Result batchGetImage(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise batchGetImageAsync(array $args = [])
15
- * @method \Aws\Result completeLayerUpload(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise completeLayerUploadAsync(array $args = [])
17
- * @method \Aws\Result createRepository(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise createRepositoryAsync(array $args = [])
19
- * @method \Aws\Result deleteLifecyclePolicy(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise deleteLifecyclePolicyAsync(array $args = [])
21
- * @method \Aws\Result deleteRepository(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise deleteRepositoryAsync(array $args = [])
23
- * @method \Aws\Result deleteRepositoryPolicy(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise deleteRepositoryPolicyAsync(array $args = [])
25
- * @method \Aws\Result describeImages(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise describeImagesAsync(array $args = [])
27
- * @method \Aws\Result describeRepositories(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise describeRepositoriesAsync(array $args = [])
29
- * @method \Aws\Result getAuthorizationToken(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise getAuthorizationTokenAsync(array $args = [])
31
- * @method \Aws\Result getDownloadUrlForLayer(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise getDownloadUrlForLayerAsync(array $args = [])
33
- * @method \Aws\Result getLifecyclePolicy(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise getLifecyclePolicyAsync(array $args = [])
35
- * @method \Aws\Result getLifecyclePolicyPreview(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise getLifecyclePolicyPreviewAsync(array $args = [])
37
- * @method \Aws\Result getRepositoryPolicy(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise getRepositoryPolicyAsync(array $args = [])
39
- * @method \Aws\Result initiateLayerUpload(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise initiateLayerUploadAsync(array $args = [])
41
- * @method \Aws\Result listImages(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise listImagesAsync(array $args = [])
43
- * @method \Aws\Result putImage(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise putImageAsync(array $args = [])
45
- * @method \Aws\Result putLifecyclePolicy(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise putLifecyclePolicyAsync(array $args = [])
47
- * @method \Aws\Result setRepositoryPolicy(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise setRepositoryPolicyAsync(array $args = [])
49
- * @method \Aws\Result startLifecyclePolicyPreview(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise startLifecyclePolicyPreviewAsync(array $args = [])
51
- * @method \Aws\Result uploadLayerPart(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise uploadLayerPartAsync(array $args = [])
53
- */
54
- class EcrClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Ecr/Exception/EcrException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\Ecr\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **Amazon EC2 Container Registry** service.
8
- */
9
- class EcrException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Ecs/EcsClient.php DELETED
@@ -1,72 +0,0 @@
1
- <?php
2
- namespace Aws\Ecs;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with **Amazon ECS**.
8
- *
9
- * @method \Aws\Result createCluster(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise createClusterAsync(array $args = [])
11
- * @method \Aws\Result createService(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise createServiceAsync(array $args = [])
13
- * @method \Aws\Result deleteAttributes(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise deleteAttributesAsync(array $args = [])
15
- * @method \Aws\Result deleteCluster(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise deleteClusterAsync(array $args = [])
17
- * @method \Aws\Result deleteService(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise deleteServiceAsync(array $args = [])
19
- * @method \Aws\Result deregisterContainerInstance(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise deregisterContainerInstanceAsync(array $args = [])
21
- * @method \Aws\Result deregisterTaskDefinition(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise deregisterTaskDefinitionAsync(array $args = [])
23
- * @method \Aws\Result describeClusters(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise describeClustersAsync(array $args = [])
25
- * @method \Aws\Result describeContainerInstances(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise describeContainerInstancesAsync(array $args = [])
27
- * @method \Aws\Result describeServices(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise describeServicesAsync(array $args = [])
29
- * @method \Aws\Result describeTaskDefinition(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise describeTaskDefinitionAsync(array $args = [])
31
- * @method \Aws\Result describeTasks(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise describeTasksAsync(array $args = [])
33
- * @method \Aws\Result discoverPollEndpoint(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise discoverPollEndpointAsync(array $args = [])
35
- * @method \Aws\Result listAttributes(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise listAttributesAsync(array $args = [])
37
- * @method \Aws\Result listClusters(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise listClustersAsync(array $args = [])
39
- * @method \Aws\Result listContainerInstances(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise listContainerInstancesAsync(array $args = [])
41
- * @method \Aws\Result listServices(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise listServicesAsync(array $args = [])
43
- * @method \Aws\Result listTaskDefinitionFamilies(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise listTaskDefinitionFamiliesAsync(array $args = [])
45
- * @method \Aws\Result listTaskDefinitions(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise listTaskDefinitionsAsync(array $args = [])
47
- * @method \Aws\Result listTasks(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise listTasksAsync(array $args = [])
49
- * @method \Aws\Result putAttributes(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise putAttributesAsync(array $args = [])
51
- * @method \Aws\Result registerContainerInstance(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise registerContainerInstanceAsync(array $args = [])
53
- * @method \Aws\Result registerTaskDefinition(array $args = [])
54
- * @method \GuzzleHttp\Promise\Promise registerTaskDefinitionAsync(array $args = [])
55
- * @method \Aws\Result runTask(array $args = [])
56
- * @method \GuzzleHttp\Promise\Promise runTaskAsync(array $args = [])
57
- * @method \Aws\Result startTask(array $args = [])
58
- * @method \GuzzleHttp\Promise\Promise startTaskAsync(array $args = [])
59
- * @method \Aws\Result stopTask(array $args = [])
60
- * @method \GuzzleHttp\Promise\Promise stopTaskAsync(array $args = [])
61
- * @method \Aws\Result submitContainerStateChange(array $args = [])
62
- * @method \GuzzleHttp\Promise\Promise submitContainerStateChangeAsync(array $args = [])
63
- * @method \Aws\Result submitTaskStateChange(array $args = [])
64
- * @method \GuzzleHttp\Promise\Promise submitTaskStateChangeAsync(array $args = [])
65
- * @method \Aws\Result updateContainerAgent(array $args = [])
66
- * @method \GuzzleHttp\Promise\Promise updateContainerAgentAsync(array $args = [])
67
- * @method \Aws\Result updateContainerInstancesState(array $args = [])
68
- * @method \GuzzleHttp\Promise\Promise updateContainerInstancesStateAsync(array $args = [])
69
- * @method \Aws\Result updateService(array $args = [])
70
- * @method \GuzzleHttp\Promise\Promise updateServiceAsync(array $args = [])
71
- */
72
- class EcsClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Ecs/Exception/EcsException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\Ecs\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Amazon ECS exception.
8
- */
9
- class EcsException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Efs/EfsClient.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
- namespace Aws\Efs;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with **Amazon EFS**.
8
- *
9
- * @method \Aws\Result createFileSystem(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise createFileSystemAsync(array $args = [])
11
- * @method \Aws\Result createMountTarget(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise createMountTargetAsync(array $args = [])
13
- * @method \Aws\Result createTags(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise createTagsAsync(array $args = [])
15
- * @method \Aws\Result deleteFileSystem(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise deleteFileSystemAsync(array $args = [])
17
- * @method \Aws\Result deleteMountTarget(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise deleteMountTargetAsync(array $args = [])
19
- * @method \Aws\Result deleteTags(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise deleteTagsAsync(array $args = [])
21
- * @method \Aws\Result describeFileSystems(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise describeFileSystemsAsync(array $args = [])
23
- * @method \Aws\Result describeMountTargetSecurityGroups(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise describeMountTargetSecurityGroupsAsync(array $args = [])
25
- * @method \Aws\Result describeMountTargets(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise describeMountTargetsAsync(array $args = [])
27
- * @method \Aws\Result describeTags(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise describeTagsAsync(array $args = [])
29
- * @method \Aws\Result modifyMountTargetSecurityGroups(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise modifyMountTargetSecurityGroupsAsync(array $args = [])
31
- * @method \Aws\Result updateFileSystem(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise updateFileSystemAsync(array $args = [])
33
- */
34
- class EfsClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Efs/Exception/EfsException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\Efs\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Amazon EFS exception.
8
- */
9
- class EfsException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/ElastiCache/ElastiCacheClient.php DELETED
@@ -1,94 +0,0 @@
1
- <?php
2
- namespace Aws\ElastiCache;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon ElastiCache** service.
8
- *
9
- * @method \Aws\Result addTagsToResource(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise addTagsToResourceAsync(array $args = [])
11
- * @method \Aws\Result authorizeCacheSecurityGroupIngress(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise authorizeCacheSecurityGroupIngressAsync(array $args = [])
13
- * @method \Aws\Result copySnapshot(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise copySnapshotAsync(array $args = [])
15
- * @method \Aws\Result createCacheCluster(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise createCacheClusterAsync(array $args = [])
17
- * @method \Aws\Result createCacheParameterGroup(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise createCacheParameterGroupAsync(array $args = [])
19
- * @method \Aws\Result createCacheSecurityGroup(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise createCacheSecurityGroupAsync(array $args = [])
21
- * @method \Aws\Result createCacheSubnetGroup(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise createCacheSubnetGroupAsync(array $args = [])
23
- * @method \Aws\Result createReplicationGroup(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise createReplicationGroupAsync(array $args = [])
25
- * @method \Aws\Result createSnapshot(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise createSnapshotAsync(array $args = [])
27
- * @method \Aws\Result decreaseReplicaCount(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise decreaseReplicaCountAsync(array $args = [])
29
- * @method \Aws\Result deleteCacheCluster(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise deleteCacheClusterAsync(array $args = [])
31
- * @method \Aws\Result deleteCacheParameterGroup(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise deleteCacheParameterGroupAsync(array $args = [])
33
- * @method \Aws\Result deleteCacheSecurityGroup(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise deleteCacheSecurityGroupAsync(array $args = [])
35
- * @method \Aws\Result deleteCacheSubnetGroup(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise deleteCacheSubnetGroupAsync(array $args = [])
37
- * @method \Aws\Result deleteReplicationGroup(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise deleteReplicationGroupAsync(array $args = [])
39
- * @method \Aws\Result deleteSnapshot(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise deleteSnapshotAsync(array $args = [])
41
- * @method \Aws\Result describeCacheClusters(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise describeCacheClustersAsync(array $args = [])
43
- * @method \Aws\Result describeCacheEngineVersions(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise describeCacheEngineVersionsAsync(array $args = [])
45
- * @method \Aws\Result describeCacheParameterGroups(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise describeCacheParameterGroupsAsync(array $args = [])
47
- * @method \Aws\Result describeCacheParameters(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise describeCacheParametersAsync(array $args = [])
49
- * @method \Aws\Result describeCacheSecurityGroups(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise describeCacheSecurityGroupsAsync(array $args = [])
51
- * @method \Aws\Result describeCacheSubnetGroups(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise describeCacheSubnetGroupsAsync(array $args = [])
53
- * @method \Aws\Result describeEngineDefaultParameters(array $args = [])
54
- * @method \GuzzleHttp\Promise\Promise describeEngineDefaultParametersAsync(array $args = [])
55
- * @method \Aws\Result describeEvents(array $args = [])
56
- * @method \GuzzleHttp\Promise\Promise describeEventsAsync(array $args = [])
57
- * @method \Aws\Result describeReplicationGroups(array $args = [])
58
- * @method \GuzzleHttp\Promise\Promise describeReplicationGroupsAsync(array $args = [])
59
- * @method \Aws\Result describeReservedCacheNodes(array $args = [])
60
- * @method \GuzzleHttp\Promise\Promise describeReservedCacheNodesAsync(array $args = [])
61
- * @method \Aws\Result describeReservedCacheNodesOfferings(array $args = [])
62
- * @method \GuzzleHttp\Promise\Promise describeReservedCacheNodesOfferingsAsync(array $args = [])
63
- * @method \Aws\Result describeSnapshots(array $args = [])
64
- * @method \GuzzleHttp\Promise\Promise describeSnapshotsAsync(array $args = [])
65
- * @method \Aws\Result increaseReplicaCount(array $args = [])
66
- * @method \GuzzleHttp\Promise\Promise increaseReplicaCountAsync(array $args = [])
67
- * @method \Aws\Result listAllowedNodeTypeModifications(array $args = [])
68
- * @method \GuzzleHttp\Promise\Promise listAllowedNodeTypeModificationsAsync(array $args = [])
69
- * @method \Aws\Result listTagsForResource(array $args = [])
70
- * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
71
- * @method \Aws\Result modifyCacheCluster(array $args = [])
72
- * @method \GuzzleHttp\Promise\Promise modifyCacheClusterAsync(array $args = [])
73
- * @method \Aws\Result modifyCacheParameterGroup(array $args = [])
74
- * @method \GuzzleHttp\Promise\Promise modifyCacheParameterGroupAsync(array $args = [])
75
- * @method \Aws\Result modifyCacheSubnetGroup(array $args = [])
76
- * @method \GuzzleHttp\Promise\Promise modifyCacheSubnetGroupAsync(array $args = [])
77
- * @method \Aws\Result modifyReplicationGroup(array $args = [])
78
- * @method \GuzzleHttp\Promise\Promise modifyReplicationGroupAsync(array $args = [])
79
- * @method \Aws\Result modifyReplicationGroupShardConfiguration(array $args = [])
80
- * @method \GuzzleHttp\Promise\Promise modifyReplicationGroupShardConfigurationAsync(array $args = [])
81
- * @method \Aws\Result purchaseReservedCacheNodesOffering(array $args = [])
82
- * @method \GuzzleHttp\Promise\Promise purchaseReservedCacheNodesOfferingAsync(array $args = [])
83
- * @method \Aws\Result rebootCacheCluster(array $args = [])
84
- * @method \GuzzleHttp\Promise\Promise rebootCacheClusterAsync(array $args = [])
85
- * @method \Aws\Result removeTagsFromResource(array $args = [])
86
- * @method \GuzzleHttp\Promise\Promise removeTagsFromResourceAsync(array $args = [])
87
- * @method \Aws\Result resetCacheParameterGroup(array $args = [])
88
- * @method \GuzzleHttp\Promise\Promise resetCacheParameterGroupAsync(array $args = [])
89
- * @method \Aws\Result revokeCacheSecurityGroupIngress(array $args = [])
90
- * @method \GuzzleHttp\Promise\Promise revokeCacheSecurityGroupIngressAsync(array $args = [])
91
- * @method \Aws\Result testFailover(array $args = [])
92
- * @method \GuzzleHttp\Promise\Promise testFailoverAsync(array $args = [])
93
- */
94
- class ElastiCacheClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/ElastiCache/Exception/ElastiCacheException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\ElastiCache\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the Amazon ElastiCache service.
8
- */
9
- class ElastiCacheException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/ElasticBeanstalk/ElasticBeanstalkClient.php DELETED
@@ -1,98 +0,0 @@
1
- <?php
2
- namespace Aws\ElasticBeanstalk;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS Elastic Beanstalk** service.
8
- *
9
- * @method \Aws\Result abortEnvironmentUpdate(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise abortEnvironmentUpdateAsync(array $args = [])
11
- * @method \Aws\Result applyEnvironmentManagedAction(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise applyEnvironmentManagedActionAsync(array $args = [])
13
- * @method \Aws\Result checkDNSAvailability(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise checkDNSAvailabilityAsync(array $args = [])
15
- * @method \Aws\Result composeEnvironments(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise composeEnvironmentsAsync(array $args = [])
17
- * @method \Aws\Result createApplication(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise createApplicationAsync(array $args = [])
19
- * @method \Aws\Result createApplicationVersion(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise createApplicationVersionAsync(array $args = [])
21
- * @method \Aws\Result createConfigurationTemplate(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise createConfigurationTemplateAsync(array $args = [])
23
- * @method \Aws\Result createEnvironment(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise createEnvironmentAsync(array $args = [])
25
- * @method \Aws\Result createPlatformVersion(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise createPlatformVersionAsync(array $args = [])
27
- * @method \Aws\Result createStorageLocation(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise createStorageLocationAsync(array $args = [])
29
- * @method \Aws\Result deleteApplication(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise deleteApplicationAsync(array $args = [])
31
- * @method \Aws\Result deleteApplicationVersion(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise deleteApplicationVersionAsync(array $args = [])
33
- * @method \Aws\Result deleteConfigurationTemplate(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise deleteConfigurationTemplateAsync(array $args = [])
35
- * @method \Aws\Result deleteEnvironmentConfiguration(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise deleteEnvironmentConfigurationAsync(array $args = [])
37
- * @method \Aws\Result deletePlatformVersion(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise deletePlatformVersionAsync(array $args = [])
39
- * @method \Aws\Result describeAccountAttributes(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise describeAccountAttributesAsync(array $args = [])
41
- * @method \Aws\Result describeApplicationVersions(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise describeApplicationVersionsAsync(array $args = [])
43
- * @method \Aws\Result describeApplications(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise describeApplicationsAsync(array $args = [])
45
- * @method \Aws\Result describeConfigurationOptions(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise describeConfigurationOptionsAsync(array $args = [])
47
- * @method \Aws\Result describeConfigurationSettings(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise describeConfigurationSettingsAsync(array $args = [])
49
- * @method \Aws\Result describeEnvironmentHealth(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise describeEnvironmentHealthAsync(array $args = [])
51
- * @method \Aws\Result describeEnvironmentManagedActionHistory(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise describeEnvironmentManagedActionHistoryAsync(array $args = [])
53
- * @method \Aws\Result describeEnvironmentManagedActions(array $args = [])
54
- * @method \GuzzleHttp\Promise\Promise describeEnvironmentManagedActionsAsync(array $args = [])
55
- * @method \Aws\Result describeEnvironmentResources(array $args = [])
56
- * @method \GuzzleHttp\Promise\Promise describeEnvironmentResourcesAsync(array $args = [])
57
- * @method \Aws\Result describeEnvironments(array $args = [])
58
- * @method \GuzzleHttp\Promise\Promise describeEnvironmentsAsync(array $args = [])
59
- * @method \Aws\Result describeEvents(array $args = [])
60
- * @method \GuzzleHttp\Promise\Promise describeEventsAsync(array $args = [])
61
- * @method \Aws\Result describeInstancesHealth(array $args = [])
62
- * @method \GuzzleHttp\Promise\Promise describeInstancesHealthAsync(array $args = [])
63
- * @method \Aws\Result describePlatformVersion(array $args = [])
64
- * @method \GuzzleHttp\Promise\Promise describePlatformVersionAsync(array $args = [])
65
- * @method \Aws\Result listAvailableSolutionStacks(array $args = [])
66
- * @method \GuzzleHttp\Promise\Promise listAvailableSolutionStacksAsync(array $args = [])
67
- * @method \Aws\Result listPlatformVersions(array $args = [])
68
- * @method \GuzzleHttp\Promise\Promise listPlatformVersionsAsync(array $args = [])
69
- * @method \Aws\Result listTagsForResource(array $args = [])
70
- * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
71
- * @method \Aws\Result rebuildEnvironment(array $args = [])
72
- * @method \GuzzleHttp\Promise\Promise rebuildEnvironmentAsync(array $args = [])
73
- * @method \Aws\Result requestEnvironmentInfo(array $args = [])
74
- * @method \GuzzleHttp\Promise\Promise requestEnvironmentInfoAsync(array $args = [])
75
- * @method \Aws\Result restartAppServer(array $args = [])
76
- * @method \GuzzleHttp\Promise\Promise restartAppServerAsync(array $args = [])
77
- * @method \Aws\Result retrieveEnvironmentInfo(array $args = [])
78
- * @method \GuzzleHttp\Promise\Promise retrieveEnvironmentInfoAsync(array $args = [])
79
- * @method \Aws\Result swapEnvironmentCNAMEs(array $args = [])
80
- * @method \GuzzleHttp\Promise\Promise swapEnvironmentCNAMEsAsync(array $args = [])
81
- * @method \Aws\Result terminateEnvironment(array $args = [])
82
- * @method \GuzzleHttp\Promise\Promise terminateEnvironmentAsync(array $args = [])
83
- * @method \Aws\Result updateApplication(array $args = [])
84
- * @method \GuzzleHttp\Promise\Promise updateApplicationAsync(array $args = [])
85
- * @method \Aws\Result updateApplicationResourceLifecycle(array $args = [])
86
- * @method \GuzzleHttp\Promise\Promise updateApplicationResourceLifecycleAsync(array $args = [])
87
- * @method \Aws\Result updateApplicationVersion(array $args = [])
88
- * @method \GuzzleHttp\Promise\Promise updateApplicationVersionAsync(array $args = [])
89
- * @method \Aws\Result updateConfigurationTemplate(array $args = [])
90
- * @method \GuzzleHttp\Promise\Promise updateConfigurationTemplateAsync(array $args = [])
91
- * @method \Aws\Result updateEnvironment(array $args = [])
92
- * @method \GuzzleHttp\Promise\Promise updateEnvironmentAsync(array $args = [])
93
- * @method \Aws\Result updateTagsForResource(array $args = [])
94
- * @method \GuzzleHttp\Promise\Promise updateTagsForResourceAsync(array $args = [])
95
- * @method \Aws\Result validateConfigurationSettings(array $args = [])
96
- * @method \GuzzleHttp\Promise\Promise validateConfigurationSettingsAsync(array $args = [])
97
- */
98
- class ElasticBeanstalkClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/ElasticBeanstalk/Exception/ElasticBeanstalkException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\ElasticBeanstalk\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the AWS Elastic Beanstalk service.
8
- */
9
- class ElasticBeanstalkException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/ElasticLoadBalancing/ElasticLoadBalancingClient.php DELETED
@@ -1,68 +0,0 @@
1
- <?php
2
- namespace Aws\ElasticLoadBalancing;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Elastic Load Balancing** service.
8
- *
9
- * @method \Aws\Result addTags(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise addTagsAsync(array $args = [])
11
- * @method \Aws\Result applySecurityGroupsToLoadBalancer(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise applySecurityGroupsToLoadBalancerAsync(array $args = [])
13
- * @method \Aws\Result attachLoadBalancerToSubnets(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise attachLoadBalancerToSubnetsAsync(array $args = [])
15
- * @method \Aws\Result configureHealthCheck(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise configureHealthCheckAsync(array $args = [])
17
- * @method \Aws\Result createAppCookieStickinessPolicy(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise createAppCookieStickinessPolicyAsync(array $args = [])
19
- * @method \Aws\Result createLBCookieStickinessPolicy(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise createLBCookieStickinessPolicyAsync(array $args = [])
21
- * @method \Aws\Result createLoadBalancer(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise createLoadBalancerAsync(array $args = [])
23
- * @method \Aws\Result createLoadBalancerListeners(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise createLoadBalancerListenersAsync(array $args = [])
25
- * @method \Aws\Result createLoadBalancerPolicy(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise createLoadBalancerPolicyAsync(array $args = [])
27
- * @method \Aws\Result deleteLoadBalancer(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise deleteLoadBalancerAsync(array $args = [])
29
- * @method \Aws\Result deleteLoadBalancerListeners(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise deleteLoadBalancerListenersAsync(array $args = [])
31
- * @method \Aws\Result deleteLoadBalancerPolicy(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise deleteLoadBalancerPolicyAsync(array $args = [])
33
- * @method \Aws\Result deregisterInstancesFromLoadBalancer(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise deregisterInstancesFromLoadBalancerAsync(array $args = [])
35
- * @method \Aws\Result describeAccountLimits(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise describeAccountLimitsAsync(array $args = [])
37
- * @method \Aws\Result describeInstanceHealth(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise describeInstanceHealthAsync(array $args = [])
39
- * @method \Aws\Result describeLoadBalancerAttributes(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise describeLoadBalancerAttributesAsync(array $args = [])
41
- * @method \Aws\Result describeLoadBalancerPolicies(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise describeLoadBalancerPoliciesAsync(array $args = [])
43
- * @method \Aws\Result describeLoadBalancerPolicyTypes(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise describeLoadBalancerPolicyTypesAsync(array $args = [])
45
- * @method \Aws\Result describeLoadBalancers(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise describeLoadBalancersAsync(array $args = [])
47
- * @method \Aws\Result describeTags(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise describeTagsAsync(array $args = [])
49
- * @method \Aws\Result detachLoadBalancerFromSubnets(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise detachLoadBalancerFromSubnetsAsync(array $args = [])
51
- * @method \Aws\Result disableAvailabilityZonesForLoadBalancer(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise disableAvailabilityZonesForLoadBalancerAsync(array $args = [])
53
- * @method \Aws\Result enableAvailabilityZonesForLoadBalancer(array $args = [])
54
- * @method \GuzzleHttp\Promise\Promise enableAvailabilityZonesForLoadBalancerAsync(array $args = [])
55
- * @method \Aws\Result modifyLoadBalancerAttributes(array $args = [])
56
- * @method \GuzzleHttp\Promise\Promise modifyLoadBalancerAttributesAsync(array $args = [])
57
- * @method \Aws\Result registerInstancesWithLoadBalancer(array $args = [])
58
- * @method \GuzzleHttp\Promise\Promise registerInstancesWithLoadBalancerAsync(array $args = [])
59
- * @method \Aws\Result removeTags(array $args = [])
60
- * @method \GuzzleHttp\Promise\Promise removeTagsAsync(array $args = [])
61
- * @method \Aws\Result setLoadBalancerListenerSSLCertificate(array $args = [])
62
- * @method \GuzzleHttp\Promise\Promise setLoadBalancerListenerSSLCertificateAsync(array $args = [])
63
- * @method \Aws\Result setLoadBalancerPoliciesForBackendServer(array $args = [])
64
- * @method \GuzzleHttp\Promise\Promise setLoadBalancerPoliciesForBackendServerAsync(array $args = [])
65
- * @method \Aws\Result setLoadBalancerPoliciesOfListener(array $args = [])
66
- * @method \GuzzleHttp\Promise\Promise setLoadBalancerPoliciesOfListenerAsync(array $args = [])
67
- */
68
- class ElasticLoadBalancingClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/ElasticLoadBalancing/Exception/ElasticLoadBalancingException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\ElasticLoadBalancing\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the Elastic Load Balancing service.
8
- */
9
- class ElasticLoadBalancingException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/ElasticLoadBalancingV2/ElasticLoadBalancingV2Client.php DELETED
@@ -1,77 +0,0 @@
1
- <?php
2
- namespace Aws\ElasticLoadBalancingV2;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Elastic Load Balancing** service.
8
- * @method \Aws\Result addListenerCertificates(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise addListenerCertificatesAsync(array $args = [])
10
- * @method \Aws\Result addTags(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise addTagsAsync(array $args = [])
12
- * @method \Aws\Result createListener(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise createListenerAsync(array $args = [])
14
- * @method \Aws\Result createLoadBalancer(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise createLoadBalancerAsync(array $args = [])
16
- * @method \Aws\Result createRule(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise createRuleAsync(array $args = [])
18
- * @method \Aws\Result createTargetGroup(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise createTargetGroupAsync(array $args = [])
20
- * @method \Aws\Result deleteListener(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise deleteListenerAsync(array $args = [])
22
- * @method \Aws\Result deleteLoadBalancer(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise deleteLoadBalancerAsync(array $args = [])
24
- * @method \Aws\Result deleteRule(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise deleteRuleAsync(array $args = [])
26
- * @method \Aws\Result deleteTargetGroup(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise deleteTargetGroupAsync(array $args = [])
28
- * @method \Aws\Result deregisterTargets(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise deregisterTargetsAsync(array $args = [])
30
- * @method \Aws\Result describeAccountLimits(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise describeAccountLimitsAsync(array $args = [])
32
- * @method \Aws\Result describeListenerCertificates(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise describeListenerCertificatesAsync(array $args = [])
34
- * @method \Aws\Result describeListeners(array $args = [])
35
- * @method \GuzzleHttp\Promise\Promise describeListenersAsync(array $args = [])
36
- * @method \Aws\Result describeLoadBalancerAttributes(array $args = [])
37
- * @method \GuzzleHttp\Promise\Promise describeLoadBalancerAttributesAsync(array $args = [])
38
- * @method \Aws\Result describeLoadBalancers(array $args = [])
39
- * @method \GuzzleHttp\Promise\Promise describeLoadBalancersAsync(array $args = [])
40
- * @method \Aws\Result describeRules(array $args = [])
41
- * @method \GuzzleHttp\Promise\Promise describeRulesAsync(array $args = [])
42
- * @method \Aws\Result describeSSLPolicies(array $args = [])
43
- * @method \GuzzleHttp\Promise\Promise describeSSLPoliciesAsync(array $args = [])
44
- * @method \Aws\Result describeTags(array $args = [])
45
- * @method \GuzzleHttp\Promise\Promise describeTagsAsync(array $args = [])
46
- * @method \Aws\Result describeTargetGroupAttributes(array $args = [])
47
- * @method \GuzzleHttp\Promise\Promise describeTargetGroupAttributesAsync(array $args = [])
48
- * @method \Aws\Result describeTargetGroups(array $args = [])
49
- * @method \GuzzleHttp\Promise\Promise describeTargetGroupsAsync(array $args = [])
50
- * @method \Aws\Result describeTargetHealth(array $args = [])
51
- * @method \GuzzleHttp\Promise\Promise describeTargetHealthAsync(array $args = [])
52
- * @method \Aws\Result modifyListener(array $args = [])
53
- * @method \GuzzleHttp\Promise\Promise modifyListenerAsync(array $args = [])
54
- * @method \Aws\Result modifyLoadBalancerAttributes(array $args = [])
55
- * @method \GuzzleHttp\Promise\Promise modifyLoadBalancerAttributesAsync(array $args = [])
56
- * @method \Aws\Result modifyRule(array $args = [])
57
- * @method \GuzzleHttp\Promise\Promise modifyRuleAsync(array $args = [])
58
- * @method \Aws\Result modifyTargetGroup(array $args = [])
59
- * @method \GuzzleHttp\Promise\Promise modifyTargetGroupAsync(array $args = [])
60
- * @method \Aws\Result modifyTargetGroupAttributes(array $args = [])
61
- * @method \GuzzleHttp\Promise\Promise modifyTargetGroupAttributesAsync(array $args = [])
62
- * @method \Aws\Result registerTargets(array $args = [])
63
- * @method \GuzzleHttp\Promise\Promise registerTargetsAsync(array $args = [])
64
- * @method \Aws\Result removeListenerCertificates(array $args = [])
65
- * @method \GuzzleHttp\Promise\Promise removeListenerCertificatesAsync(array $args = [])
66
- * @method \Aws\Result removeTags(array $args = [])
67
- * @method \GuzzleHttp\Promise\Promise removeTagsAsync(array $args = [])
68
- * @method \Aws\Result setIpAddressType(array $args = [])
69
- * @method \GuzzleHttp\Promise\Promise setIpAddressTypeAsync(array $args = [])
70
- * @method \Aws\Result setRulePriorities(array $args = [])
71
- * @method \GuzzleHttp\Promise\Promise setRulePrioritiesAsync(array $args = [])
72
- * @method \Aws\Result setSecurityGroups(array $args = [])
73
- * @method \GuzzleHttp\Promise\Promise setSecurityGroupsAsync(array $args = [])
74
- * @method \Aws\Result setSubnets(array $args = [])
75
- * @method \GuzzleHttp\Promise\Promise setSubnetsAsync(array $args = [])
76
- */
77
- class ElasticLoadBalancingV2Client extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/ElasticLoadBalancingV2/Exception/ElasticLoadBalancingV2Exception.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\ElasticLoadBalancingV2\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **Elastic Load Balancing** service.
8
- */
9
- class ElasticLoadBalancingV2Exception extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/ElasticTranscoder/ElasticTranscoderClient.php DELETED
@@ -1,44 +0,0 @@
1
- <?php
2
- namespace Aws\ElasticTranscoder;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon Elastic Transcoder** service.
8
- *
9
- * @method \Aws\Result cancelJob(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise cancelJobAsync(array $args = [])
11
- * @method \Aws\Result createJob(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise createJobAsync(array $args = [])
13
- * @method \Aws\Result createPipeline(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise createPipelineAsync(array $args = [])
15
- * @method \Aws\Result createPreset(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise createPresetAsync(array $args = [])
17
- * @method \Aws\Result deletePipeline(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise deletePipelineAsync(array $args = [])
19
- * @method \Aws\Result deletePreset(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise deletePresetAsync(array $args = [])
21
- * @method \Aws\Result listJobsByPipeline(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise listJobsByPipelineAsync(array $args = [])
23
- * @method \Aws\Result listJobsByStatus(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise listJobsByStatusAsync(array $args = [])
25
- * @method \Aws\Result listPipelines(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise listPipelinesAsync(array $args = [])
27
- * @method \Aws\Result listPresets(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise listPresetsAsync(array $args = [])
29
- * @method \Aws\Result readJob(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise readJobAsync(array $args = [])
31
- * @method \Aws\Result readPipeline(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise readPipelineAsync(array $args = [])
33
- * @method \Aws\Result readPreset(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise readPresetAsync(array $args = [])
35
- * @method \Aws\Result testRole(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise testRoleAsync(array $args = [])
37
- * @method \Aws\Result updatePipeline(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise updatePipelineAsync(array $args = [])
39
- * @method \Aws\Result updatePipelineNotifications(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise updatePipelineNotificationsAsync(array $args = [])
41
- * @method \Aws\Result updatePipelineStatus(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise updatePipelineStatusAsync(array $args = [])
43
- */
44
- class ElasticTranscoderClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/ElasticTranscoder/Exception/ElasticTranscoderException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\ElasticTranscoder\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the Amazon Elastic Transcoder service.
8
- */
9
- class ElasticTranscoderException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/ElasticsearchService/ElasticsearchServiceClient.php DELETED
@@ -1,52 +0,0 @@
1
- <?php
2
- namespace Aws\ElasticsearchService;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon Elasticsearch Service** service.
8
- *
9
- * @method \Aws\Result addTags(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise addTagsAsync(array $args = [])
11
- * @method \Aws\Result createElasticsearchDomain(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise createElasticsearchDomainAsync(array $args = [])
13
- * @method \Aws\Result deleteElasticsearchDomain(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise deleteElasticsearchDomainAsync(array $args = [])
15
- * @method \Aws\Result deleteElasticsearchServiceRole(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise deleteElasticsearchServiceRoleAsync(array $args = [])
17
- * @method \Aws\Result describeElasticsearchDomain(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise describeElasticsearchDomainAsync(array $args = [])
19
- * @method \Aws\Result describeElasticsearchDomainConfig(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise describeElasticsearchDomainConfigAsync(array $args = [])
21
- * @method \Aws\Result describeElasticsearchDomains(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise describeElasticsearchDomainsAsync(array $args = [])
23
- * @method \Aws\Result describeElasticsearchInstanceTypeLimits(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise describeElasticsearchInstanceTypeLimitsAsync(array $args = [])
25
- * @method \Aws\Result describeReservedElasticsearchInstanceOfferings(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise describeReservedElasticsearchInstanceOfferingsAsync(array $args = [])
27
- * @method \Aws\Result describeReservedElasticsearchInstances(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise describeReservedElasticsearchInstancesAsync(array $args = [])
29
- * @method \Aws\Result getCompatibleElasticsearchVersions(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise getCompatibleElasticsearchVersionsAsync(array $args = [])
31
- * @method \Aws\Result getUpgradeHistory(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise getUpgradeHistoryAsync(array $args = [])
33
- * @method \Aws\Result getUpgradeStatus(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise getUpgradeStatusAsync(array $args = [])
35
- * @method \Aws\Result listDomainNames(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise listDomainNamesAsync(array $args = [])
37
- * @method \Aws\Result listElasticsearchInstanceTypes(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise listElasticsearchInstanceTypesAsync(array $args = [])
39
- * @method \Aws\Result listElasticsearchVersions(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise listElasticsearchVersionsAsync(array $args = [])
41
- * @method \Aws\Result listTags(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise listTagsAsync(array $args = [])
43
- * @method \Aws\Result purchaseReservedElasticsearchInstanceOffering(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise purchaseReservedElasticsearchInstanceOfferingAsync(array $args = [])
45
- * @method \Aws\Result removeTags(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise removeTagsAsync(array $args = [])
47
- * @method \Aws\Result updateElasticsearchDomainConfig(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise updateElasticsearchDomainConfigAsync(array $args = [])
49
- * @method \Aws\Result upgradeElasticsearchDomain(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise upgradeElasticsearchDomainAsync(array $args = [])
51
- */
52
- class ElasticsearchServiceClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/ElasticsearchService/Exception/ElasticsearchServiceException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\ElasticsearchService\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **Amazon Elasticsearch Service** service.
8
- */
9
- class ElasticsearchServiceException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Emr/EmrClient.php DELETED
@@ -1,64 +0,0 @@
1
- <?php
2
- namespace Aws\Emr;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon Elastic MapReduce (Amazon EMR)** service.
8
- *
9
- * @method \Aws\Result addInstanceFleet(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise addInstanceFleetAsync(array $args = [])
11
- * @method \Aws\Result addInstanceGroups(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise addInstanceGroupsAsync(array $args = [])
13
- * @method \Aws\Result addJobFlowSteps(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise addJobFlowStepsAsync(array $args = [])
15
- * @method \Aws\Result addTags(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise addTagsAsync(array $args = [])
17
- * @method \Aws\Result cancelSteps(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise cancelStepsAsync(array $args = [])
19
- * @method \Aws\Result createSecurityConfiguration(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise createSecurityConfigurationAsync(array $args = [])
21
- * @method \Aws\Result deleteSecurityConfiguration(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise deleteSecurityConfigurationAsync(array $args = [])
23
- * @method \Aws\Result describeCluster(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise describeClusterAsync(array $args = [])
25
- * @method \Aws\Result describeJobFlows(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise describeJobFlowsAsync(array $args = [])
27
- * @method \Aws\Result describeSecurityConfiguration(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise describeSecurityConfigurationAsync(array $args = [])
29
- * @method \Aws\Result describeStep(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise describeStepAsync(array $args = [])
31
- * @method \Aws\Result listBootstrapActions(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise listBootstrapActionsAsync(array $args = [])
33
- * @method \Aws\Result listClusters(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise listClustersAsync(array $args = [])
35
- * @method \Aws\Result listInstanceFleets(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise listInstanceFleetsAsync(array $args = [])
37
- * @method \Aws\Result listInstanceGroups(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise listInstanceGroupsAsync(array $args = [])
39
- * @method \Aws\Result listInstances(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise listInstancesAsync(array $args = [])
41
- * @method \Aws\Result listSecurityConfigurations(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise listSecurityConfigurationsAsync(array $args = [])
43
- * @method \Aws\Result listSteps(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise listStepsAsync(array $args = [])
45
- * @method \Aws\Result modifyInstanceFleet(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise modifyInstanceFleetAsync(array $args = [])
47
- * @method \Aws\Result modifyInstanceGroups(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise modifyInstanceGroupsAsync(array $args = [])
49
- * @method \Aws\Result putAutoScalingPolicy(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise putAutoScalingPolicyAsync(array $args = [])
51
- * @method \Aws\Result removeAutoScalingPolicy(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise removeAutoScalingPolicyAsync(array $args = [])
53
- * @method \Aws\Result removeTags(array $args = [])
54
- * @method \GuzzleHttp\Promise\Promise removeTagsAsync(array $args = [])
55
- * @method \Aws\Result runJobFlow(array $args = [])
56
- * @method \GuzzleHttp\Promise\Promise runJobFlowAsync(array $args = [])
57
- * @method \Aws\Result setTerminationProtection(array $args = [])
58
- * @method \GuzzleHttp\Promise\Promise setTerminationProtectionAsync(array $args = [])
59
- * @method \Aws\Result setVisibleToAllUsers(array $args = [])
60
- * @method \GuzzleHttp\Promise\Promise setVisibleToAllUsersAsync(array $args = [])
61
- * @method \Aws\Result terminateJobFlows(array $args = [])
62
- * @method \GuzzleHttp\Promise\Promise terminateJobFlowsAsync(array $args = [])
63
- */
64
- class EmrClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Emr/Exception/EmrException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\Emr\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the Amazon Elastic MapReduce service.
8
- */
9
- class EmrException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Endpoint/EndpointProvider.php DELETED
@@ -1,96 +0,0 @@
1
- <?php
2
- namespace Aws\Endpoint;
3
-
4
- use Aws\Exception\UnresolvedEndpointException;
5
-
6
- /**
7
- * Endpoint providers.
8
- *
9
- * An endpoint provider is a function that accepts a hash of endpoint options,
10
- * including but not limited to "service" and "region" key value pairs. The
11
- * endpoint provider function returns a hash of endpoint data, which MUST
12
- * include an "endpoint" key value pair that represents the resolved endpoint
13
- * or NULL if an endpoint cannot be determined.
14
- *
15
- * You can wrap your calls to an endpoint provider with the
16
- * {@see EndpointProvider::resolve} function to ensure that an endpoint hash is
17
- * created. If an endpoint hash is not created, then the resolve() function
18
- * will throw an {@see Aws\Exception\UnresolvedEndpointException}.
19
- *
20
- * use Aws\Endpoint\EndpointProvider;
21
- * $provider = EndpointProvider::defaultProvider();
22
- * // Returns an array or NULL.
23
- * $endpoint = $provider(['service' => 'ec2', 'region' => 'us-west-2']);
24
- * // Returns an endpoint array or throws.
25
- * $endpoint = EndpointProvider::resolve($provider, [
26
- * 'service' => 'ec2',
27
- * 'region' => 'us-west-2'
28
- * ]);
29
- *
30
- * You can compose multiple providers into a single provider using
31
- * {@see Aws\or_chain}. This function accepts providers as arguments and
32
- * returns a new function that will invoke each provider until a non-null value
33
- * is returned.
34
- *
35
- * $a = function (array $args) {
36
- * if ($args['region'] === 'my-test-region') {
37
- * return ['endpoint' => 'http://localhost:123/api'];
38
- * }
39
- * };
40
- * $b = EndpointProvider::defaultProvider();
41
- * $c = \Aws\or_chain($a, $b);
42
- * $config = ['service' => 'ec2', 'region' => 'my-test-region'];
43
- * $res = $c($config); // $a handles this.
44
- * $config['region'] = 'us-west-2';
45
- * $res = $c($config); // $b handles this.
46
- */
47
- class EndpointProvider
48
- {
49
- /**
50
- * Resolves and endpoint provider and ensures a non-null return value.
51
- *
52
- * @param callable $provider Provider function to invoke.
53
- * @param array $args Endpoint arguments to pass to the provider.
54
- *
55
- * @return array
56
- * @throws UnresolvedEndpointException
57
- */
58
- public static function resolve(callable $provider, array $args = [])
59
- {
60
- $result = $provider($args);
61
- if (is_array($result)) {
62
- return $result;
63
- }
64
-
65
- throw new UnresolvedEndpointException(
66
- 'Unable to resolve an endpoint using the provider arguments: '
67
- . json_encode($args) . '. Note: you can provide an "endpoint" '
68
- . 'option to a client constructor to bypass invoking an endpoint '
69
- . 'provider.');
70
- }
71
-
72
- /**
73
- * Creates and returns the default SDK endpoint provider.
74
- *
75
- * @deprecated Use an instance of \Aws\Endpoint\Partition instead.
76
- *
77
- * @return callable
78
- */
79
- public static function defaultProvider()
80
- {
81
- return PartitionEndpointProvider::defaultProvider();
82
- }
83
-
84
- /**
85
- * Creates and returns an endpoint provider that uses patterns from an
86
- * array.
87
- *
88
- * @param array $patterns Endpoint patterns
89
- *
90
- * @return callable
91
- */
92
- public static function patterns(array $patterns)
93
- {
94
- return new PatternEndpointProvider($patterns);
95
- }
96
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Endpoint/Partition.php DELETED
@@ -1,183 +0,0 @@
1
- <?php
2
- namespace Aws\Endpoint;
3
-
4
- use ArrayAccess;
5
- use Aws\HasDataTrait;
6
- use InvalidArgumentException as Iae;
7
-
8
- /**
9
- * Default implementation of an AWS partition.
10
- */
11
- final class Partition implements ArrayAccess, PartitionInterface
12
- {
13
- use HasDataTrait;
14
-
15
- /**
16
- * The partition constructor accepts the following options:
17
- *
18
- * - `partition`: (string, required) The partition name as specified in an
19
- * ARN (e.g., `aws`)
20
- * - `partitionName`: (string) The human readable name of the partition
21
- * (e.g., "AWS Standard")
22
- * - `dnsSuffix`: (string, required) The DNS suffix of the partition. This
23
- * value is used to determine how endpoints in the partition are resolved.
24
- * - `regionRegex`: (string) A PCRE regular expression that specifies the
25
- * pattern that region names in the endpoint adhere to.
26
- * - `regions`: (array, required) A map of the regions in the partition.
27
- * Each key is the region as present in a hostname (e.g., `us-east-1`),
28
- * and each value is a structure containing region information.
29
- * - `defaults`: (array) A map of default key value pairs to apply to each
30
- * endpoint of the partition. Any value in an `endpoint` definition will
31
- * supersede any values specified in `defaults`.
32
- * - `services`: (array, required) A map of service endpoint prefix name
33
- * (the value found in a hostname) to information about the service.
34
- *
35
- * @param array $definition
36
- *
37
- * @throws Iae if any required options are missing
38
- */
39
- public function __construct(array $definition)
40
- {
41
- foreach (['partition', 'regions', 'services', 'dnsSuffix'] as $key) {
42
- if (!isset($definition[$key])) {
43
- throw new Iae("Partition missing required $key field");
44
- }
45
- }
46
-
47
- $this->data = $definition;
48
- }
49
-
50
- public function getName()
51
- {
52
- return $this->data['partition'];
53
- }
54
-
55
- public function isRegionMatch($region, $service)
56
- {
57
- if (isset($this->data['regions'][$region])
58
- || isset($this->data['services'][$service]['endpoints'][$region])
59
- ) {
60
- return true;
61
- }
62
-
63
- if (isset($this->data['regionRegex'])) {
64
- return (bool) preg_match(
65
- "@{$this->data['regionRegex']}@",
66
- $region
67
- );
68
- }
69
-
70
- return false;
71
- }
72
-
73
- public function getAvailableEndpoints(
74
- $service,
75
- $allowNonRegionalEndpoints = false
76
- ) {
77
- if ($this->isServicePartitionGlobal($service)) {
78
- return [$this->getPartitionEndpoint($service)];
79
- }
80
-
81
- if (isset($this->data['services'][$service]['endpoints'])) {
82
- $serviceRegions = array_keys(
83
- $this->data['services'][$service]['endpoints']
84
- );
85
-
86
- return $allowNonRegionalEndpoints
87
- ? $serviceRegions
88
- : array_intersect($serviceRegions, array_keys(
89
- $this->data['regions']
90
- ));
91
- }
92
-
93
- return [];
94
- }
95
-
96
- public function __invoke(array $args = [])
97
- {
98
- $service = isset($args['service']) ? $args['service'] : '';
99
- $region = isset($args['region']) ? $args['region'] : '';
100
- $scheme = isset($args['scheme']) ? $args['scheme'] : 'https';
101
- $data = $this->getEndpointData($service, $region);
102
-
103
- return [
104
- 'endpoint' => "{$scheme}://" . $this->formatEndpoint(
105
- isset($data['hostname']) ? $data['hostname'] : '',
106
- $service,
107
- $region
108
- ),
109
- 'signatureVersion' => $this->getSignatureVersion($data),
110
- 'signingRegion' => isset($data['credentialScope']['region'])
111
- ? $data['credentialScope']['region']
112
- : $region,
113
- 'signingName' => isset($data['credentialScope']['service'])
114
- ? $data['credentialScope']['service']
115
- : $service,
116
- ];
117
- }
118
-
119
- private function getEndpointData($service, $region)
120
- {
121
-
122
- $resolved = $this->resolveRegion($service, $region);
123
- $data = isset($this->data['services'][$service]['endpoints'][$resolved])
124
- ? $this->data['services'][$service]['endpoints'][$resolved]
125
- : [];
126
- $data += isset($this->data['services'][$service]['defaults'])
127
- ? $this->data['services'][$service]['defaults']
128
- : [];
129
- $data += isset($this->data['defaults'])
130
- ? $this->data['defaults']
131
- : [];
132
-
133
- return $data;
134
- }
135
-
136
- private function getSignatureVersion(array $data)
137
- {
138
- static $supportedBySdk = [
139
- 's3v4',
140
- 'v4',
141
- 'anonymous',
142
- ];
143
-
144
- $possibilities = array_intersect(
145
- $supportedBySdk,
146
- isset($data['signatureVersions'])
147
- ? $data['signatureVersions']
148
- : ['v4']
149
- );
150
-
151
- return array_shift($possibilities);
152
- }
153
-
154
- private function resolveRegion($service, $region)
155
- {
156
- if ($this->isServicePartitionGlobal($service)) {
157
- return $this->getPartitionEndpoint($service);
158
- }
159
-
160
- return $region;
161
- }
162
-
163
- private function isServicePartitionGlobal($service)
164
- {
165
- return isset($this->data['services'][$service]['isRegionalized'])
166
- && false === $this->data['services'][$service]['isRegionalized']
167
- && isset($this->data['services'][$service]['partitionEndpoint']);
168
- }
169
-
170
- private function getPartitionEndpoint($service)
171
- {
172
- return $this->data['services'][$service]['partitionEndpoint'];
173
- }
174
-
175
- private function formatEndpoint($template, $service, $region)
176
- {
177
- return strtr($template, [
178
- '{service}' => $service,
179
- '{region}' => $region,
180
- '{dnsSuffix}' => $this->data['dnsSuffix'],
181
- ]);
182
- }
183
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Endpoint/PartitionEndpointProvider.php DELETED
@@ -1,108 +0,0 @@
1
- <?php
2
- namespace Aws\Endpoint;
3
-
4
- use JmesPath\Env;
5
-
6
- class PartitionEndpointProvider
7
- {
8
- /** @var Partition[] */
9
- private $partitions;
10
- /** @var string */
11
- private $defaultPartition;
12
-
13
- public function __construct(array $partitions, $defaultPartition = 'aws')
14
- {
15
- $this->partitions = array_map(function (array $definition) {
16
- return new Partition($definition);
17
- }, array_values($partitions));
18
- $this->defaultPartition = $defaultPartition;
19
- }
20
-
21
- public function __invoke(array $args = [])
22
- {
23
- $partition = $this->getPartition(
24
- isset($args['region']) ? $args['region'] : '',
25
- isset($args['service']) ? $args['service'] : ''
26
- );
27
-
28
- return $partition($args);
29
- }
30
-
31
- /**
32
- * Returns the partition containing the provided region or the default
33
- * partition if no match is found.
34
- *
35
- * @param string $region
36
- * @param string $service
37
- *
38
- * @return Partition
39
- */
40
- public function getPartition($region, $service)
41
- {
42
- foreach ($this->partitions as $partition) {
43
- if ($partition->isRegionMatch($region, $service)) {
44
- return $partition;
45
- }
46
- }
47
-
48
- return $this->getPartitionByName($this->defaultPartition);
49
- }
50
-
51
- /**
52
- * Returns the partition with the provided name or null if no partition with
53
- * the provided name can be found.
54
- *
55
- * @param string $name
56
- *
57
- * @return Partition|null
58
- */
59
- public function getPartitionByName($name)
60
- {
61
- foreach ($this->partitions as $partition) {
62
- if ($name === $partition->getName()) {
63
- return $partition;
64
- }
65
- }
66
- }
67
-
68
- /**
69
- * Creates and returns the default SDK partition provider.
70
- *
71
- * @return PartitionEndpointProvider
72
- */
73
- public static function defaultProvider()
74
- {
75
- $data = \Aws\load_compiled_json(__DIR__ . '/../data/endpoints.json');
76
- $prefixData = \Aws\load_compiled_json(__DIR__ . '/../data/endpoints_prefix_history.json');
77
- $mergedData = self::mergePrefixData($data, $prefixData);
78
-
79
- return new self($mergedData['partitions']);
80
- }
81
-
82
- /**
83
- * Copy endpoint data for other prefixes used by a given service
84
- *
85
- * @param $data
86
- * @param $prefixData
87
- * @return array
88
- */
89
- public static function mergePrefixData($data, $prefixData)
90
- {
91
- $prefixGroups = $prefixData['prefix-groups'];
92
-
93
- foreach ($data["partitions"] as $index => $partition) {
94
- foreach ($prefixGroups as $current => $old) {
95
- $serviceData = Env::search("services.{$current}", $partition);
96
- if (!empty($serviceData)) {
97
- foreach ($old as $prefix) {
98
- if (empty(Env::search("services.{$prefix}", $partition))) {
99
- $data["partitions"][$index]["services"][$prefix] = $serviceData;
100
- }
101
- }
102
- }
103
- }
104
- }
105
-
106
- return $data;
107
- }
108
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Endpoint/PartitionInterface.php DELETED
@@ -1,56 +0,0 @@
1
- <?php
2
- namespace Aws\Endpoint;
3
-
4
- /**
5
- * Represents a section of the AWS cloud.
6
- */
7
- interface PartitionInterface
8
- {
9
- /**
10
- * Returns the partition's short name, e.g., 'aws,' 'aws-cn,' or
11
- * 'aws-us-gov.'
12
- *
13
- * @return string
14
- */
15
- public function getName();
16
-
17
- /**
18
- * Determine if this partition contains the provided region. Include the
19
- * name of the service to inspect non-regional endpoints
20
- *
21
- * @param string $region
22
- * @param string $service
23
- *
24
- * @return bool
25
- */
26
- public function isRegionMatch($region, $service);
27
-
28
- /**
29
- * Return the endpoints supported by a given service.
30
- *
31
- * @param string $service Identifier of the service
32
- * whose endpoints should be
33
- * listed (e.g., 's3' or 'ses')
34
- * @param bool $allowNonRegionalEndpoints Set to `true` to include
35
- * endpoints that are not AWS
36
- * regions (e.g., 'local' for
37
- * DynamoDB or
38
- * 'fips-us-gov-west-1' for S3)
39
- *
40
- * @return string[]
41
- */
42
- public function getAvailableEndpoints(
43
- $service,
44
- $allowNonRegionalEndpoints = false
45
- );
46
-
47
- /**
48
- * A partition must be invokable as an endpoint provider.
49
- *
50
- * @see EndpointProvider
51
- *
52
- * @param array $args
53
- * @return array
54
- */
55
- public function __invoke(array $args = []);
56
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Endpoint/PatternEndpointProvider.php DELETED
@@ -1,51 +0,0 @@
1
- <?php
2
- namespace Aws\Endpoint;
3
-
4
- /**
5
- * Provides endpoints based on an endpoint pattern configuration array.
6
- */
7
- class PatternEndpointProvider
8
- {
9
- /** @var array */
10
- private $patterns;
11
-
12
- /**
13
- * @param array $patterns Hash of endpoint patterns mapping to endpoint
14
- * configurations.
15
- */
16
- public function __construct(array $patterns)
17
- {
18
- $this->patterns = $patterns;
19
- }
20
-
21
- public function __invoke(array $args = [])
22
- {
23
- $service = isset($args['service']) ? $args['service'] : '';
24
- $region = isset($args['region']) ? $args['region'] : '';
25
- $keys = ["{$region}/{$service}", "{$region}/*", "*/{$service}", "*/*"];
26
-
27
- foreach ($keys as $key) {
28
- if (isset($this->patterns[$key])) {
29
- return $this->expand(
30
- $this->patterns[$key],
31
- isset($args['scheme']) ? $args['scheme'] : 'https',
32
- $service,
33
- $region
34
- );
35
- }
36
- }
37
-
38
- return null;
39
- }
40
-
41
- private function expand(array $config, $scheme, $service, $region)
42
- {
43
- $config['endpoint'] = $scheme . '://'
44
- . strtr($config['endpoint'], [
45
- '{service}' => $service,
46
- '{region}' => $region
47
- ]);
48
-
49
- return $config;
50
- }
51
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Exception/AwsException.php DELETED
@@ -1,208 +0,0 @@
1
- <?php
2
- namespace Aws\Exception;
3
-
4
- use Psr\Http\Message\ResponseInterface;
5
- use Psr\Http\Message\RequestInterface;
6
- use Aws\CommandInterface;
7
- use Aws\ResultInterface;
8
-
9
- /**
10
- * Represents an AWS exception that is thrown when a command fails.
11
- */
12
- class AwsException extends \RuntimeException
13
- {
14
- /** @var ResponseInterface */
15
- private $response;
16
- private $request;
17
- private $result;
18
- private $command;
19
- private $requestId;
20
- private $errorType;
21
- private $errorCode;
22
- private $connectionError;
23
- private $transferInfo;
24
- private $errorMessage;
25
-
26
- /**
27
- * @param string $message Exception message
28
- * @param CommandInterface $command
29
- * @param array $context Exception context
30
- * @param \Exception $previous Previous exception (if any)
31
- */
32
- public function __construct(
33
- $message,
34
- CommandInterface $command,
35
- array $context = [],
36
- \Exception $previous = null
37
- ) {
38
- $this->command = $command;
39
- $this->response = isset($context['response']) ? $context['response'] : null;
40
- $this->request = isset($context['request']) ? $context['request'] : null;
41
- $this->requestId = isset($context['request_id'])
42
- ? $context['request_id']
43
- : null;
44
- $this->errorType = isset($context['type']) ? $context['type'] : null;
45
- $this->errorCode = isset($context['code']) ? $context['code'] : null;
46
- $this->connectionError = !empty($context['connection_error']);
47
- $this->result = isset($context['result']) ? $context['result'] : null;
48
- $this->transferInfo = isset($context['transfer_stats'])
49
- ? $context['transfer_stats']
50
- : [];
51
- $this->errorMessage = isset($context['message'])
52
- ? $context['message']
53
- : null;
54
- parent::__construct($message, 0, $previous);
55
- }
56
-
57
- public function __toString()
58
- {
59
- if (!$this->getPrevious()) {
60
- return parent::__toString();
61
- }
62
-
63
- // PHP strangely shows the innermost exception first before the outer
64
- // exception message. It also has a default character limit for
65
- // exception message strings such that the "next" exception (this one)
66
- // might not even get shown, causing developers to attempt to catch
67
- // the inner exception instead of the actual exception because they
68
- // can't see the outer exception's __toString output.
69
- return sprintf(
70
- "exception '%s' with message '%s'\n\n%s",
71
- get_class($this),
72
- $this->getMessage(),
73
- parent::__toString()
74
- );
75
- }
76
-
77
- /**
78
- * Get the command that was executed.
79
- *
80
- * @return CommandInterface
81
- */
82
- public function getCommand()
83
- {
84
- return $this->command;
85
- }
86
-
87
- /**
88
- * Get the concise error message if any.
89
- *
90
- * @return string|null
91
- */
92
- public function getAwsErrorMessage()
93
- {
94
- return $this->errorMessage;
95
- }
96
-
97
- /**
98
- * Get the sent HTTP request if any.
99
- *
100
- * @return RequestInterface|null
101
- */
102
- public function getRequest()
103
- {
104
- return $this->request;
105
- }
106
-
107
- /**
108
- * Get the received HTTP response if any.
109
- *
110
- * @return ResponseInterface|null
111
- */
112
- public function getResponse()
113
- {
114
- return $this->response;
115
- }
116
-
117
- /**
118
- * Get the result of the exception if available
119
- *
120
- * @return ResultInterface|null
121
- */
122
- public function getResult()
123
- {
124
- return $this->result;
125
- }
126
-
127
- /**
128
- * Returns true if this is a connection error.
129
- *
130
- * @return bool
131
- */
132
- public function isConnectionError()
133
- {
134
- return $this->connectionError;
135
- }
136
-
137
- /**
138
- * If available, gets the HTTP status code of the corresponding response
139
- *
140
- * @return int|null
141
- */
142
- public function getStatusCode()
143
- {
144
- return $this->response ? $this->response->getStatusCode() : null;
145
- }
146
-
147
- /**
148
- * Get the request ID of the error. This value is only present if a
149
- * response was received and is not present in the event of a networking
150
- * error.
151
- *
152
- * @return string|null Returns null if no response was received
153
- */
154
- public function getAwsRequestId()
155
- {
156
- return $this->requestId;
157
- }
158
-
159
- /**
160
- * Get the AWS error type.
161
- *
162
- * @return string|null Returns null if no response was received
163
- */
164
- public function getAwsErrorType()
165
- {
166
- return $this->errorType;
167
- }
168
-
169
- /**
170
- * Get the AWS error code.
171
- *
172
- * @return string|null Returns null if no response was received
173
- */
174
- public function getAwsErrorCode()
175
- {
176
- return $this->errorCode;
177
- }
178
-
179
- /**
180
- * Get all transfer information as an associative array if no $name
181
- * argument is supplied, or gets a specific transfer statistic if
182
- * a $name attribute is supplied (e.g., 'retries_attempted').
183
- *
184
- * @param string $name Name of the transfer stat to retrieve
185
- *
186
- * @return mixed|null|array
187
- */
188
- public function getTransferInfo($name = null)
189
- {
190
- if (!$name) {
191
- return $this->transferInfo;
192
- }
193
-
194
- return isset($this->transferInfo[$name])
195
- ? $this->transferInfo[$name]
196
- : null;
197
- }
198
-
199
- /**
200
- * Replace the transfer information associated with an exception.
201
- *
202
- * @param array $info
203
- */
204
- public function setTransferInfo(array $info)
205
- {
206
- $this->transferInfo = $info;
207
- }
208
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Exception/CouldNotCreateChecksumException.php DELETED
@@ -1,19 +0,0 @@
1
- <?php
2
- namespace Aws\Exception;
3
-
4
- class CouldNotCreateChecksumException extends \RuntimeException
5
- {
6
- public function __construct($algorithm, \Exception $previous = null)
7
- {
8
- $prefix = $algorithm === 'md5' ? "An" : "A";
9
- parent::__construct("{$prefix} {$algorithm} checksum could not be "
10
- . "calculated for the provided upload body, because it was not "
11
- . "seekable. To prevent this error you can either 1) include the "
12
- . "ContentMD5 or ContentSHA256 parameters with your request, 2) "
13
- . "use a seekable stream for the body, or 3) wrap the non-seekable "
14
- . "stream in a GuzzleHttp\\Psr7\\CachingStream object. You "
15
- . "should be careful though and remember that the CachingStream "
16
- . "utilizes PHP temp streams. This means that the stream will be "
17
- . "temporarily stored on the local disk.", 0, $previous);
18
- }
19
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Exception/CredentialsException.php DELETED
@@ -1,4 +0,0 @@
1
- <?php
2
- namespace Aws\Exception;
3
-
4
- class CredentialsException extends \RuntimeException {}
 
 
 
 
includes/aws/Aws/Exception/EventStreamDataException.php DELETED
@@ -1,38 +0,0 @@
1
- <?php
2
- namespace Aws\Exception;
3
-
4
- /**
5
- * Represents an exception that was supplied via an EventStream.
6
- */
7
- class EventStreamDataException extends \RuntimeException
8
- {
9
- private $errorCode;
10
- private $errorMessage;
11
-
12
- public function __construct($code, $message)
13
- {
14
- $this->errorCode = $code;
15
- $this->errorMessage = $message;
16
- parent::__construct($message);
17
- }
18
-
19
- /**
20
- * Get the AWS error code.
21
- *
22
- * @return string|null Returns null if no response was received
23
- */
24
- public function getAwsErrorCode()
25
- {
26
- return $this->errorCode;
27
- }
28
-
29
- /**
30
- * Get the concise error message if any.
31
- *
32
- * @return string|null
33
- */
34
- public function getAwsErrorMessage()
35
- {
36
- return $this->errorMessage;
37
- }
38
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Exception/MultipartUploadException.php DELETED
@@ -1,58 +0,0 @@
1
- <?php
2
- namespace Aws\Exception;
3
-
4
- use Aws\Multipart\UploadState;
5
-
6
- class MultipartUploadException extends \RuntimeException
7
- {
8
- /** @var UploadState State of the erroneous transfer */
9
- private $state;
10
-
11
- /**
12
- * @param UploadState $state Upload state at time of the exception.
13
- * @param \Exception|array $prev Exception being thrown.
14
- */
15
- public function __construct(UploadState $state, $prev = null) {
16
- $msg = 'An exception occurred while performing a multipart upload';
17
-
18
- if (is_array($prev)) {
19
- $msg = strtr($msg, ['performing' => 'uploading parts to']);
20
- $msg .= ". The following parts had errors:\n";
21
- /** @var $error AwsException */
22
- foreach ($prev as $part => $error) {
23
- $msg .= "- Part {$part}: " . $error->getMessage(). "\n";
24
- }
25
- } elseif ($prev instanceof AwsException) {
26
- switch ($prev->getCommand()->getName()) {
27
- case 'CreateMultipartUpload':
28
- case 'InitiateMultipartUpload':
29
- $action = 'initiating';
30
- break;
31
- case 'CompleteMultipartUpload':
32
- $action = 'completing';
33
- break;
34
- }
35
- if (isset($action)) {
36
- $msg = strtr($msg, ['performing' => $action]);
37
- }
38
- $msg .= ": {$prev->getMessage()}";
39
- }
40
-
41
- if (!$prev instanceof \Exception) {
42
- $prev = null;
43
- }
44
-
45
- parent::__construct($msg, 0, $prev);
46
- $this->state = $state;
47
- }
48
-
49
- /**
50
- * Get the state of the transfer
51
- *
52
- * @return UploadState
53
- */
54
- public function getState()
55
- {
56
- return $this->state;
57
- }
58
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Exception/UnresolvedApiException.php DELETED
@@ -1,4 +0,0 @@
1
- <?php
2
- namespace Aws\Exception;
3
-
4
- class UnresolvedApiException extends \RuntimeException {}
 
 
 
 
includes/aws/Aws/Exception/UnresolvedEndpointException.php DELETED
@@ -1,4 +0,0 @@
1
- <?php
2
- namespace Aws\Exception;
3
-
4
- class UnresolvedEndpointException extends \RuntimeException {}
 
 
 
 
includes/aws/Aws/Exception/UnresolvedSignatureException.php DELETED
@@ -1,4 +0,0 @@
1
- <?php
2
- namespace Aws\Exception;
3
-
4
- class UnresolvedSignatureException extends \RuntimeException {}
 
 
 
 
includes/aws/Aws/FMS/Exception/FMSException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\FMS\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **Firewall Management Service** service.
8
- */
9
- class FMSException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/FMS/FMSClient.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
- namespace Aws\FMS;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Firewall Management Service** service.
8
- * @method \Aws\Result associateAdminAccount(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise associateAdminAccountAsync(array $args = [])
10
- * @method \Aws\Result deleteNotificationChannel(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise deleteNotificationChannelAsync(array $args = [])
12
- * @method \Aws\Result deletePolicy(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise deletePolicyAsync(array $args = [])
14
- * @method \Aws\Result disassociateAdminAccount(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise disassociateAdminAccountAsync(array $args = [])
16
- * @method \Aws\Result getAdminAccount(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise getAdminAccountAsync(array $args = [])
18
- * @method \Aws\Result getComplianceDetail(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise getComplianceDetailAsync(array $args = [])
20
- * @method \Aws\Result getNotificationChannel(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise getNotificationChannelAsync(array $args = [])
22
- * @method \Aws\Result getPolicy(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise getPolicyAsync(array $args = [])
24
- * @method \Aws\Result listComplianceStatus(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise listComplianceStatusAsync(array $args = [])
26
- * @method \Aws\Result listMemberAccounts(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise listMemberAccountsAsync(array $args = [])
28
- * @method \Aws\Result listPolicies(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise listPoliciesAsync(array $args = [])
30
- * @method \Aws\Result putNotificationChannel(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise putNotificationChannelAsync(array $args = [])
32
- * @method \Aws\Result putPolicy(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise putPolicyAsync(array $args = [])
34
- */
35
- class FMSClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Firehose/Exception/FirehoseException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\Firehose\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **Amazon Kinesis Firehose** service.
8
- */
9
- class FirehoseException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Firehose/FirehoseClient.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
- namespace Aws\Firehose;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon Kinesis Firehose** service.
8
- *
9
- * @method \Aws\Result createDeliveryStream(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise createDeliveryStreamAsync(array $args = [])
11
- * @method \Aws\Result deleteDeliveryStream(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise deleteDeliveryStreamAsync(array $args = [])
13
- * @method \Aws\Result describeDeliveryStream(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise describeDeliveryStreamAsync(array $args = [])
15
- * @method \Aws\Result listDeliveryStreams(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise listDeliveryStreamsAsync(array $args = [])
17
- * @method \Aws\Result listTagsForDeliveryStream(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise listTagsForDeliveryStreamAsync(array $args = [])
19
- * @method \Aws\Result putRecord(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise putRecordAsync(array $args = [])
21
- * @method \Aws\Result putRecordBatch(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise putRecordBatchAsync(array $args = [])
23
- * @method \Aws\Result tagDeliveryStream(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise tagDeliveryStreamAsync(array $args = [])
25
- * @method \Aws\Result untagDeliveryStream(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise untagDeliveryStreamAsync(array $args = [])
27
- * @method \Aws\Result updateDestination(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise updateDestinationAsync(array $args = [])
29
- */
30
- class FirehoseClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/GameLift/Exception/GameLiftException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\GameLift\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **Amazon GameLift** service.
8
- */
9
- class GameLiftException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/GameLift/GameLiftClient.php DELETED
@@ -1,144 +0,0 @@
1
- <?php
2
- namespace Aws\GameLift;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon GameLift** service.
8
- *
9
- * @method \Aws\Result acceptMatch(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise acceptMatchAsync(array $args = [])
11
- * @method \Aws\Result createAlias(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise createAliasAsync(array $args = [])
13
- * @method \Aws\Result createBuild(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise createBuildAsync(array $args = [])
15
- * @method \Aws\Result createFleet(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise createFleetAsync(array $args = [])
17
- * @method \Aws\Result createGameSession(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise createGameSessionAsync(array $args = [])
19
- * @method \Aws\Result createGameSessionQueue(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise createGameSessionQueueAsync(array $args = [])
21
- * @method \Aws\Result createMatchmakingConfiguration(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise createMatchmakingConfigurationAsync(array $args = [])
23
- * @method \Aws\Result createMatchmakingRuleSet(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise createMatchmakingRuleSetAsync(array $args = [])
25
- * @method \Aws\Result createPlayerSession(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise createPlayerSessionAsync(array $args = [])
27
- * @method \Aws\Result createPlayerSessions(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise createPlayerSessionsAsync(array $args = [])
29
- * @method \Aws\Result createVpcPeeringAuthorization(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise createVpcPeeringAuthorizationAsync(array $args = [])
31
- * @method \Aws\Result createVpcPeeringConnection(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise createVpcPeeringConnectionAsync(array $args = [])
33
- * @method \Aws\Result deleteAlias(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise deleteAliasAsync(array $args = [])
35
- * @method \Aws\Result deleteBuild(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise deleteBuildAsync(array $args = [])
37
- * @method \Aws\Result deleteFleet(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise deleteFleetAsync(array $args = [])
39
- * @method \Aws\Result deleteGameSessionQueue(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise deleteGameSessionQueueAsync(array $args = [])
41
- * @method \Aws\Result deleteMatchmakingConfiguration(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise deleteMatchmakingConfigurationAsync(array $args = [])
43
- * @method \Aws\Result deleteScalingPolicy(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise deleteScalingPolicyAsync(array $args = [])
45
- * @method \Aws\Result deleteVpcPeeringAuthorization(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise deleteVpcPeeringAuthorizationAsync(array $args = [])
47
- * @method \Aws\Result deleteVpcPeeringConnection(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise deleteVpcPeeringConnectionAsync(array $args = [])
49
- * @method \Aws\Result describeAlias(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise describeAliasAsync(array $args = [])
51
- * @method \Aws\Result describeBuild(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise describeBuildAsync(array $args = [])
53
- * @method \Aws\Result describeEC2InstanceLimits(array $args = [])
54
- * @method \GuzzleHttp\Promise\Promise describeEC2InstanceLimitsAsync(array $args = [])
55
- * @method \Aws\Result describeFleetAttributes(array $args = [])
56
- * @method \GuzzleHttp\Promise\Promise describeFleetAttributesAsync(array $args = [])
57
- * @method \Aws\Result describeFleetCapacity(array $args = [])
58
- * @method \GuzzleHttp\Promise\Promise describeFleetCapacityAsync(array $args = [])
59
- * @method \Aws\Result describeFleetEvents(array $args = [])
60
- * @method \GuzzleHttp\Promise\Promise describeFleetEventsAsync(array $args = [])
61
- * @method \Aws\Result describeFleetPortSettings(array $args = [])
62
- * @method \GuzzleHttp\Promise\Promise describeFleetPortSettingsAsync(array $args = [])
63
- * @method \Aws\Result describeFleetUtilization(array $args = [])
64
- * @method \GuzzleHttp\Promise\Promise describeFleetUtilizationAsync(array $args = [])
65
- * @method \Aws\Result describeGameSessionDetails(array $args = [])
66
- * @method \GuzzleHttp\Promise\Promise describeGameSessionDetailsAsync(array $args = [])
67
- * @method \Aws\Result describeGameSessionPlacement(array $args = [])
68
- * @method \GuzzleHttp\Promise\Promise describeGameSessionPlacementAsync(array $args = [])
69
- * @method \Aws\Result describeGameSessionQueues(array $args = [])
70
- * @method \GuzzleHttp\Promise\Promise describeGameSessionQueuesAsync(array $args = [])
71
- * @method \Aws\Result describeGameSessions(array $args = [])
72
- * @method \GuzzleHttp\Promise\Promise describeGameSessionsAsync(array $args = [])
73
- * @method \Aws\Result describeInstances(array $args = [])
74
- * @method \GuzzleHttp\Promise\Promise describeInstancesAsync(array $args = [])
75
- * @method \Aws\Result describeMatchmaking(array $args = [])
76
- * @method \GuzzleHttp\Promise\Promise describeMatchmakingAsync(array $args = [])
77
- * @method \Aws\Result describeMatchmakingConfigurations(array $args = [])
78
- * @method \GuzzleHttp\Promise\Promise describeMatchmakingConfigurationsAsync(array $args = [])
79
- * @method \Aws\Result describeMatchmakingRuleSets(array $args = [])
80
- * @method \GuzzleHttp\Promise\Promise describeMatchmakingRuleSetsAsync(array $args = [])
81
- * @method \Aws\Result describePlayerSessions(array $args = [])
82
- * @method \GuzzleHttp\Promise\Promise describePlayerSessionsAsync(array $args = [])
83
- * @method \Aws\Result describeRuntimeConfiguration(array $args = [])
84
- * @method \GuzzleHttp\Promise\Promise describeRuntimeConfigurationAsync(array $args = [])
85
- * @method \Aws\Result describeScalingPolicies(array $args = [])
86
- * @method \GuzzleHttp\Promise\Promise describeScalingPoliciesAsync(array $args = [])
87
- * @method \Aws\Result describeVpcPeeringAuthorizations(array $args = [])
88
- * @method \GuzzleHttp\Promise\Promise describeVpcPeeringAuthorizationsAsync(array $args = [])
89
- * @method \Aws\Result describeVpcPeeringConnections(array $args = [])
90
- * @method \GuzzleHttp\Promise\Promise describeVpcPeeringConnectionsAsync(array $args = [])
91
- * @method \Aws\Result getGameSessionLogUrl(array $args = [])
92
- * @method \GuzzleHttp\Promise\Promise getGameSessionLogUrlAsync(array $args = [])
93
- * @method \Aws\Result getInstanceAccess(array $args = [])
94
- * @method \GuzzleHttp\Promise\Promise getInstanceAccessAsync(array $args = [])
95
- * @method \Aws\Result listAliases(array $args = [])
96
- * @method \GuzzleHttp\Promise\Promise listAliasesAsync(array $args = [])
97
- * @method \Aws\Result listBuilds(array $args = [])
98
- * @method \GuzzleHttp\Promise\Promise listBuildsAsync(array $args = [])
99
- * @method \Aws\Result listFleets(array $args = [])
100
- * @method \GuzzleHttp\Promise\Promise listFleetsAsync(array $args = [])
101
- * @method \Aws\Result putScalingPolicy(array $args = [])
102
- * @method \GuzzleHttp\Promise\Promise putScalingPolicyAsync(array $args = [])
103
- * @method \Aws\Result requestUploadCredentials(array $args = [])
104
- * @method \GuzzleHttp\Promise\Promise requestUploadCredentialsAsync(array $args = [])
105
- * @method \Aws\Result resolveAlias(array $args = [])
106
- * @method \GuzzleHttp\Promise\Promise resolveAliasAsync(array $args = [])
107
- * @method \Aws\Result searchGameSessions(array $args = [])
108
- * @method \GuzzleHttp\Promise\Promise searchGameSessionsAsync(array $args = [])
109
- * @method \Aws\Result startFleetActions(array $args = [])
110
- * @method \GuzzleHttp\Promise\Promise startFleetActionsAsync(array $args = [])
111
- * @method \Aws\Result startGameSessionPlacement(array $args = [])
112
- * @method \GuzzleHttp\Promise\Promise startGameSessionPlacementAsync(array $args = [])
113
- * @method \Aws\Result startMatchBackfill(array $args = [])
114
- * @method \GuzzleHttp\Promise\Promise startMatchBackfillAsync(array $args = [])
115
- * @method \Aws\Result startMatchmaking(array $args = [])
116
- * @method \GuzzleHttp\Promise\Promise startMatchmakingAsync(array $args = [])
117
- * @method \Aws\Result stopFleetActions(array $args = [])
118
- * @method \GuzzleHttp\Promise\Promise stopFleetActionsAsync(array $args = [])
119
- * @method \Aws\Result stopGameSessionPlacement(array $args = [])
120
- * @method \GuzzleHttp\Promise\Promise stopGameSessionPlacementAsync(array $args = [])
121
- * @method \Aws\Result stopMatchmaking(array $args = [])
122
- * @method \GuzzleHttp\Promise\Promise stopMatchmakingAsync(array $args = [])
123
- * @method \Aws\Result updateAlias(array $args = [])
124
- * @method \GuzzleHttp\Promise\Promise updateAliasAsync(array $args = [])
125
- * @method \Aws\Result updateBuild(array $args = [])
126
- * @method \GuzzleHttp\Promise\Promise updateBuildAsync(array $args = [])
127
- * @method \Aws\Result updateFleetAttributes(array $args = [])
128
- * @method \GuzzleHttp\Promise\Promise updateFleetAttributesAsync(array $args = [])
129
- * @method \Aws\Result updateFleetCapacity(array $args = [])
130
- * @method \GuzzleHttp\Promise\Promise updateFleetCapacityAsync(array $args = [])
131
- * @method \Aws\Result updateFleetPortSettings(array $args = [])
132
- * @method \GuzzleHttp\Promise\Promise updateFleetPortSettingsAsync(array $args = [])
133
- * @method \Aws\Result updateGameSession(array $args = [])
134
- * @method \GuzzleHttp\Promise\Promise updateGameSessionAsync(array $args = [])
135
- * @method \Aws\Result updateGameSessionQueue(array $args = [])
136
- * @method \GuzzleHttp\Promise\Promise updateGameSessionQueueAsync(array $args = [])
137
- * @method \Aws\Result updateMatchmakingConfiguration(array $args = [])
138
- * @method \GuzzleHttp\Promise\Promise updateMatchmakingConfigurationAsync(array $args = [])
139
- * @method \Aws\Result updateRuntimeConfiguration(array $args = [])
140
- * @method \GuzzleHttp\Promise\Promise updateRuntimeConfigurationAsync(array $args = [])
141
- * @method \Aws\Result validateMatchmakingRuleSet(array $args = [])
142
- * @method \GuzzleHttp\Promise\Promise validateMatchmakingRuleSetAsync(array $args = [])
143
- */
144
- class GameLiftClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Glacier/Exception/GlacierException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\Glacier\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the Amazon Glacier service.
8
- */
9
- class GlacierException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Glacier/GlacierClient.php DELETED
@@ -1,251 +0,0 @@
1
- <?php
2
- namespace Aws\Glacier;
3
-
4
- use Aws\Api\ApiProvider;
5
- use Aws\Api\DocModel;
6
- use Aws\Api\Service;
7
- use Aws\AwsClient;
8
- use Aws\CommandInterface;
9
- use Aws\Exception\CouldNotCreateChecksumException;
10
- use Aws\HashingStream;
11
- use Aws\Middleware;
12
- use Aws\PhpHash;
13
- use Psr\Http\Message\RequestInterface;
14
-
15
- /**
16
- * This client is used to interact with the **Amazon Glacier** service.
17
- *
18
- * @method \Aws\Result abortMultipartUpload(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise abortMultipartUploadAsync(array $args = [])
20
- * @method \Aws\Result abortVaultLock(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise abortVaultLockAsync(array $args = [])
22
- * @method \Aws\Result addTagsToVault(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise addTagsToVaultAsync(array $args = [])
24
- * @method \Aws\Result completeMultipartUpload(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise completeMultipartUploadAsync(array $args = [])
26
- * @method \Aws\Result completeVaultLock(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise completeVaultLockAsync(array $args = [])
28
- * @method \Aws\Result createVault(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise createVaultAsync(array $args = [])
30
- * @method \Aws\Result deleteArchive(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise deleteArchiveAsync(array $args = [])
32
- * @method \Aws\Result deleteVault(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise deleteVaultAsync(array $args = [])
34
- * @method \Aws\Result deleteVaultAccessPolicy(array $args = [])
35
- * @method \GuzzleHttp\Promise\Promise deleteVaultAccessPolicyAsync(array $args = [])
36
- * @method \Aws\Result deleteVaultNotifications(array $args = [])
37
- * @method \GuzzleHttp\Promise\Promise deleteVaultNotificationsAsync(array $args = [])
38
- * @method \Aws\Result describeJob(array $args = [])
39
- * @method \GuzzleHttp\Promise\Promise describeJobAsync(array $args = [])
40
- * @method \Aws\Result describeVault(array $args = [])
41
- * @method \GuzzleHttp\Promise\Promise describeVaultAsync(array $args = [])
42
- * @method \Aws\Result getDataRetrievalPolicy(array $args = [])
43
- * @method \GuzzleHttp\Promise\Promise getDataRetrievalPolicyAsync(array $args = [])
44
- * @method \Aws\Result getJobOutput(array $args = [])
45
- * @method \GuzzleHttp\Promise\Promise getJobOutputAsync(array $args = [])
46
- * @method \Aws\Result getVaultAccessPolicy(array $args = [])
47
- * @method \GuzzleHttp\Promise\Promise getVaultAccessPolicyAsync(array $args = [])
48
- * @method \Aws\Result getVaultLock(array $args = [])
49
- * @method \GuzzleHttp\Promise\Promise getVaultLockAsync(array $args = [])
50
- * @method \Aws\Result getVaultNotifications(array $args = [])
51
- * @method \GuzzleHttp\Promise\Promise getVaultNotificationsAsync(array $args = [])
52
- * @method \Aws\Result initiateJob(array $args = [])
53
- * @method \GuzzleHttp\Promise\Promise initiateJobAsync(array $args = [])
54
- * @method \Aws\Result initiateMultipartUpload(array $args = [])
55
- * @method \GuzzleHttp\Promise\Promise initiateMultipartUploadAsync(array $args = [])
56
- * @method \Aws\Result initiateVaultLock(array $args = [])
57
- * @method \GuzzleHttp\Promise\Promise initiateVaultLockAsync(array $args = [])
58
- * @method \Aws\Result listJobs(array $args = [])
59
- * @method \GuzzleHttp\Promise\Promise listJobsAsync(array $args = [])
60
- * @method \Aws\Result listMultipartUploads(array $args = [])
61
- * @method \GuzzleHttp\Promise\Promise listMultipartUploadsAsync(array $args = [])
62
- * @method \Aws\Result listParts(array $args = [])
63
- * @method \GuzzleHttp\Promise\Promise listPartsAsync(array $args = [])
64
- * @method \Aws\Result listProvisionedCapacity(array $args = [])
65
- * @method \GuzzleHttp\Promise\Promise listProvisionedCapacityAsync(array $args = [])
66
- * @method \Aws\Result listTagsForVault(array $args = [])
67
- * @method \GuzzleHttp\Promise\Promise listTagsForVaultAsync(array $args = [])
68
- * @method \Aws\Result listVaults(array $args = [])
69
- * @method \GuzzleHttp\Promise\Promise listVaultsAsync(array $args = [])
70
- * @method \Aws\Result purchaseProvisionedCapacity(array $args = [])
71
- * @method \GuzzleHttp\Promise\Promise purchaseProvisionedCapacityAsync(array $args = [])
72
- * @method \Aws\Result removeTagsFromVault(array $args = [])
73
- * @method \GuzzleHttp\Promise\Promise removeTagsFromVaultAsync(array $args = [])
74
- * @method \Aws\Result setDataRetrievalPolicy(array $args = [])
75
- * @method \GuzzleHttp\Promise\Promise setDataRetrievalPolicyAsync(array $args = [])
76
- * @method \Aws\Result setVaultAccessPolicy(array $args = [])
77
- * @method \GuzzleHttp\Promise\Promise setVaultAccessPolicyAsync(array $args = [])
78
- * @method \Aws\Result setVaultNotifications(array $args = [])
79
- * @method \GuzzleHttp\Promise\Promise setVaultNotificationsAsync(array $args = [])
80
- * @method \Aws\Result uploadArchive(array $args = [])
81
- * @method \GuzzleHttp\Promise\Promise uploadArchiveAsync(array $args = [])
82
- * @method \Aws\Result uploadMultipartPart(array $args = [])
83
- * @method \GuzzleHttp\Promise\Promise uploadMultipartPartAsync(array $args = [])
84
- */
85
- class GlacierClient extends AwsClient
86
- {
87
- public function __construct(array $args)
88
- {
89
- parent::__construct($args);
90
-
91
- // Setup middleware.
92
- $stack = $this->getHandlerList();
93
- $stack->appendBuild($this->getApiVersionMiddleware(), 'glacier.api_version');
94
- $stack->appendBuild($this->getChecksumsMiddleware(), 'glacier.checksum');
95
- $stack->appendBuild(
96
- Middleware::contentType(['UploadArchive', 'UploadPart']),
97
- 'glacier.content_type'
98
- );
99
- $stack->appendInit(
100
- Middleware::sourceFile($this->getApi(), 'body', 'sourceFile'),
101
- 'glacier.source_file'
102
- );
103
- }
104
-
105
- /**
106
- * {@inheritdoc}
107
- *
108
- * Sets the default accountId to "-" for all operations.
109
- */
110
- public function getCommand($name, array $args = [])
111
- {
112
- return parent::getCommand($name, $args + ['accountId' => '-']);
113
- }
114
-
115
- /**
116
- * Creates a middleware that updates a command with the content and tree
117
- * hash headers for upload operations.
118
- *
119
- * @return callable
120
- * @throws CouldNotCreateChecksumException if the body is not seekable.
121
- */
122
- private function getChecksumsMiddleware()
123
- {
124
- return function (callable $handler) {
125
- return function (
126
- CommandInterface $command,
127
- RequestInterface $request = null
128
- ) use ($handler) {
129
- // Accept "ContentSHA256" with a lowercase "c" to match other Glacier params.
130
- if (!$command['ContentSHA256'] && $command['contentSHA256']) {
131
- $command['ContentSHA256'] = $command['contentSHA256'];
132
- unset($command['contentSHA256']);
133
- }
134
-
135
- // If uploading, then make sure checksums are added.
136
- $name = $command->getName();
137
- if (($name === 'UploadArchive' || $name === 'UploadMultipartPart')
138
- && (!$command['checksum'] || !$command['ContentSHA256'])
139
- ) {
140
- $body = $request->getBody();
141
- if (!$body->isSeekable()) {
142
- throw new CouldNotCreateChecksumException('sha256');
143
- }
144
-
145
- // Add a tree hash if not provided.
146
- if (!$command['checksum']) {
147
- $body = new HashingStream(
148
- $body, new TreeHash(),
149
- function ($result) use ($command, &$request) {
150
- $request = $request->withHeader(
151
- 'x-amz-sha256-tree-hash',
152
- bin2hex($result)
153
- );
154
- }
155
- );
156
- }
157
-
158
- // Add a linear content hash if not provided.
159
- if (!$command['ContentSHA256']) {
160
- $body = new HashingStream(
161
- $body, new PhpHash('sha256'),
162
- function ($result) use ($command) {
163
- $command['ContentSHA256'] = bin2hex($result);
164
- }
165
- );
166
- }
167
-
168
- // Read the stream in order to calculate the hashes.
169
- while (!$body->eof()) {
170
- $body->read(1048576);
171
- }
172
- $body->seek(0);
173
- }
174
-
175
- // Set the content hash header if a value is in the command.
176
- if ($command['ContentSHA256']) {
177
- $request = $request->withHeader(
178
- 'x-amz-content-sha256',
179
- $command['ContentSHA256']
180
- );
181
- }
182
-
183
- return $handler($command, $request);
184
- };
185
- };
186
- }
187
-
188
- /**
189
- * Creates a middleware that adds the API version header for all requests.
190
- *
191
- * @return callable
192
- */
193
- private function getApiVersionMiddleware()
194
- {
195
- return function (callable $handler) {
196
- return function (
197
- CommandInterface $command,
198
- RequestInterface $request = null
199
- ) use ($handler) {
200
- return $handler($command, $request->withHeader(
201
- 'x-amz-glacier-version',
202
- $this->getApi()->getMetadata('apiVersion')
203
- ));
204
- };
205
- };
206
- }
207
-
208
- /**
209
- * @internal
210
- * @codeCoverageIgnore
211
- */
212
- public static function applyDocFilters(array $api, array $docs)
213
- {
214
- // Add the SourceFile parameter.
215
- $docs['shapes']['SourceFile']['base'] = 'The path to a file on disk to use instead of the body parameter.';
216
- $api['shapes']['SourceFile'] = ['type' => 'string'];
217
- $api['shapes']['UploadArchiveInput']['members']['sourceFile'] = ['shape' => 'SourceFile'];
218
- $api['shapes']['UploadMultipartPartInput']['members']['sourceFile'] = ['shape' => 'SourceFile'];
219
-
220
- // Add the ContentSHA256 parameter.
221
- $docs['shapes']['ContentSHA256']['base'] = 'A SHA256 hash of the content of the request body';
222
- $api['shapes']['ContentSHA256'] = ['type' => 'string'];
223
- $api['shapes']['UploadArchiveInput']['members']['contentSHA256'] = ['shape' => 'ContentSHA256'];
224
- $api['shapes']['UploadMultipartPartInput']['members']['contentSHA256'] = ['shape' => 'ContentSHA256'];
225
-
226
- // Add information about "checksum" and "ContentSHA256" being optional.
227
- $optional = '<div class="alert alert-info">The SDK will compute this value '
228
- . 'for you on your behalf if it is not supplied.</div>';
229
- $docs['shapes']['checksum']['append'] = $optional;
230
- $docs['shapes']['ContentSHA256']['append'] = $optional;
231
-
232
- // Make "accountId" optional for all operations.
233
- foreach ($api['operations'] as $operation) {
234
- $inputShape =& $api['shapes'][$operation['input']['shape']];
235
- $accountIdIndex = array_search('accountId', $inputShape['required']);
236
- unset($inputShape['required'][$accountIdIndex]);
237
- }
238
- // Add information about the default value for "accountId".
239
- $optional = '<div class="alert alert-info">The SDK will set this value to "-" by default.</div>';
240
- foreach ($docs['shapes']['string']['refs'] as $name => &$ref) {
241
- if (strpos($name, 'accountId')) {
242
- $ref .= $optional;
243
- }
244
- }
245
-
246
- return [
247
- new Service($api, ApiProvider::defaultProvider()),
248
- new DocModel($docs)
249
- ];
250
- }
251
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Glacier/MultipartUploader.php DELETED
@@ -1,284 +0,0 @@
1
- <?php
2
- namespace Aws\Glacier;
3
-
4
- use Aws\CommandInterface;
5
- use Aws\HashingStream;
6
- use Aws\Multipart\AbstractUploader;
7
- use Aws\Multipart\UploadState;
8
- use Aws\PhpHash;
9
- use Aws\ResultInterface;
10
- use GuzzleHttp\Psr7;
11
- use Psr\Http\Message\StreamInterface as Stream;
12
-
13
- /**
14
- * Encapsulates the execution of a multipart upload to Glacier.
15
- */
16
- class MultipartUploader extends AbstractUploader
17
- {
18
- const PART_MIN_SIZE = 1048576;
19
-
20
- private static $validPartSizes = [
21
- 1048576, // 1 MB
22
- 2097152, // 2 MB
23
- 4194304, // 4 MB
24
- 8388608, // 8 MB
25
- 16777216, // 16 MB
26
- 33554432, // 32 MB
27
- 67108864, // 64 MB
28
- 134217728, // 128 MB
29
- 268435456, // 256 MB
30
- 536870912, // 512 MB
31
- 1073741824, // 1 GB
32
- 2147483648, // 2 GB
33
- 4294967296, // 4 GB
34
- ];
35
-
36
- /**
37
- * Creates an UploadState object for a multipart upload by querying the
38
- * service for the specified upload's information.
39
- *
40
- * @param GlacierClient $client GlacierClient object to use.
41
- * @param string $vaultName Vault name for the multipart upload.
42
- * @param string $uploadId Upload ID for the multipart upload.
43
- * @param string $accountId Account ID for the multipart upload.
44
- *
45
- * @return UploadState
46
- */
47
- public static function getStateFromService(
48
- GlacierClient $client,
49
- $vaultName,
50
- $uploadId,
51
- $accountId = '-'
52
- ) {
53
- $state = new UploadState([
54
- 'accountId' => $accountId,
55
- 'vaultName' => $vaultName,
56
- 'uploadId' => $uploadId,
57
- ]);
58
-
59
- foreach ($client->getPaginator('ListParts', $state->getId()) as $result) {
60
- // Get the part size from the first part in the first result.
61
- if (!$state->getPartSize()) {
62
- $state->setPartSize($result['PartSizeInBytes']);
63
- }
64
- // Mark all the parts returned by ListParts as uploaded.
65
- foreach ($result['Parts'] as $part) {
66
- list($rangeIndex, $rangeSize) = self::parseRange(
67
- $part['RangeInBytes'],
68
- $state->getPartSize()
69
- );
70
- $state->markPartAsUploaded($rangeIndex, [
71
- 'size' => $rangeSize,
72
- 'checksum' => $part['SHA256TreeHash'],
73
- ]);
74
- }
75
- }
76
-
77
- $state->setStatus(UploadState::INITIATED);
78
-
79
- return $state;
80
- }
81
-
82
- /**
83
- * Creates a multipart upload for a Glacier archive.
84
- *
85
- * The valid configuration options are as follows:
86
- *
87
- * - account_id: (string, default=string('-')) Account ID for the archive
88
- * being uploaded, if different from the account making the request.
89
- * - archive_description: (string) Description of the archive.
90
- * - before_complete: (callable) Callback to invoke before the
91
- * `CompleteMultipartUpload` operation. The callback should have a
92
- * function signature like `function (Aws\Command $command) {...}`.
93
- * - before_initiate: (callable) Callback to invoke before the
94
- * `InitiateMultipartUpload` operation. The callback should have a
95
- * function signature like `function (Aws\Command $command) {...}`.
96
- * - before_upload: (callable) Callback to invoke before any
97
- * `UploadMultipartPart` operations. The callback should have a function
98
- * signature like `function (Aws\Command $command) {...}`.
99
- * - concurrency: (int, default=int(3)) Maximum number of concurrent
100
- * `UploadMultipartPart` operations allowed during the multipart upload.
101
- * - part_size: (int, default=int(1048576)) Part size, in bytes, to use when
102
- * doing a multipart upload. This must between 1 MB and 4 GB, and must be
103
- * a power of 2 (in megabytes).
104
- * - prepare_data_source: (callable) Callback to invoke before starting the
105
- * multipart upload workflow. The callback should have a function
106
- * signature like `function () {...}`.
107
- * - state: (Aws\Multipart\UploadState) An object that represents the state
108
- * of the multipart upload and that is used to resume a previous upload.
109
- * When this options is provided, the `account_id`, `key`, and `part_size`
110
- * options are ignored.
111
- * - vault_name: (string, required) Vault name to use for the archive being
112
- * uploaded.
113
- *
114
- * @param GlacierClient $client Client used for the upload.
115
- * @param mixed $source Source of the data to upload.
116
- * @param array $config Configuration used to perform the upload.
117
- */
118
- public function __construct(GlacierClient $client, $source, array $config = [])
119
- {
120
- parent::__construct($client, $source, $config + [
121
- 'account_id' => '-',
122
- 'vault_name' => null,
123
- ]);
124
- }
125
-
126
- protected function loadUploadWorkflowInfo()
127
- {
128
- return [
129
- 'command' => [
130
- 'initiate' => 'InitiateMultipartUpload',
131
- 'upload' => 'UploadMultipartPart',
132
- 'complete' => 'CompleteMultipartUpload',
133
- ],
134
- 'id' => [
135
- 'account_id' => 'accountId',
136
- 'vault_name' => 'vaultName',
137
- 'upload_id' => 'uploadId',
138
- ],
139
- 'part_num' => 'range',
140
- ];
141
- }
142
-
143
- protected function determinePartSize()
144
- {
145
- // Make sure the part size is set.
146
- $partSize = $this->config['part_size'] ?: self::PART_MIN_SIZE;
147
-
148
- // Ensure that the part size is valid.
149
- if (!in_array($partSize, self::$validPartSizes)) {
150
- throw new \InvalidArgumentException('The part_size must be a power '
151
- . 'of 2, in megabytes, such that 1 MB <= PART_SIZE <= 4 GB.');
152
- }
153
-
154
- return $partSize;
155
- }
156
-
157
- protected function createPart($seekable, $number)
158
- {
159
- $data = [];
160
- $firstByte = $this->source->tell();
161
-
162
- // Read from the source to create the body stream. This also
163
- // calculates the linear and tree hashes as the data is read.
164
- if ($seekable) {
165
- // Case 1: Stream is seekable, can make stream from new handle.
166
- $body = Psr7\try_fopen($this->source->getMetadata('uri'), 'r');
167
- $body = $this->limitPartStream(Psr7\stream_for($body));
168
- // Create another stream decorated with hashing streams and read
169
- // through it, so we can get the hash values for the part.
170
- $decoratedBody = $this->decorateWithHashes($body, $data);
171
- while (!$decoratedBody->eof()) $decoratedBody->read(1048576);
172
- // Seek the original source forward to the end of the range.
173
- $this->source->seek($this->source->tell() + $body->getSize());
174
- } else {
175
- // Case 2: Stream is not seekable, must store part in temp stream.
176
- $source = $this->limitPartStream($this->source);
177
- $source = $this->decorateWithHashes($source, $data);
178
- $body = Psr7\stream_for();
179
- Psr7\copy_to_stream($source, $body);
180
- }
181
-
182
- // Do not create a part if the body size is zero.
183
- if ($body->getSize() === 0) {
184
- return false;
185
- }
186
-
187
- $body->seek(0);
188
- $data['body'] = $body;
189
- $lastByte = $this->source->tell() - 1;
190
- $data['range'] = "bytes {$firstByte}-{$lastByte}/*";
191
-
192
- return $data;
193
- }
194
-
195
- protected function handleResult(CommandInterface $command, ResultInterface $result)
196
- {
197
- list($rangeIndex, $rangeSize) = $this->parseRange(
198
- $command['range'],
199
- $this->state->getPartSize()
200
- );
201
-
202
- $this->state->markPartAsUploaded($rangeIndex, [
203
- 'size' => $rangeSize,
204
- 'checksum' => $command['checksum']
205
- ]);
206
- }
207
-
208
- protected function getInitiateParams()
209
- {
210
- $params = ['partSize' => $this->state->getPartSize()];
211
- if (isset($this->config['archive_description'])) {
212
- $params['archiveDescription'] = $this->config['archive_description'];
213
- }
214
-
215
- return $params;
216
- }
217
-
218
- protected function getCompleteParams()
219
- {
220
- $treeHash = new TreeHash();
221
- $archiveSize = 0;
222
- foreach ($this->state->getUploadedParts() as $part) {
223
- $archiveSize += $part['size'];
224
- $treeHash->addChecksum($part['checksum']);
225
- }
226
-
227
- return [
228
- 'archiveSize' => $archiveSize,
229
- 'checksum' => bin2hex($treeHash->complete()),
230
- ];
231
- }
232
-
233
- /**
234
- * Decorates a stream with a tree AND linear sha256 hashing stream.
235
- *
236
- * @param Stream $stream Stream to decorate.
237
- * @param array $data Data bag that results are injected into.
238
- *
239
- * @return Stream
240
- */
241
- private function decorateWithHashes(Stream $stream, array &$data)
242
- {
243
- // Make sure that a tree hash is calculated.
244
- $stream = new HashingStream($stream, new TreeHash(),
245
- function ($result) use (&$data) {
246
- $data['checksum'] = bin2hex($result);
247
- }
248
- );
249
-
250
- // Make sure that a linear SHA256 hash is calculated.
251
- $stream = new HashingStream($stream, new PhpHash('sha256'),
252
- function ($result) use (&$data) {
253
- $data['ContentSHA256'] = bin2hex($result);
254
- }
255
- );
256
-
257
- return $stream;
258
- }
259
-
260
- /**
261
- * Parses a Glacier range string into a size and part number.
262
- *
263
- * @param string $range Glacier range string (e.g., "bytes 5-5000/*")
264
- * @param int $partSize The chosen part size
265
- *
266
- * @return array
267
- */
268
- private static function parseRange($range, $partSize)
269
- {
270
- // Strip away the prefix and suffix.
271
- if (strpos($range, 'bytes') !== false) {
272
- $range = substr($range, 6, -2);
273
- }
274
-
275
- // Split that range into it's parts.
276
- list($firstByte, $lastByte) = explode('-', $range);
277
-
278
- // Calculate and return range index and range size
279
- return [
280
- intval($firstByte / $partSize) + 1,
281
- $lastByte - $firstByte + 1,
282
- ];
283
- }
284
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Glacier/TreeHash.php DELETED
@@ -1,118 +0,0 @@
1
- <?php
2
- namespace Aws\Glacier;
3
-
4
- use Aws\HashInterface;
5
-
6
- /**
7
- * Encapsulates the creation of a tree hash from streamed data
8
- */
9
- class TreeHash implements HashInterface
10
- {
11
- const MB = 1048576;
12
- const EMPTY_HASH = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855';
13
-
14
- /** @var string Algorithm used for hashing. */
15
- private $algorithm;
16
-
17
- /** @var string Buffered data that has not yet been hashed. */
18
- private $buffer;
19
-
20
- /** @var array Binary checksums from which the tree hash is derived. */
21
- private $checksums = [];
22
-
23
- /** @var string Resulting hash in binary form. */
24
- private $hash;
25
-
26
- public function __construct($algorithm = 'sha256')
27
- {
28
- $this->algorithm = $algorithm;
29
- $this->reset();
30
- }
31
-
32
- /**
33
- * {@inheritdoc}
34
- * @throws \LogicException if the root tree hash is already calculated
35
- */
36
- public function update($data)
37
- {
38
- // Error if hash is already calculated.
39
- if ($this->hash) {
40
- throw new \LogicException('You may not add more data to a '
41
- . 'complete tree hash.');
42
- }
43
-
44
- // Buffer incoming data.
45
- $this->buffer .= $data;
46
-
47
- // When there is more than a MB of data, create a checksum.
48
- while (strlen($this->buffer) >= self::MB) {
49
- $data = substr($this->buffer, 0, self::MB);
50
- $this->buffer = substr($this->buffer, self::MB) ?: '';
51
- $this->checksums[] = hash($this->algorithm, $data, true);
52
- }
53
-
54
- return $this;
55
- }
56
-
57
- /**
58
- * Add a checksum to the tree hash directly
59
- *
60
- * @param string $checksum The checksum to add
61
- * @param bool $inBinaryForm TRUE if checksum is in binary form
62
- *
63
- * @return self
64
- * @throws \LogicException if the root tree hash is already calculated
65
- */
66
- public function addChecksum($checksum, $inBinaryForm = false)
67
- {
68
- // Error if hash is already calculated
69
- if ($this->hash) {
70
- throw new \LogicException('You may not add more checksums to a '
71
- . 'complete tree hash.');
72
- }
73
-
74
- // Convert the checksum to binary form if necessary
75
- $this->checksums[] = $inBinaryForm ? $checksum : hex2bin($checksum);
76
-
77
- return $this;
78
- }
79
-
80
- public function complete()
81
- {
82
- if (!$this->hash) {
83
- // Clear out the remaining buffer.
84
- if (strlen($this->buffer) > 0) {
85
- $this->checksums[] = hash($this->algorithm, $this->buffer, true);
86
- $this->buffer = '';
87
- }
88
-
89
- // If no hashes, add the EMPTY_HASH.
90
- if (!$this->checksums) {
91
- $this->checksums[] = hex2bin(self::EMPTY_HASH);
92
- }
93
-
94
- // Perform hashes up the tree to arrive at the root checksum.
95
- $hashes = $this->checksums;
96
- while (count($hashes) > 1) {
97
- $sets = array_chunk($hashes, 2);
98
- $hashes = array();
99
- foreach ($sets as $set) {
100
- $hashes[] = (count($set) === 1)
101
- ? $set[0]
102
- : hash($this->algorithm, $set[0] . $set[1], true);
103
- }
104
- }
105
-
106
- $this->hash = $hashes[0];
107
- }
108
-
109
- return $this->hash;
110
- }
111
-
112
- public function reset()
113
- {
114
- $this->hash = null;
115
- $this->checksums = [];
116
- $this->buffer = '';
117
- }
118
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Glue/Exception/GlueException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\Glue\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **AWS Glue** service.
8
- */
9
- class GlueException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Glue/GlueClient.php DELETED
@@ -1,177 +0,0 @@
1
- <?php
2
- namespace Aws\Glue;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS Glue** service.
8
- * @method \Aws\Result batchCreatePartition(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise batchCreatePartitionAsync(array $args = [])
10
- * @method \Aws\Result batchDeleteConnection(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise batchDeleteConnectionAsync(array $args = [])
12
- * @method \Aws\Result batchDeletePartition(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise batchDeletePartitionAsync(array $args = [])
14
- * @method \Aws\Result batchDeleteTable(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise batchDeleteTableAsync(array $args = [])
16
- * @method \Aws\Result batchDeleteTableVersion(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise batchDeleteTableVersionAsync(array $args = [])
18
- * @method \Aws\Result batchGetPartition(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise batchGetPartitionAsync(array $args = [])
20
- * @method \Aws\Result batchStopJobRun(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise batchStopJobRunAsync(array $args = [])
22
- * @method \Aws\Result createClassifier(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise createClassifierAsync(array $args = [])
24
- * @method \Aws\Result createConnection(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise createConnectionAsync(array $args = [])
26
- * @method \Aws\Result createCrawler(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise createCrawlerAsync(array $args = [])
28
- * @method \Aws\Result createDatabase(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise createDatabaseAsync(array $args = [])
30
- * @method \Aws\Result createDevEndpoint(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise createDevEndpointAsync(array $args = [])
32
- * @method \Aws\Result createJob(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise createJobAsync(array $args = [])
34
- * @method \Aws\Result createPartition(array $args = [])
35
- * @method \GuzzleHttp\Promise\Promise createPartitionAsync(array $args = [])
36
- * @method \Aws\Result createScript(array $args = [])
37
- * @method \GuzzleHttp\Promise\Promise createScriptAsync(array $args = [])
38
- * @method \Aws\Result createSecurityConfiguration(array $args = [])
39
- * @method \GuzzleHttp\Promise\Promise createSecurityConfigurationAsync(array $args = [])
40
- * @method \Aws\Result createTable(array $args = [])
41
- * @method \GuzzleHttp\Promise\Promise createTableAsync(array $args = [])
42
- * @method \Aws\Result createTrigger(array $args = [])
43
- * @method \GuzzleHttp\Promise\Promise createTriggerAsync(array $args = [])
44
- * @method \Aws\Result createUserDefinedFunction(array $args = [])
45
- * @method \GuzzleHttp\Promise\Promise createUserDefinedFunctionAsync(array $args = [])
46
- * @method \Aws\Result deleteClassifier(array $args = [])
47
- * @method \GuzzleHttp\Promise\Promise deleteClassifierAsync(array $args = [])
48
- * @method \Aws\Result deleteConnection(array $args = [])
49
- * @method \GuzzleHttp\Promise\Promise deleteConnectionAsync(array $args = [])
50
- * @method \Aws\Result deleteCrawler(array $args = [])
51
- * @method \GuzzleHttp\Promise\Promise deleteCrawlerAsync(array $args = [])
52
- * @method \Aws\Result deleteDatabase(array $args = [])
53
- * @method \GuzzleHttp\Promise\Promise deleteDatabaseAsync(array $args = [])
54
- * @method \Aws\Result deleteDevEndpoint(array $args = [])
55
- * @method \GuzzleHttp\Promise\Promise deleteDevEndpointAsync(array $args = [])
56
- * @method \Aws\Result deleteJob(array $args = [])
57
- * @method \GuzzleHttp\Promise\Promise deleteJobAsync(array $args = [])
58
- * @method \Aws\Result deletePartition(array $args = [])
59
- * @method \GuzzleHttp\Promise\Promise deletePartitionAsync(array $args = [])
60
- * @method \Aws\Result deleteSecurityConfiguration(array $args = [])
61
- * @method \GuzzleHttp\Promise\Promise deleteSecurityConfigurationAsync(array $args = [])
62
- * @method \Aws\Result deleteTable(array $args = [])
63
- * @method \GuzzleHttp\Promise\Promise deleteTableAsync(array $args = [])
64
- * @method \Aws\Result deleteTableVersion(array $args = [])
65
- * @method \GuzzleHttp\Promise\Promise deleteTableVersionAsync(array $args = [])
66
- * @method \Aws\Result deleteTrigger(array $args = [])
67
- * @method \GuzzleHttp\Promise\Promise deleteTriggerAsync(array $args = [])
68
- * @method \Aws\Result deleteUserDefinedFunction(array $args = [])
69
- * @method \GuzzleHttp\Promise\Promise deleteUserDefinedFunctionAsync(array $args = [])
70
- * @method \Aws\Result getCatalogImportStatus(array $args = [])
71
- * @method \GuzzleHttp\Promise\Promise getCatalogImportStatusAsync(array $args = [])
72
- * @method \Aws\Result getClassifier(array $args = [])
73
- * @method \GuzzleHttp\Promise\Promise getClassifierAsync(array $args = [])
74
- * @method \Aws\Result getClassifiers(array $args = [])
75
- * @method \GuzzleHttp\Promise\Promise getClassifiersAsync(array $args = [])
76
- * @method \Aws\Result getConnection(array $args = [])
77
- * @method \GuzzleHttp\Promise\Promise getConnectionAsync(array $args = [])
78
- * @method \Aws\Result getConnections(array $args = [])
79
- * @method \GuzzleHttp\Promise\Promise getConnectionsAsync(array $args = [])
80
- * @method \Aws\Result getCrawler(array $args = [])
81
- * @method \GuzzleHttp\Promise\Promise getCrawlerAsync(array $args = [])
82
- * @method \Aws\Result getCrawlerMetrics(array $args = [])
83
- * @method \GuzzleHttp\Promise\Promise getCrawlerMetricsAsync(array $args = [])
84
- * @method \Aws\Result getCrawlers(array $args = [])
85
- * @method \GuzzleHttp\Promise\Promise getCrawlersAsync(array $args = [])
86
- * @method \Aws\Result getDataCatalogEncryptionSettings(array $args = [])
87
- * @method \GuzzleHttp\Promise\Promise getDataCatalogEncryptionSettingsAsync(array $args = [])
88
- * @method \Aws\Result getDatabase(array $args = [])
89
- * @method \GuzzleHttp\Promise\Promise getDatabaseAsync(array $args = [])
90
- * @method \Aws\Result getDatabases(array $args = [])
91
- * @method \GuzzleHttp\Promise\Promise getDatabasesAsync(array $args = [])
92
- * @method \Aws\Result getDataflowGraph(array $args = [])
93
- * @method \GuzzleHttp\Promise\Promise getDataflowGraphAsync(array $args = [])
94
- * @method \Aws\Result getDevEndpoint(array $args = [])
95
- * @method \GuzzleHttp\Promise\Promise getDevEndpointAsync(array $args = [])
96
- * @method \Aws\Result getDevEndpoints(array $args = [])
97
- * @method \GuzzleHttp\Promise\Promise getDevEndpointsAsync(array $args = [])
98
- * @method \Aws\Result getJob(array $args = [])
99
- * @method \GuzzleHttp\Promise\Promise getJobAsync(array $args = [])
100
- * @method \Aws\Result getJobRun(array $args = [])
101
- * @method \GuzzleHttp\Promise\Promise getJobRunAsync(array $args = [])
102
- * @method \Aws\Result getJobRuns(array $args = [])
103
- * @method \GuzzleHttp\Promise\Promise getJobRunsAsync(array $args = [])
104
- * @method \Aws\Result getJobs(array $args = [])
105
- * @method \GuzzleHttp\Promise\Promise getJobsAsync(array $args = [])
106
- * @method \Aws\Result getMapping(array $args = [])
107
- * @method \GuzzleHttp\Promise\Promise getMappingAsync(array $args = [])
108
- * @method \Aws\Result getPartition(array $args = [])
109
- * @method \GuzzleHttp\Promise\Promise getPartitionAsync(array $args = [])
110
- * @method \Aws\Result getPartitions(array $args = [])
111
- * @method \GuzzleHttp\Promise\Promise getPartitionsAsync(array $args = [])
112
- * @method \Aws\Result getPlan(array $args = [])
113
- * @method \GuzzleHttp\Promise\Promise getPlanAsync(array $args = [])
114
- * @method \Aws\Result getSecurityConfiguration(array $args = [])
115
- * @method \GuzzleHttp\Promise\Promise getSecurityConfigurationAsync(array $args = [])
116
- * @method \Aws\Result getSecurityConfigurations(array $args = [])
117
- * @method \GuzzleHttp\Promise\Promise getSecurityConfigurationsAsync(array $args = [])
118
- * @method \Aws\Result getTable(array $args = [])
119
- * @method \GuzzleHttp\Promise\Promise getTableAsync(array $args = [])
120
- * @method \Aws\Result getTableVersion(array $args = [])
121
- * @method \GuzzleHttp\Promise\Promise getTableVersionAsync(array $args = [])
122
- * @method \Aws\Result getTableVersions(array $args = [])
123
- * @method \GuzzleHttp\Promise\Promise getTableVersionsAsync(array $args = [])
124
- * @method \Aws\Result getTables(array $args = [])
125
- * @method \GuzzleHttp\Promise\Promise getTablesAsync(array $args = [])
126
- * @method \Aws\Result getTrigger(array $args = [])
127
- * @method \GuzzleHttp\Promise\Promise getTriggerAsync(array $args = [])
128
- * @method \Aws\Result getTriggers(array $args = [])
129
- * @method \GuzzleHttp\Promise\Promise getTriggersAsync(array $args = [])
130
- * @method \Aws\Result getUserDefinedFunction(array $args = [])
131
- * @method \GuzzleHttp\Promise\Promise getUserDefinedFunctionAsync(array $args = [])
132
- * @method \Aws\Result getUserDefinedFunctions(array $args = [])
133
- * @method \GuzzleHttp\Promise\Promise getUserDefinedFunctionsAsync(array $args = [])
134
- * @method \Aws\Result importCatalogToGlue(array $args = [])
135
- * @method \GuzzleHttp\Promise\Promise importCatalogToGlueAsync(array $args = [])
136
- * @method \Aws\Result putDataCatalogEncryptionSettings(array $args = [])
137
- * @method \GuzzleHttp\Promise\Promise putDataCatalogEncryptionSettingsAsync(array $args = [])
138
- * @method \Aws\Result resetJobBookmark(array $args = [])
139
- * @method \GuzzleHttp\Promise\Promise resetJobBookmarkAsync(array $args = [])
140
- * @method \Aws\Result startCrawler(array $args = [])
141
- * @method \GuzzleHttp\Promise\Promise startCrawlerAsync(array $args = [])
142
- * @method \Aws\Result startCrawlerSchedule(array $args = [])
143
- * @method \GuzzleHttp\Promise\Promise startCrawlerScheduleAsync(array $args = [])
144
- * @method \Aws\Result startJobRun(array $args = [])
145
- * @method \GuzzleHttp\Promise\Promise startJobRunAsync(array $args = [])
146
- * @method \Aws\Result startTrigger(array $args = [])
147
- * @method \GuzzleHttp\Promise\Promise startTriggerAsync(array $args = [])
148
- * @method \Aws\Result stopCrawler(array $args = [])
149
- * @method \GuzzleHttp\Promise\Promise stopCrawlerAsync(array $args = [])
150
- * @method \Aws\Result stopCrawlerSchedule(array $args = [])
151
- * @method \GuzzleHttp\Promise\Promise stopCrawlerScheduleAsync(array $args = [])
152
- * @method \Aws\Result stopTrigger(array $args = [])
153
- * @method \GuzzleHttp\Promise\Promise stopTriggerAsync(array $args = [])
154
- * @method \Aws\Result updateClassifier(array $args = [])
155
- * @method \GuzzleHttp\Promise\Promise updateClassifierAsync(array $args = [])
156
- * @method \Aws\Result updateConnection(array $args = [])
157
- * @method \GuzzleHttp\Promise\Promise updateConnectionAsync(array $args = [])
158
- * @method \Aws\Result updateCrawler(array $args = [])
159
- * @method \GuzzleHttp\Promise\Promise updateCrawlerAsync(array $args = [])
160
- * @method \Aws\Result updateCrawlerSchedule(array $args = [])
161
- * @method \GuzzleHttp\Promise\Promise updateCrawlerScheduleAsync(array $args = [])
162
- * @method \Aws\Result updateDatabase(array $args = [])
163
- * @method \GuzzleHttp\Promise\Promise updateDatabaseAsync(array $args = [])
164
- * @method \Aws\Result updateDevEndpoint(array $args = [])
165
- * @method \GuzzleHttp\Promise\Promise updateDevEndpointAsync(array $args = [])
166
- * @method \Aws\Result updateJob(array $args = [])
167
- * @method \GuzzleHttp\Promise\Promise updateJobAsync(array $args = [])
168
- * @method \Aws\Result updatePartition(array $args = [])
169
- * @method \GuzzleHttp\Promise\Promise updatePartitionAsync(array $args = [])
170
- * @method \Aws\Result updateTable(array $args = [])
171
- * @method \GuzzleHttp\Promise\Promise updateTableAsync(array $args = [])
172
- * @method \Aws\Result updateTrigger(array $args = [])
173
- * @method \GuzzleHttp\Promise\Promise updateTriggerAsync(array $args = [])
174
- * @method \Aws\Result updateUserDefinedFunction(array $args = [])
175
- * @method \GuzzleHttp\Promise\Promise updateUserDefinedFunctionAsync(array $args = [])
176
- */
177
- class GlueClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Greengrass/Exception/GreengrassException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\Greengrass\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **AWS Greengrass** service.
8
- */
9
- class GreengrassException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Greengrass/GreengrassClient.php DELETED
@@ -1,157 +0,0 @@
1
- <?php
2
- namespace Aws\Greengrass;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS Greengrass** service.
8
- * @method \Aws\Result associateRoleToGroup(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise associateRoleToGroupAsync(array $args = [])
10
- * @method \Aws\Result associateServiceRoleToAccount(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise associateServiceRoleToAccountAsync(array $args = [])
12
- * @method \Aws\Result createCoreDefinition(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise createCoreDefinitionAsync(array $args = [])
14
- * @method \Aws\Result createCoreDefinitionVersion(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise createCoreDefinitionVersionAsync(array $args = [])
16
- * @method \Aws\Result createDeployment(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise createDeploymentAsync(array $args = [])
18
- * @method \Aws\Result createDeviceDefinition(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise createDeviceDefinitionAsync(array $args = [])
20
- * @method \Aws\Result createDeviceDefinitionVersion(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise createDeviceDefinitionVersionAsync(array $args = [])
22
- * @method \Aws\Result createFunctionDefinition(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise createFunctionDefinitionAsync(array $args = [])
24
- * @method \Aws\Result createFunctionDefinitionVersion(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise createFunctionDefinitionVersionAsync(array $args = [])
26
- * @method \Aws\Result createGroup(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise createGroupAsync(array $args = [])
28
- * @method \Aws\Result createGroupCertificateAuthority(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise createGroupCertificateAuthorityAsync(array $args = [])
30
- * @method \Aws\Result createGroupVersion(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise createGroupVersionAsync(array $args = [])
32
- * @method \Aws\Result createLoggerDefinition(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise createLoggerDefinitionAsync(array $args = [])
34
- * @method \Aws\Result createLoggerDefinitionVersion(array $args = [])
35
- * @method \GuzzleHttp\Promise\Promise createLoggerDefinitionVersionAsync(array $args = [])
36
- * @method \Aws\Result createResourceDefinition(array $args = [])
37
- * @method \GuzzleHttp\Promise\Promise createResourceDefinitionAsync(array $args = [])
38
- * @method \Aws\Result createResourceDefinitionVersion(array $args = [])
39
- * @method \GuzzleHttp\Promise\Promise createResourceDefinitionVersionAsync(array $args = [])
40
- * @method \Aws\Result createSoftwareUpdateJob(array $args = [])
41
- * @method \GuzzleHttp\Promise\Promise createSoftwareUpdateJobAsync(array $args = [])
42
- * @method \Aws\Result createSubscriptionDefinition(array $args = [])
43
- * @method \GuzzleHttp\Promise\Promise createSubscriptionDefinitionAsync(array $args = [])
44
- * @method \Aws\Result createSubscriptionDefinitionVersion(array $args = [])
45
- * @method \GuzzleHttp\Promise\Promise createSubscriptionDefinitionVersionAsync(array $args = [])
46
- * @method \Aws\Result deleteCoreDefinition(array $args = [])
47
- * @method \GuzzleHttp\Promise\Promise deleteCoreDefinitionAsync(array $args = [])
48
- * @method \Aws\Result deleteDeviceDefinition(array $args = [])
49
- * @method \GuzzleHttp\Promise\Promise deleteDeviceDefinitionAsync(array $args = [])
50
- * @method \Aws\Result deleteFunctionDefinition(array $args = [])
51
- * @method \GuzzleHttp\Promise\Promise deleteFunctionDefinitionAsync(array $args = [])
52
- * @method \Aws\Result deleteGroup(array $args = [])
53
- * @method \GuzzleHttp\Promise\Promise deleteGroupAsync(array $args = [])
54
- * @method \Aws\Result deleteLoggerDefinition(array $args = [])
55
- * @method \GuzzleHttp\Promise\Promise deleteLoggerDefinitionAsync(array $args = [])
56
- * @method \Aws\Result deleteResourceDefinition(array $args = [])
57
- * @method \GuzzleHttp\Promise\Promise deleteResourceDefinitionAsync(array $args = [])
58
- * @method \Aws\Result deleteSubscriptionDefinition(array $args = [])
59
- * @method \GuzzleHttp\Promise\Promise deleteSubscriptionDefinitionAsync(array $args = [])
60
- * @method \Aws\Result disassociateRoleFromGroup(array $args = [])
61
- * @method \GuzzleHttp\Promise\Promise disassociateRoleFromGroupAsync(array $args = [])
62
- * @method \Aws\Result disassociateServiceRoleFromAccount(array $args = [])
63
- * @method \GuzzleHttp\Promise\Promise disassociateServiceRoleFromAccountAsync(array $args = [])
64
- * @method \Aws\Result getAssociatedRole(array $args = [])
65
- * @method \GuzzleHttp\Promise\Promise getAssociatedRoleAsync(array $args = [])
66
- * @method \Aws\Result getConnectivityInfo(array $args = [])
67
- * @method \GuzzleHttp\Promise\Promise getConnectivityInfoAsync(array $args = [])
68
- * @method \Aws\Result getCoreDefinition(array $args = [])
69
- * @method \GuzzleHttp\Promise\Promise getCoreDefinitionAsync(array $args = [])
70
- * @method \Aws\Result getCoreDefinitionVersion(array $args = [])
71
- * @method \GuzzleHttp\Promise\Promise getCoreDefinitionVersionAsync(array $args = [])
72
- * @method \Aws\Result getDeploymentStatus(array $args = [])
73
- * @method \GuzzleHttp\Promise\Promise getDeploymentStatusAsync(array $args = [])
74
- * @method \Aws\Result getDeviceDefinition(array $args = [])
75
- * @method \GuzzleHttp\Promise\Promise getDeviceDefinitionAsync(array $args = [])
76
- * @method \Aws\Result getDeviceDefinitionVersion(array $args = [])
77
- * @method \GuzzleHttp\Promise\Promise getDeviceDefinitionVersionAsync(array $args = [])
78
- * @method \Aws\Result getFunctionDefinition(array $args = [])
79
- * @method \GuzzleHttp\Promise\Promise getFunctionDefinitionAsync(array $args = [])
80
- * @method \Aws\Result getFunctionDefinitionVersion(array $args = [])
81
- * @method \GuzzleHttp\Promise\Promise getFunctionDefinitionVersionAsync(array $args = [])
82
- * @method \Aws\Result getGroup(array $args = [])
83
- * @method \GuzzleHttp\Promise\Promise getGroupAsync(array $args = [])
84
- * @method \Aws\Result getGroupCertificateAuthority(array $args = [])
85
- * @method \GuzzleHttp\Promise\Promise getGroupCertificateAuthorityAsync(array $args = [])
86
- * @method \Aws\Result getGroupCertificateConfiguration(array $args = [])
87
- * @method \GuzzleHttp\Promise\Promise getGroupCertificateConfigurationAsync(array $args = [])
88
- * @method \Aws\Result getGroupVersion(array $args = [])
89
- * @method \GuzzleHttp\Promise\Promise getGroupVersionAsync(array $args = [])
90
- * @method \Aws\Result getLoggerDefinition(array $args = [])
91
- * @method \GuzzleHttp\Promise\Promise getLoggerDefinitionAsync(array $args = [])
92
- * @method \Aws\Result getLoggerDefinitionVersion(array $args = [])
93
- * @method \GuzzleHttp\Promise\Promise getLoggerDefinitionVersionAsync(array $args = [])
94
- * @method \Aws\Result getResourceDefinition(array $args = [])
95
- * @method \GuzzleHttp\Promise\Promise getResourceDefinitionAsync(array $args = [])
96
- * @method \Aws\Result getResourceDefinitionVersion(array $args = [])
97
- * @method \GuzzleHttp\Promise\Promise getResourceDefinitionVersionAsync(array $args = [])
98
- * @method \Aws\Result getServiceRoleForAccount(array $args = [])
99
- * @method \GuzzleHttp\Promise\Promise getServiceRoleForAccountAsync(array $args = [])
100
- * @method \Aws\Result getSubscriptionDefinition(array $args = [])
101
- * @method \GuzzleHttp\Promise\Promise getSubscriptionDefinitionAsync(array $args = [])
102
- * @method \Aws\Result getSubscriptionDefinitionVersion(array $args = [])
103
- * @method \GuzzleHttp\Promise\Promise getSubscriptionDefinitionVersionAsync(array $args = [])
104
- * @method \Aws\Result listCoreDefinitionVersions(array $args = [])
105
- * @method \GuzzleHttp\Promise\Promise listCoreDefinitionVersionsAsync(array $args = [])
106
- * @method \Aws\Result listCoreDefinitions(array $args = [])
107
- * @method \GuzzleHttp\Promise\Promise listCoreDefinitionsAsync(array $args = [])
108
- * @method \Aws\Result listDeployments(array $args = [])
109
- * @method \GuzzleHttp\Promise\Promise listDeploymentsAsync(array $args = [])
110
- * @method \Aws\Result listDeviceDefinitionVersions(array $args = [])
111
- * @method \GuzzleHttp\Promise\Promise listDeviceDefinitionVersionsAsync(array $args = [])
112
- * @method \Aws\Result listDeviceDefinitions(array $args = [])
113
- * @method \GuzzleHttp\Promise\Promise listDeviceDefinitionsAsync(array $args = [])
114
- * @method \Aws\Result listFunctionDefinitionVersions(array $args = [])
115
- * @method \GuzzleHttp\Promise\Promise listFunctionDefinitionVersionsAsync(array $args = [])
116
- * @method \Aws\Result listFunctionDefinitions(array $args = [])
117
- * @method \GuzzleHttp\Promise\Promise listFunctionDefinitionsAsync(array $args = [])
118
- * @method \Aws\Result listGroupCertificateAuthorities(array $args = [])
119
- * @method \GuzzleHttp\Promise\Promise listGroupCertificateAuthoritiesAsync(array $args = [])
120
- * @method \Aws\Result listGroupVersions(array $args = [])
121
- * @method \GuzzleHttp\Promise\Promise listGroupVersionsAsync(array $args = [])
122
- * @method \Aws\Result listGroups(array $args = [])
123
- * @method \GuzzleHttp\Promise\Promise listGroupsAsync(array $args = [])
124
- * @method \Aws\Result listLoggerDefinitionVersions(array $args = [])
125
- * @method \GuzzleHttp\Promise\Promise listLoggerDefinitionVersionsAsync(array $args = [])
126
- * @method \Aws\Result listLoggerDefinitions(array $args = [])
127
- * @method \GuzzleHttp\Promise\Promise listLoggerDefinitionsAsync(array $args = [])
128
- * @method \Aws\Result listResourceDefinitionVersions(array $args = [])
129
- * @method \GuzzleHttp\Promise\Promise listResourceDefinitionVersionsAsync(array $args = [])
130
- * @method \Aws\Result listResourceDefinitions(array $args = [])
131
- * @method \GuzzleHttp\Promise\Promise listResourceDefinitionsAsync(array $args = [])
132
- * @method \Aws\Result listSubscriptionDefinitionVersions(array $args = [])
133
- * @method \GuzzleHttp\Promise\Promise listSubscriptionDefinitionVersionsAsync(array $args = [])
134
- * @method \Aws\Result listSubscriptionDefinitions(array $args = [])
135
- * @method \GuzzleHttp\Promise\Promise listSubscriptionDefinitionsAsync(array $args = [])
136
- * @method \Aws\Result resetDeployments(array $args = [])
137
- * @method \GuzzleHttp\Promise\Promise resetDeploymentsAsync(array $args = [])
138
- * @method \Aws\Result updateConnectivityInfo(array $args = [])
139
- * @method \GuzzleHttp\Promise\Promise updateConnectivityInfoAsync(array $args = [])
140
- * @method \Aws\Result updateCoreDefinition(array $args = [])
141
- * @method \GuzzleHttp\Promise\Promise updateCoreDefinitionAsync(array $args = [])
142
- * @method \Aws\Result updateDeviceDefinition(array $args = [])
143
- * @method \GuzzleHttp\Promise\Promise updateDeviceDefinitionAsync(array $args = [])
144
- * @method \Aws\Result updateFunctionDefinition(array $args = [])
145
- * @method \GuzzleHttp\Promise\Promise updateFunctionDefinitionAsync(array $args = [])
146
- * @method \Aws\Result updateGroup(array $args = [])
147
- * @method \GuzzleHttp\Promise\Promise updateGroupAsync(array $args = [])
148
- * @method \Aws\Result updateGroupCertificateConfiguration(array $args = [])
149
- * @method \GuzzleHttp\Promise\Promise updateGroupCertificateConfigurationAsync(array $args = [])
150
- * @method \Aws\Result updateLoggerDefinition(array $args = [])
151
- * @method \GuzzleHttp\Promise\Promise updateLoggerDefinitionAsync(array $args = [])
152
- * @method \Aws\Result updateResourceDefinition(array $args = [])
153
- * @method \GuzzleHttp\Promise\Promise updateResourceDefinitionAsync(array $args = [])
154
- * @method \Aws\Result updateSubscriptionDefinition(array $args = [])
155
- * @method \GuzzleHttp\Promise\Promise updateSubscriptionDefinitionAsync(array $args = [])
156
- */
157
- class GreengrassClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/GuardDuty/Exception/GuardDutyException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\GuardDuty\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **Amazon GuardDuty** service.
8
- */
9
- class GuardDutyException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/GuardDuty/GuardDutyClient.php DELETED
@@ -1,93 +0,0 @@
1
- <?php
2
- namespace Aws\GuardDuty;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **Amazon GuardDuty** service.
8
- * @method \Aws\Result acceptInvitation(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise acceptInvitationAsync(array $args = [])
10
- * @method \Aws\Result archiveFindings(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise archiveFindingsAsync(array $args = [])
12
- * @method \Aws\Result createDetector(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise createDetectorAsync(array $args = [])
14
- * @method \Aws\Result createFilter(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise createFilterAsync(array $args = [])
16
- * @method \Aws\Result createIPSet(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise createIPSetAsync(array $args = [])
18
- * @method \Aws\Result createMembers(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise createMembersAsync(array $args = [])
20
- * @method \Aws\Result createSampleFindings(array $args = [])
21
- * @method \GuzzleHttp\Promise\Promise createSampleFindingsAsync(array $args = [])
22
- * @method \Aws\Result createThreatIntelSet(array $args = [])
23
- * @method \GuzzleHttp\Promise\Promise createThreatIntelSetAsync(array $args = [])
24
- * @method \Aws\Result declineInvitations(array $args = [])
25
- * @method \GuzzleHttp\Promise\Promise declineInvitationsAsync(array $args = [])
26
- * @method \Aws\Result deleteDetector(array $args = [])
27
- * @method \GuzzleHttp\Promise\Promise deleteDetectorAsync(array $args = [])
28
- * @method \Aws\Result deleteFilter(array $args = [])
29
- * @method \GuzzleHttp\Promise\Promise deleteFilterAsync(array $args = [])
30
- * @method \Aws\Result deleteIPSet(array $args = [])
31
- * @method \GuzzleHttp\Promise\Promise deleteIPSetAsync(array $args = [])
32
- * @method \Aws\Result deleteInvitations(array $args = [])
33
- * @method \GuzzleHttp\Promise\Promise deleteInvitationsAsync(array $args = [])
34
- * @method \Aws\Result deleteMembers(array $args = [])
35
- * @method \GuzzleHttp\Promise\Promise deleteMembersAsync(array $args = [])
36
- * @method \Aws\Result deleteThreatIntelSet(array $args = [])
37
- * @method \GuzzleHttp\Promise\Promise deleteThreatIntelSetAsync(array $args = [])
38
- * @method \Aws\Result disassociateFromMasterAccount(array $args = [])
39
- * @method \GuzzleHttp\Promise\Promise disassociateFromMasterAccountAsync(array $args = [])
40
- * @method \Aws\Result disassociateMembers(array $args = [])
41
- * @method \GuzzleHttp\Promise\Promise disassociateMembersAsync(array $args = [])
42
- * @method \Aws\Result getDetector(array $args = [])
43
- * @method \GuzzleHttp\Promise\Promise getDetectorAsync(array $args = [])
44
- * @method \Aws\Result getFilter(array $args = [])
45
- * @method \GuzzleHttp\Promise\Promise getFilterAsync(array $args = [])
46
- * @method \Aws\Result getFindings(array $args = [])
47
- * @method \GuzzleHttp\Promise\Promise getFindingsAsync(array $args = [])
48
- * @method \Aws\Result getFindingsStatistics(array $args = [])
49
- * @method \GuzzleHttp\Promise\Promise getFindingsStatisticsAsync(array $args = [])
50
- * @method \Aws\Result getIPSet(array $args = [])
51
- * @method \GuzzleHttp\Promise\Promise getIPSetAsync(array $args = [])
52
- * @method \Aws\Result getInvitationsCount(array $args = [])
53
- * @method \GuzzleHttp\Promise\Promise getInvitationsCountAsync(array $args = [])
54
- * @method \Aws\Result getMasterAccount(array $args = [])
55
- * @method \GuzzleHttp\Promise\Promise getMasterAccountAsync(array $args = [])
56
- * @method \Aws\Result getMembers(array $args = [])
57
- * @method \GuzzleHttp\Promise\Promise getMembersAsync(array $args = [])
58
- * @method \Aws\Result getThreatIntelSet(array $args = [])
59
- * @method \GuzzleHttp\Promise\Promise getThreatIntelSetAsync(array $args = [])
60
- * @method \Aws\Result inviteMembers(array $args = [])
61
- * @method \GuzzleHttp\Promise\Promise inviteMembersAsync(array $args = [])
62
- * @method \Aws\Result listDetectors(array $args = [])
63
- * @method \GuzzleHttp\Promise\Promise listDetectorsAsync(array $args = [])
64
- * @method \Aws\Result listFilters(array $args = [])
65
- * @method \GuzzleHttp\Promise\Promise listFiltersAsync(array $args = [])
66
- * @method \Aws\Result listFindings(array $args = [])
67
- * @method \GuzzleHttp\Promise\Promise listFindingsAsync(array $args = [])
68
- * @method \Aws\Result listIPSets(array $args = [])
69
- * @method \GuzzleHttp\Promise\Promise listIPSetsAsync(array $args = [])
70
- * @method \Aws\Result listInvitations(array $args = [])
71
- * @method \GuzzleHttp\Promise\Promise listInvitationsAsync(array $args = [])
72
- * @method \Aws\Result listMembers(array $args = [])
73
- * @method \GuzzleHttp\Promise\Promise listMembersAsync(array $args = [])
74
- * @method \Aws\Result listThreatIntelSets(array $args = [])
75
- * @method \GuzzleHttp\Promise\Promise listThreatIntelSetsAsync(array $args = [])
76
- * @method \Aws\Result startMonitoringMembers(array $args = [])
77
- * @method \GuzzleHttp\Promise\Promise startMonitoringMembersAsync(array $args = [])
78
- * @method \Aws\Result stopMonitoringMembers(array $args = [])
79
- * @method \GuzzleHttp\Promise\Promise stopMonitoringMembersAsync(array $args = [])
80
- * @method \Aws\Result unarchiveFindings(array $args = [])
81
- * @method \GuzzleHttp\Promise\Promise unarchiveFindingsAsync(array $args = [])
82
- * @method \Aws\Result updateDetector(array $args = [])
83
- * @method \GuzzleHttp\Promise\Promise updateDetectorAsync(array $args = [])
84
- * @method \Aws\Result updateFilter(array $args = [])
85
- * @method \GuzzleHttp\Promise\Promise updateFilterAsync(array $args = [])
86
- * @method \Aws\Result updateFindingsFeedback(array $args = [])
87
- * @method \GuzzleHttp\Promise\Promise updateFindingsFeedbackAsync(array $args = [])
88
- * @method \Aws\Result updateIPSet(array $args = [])
89
- * @method \GuzzleHttp\Promise\Promise updateIPSetAsync(array $args = [])
90
- * @method \Aws\Result updateThreatIntelSet(array $args = [])
91
- * @method \GuzzleHttp\Promise\Promise updateThreatIntelSetAsync(array $args = [])
92
- */
93
- class GuardDutyClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Handler/GuzzleV5/GuzzleHandler.php DELETED
@@ -1,209 +0,0 @@
1
- <?php
2
- namespace Aws\Handler\GuzzleV5;
3
-
4
- use Exception;
5
- use GuzzleHttp\Client;
6
- use GuzzleHttp\ClientInterface;
7
- use GuzzleHttp\Event\EndEvent;
8
- use GuzzleHttp\Exception\ConnectException;
9
- use GuzzleHttp\Exception\RequestException;
10
- use GuzzleHttp\Message\ResponseInterface as GuzzleResponse;
11
- use GuzzleHttp\Promise;
12
- use GuzzleHttp\Psr7\Response as Psr7Response;
13
- use GuzzleHttp\Stream\Stream;
14
- use Psr\Http\Message\RequestInterface as Psr7Request;
15
- use Psr\Http\Message\StreamInterface as Psr7StreamInterface;
16
-
17
- /**
18
- * A request handler that sends PSR-7-compatible requests with Guzzle 5.
19
- *
20
- * The handler accepts a PSR-7 Request object and an array of transfer options
21
- * and returns a Guzzle 6 Promise. The promise is either resolved with a
22
- * PSR-7 Response object or rejected with an array of error data.
23
- *
24
- * @codeCoverageIgnore
25
- */
26
- class GuzzleHandler
27
- {
28
- private static $validOptions = [
29
- 'proxy' => true,
30
- 'verify' => true,
31
- 'timeout' => true,
32
- 'debug' => true,
33
- 'connect_timeout' => true,
34
- 'stream' => true,
35
- 'delay' => true,
36
- 'sink' => true,
37
- ];
38
-
39
- /** @var ClientInterface */
40
- private $client;
41
-
42
- /**
43
- * @param ClientInterface $client
44
- */
45
- public function __construct(ClientInterface $client = null)
46
- {
47
- $this->client = $client ?: new Client();
48
- }
49
-
50
- /**
51
- * @param Psr7Request $request
52
- * @param array $options
53
- *
54
- * @return Promise\Promise
55
- */
56
- public function __invoke(Psr7Request $request, array $options = [])
57
- {
58
- // Create and send a Guzzle 5 request
59
- $guzzlePromise = $this->client->send(
60
- $this->createGuzzleRequest($request, $options)
61
- );
62
-
63
- $promise = new Promise\Promise(
64
- function () use ($guzzlePromise) {
65
- try {
66
- $guzzlePromise->wait();
67
- } catch (\Exception $e) {
68
- // The promise is already delivered when the exception is
69
- // thrown, so don't rethrow it.
70
- }
71
- },
72
- [$guzzlePromise, 'cancel']
73
- );
74
-
75
- $guzzlePromise->then([$promise, 'resolve'], [$promise, 'reject']);
76
-
77
- return $promise->then(
78
- function (GuzzleResponse $response) {
79
- // Adapt the Guzzle 5 Future to a Guzzle 6 ResponsePromise.
80
- return $this->createPsr7Response($response);
81
- },
82
- function (Exception $exception) use ($options) {
83
- // If we got a 'sink' that's a path, set the response body to
84
- // the contents of the file. This will build the resulting
85
- // exception with more information.
86
- if ($exception instanceof RequestException) {
87
- if (isset($options['sink'])) {
88
- if (!($options['sink'] instanceof Psr7StreamInterface)) {
89
- $exception->getResponse()->setBody(
90
- Stream::factory(
91
- file_get_contents($options['sink'])
92
- )
93
- );
94
- }
95
- }
96
- }
97
- // Reject with information about the error.
98
- return new Promise\RejectedPromise($this->prepareErrorData($exception));
99
- }
100
- );
101
- }
102
-
103
- private function createGuzzleRequest(Psr7Request $psrRequest, array $options)
104
- {
105
- $ringConfig = [];
106
- $statsCallback = isset($options['http_stats_receiver'])
107
- ? $options['http_stats_receiver']
108
- : null;
109
- unset($options['http_stats_receiver']);
110
-
111
- // Remove unsupported options.
112
- foreach (array_keys($options) as $key) {
113
- if (!isset(self::$validOptions[$key])) {
114
- unset($options[$key]);
115
- }
116
- }
117
-
118
- // Handle delay option.
119
- if (isset($options['delay'])) {
120
- $ringConfig['delay'] = $options['delay'];
121
- unset($options['delay']);
122
- }
123
-
124
- // Prepare sink option.
125
- if (isset($options['sink'])) {
126
- $ringConfig['save_to'] = ($options['sink'] instanceof Psr7StreamInterface)
127
- ? new GuzzleStream($options['sink'])
128
- : $options['sink'];
129
- unset($options['sink']);
130
- }
131
-
132
- // Ensure that all requests are async and lazy like Guzzle 6.
133
- $options['future'] = 'lazy';
134
-
135
- // Create the Guzzle 5 request from the provided PSR7 request.
136
- $request = $this->client->createRequest(
137
- $psrRequest->getMethod(),
138
- $psrRequest->getUri(),
139
- $options
140
- );
141
-
142
- if (is_callable($statsCallback)) {
143
- $request->getEmitter()->on(
144
- 'end',
145
- function (EndEvent $event) use ($statsCallback) {
146
- $statsCallback($event->getTransferInfo());
147
- }
148
- );
149
- }
150
-
151
- // For the request body, adapt the PSR stream to a Guzzle stream.
152
- $body = $psrRequest->getBody();
153
- if ($body->getSize() === 0) {
154
- $request->setBody(null);
155
- } else {
156
- $request->setBody(new GuzzleStream($body));
157
- }
158
-
159
- $request->setHeaders($psrRequest->getHeaders());
160
-
161
- $request->setHeader(
162
- 'User-Agent',
163
- $request->getHeader('User-Agent')
164
- . ' ' . Client::getDefaultUserAgent()
165
- );
166
-
167
- // Make sure the delay is configured, if provided.
168
- if ($ringConfig) {
169
- foreach ($ringConfig as $k => $v) {
170
- $request->getConfig()->set($k, $v);
171
- }
172
- }
173
-
174
- return $request;
175
- }
176
-
177
- private function createPsr7Response(GuzzleResponse $response)
178
- {
179
- if ($body = $response->getBody()) {
180
- $body = new PsrStream($body);
181
- }
182
-
183
- return new Psr7Response(
184
- $response->getStatusCode(),
185
- $response->getHeaders(),
186
- $body,
187
- $response->getReasonPhrase()
188
- );
189
- }
190
-
191
- private function prepareErrorData(Exception $e)
192
- {
193
- $error = [
194
- 'exception' => $e,
195
- 'connection_error' => false,
196
- 'response' => null,
197
- ];
198
-
199
- if ($e instanceof ConnectException) {
200
- $error['connection_error'] = true;
201
- }
202
-
203
- if ($e instanceof RequestException && $e->getResponse()) {
204
- $error['response'] = $this->createPsr7Response($e->getResponse());
205
- }
206
-
207
- return $error;
208
- }
209
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Handler/GuzzleV5/GuzzleStream.php DELETED
@@ -1,24 +0,0 @@
1
- <?php
2
- namespace Aws\Handler\GuzzleV5;
3
-
4
- use GuzzleHttp\Stream\StreamDecoratorTrait;
5
- use GuzzleHttp\Stream\StreamInterface as GuzzleStreamInterface;
6
- use Psr\Http\Message\StreamInterface as Psr7StreamInterface;
7
-
8
- /**
9
- * Adapts a PSR-7 Stream to a Guzzle 5 Stream.
10
- *
11
- * @codeCoverageIgnore
12
- */
13
- class GuzzleStream implements GuzzleStreamInterface
14
- {
15
- use StreamDecoratorTrait;
16
-
17
- /** @var Psr7StreamInterface */
18
- private $stream;
19
-
20
- public function __construct(Psr7StreamInterface $stream)
21
- {
22
- $this->stream = $stream;
23
- }
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Handler/GuzzleV5/PsrStream.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
- namespace Aws\Handler\GuzzleV5;
3
-
4
- use GuzzleHttp\Stream\StreamDecoratorTrait;
5
- use GuzzleHttp\Stream\StreamInterface as GuzzleStreamInterface;
6
- use Psr\Http\Message\StreamInterface as Psr7StreamInterface;
7
-
8
- /**
9
- * Adapts a Guzzle 5 Stream to a PSR-7 Stream.
10
- *
11
- * @codeCoverageIgnore
12
- */
13
- class PsrStream implements Psr7StreamInterface
14
- {
15
- use StreamDecoratorTrait;
16
-
17
- /** @var GuzzleStreamInterface */
18
- private $stream;
19
-
20
- public function __construct(GuzzleStreamInterface $stream)
21
- {
22
- $this->stream = $stream;
23
- }
24
-
25
- public function rewind()
26
- {
27
- $this->stream->seek(0);
28
- }
29
-
30
- public function getContents()
31
- {
32
- return $this->stream->getContents();
33
- }
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Handler/GuzzleV6/GuzzleHandler.php DELETED
@@ -1,85 +0,0 @@
1
- <?php
2
- namespace Aws\Handler\GuzzleV6;
3
-
4
- use Exception;
5
- use GuzzleHttp\Exception\ConnectException;
6
- use GuzzleHttp\Exception\RequestException;
7
- use GuzzleHttp\Promise;
8
- use GuzzleHttp\Client;
9
- use GuzzleHttp\ClientInterface;
10
- use GuzzleHttp\TransferStats;
11
- use Psr\Http\Message\RequestInterface as Psr7Request;
12
-
13
- /**
14
- * A request handler that sends PSR-7-compatible requests with Guzzle 6.
15
- */
16
- class GuzzleHandler
17
- {
18
- /** @var ClientInterface */
19
- private $client;
20
-
21
- /**
22
- * @param ClientInterface $client
23
- */
24
- public function __construct(ClientInterface $client = null)
25
- {
26
- $this->client = $client ?: new Client();
27
- }
28
-
29
- /**
30
- * @param Psr7Request $request
31
- * @param array $options
32
- *
33
- * @return Promise\Promise
34
- */
35
- public function __invoke(Psr7Request $request, array $options = [])
36
- {
37
- $request = $request->withHeader(
38
- 'User-Agent',
39
- $request->getHeaderLine('User-Agent')
40
- . ' ' . \GuzzleHttp\default_user_agent()
41
- );
42
-
43
- return $this->client->sendAsync($request, $this->parseOptions($options))
44
- ->otherwise(
45
- static function (\Exception $e) {
46
- $error = [
47
- 'exception' => $e,
48
- 'connection_error' => $e instanceof ConnectException,
49
- 'response' => null,
50
- ];
51
-
52
- if ($e instanceof RequestException && $e->getResponse()) {
53
- $error['response'] = $e->getResponse();
54
- }
55
-
56
- return new Promise\RejectedPromise($error);
57
- }
58
- );
59
- }
60
-
61
- private function parseOptions(array $options)
62
- {
63
- if (isset($options['http_stats_receiver'])) {
64
- $fn = $options['http_stats_receiver'];
65
- unset($options['http_stats_receiver']);
66
-
67
- $prev = isset($options['on_stats'])
68
- ? $options['on_stats']
69
- : null;
70
-
71
- $options['on_stats'] = static function (
72
- TransferStats $stats
73
- ) use ($fn, $prev) {
74
- if (is_callable($prev)) {
75
- $prev($stats);
76
- }
77
- $transferStats = ['total_time' => $stats->getTransferTime()];
78
- $transferStats += $stats->getHandlerStats();
79
- $fn($transferStats);
80
- };
81
- }
82
-
83
- return $options;
84
- }
85
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/HandlerList.php DELETED
@@ -1,426 +0,0 @@
1
- <?php
2
- namespace Aws;
3
-
4
- /**
5
- * Builds a single handler function from zero or more middleware functions and
6
- * a handler. The handler function is then used to send command objects and
7
- * return a promise that is resolved with an AWS result object.
8
- *
9
- * The "front" of the list is invoked before the "end" of the list. You can add
10
- * middleware to the front of the list using one of the "prepend" method, and
11
- * the end of the list using one of the "append" method. The last function
12
- * invoked in a handler list is the handler (a function that does not accept a
13
- * next handler but rather is responsible for returning a promise that is
14
- * fulfilled with an Aws\ResultInterface object).
15
- *
16
- * Handlers are ordered using a "step" that describes the step at which the
17
- * SDK is when sending a command. The available steps are:
18
- *
19
- * - init: The command is being initialized, allowing you to do things like add
20
- * default options.
21
- * - validate: The command is being validated before it is serialized
22
- * - build: The command is being serialized into an HTTP request. A middleware
23
- * in this step MUST serialize an HTTP request and populate the "@request"
24
- * parameter of a command with the request such that it is available to
25
- * subsequent middleware.
26
- * - sign: The request is being signed and prepared to be sent over the wire.
27
- *
28
- * Middleware can be registered with a name to allow you to easily add a
29
- * middleware before or after another middleware by name. This also allows you
30
- * to remove a middleware by name (in addition to removing by instance).
31
- */
32
- class HandlerList implements \Countable
33
- {
34
- const INIT = 'init';
35
- const VALIDATE = 'validate';
36
- const BUILD = 'build';
37
- const SIGN = 'sign';
38
-
39
- /** @var callable */
40
- private $handler;
41
-
42
- /** @var array */
43
- private $named = [];
44
-
45
- /** @var array */
46
- private $sorted;
47
-
48
- /** @var callable|null */
49
- private $interposeFn;
50
-
51
- /** @var array Steps (in reverse order) */
52
- private $steps = [
53
- self::SIGN => [],
54
- self::BUILD => [],
55
- self::VALIDATE => [],
56
- self::INIT => [],
57
- ];
58
-
59
- /**
60
- * @param callable $handler HTTP handler.
61
- */
62
- public function __construct(callable $handler = null)
63
- {
64
- $this->handler = $handler;
65
- }
66
-
67
- /**
68
- * Dumps a string representation of the list.
69
- *
70
- * @return string
71
- */
72
- public function __toString()
73
- {
74
- $str = '';
75
- $i = 0;
76
-
77
- foreach (array_reverse($this->steps) as $k => $step) {
78
- foreach (array_reverse($step) as $j => $tuple) {
79
- $str .= "{$i}) Step: {$k}, ";
80
- if ($tuple[1]) {
81
- $str .= "Name: {$tuple[1]}, ";
82
- }
83
- $str .= "Function: " . $this->debugCallable($tuple[0]) . "\n";
84
- $i++;
85
- }
86
- }
87
-
88
- if ($this->handler) {
89
- $str .= "{$i}) Handler: " . $this->debugCallable($this->handler) . "\n";
90
- }
91
-
92
- return $str;
93
- }
94
-
95
- /**
96
- * Set the HTTP handler that actually returns a response.
97
- *
98
- * @param callable $handler Function that accepts a request and array of
99
- * options and returns a Promise.
100
- */
101
- public function setHandler(callable $handler)
102
- {
103
- $this->handler = $handler;
104
- }
105
-
106
- /**
107
- * Returns true if the builder has a handler.
108
- *
109
- * @return bool
110
- */
111
- public function hasHandler()
112
- {
113
- return (bool) $this->handler;
114
- }
115
-
116
- /**
117
- * Append a middleware to the init step.
118
- *
119
- * @param callable $middleware Middleware function to add.
120
- * @param string $name Name of the middleware.
121
- */
122
- public function appendInit(callable $middleware, $name = null)
123
- {
124
- $this->add(self::INIT, $name, $middleware);
125
- }
126
-
127
- /**
128
- * Prepend a middleware to the init step.
129
- *
130
- * @param callable $middleware Middleware function to add.
131
- * @param string $name Name of the middleware.
132
- */
133
- public function prependInit(callable $middleware, $name = null)
134
- {
135
- $this->add(self::INIT, $name, $middleware, true);
136
- }
137
-
138
- /**
139
- * Append a middleware to the validate step.
140
- *
141
- * @param callable $middleware Middleware function to add.
142
- * @param string $name Name of the middleware.
143
- */
144
- public function appendValidate(callable $middleware, $name = null)
145
- {
146
- $this->add(self::VALIDATE, $name, $middleware);
147
- }
148
-
149
- /**
150
- * Prepend a middleware to the validate step.
151
- *
152
- * @param callable $middleware Middleware function to add.
153
- * @param string $name Name of the middleware.
154
- */
155
- public function prependValidate(callable $middleware, $name = null)
156
- {
157
- $this->add(self::VALIDATE, $name, $middleware, true);
158
- }
159
-
160
- /**
161
- * Append a middleware to the build step.
162
- *
163
- * @param callable $middleware Middleware function to add.
164
- * @param string $name Name of the middleware.
165
- */
166
- public function appendBuild(callable $middleware, $name = null)
167
- {
168
- $this->add(self::BUILD, $name, $middleware);
169
- }
170
-
171
- /**
172
- * Prepend a middleware to the build step.
173
- *
174
- * @param callable $middleware Middleware function to add.
175
- * @param string $name Name of the middleware.
176
- */
177
- public function prependBuild(callable $middleware, $name = null)
178
- {
179
- $this->add(self::BUILD, $name, $middleware, true);
180
- }
181
-
182
- /**
183
- * Append a middleware to the sign step.
184
- *
185
- * @param callable $middleware Middleware function to add.
186
- * @param string $name Name of the middleware.
187
- */
188
- public function appendSign(callable $middleware, $name = null)
189
- {
190
- $this->add(self::SIGN, $name, $middleware);
191
- }
192
-
193
- /**
194
- * Prepend a middleware to the sign step.
195
- *
196
- * @param callable $middleware Middleware function to add.
197
- * @param string $name Name of the middleware.
198
- */
199
- public function prependSign(callable $middleware, $name = null)
200
- {
201
- $this->add(self::SIGN, $name, $middleware, true);
202
- }
203
-
204
- /**
205
- * Add a middleware before the given middleware by name.
206
- *
207
- * @param string|callable $findName Add before this
208
- * @param string $withName Optional name to give the middleware
209
- * @param callable $middleware Middleware to add.
210
- */
211
- public function before($findName, $withName, callable $middleware)
212
- {
213
- $this->splice($findName, $withName, $middleware, true);
214
- }
215
-
216
- /**
217
- * Add a middleware after the given middleware by name.
218
- *
219
- * @param string|callable $findName Add after this
220
- * @param string $withName Optional name to give the middleware
221
- * @param callable $middleware Middleware to add.
222
- */
223
- public function after($findName, $withName, callable $middleware)
224
- {
225
- $this->splice($findName, $withName, $middleware, false);
226
- }
227
-
228
- /**
229
- * Remove a middleware by name or by instance from the list.
230
- *
231
- * @param string|callable $nameOrInstance Middleware to remove.
232
- */
233
- public function remove($nameOrInstance)
234
- {
235
- if (is_callable($nameOrInstance)) {
236
- $this->removeByInstance($nameOrInstance);
237
- } elseif (is_string($nameOrInstance)) {
238
- $this->removeByName($nameOrInstance);
239
- }
240
- }
241
-
242
- /**
243
- * Interpose a function between each middleware (e.g., allowing for a trace
244
- * through the middleware layers).
245
- *
246
- * The interpose function is a function that accepts a "step" argument as a
247
- * string and a "name" argument string. This function must then return a
248
- * function that accepts the next handler in the list. This function must
249
- * then return a function that accepts a CommandInterface and optional
250
- * RequestInterface and returns a promise that is fulfilled with an
251
- * Aws\ResultInterface or rejected with an Aws\Exception\AwsException
252
- * object.
253
- *
254
- * @param callable|null $fn Pass null to remove any previously set function
255
- */
256
- public function interpose(callable $fn = null)
257
- {
258
- $this->sorted = null;
259
- $this->interposeFn = $fn;
260
- }
261
-
262
- /**
263
- * Compose the middleware and handler into a single callable function.
264
- *
265
- * @return callable
266
- */
267
- public function resolve()
268
- {
269
- if (!($prev = $this->handler)) {
270
- throw new \LogicException('No handler has been specified');
271
- }
272
-
273
- if ($this->sorted === null) {
274
- $this->sortMiddleware();
275
- }
276
-
277
- foreach ($this->sorted as $fn) {
278
- $prev = $fn($prev);
279
- }
280
-
281
- return $prev;
282
- }
283
-
284
- public function count()
285
- {
286
- return count($this->steps[self::INIT])
287
- + count($this->steps[self::VALIDATE])
288
- + count($this->steps[self::BUILD])
289
- + count($this->steps[self::SIGN]);
290
- }
291
-
292
- /**
293
- * Splices a function into the middleware list at a specific position.
294
- *
295
- * @param $findName
296
- * @param $withName
297
- * @param callable $middleware
298
- * @param $before
299
- */
300
- private function splice($findName, $withName, callable $middleware, $before)
301
- {
302
- if (!isset($this->named[$findName])) {
303
- throw new \InvalidArgumentException("$findName not found");
304
- }
305
-
306
- $idx = $this->sorted = null;
307
- $step = $this->named[$findName];
308
-
309
- if ($withName) {
310
- $this->named[$withName] = $step;
311
- }
312
-
313
- foreach ($this->steps[$step] as $i => $tuple) {
314
- if ($tuple[1] === $findName) {
315
- $idx = $i;
316
- break;
317
- }
318
- }
319
-
320
- $replacement = $before
321
- ? [$this->steps[$step][$idx], [$middleware, $withName]]
322
- : [[$middleware, $withName], $this->steps[$step][$idx]];
323
- array_splice($this->steps[$step], $idx, 1, $replacement);
324
- }
325
-
326
- /**
327
- * Provides a debug string for a given callable.
328
- *
329
- * @param array|callable $fn Function to write as a string.
330
- *
331
- * @return string
332
- */
333
- private function debugCallable($fn)
334
- {
335
- if (is_string($fn)) {
336
- return "callable({$fn})";
337
- }
338
-
339
- if (is_array($fn)) {
340
- $ele = is_string($fn[0]) ? $fn[0] : get_class($fn[0]);
341
- return "callable(['{$ele}', '{$fn[1]}'])";
342
- }
343
-
344
- return 'callable(' . spl_object_hash($fn) . ')';
345
- }
346
-
347
- /**
348
- * Sort the middleware, and interpose if needed in the sorted list.
349
- */
350
- private function sortMiddleware()
351
- {
352
- $this->sorted = [];
353
-
354
- if (!$this->interposeFn) {
355
- foreach ($this->steps as $step) {
356
- foreach ($step as $fn) {
357
- $this->sorted[] = $fn[0];
358
- }
359
- }
360
- return;
361
- }
362
-
363
- $ifn = $this->interposeFn;
364
- // Interpose the interposeFn into the handler stack.
365
- foreach ($this->steps as $stepName => $step) {
366
- foreach ($step as $fn) {
367
- $this->sorted[] = $ifn($stepName, $fn[1]);
368
- $this->sorted[] = $fn[0];
369
- }
370
- }
371
- }
372
-
373
- private function removeByName($name)
374
- {
375
- if (!isset($this->named[$name])) {
376
- return;
377
- }
378
-
379
- $this->sorted = null;
380
- $step = $this->named[$name];
381
- $this->steps[$step] = array_values(
382
- array_filter(
383
- $this->steps[$step],
384
- function ($tuple) use ($name) {
385
- return $tuple[1] !== $name;
386
- }
387
- )
388
- );
389
- }
390
-
391
- private function removeByInstance(callable $fn)
392
- {
393
- foreach ($this->steps as $k => $step) {
394
- foreach ($step as $j => $tuple) {
395
- if ($tuple[0] === $fn) {
396
- $this->sorted = null;
397
- unset($this->named[$this->steps[$k][$j][1]]);
398
- unset($this->steps[$k][$j]);
399
- }
400
- }
401
- }
402
- }
403
-
404
- /**
405
- * Add a middleware to a step.
406
- *
407
- * @param string $step Middleware step.
408
- * @param string $name Middleware name.
409
- * @param callable $middleware Middleware function to add.
410
- * @param bool $prepend Prepend instead of append.
411
- */
412
- private function add($step, $name, callable $middleware, $prepend = false)
413
- {
414
- $this->sorted = null;
415
-
416
- if ($prepend) {
417
- $this->steps[$step][] = [$middleware, $name];
418
- } else {
419
- array_unshift($this->steps[$step], [$middleware, $name]);
420
- }
421
-
422
- if ($name) {
423
- $this->named[$name] = $step;
424
- }
425
- }
426
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/HasDataTrait.php DELETED
@@ -1,60 +0,0 @@
1
- <?php
2
- namespace Aws;
3
-
4
- /**
5
- * Trait implementing ToArrayInterface, \ArrayAccess, \Countable, and
6
- * \IteratorAggregate
7
- */
8
- trait HasDataTrait
9
- {
10
- /** @var array */
11
- private $data = [];
12
-
13
- public function getIterator()
14
- {
15
- return new \ArrayIterator($this->data);
16
- }
17
-
18
- /**
19
- * This method returns a reference to the variable to allow for indirect
20
- * array modification (e.g., $foo['bar']['baz'] = 'qux').
21
- *
22
- * @param $offset
23
- *
24
- * @return mixed|null
25
- */
26
- public function & offsetGet($offset)
27
- {
28
- if (isset($this->data[$offset])) {
29
- return $this->data[$offset];
30
- }
31
-
32
- $value = null;
33
- return $value;
34
- }
35
-
36
- public function offsetSet($offset, $value)
37
- {
38
- $this->data[$offset] = $value;
39
- }
40
-
41
- public function offsetExists($offset)
42
- {
43
- return isset($this->data[$offset]);
44
- }
45
-
46
- public function offsetUnset($offset)
47
- {
48
- unset($this->data[$offset]);
49
- }
50
-
51
- public function toArray()
52
- {
53
- return $this->data;
54
- }
55
-
56
- public function count()
57
- {
58
- return count($this->data);
59
- }
60
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/HashInterface.php DELETED
@@ -1,27 +0,0 @@
1
- <?php
2
- namespace Aws;
3
-
4
- /**
5
- * Interface that allows implementing various incremental hashes.
6
- */
7
- interface HashInterface
8
- {
9
- /**
10
- * Adds data to the hash.
11
- *
12
- * @param string $data Data to add to the hash
13
- */
14
- public function update($data);
15
-
16
- /**
17
- * Finalizes the incremental hash and returns the resulting digest.
18
- *
19
- * @return string
20
- */
21
- public function complete();
22
-
23
- /**
24
- * Removes all data from the hash, effectively starting a new hash.
25
- */
26
- public function reset();
27
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/HashingStream.php DELETED
@@ -1,60 +0,0 @@
1
- <?php
2
- namespace Aws;
3
-
4
- use GuzzleHttp\Psr7\StreamDecoratorTrait;
5
- use Psr\Http\Message\StreamInterface;
6
-
7
- /**
8
- * Stream decorator that calculates a rolling hash of the stream as it is read.
9
- */
10
- class HashingStream implements StreamInterface
11
- {
12
- use StreamDecoratorTrait;
13
-
14
- /** @var HashInterface */
15
- private $hash;
16
-
17
- /** @var callable|null */
18
- private $callback;
19
-
20
- /**
21
- * @param StreamInterface $stream Stream that is being read.
22
- * @param HashInterface $hash Hash used to calculate checksum.
23
- * @param callable $onComplete Optional function invoked when the
24
- * hash calculation is completed.
25
- */
26
- public function __construct(
27
- StreamInterface $stream,
28
- HashInterface $hash,
29
- callable $onComplete = null
30
- ) {
31
- $this->stream = $stream;
32
- $this->hash = $hash;
33
- $this->callback = $onComplete;
34
- }
35
-
36
- public function read($length)
37
- {
38
- $data = $this->stream->read($length);
39
- $this->hash->update($data);
40
- if ($this->eof()) {
41
- $result = $this->hash->complete();
42
- if ($this->callback) {
43
- call_user_func($this->callback, $result);
44
- }
45
- }
46
-
47
- return $data;
48
- }
49
-
50
- public function seek($offset, $whence = SEEK_SET)
51
- {
52
- if ($offset === 0) {
53
- $this->hash->reset();
54
- return $this->stream->seek($offset);
55
- }
56
-
57
- // Seeking arbitrarily is not supported.
58
- return false;
59
- }
60
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Health/Exception/HealthException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\Health\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the **AWS Health APIs and Notifications** service.
8
- */
9
- class HealthException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Health/HealthClient.php DELETED
@@ -1,21 +0,0 @@
1
- <?php
2
- namespace Aws\Health;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS Health APIs and Notifications** service.
8
- * @method \Aws\Result describeAffectedEntities(array $args = [])
9
- * @method \GuzzleHttp\Promise\Promise describeAffectedEntitiesAsync(array $args = [])
10
- * @method \Aws\Result describeEntityAggregates(array $args = [])
11
- * @method \GuzzleHttp\Promise\Promise describeEntityAggregatesAsync(array $args = [])
12
- * @method \Aws\Result describeEventAggregates(array $args = [])
13
- * @method \GuzzleHttp\Promise\Promise describeEventAggregatesAsync(array $args = [])
14
- * @method \Aws\Result describeEventDetails(array $args = [])
15
- * @method \GuzzleHttp\Promise\Promise describeEventDetailsAsync(array $args = [])
16
- * @method \Aws\Result describeEventTypes(array $args = [])
17
- * @method \GuzzleHttp\Promise\Promise describeEventTypesAsync(array $args = [])
18
- * @method \Aws\Result describeEvents(array $args = [])
19
- * @method \GuzzleHttp\Promise\Promise describeEventsAsync(array $args = [])
20
- */
21
- class HealthClient extends AwsClient {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/History.php DELETED
@@ -1,156 +0,0 @@
1
- <?php
2
- namespace Aws;
3
-
4
- use Psr\Http\Message\RequestInterface;
5
- use Aws\Exception\AwsException;
6
-
7
- /**
8
- * Represents a history container that is required when using the history
9
- * middleware.
10
- */
11
- class History implements \Countable, \IteratorAggregate
12
- {
13
- private $maxEntries;
14
- private $entries = array();
15
-
16
- /**
17
- * @param int $maxEntries Maximum number of entries to store.
18
- */
19
- public function __construct($maxEntries = 10)
20
- {
21
- $this->maxEntries = $maxEntries;
22
- }
23
-
24
- public function count()
25
- {
26
- return count($this->entries);
27
- }
28
-
29
- public function getIterator()
30
- {
31
- return new \ArrayIterator(array_values($this->entries));
32
- }
33
-
34
- /**
35
- * Get the last finished command seen by the history container.
36
- *
37
- * @return CommandInterface
38
- * @throws \LogicException if no commands have been seen.
39
- */
40
- public function getLastCommand()
41
- {
42
- if (!$this->entries) {
43
- throw new \LogicException('No commands received');
44
- }
45
-
46
- return end($this->entries)['command'];
47
- }
48
-
49
- /**
50
- * Get the last finished request seen by the history container.
51
- *
52
- * @return RequestInterface
53
- * @throws \LogicException if no requests have been seen.
54
- */
55
- public function getLastRequest()
56
- {
57
- if (!$this->entries) {
58
- throw new \LogicException('No requests received');
59
- }
60
-
61
- return end($this->entries)['request'];
62
- }
63
-
64
- /**
65
- * Get the last received result or exception.
66
- *
67
- * @return ResultInterface|AwsException
68
- * @throws \LogicException if no return values have been received.
69
- */
70
- public function getLastReturn()
71
- {
72
- if (!$this->entries) {
73
- throw new \LogicException('No entries');
74
- }
75
-
76
- $last = end($this->entries);
77
-
78
- if (isset($last['result'])) {
79
- return $last['result'];
80
- }
81
-
82
- if (isset($last['exception'])) {
83
- return $last['exception'];
84
- }
85
-
86
- throw new \LogicException('No return value for last entry.');
87
- }
88
-
89
- /**
90
- * Initiate an entry being added to the history.
91
- *
92
- * @param CommandInterface $cmd Command be executed.
93
- * @param RequestInterface $req Request being sent.
94
- *
95
- * @return string Returns the ticket used to finish the entry.
96
- */
97
- public function start(CommandInterface $cmd, RequestInterface $req)
98
- {
99
- $ticket = uniqid();
100
- $this->entries[$ticket] = [
101
- 'command' => $cmd,
102
- 'request' => $req,
103
- 'result' => null,
104
- 'exception' => null,
105
- ];
106
-
107
- return $ticket;
108
- }
109
-
110
- /**
111
- * Finish adding an entry to the history container.
112
- *
113
- * @param string $ticket Ticket returned from the start call.
114
- * @param mixed $result The result (an exception or AwsResult).
115
- */
116
- public function finish($ticket, $result)
117
- {
118
- if (!isset($this->entries[$ticket])) {
119
- throw new \InvalidArgumentException('Invalid history ticket');
120
- }
121
-
122
- if (isset($this->entries[$ticket]['result'])
123
- || isset($this->entries[$ticket]['exception'])
124
- ) {
125
- throw new \LogicException('History entry is already finished');
126
- }
127
-
128
- if ($result instanceof \Exception) {
129
- $this->entries[$ticket]['exception'] = $result;
130
- } else {
131
- $this->entries[$ticket]['result'] = $result;
132
- }
133
-
134
- if (count($this->entries) >= $this->maxEntries) {
135
- $this->entries = array_slice($this->entries, -$this->maxEntries, null, true);
136
- }
137
- }
138
-
139
- /**
140
- * Flush the history
141
- */
142
- public function clear()
143
- {
144
- $this->entries = [];
145
- }
146
-
147
- /**
148
- * Converts the history to an array.
149
- *
150
- * @return array
151
- */
152
- public function toArray()
153
- {
154
- return array_values($this->entries);
155
- }
156
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Iam/Exception/IamException.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Aws\Iam\Exception;
3
-
4
- use Aws\Exception\AwsException;
5
-
6
- /**
7
- * Represents an error interacting with the AWS Identity and Access Management service.
8
- */
9
- class IamException extends AwsException {}
 
 
 
 
 
 
 
 
 
includes/aws/Aws/Iam/IamClient.php DELETED
@@ -1,264 +0,0 @@
1
- <?php
2
- namespace Aws\Iam;
3
-
4
- use Aws\AwsClient;
5
-
6
- /**
7
- * This client is used to interact with the **AWS Identity and Access Management (AWS IAM)** service.
8
- *
9
- * @method \Aws\Result addClientIDToOpenIDConnectProvider(array $args = [])
10
- * @method \GuzzleHttp\Promise\Promise addClientIDToOpenIDConnectProviderAsync(array $args = [])
11
- * @method \Aws\Result addRoleToInstanceProfile(array $args = [])
12
- * @method \GuzzleHttp\Promise\Promise addRoleToInstanceProfileAsync(array $args = [])
13
- * @method \Aws\Result addUserToGroup(array $args = [])
14
- * @method \GuzzleHttp\Promise\Promise addUserToGroupAsync(array $args = [])
15
- * @method \Aws\Result attachGroupPolicy(array $args = [])
16
- * @method \GuzzleHttp\Promise\Promise attachGroupPolicyAsync(array $args = [])
17
- * @method \Aws\Result attachRolePolicy(array $args = [])
18
- * @method \GuzzleHttp\Promise\Promise attachRolePolicyAsync(array $args = [])
19
- * @method \Aws\Result attachUserPolicy(array $args = [])
20
- * @method \GuzzleHttp\Promise\Promise attachUserPolicyAsync(array $args = [])
21
- * @method \Aws\Result changePassword(array $args = [])
22
- * @method \GuzzleHttp\Promise\Promise changePasswordAsync(array $args = [])
23
- * @method \Aws\Result createAccessKey(array $args = [])
24
- * @method \GuzzleHttp\Promise\Promise createAccessKeyAsync(array $args = [])
25
- * @method \Aws\Result createAccountAlias(array $args = [])
26
- * @method \GuzzleHttp\Promise\Promise createAccountAliasAsync(array $args = [])
27
- * @method \Aws\Result createGroup(array $args = [])
28
- * @method \GuzzleHttp\Promise\Promise createGroupAsync(array $args = [])
29
- * @method \Aws\Result createInstanceProfile(array $args = [])
30
- * @method \GuzzleHttp\Promise\Promise createInstanceProfileAsync(array $args = [])
31
- * @method \Aws\Result createLoginProfile(array $args = [])
32
- * @method \GuzzleHttp\Promise\Promise createLoginProfileAsync(array $args = [])
33
- * @method \Aws\Result createOpenIDConnectProvider(array $args = [])
34
- * @method \GuzzleHttp\Promise\Promise createOpenIDConnectProviderAsync(array $args = [])
35
- * @method \Aws\Result createPolicy(array $args = [])
36
- * @method \GuzzleHttp\Promise\Promise createPolicyAsync(array $args = [])
37
- * @method \Aws\Result createPolicyVersion(array $args = [])
38
- * @method \GuzzleHttp\Promise\Promise createPolicyVersionAsync(array $args = [])
39
- * @method \Aws\Result createRole(array $args = [])
40
- * @method \GuzzleHttp\Promise\Promise createRoleAsync(array $args = [])
41
- * @method \Aws\Result createSAMLProvider(array $args = [])
42
- * @method \GuzzleHttp\Promise\Promise createSAMLProviderAsync(array $args = [])
43
- * @method \Aws\Result createServiceLinkedRole(array $args = [])
44
- * @method \GuzzleHttp\Promise\Promise createServiceLinkedRoleAsync(array $args = [])
45
- * @method \Aws\Result createServiceSpecificCredential(array $args = [])
46
- * @method \GuzzleHttp\Promise\Promise createServiceSpecificCredentialAsync(array $args = [])
47
- * @method \Aws\Result createUser(array $args = [])
48
- * @method \GuzzleHttp\Promise\Promise createUserAsync(array $args = [])
49
- * @method \Aws\Result createVirtualMFADevice(array $args = [])
50
- * @method \GuzzleHttp\Promise\Promise createVirtualMFADeviceAsync(array $args = [])
51
- * @method \Aws\Result deactivateMFADevice(array $args = [])
52
- * @method \GuzzleHttp\Promise\Promise deactivateMFADeviceAsync(array $args = [])
53
- * @method \Aws\Result deleteAccessKey(array $args = [])
54
- * @method \GuzzleHttp\Promise\Promise deleteAccessKeyAsync(array $args = [])
55
- * @method \Aws\Result deleteAccountAlias(array $args = [])
56
- * @method \GuzzleHttp\Promise\Promise deleteAccountAliasAsync(array $args = [])
57
- * @method \Aws\Result deleteAccountPasswordPolicy(array $args = [])
58
- * @method \GuzzleHttp\Promise\Promise deleteAccountPasswordPolicyAsync(array $args = [])
59
- * @method \Aws\Result deleteGroup(array $args = [])
60
- * @method \GuzzleHttp\Promise\Promise deleteGroupAsync(array $args = [])
61
- * @method \Aws\Result deleteGroupPolicy(array $args = [])
62
- * @method \GuzzleHttp\Promise\Promise deleteGroupPolicyAsync(array $args = [])
63
- * @method \Aws\Result deleteInstanceProfile(array $args = [])
64
- * @method \GuzzleHttp\Promise\Promise deleteInstanceProfileAsync(array $args = [])
65
- * @method \Aws\Result deleteLoginProfile(array $args = [])
66
- * @method \GuzzleHttp\Promise\Promise deleteLoginProfileAsync(array $args = [])
67
- * @method \Aws\Result deleteOpenIDConnectProvider(array $args = [])
68
- * @method \GuzzleHttp\Promise\Promise deleteOpenIDConnectProviderAsync(array $args = [])
69
- * @method \Aws\Result deletePolicy(array $args = [])
70
- * @method \GuzzleHttp\Promise\Promise deletePolicyAsync(array $args = [])
71
- * @method \Aws\Result deletePolicyVersion(array $args = [])
72
- * @method \GuzzleHttp\Promise\Promise deletePolicyVersionAsync(array $args = [])
73
- * @method \Aws\Result deleteRole(array $args = [])
74
- * @method \GuzzleHttp\Promise\Promise deleteRoleAsync(array $args = [])
75
- * @method \Aws\Result deleteRolePermissionsBoundary(array $args = [])
76
- * @method \GuzzleHttp\Promise\Promise deleteRolePermissionsBoundaryAsync(array $args = [])
77
- * @method \Aws\Result deleteRolePolicy(array $args = [])
78
- * @method \GuzzleHttp\Promise\Promise deleteRolePolicyAsync(array $args = [])
79
- * @method \Aws\Result deleteSAMLProvider(array $args = [])
80
- * @method \GuzzleHttp\Promise\Promise deleteSAMLProviderAsync(array $args = [])
81
- * @method \Aws\Result deleteSSHPublicKey(array $args = [])
82
- * @method \GuzzleHttp\Promise\Promise deleteSSHPublicKeyAsync(array $args = [])
83
- * @method \Aws\Result deleteServerCertificate(array $args = [])
84
- * @method \GuzzleHttp\Promise\Promise deleteServerCertificateAsync(array $args = [])
85
- * @method \Aws\Result deleteServiceLinkedRole(array $args = [])
86
- * @method \GuzzleHttp\Promise\Promise deleteServiceLinkedRoleAsync(array $args = [])
87
- * @method \Aws\Result deleteServiceSpecificCredential(array $args = [])
88
- * @method \GuzzleHttp\Promise\Promise deleteServiceSpecificCredentialAsync(array $args = [])
89
- * @method \Aws\Result deleteSigningCertificate(array $args = [])
90
- * @method \GuzzleHttp\Promise\Promise deleteSigningCertificateAsync(array $args = [])
91
- * @method \Aws\Result deleteUser(array $args = [])
92
- * @method \GuzzleHttp\Promise\Promise deleteUserAsync(array $args = [])
93
- * @method \Aws\Result deleteUserPermissionsBoundary(array $args = [])
94
- * @method \GuzzleHttp\Promise\Promise deleteUserPermissionsBoundaryAsync(array $args = [])
95
- * @method \Aws\Result deleteUserPolicy(array $args = [])
96
- * @method \GuzzleHttp\Promise\Promise deleteUserPolicyAsync(array $args = [])
97
- * @method \Aws\Result deleteVirtualMFADevice(array $args = [])
98
- * @method \GuzzleHttp\Promise\Promise deleteVirtualMFADeviceAsync(array $args = [])
99
- * @method \Aws\Result detachGroupPolicy(array $args = [])
100
- * @method \GuzzleHttp\Promise\Promise detachGroupPolicyAsync(array $args = [])
101
- * @method \Aws\Result detachRolePolicy(array $args = [])
102
- * @method \GuzzleHttp\Promise\Promise detachRolePolicyAsync(array $args = [])
103
- * @method \Aws\Result detachUserPolicy(array $args = [])
104
- * @method \GuzzleHttp\Promise\Promise detachUserPolicyAsync(array $args = [])
105
- * @method \Aws\Result enableMFADevice(array $args = [])
106
- * @method \GuzzleHttp\Promise\Promise enableMFADeviceAsync(array $args = [])
107
- * @method \Aws\Result generateCredentialReport(array $args = [])
108
- * @method \GuzzleHttp\Promise\Promise generateCredentialReportAsync(array $args = [])
109
- * @method \Aws\Result getAccessKeyLastUsed(array $args = [])
110
- * @method \GuzzleHttp\Promise\Promise getAccessKeyLastUsedAsync(array $args = [])
111
- * @method \Aws\Result getAccountAuthorizationDetails(array $args = [])
112
- * @method \GuzzleHttp\Promise\Promise getAccountAuthorizationDetailsAsync(array $args = [])
113
- * @method \Aws\Result getAccountPasswordPolicy(array $args = [])
114
- * @method \GuzzleHttp\Promise\Promise getAccountPasswordPolicyAsync(array $args = [])
115
- * @method \Aws\Result getAccountSummary(array $args = [])
116
- * @method \GuzzleHttp\Promise\Promise getAccountSummaryAsync(array $args = [])
117
- * @method \Aws\Result getContextKeysForCustomPolicy(array $args = [])
118
- * @method \GuzzleHttp\Promise\Promise getContextKeysForCustomPolicyAsync(array $args = [])
119
- * @method \Aws\Result getContextKeysForPrincipalPolicy(array $args = [])
120
- * @method \GuzzleHttp\Promise\Promise getContextKeysForPrincipalPolicyAsync(array $args = [])
121
- * @method \Aws\Result g