diff options
author | Andrew Dolgov <[email protected]> | 2022-11-23 21:14:33 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2022-11-23 21:14:33 +0300 |
commit | 0c8af4992cb0f7589dcafaad65ada12753c64594 (patch) | |
tree | 18e83d068c3e7dd2499331de977782b382279396 /vendor/aws/aws-crt-php/src/AWS/CRT/Auth/SigningResult.php |
initial
Diffstat (limited to 'vendor/aws/aws-crt-php/src/AWS/CRT/Auth/SigningResult.php')
-rw-r--r-- | vendor/aws/aws-crt-php/src/AWS/CRT/Auth/SigningResult.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/vendor/aws/aws-crt-php/src/AWS/CRT/Auth/SigningResult.php b/vendor/aws/aws-crt-php/src/AWS/CRT/Auth/SigningResult.php new file mode 100644 index 0000000..b8a4ab5 --- /dev/null +++ b/vendor/aws/aws-crt-php/src/AWS/CRT/Auth/SigningResult.php @@ -0,0 +1,33 @@ +<?php +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ +namespace AWS\CRT\Auth; + +use AWS\CRT\NativeResource; +use AWS\CRT\HTTP\Request; + +class SigningResult extends NativeResource { + protected function __construct($native) { + parent::__construct(); + + $this->acquire($native); + } + + function __destruct() { + // No destruction necessary, SigningResults are transient, just release + $this->release(); + parent::__destruct(); + } + + public static function fromNative($ptr) { + return new SigningResult($ptr); + } + + public function applyToHttpRequest(&$http_request) { + self::$crt->signing_result_apply_to_http_request($this->native, $http_request->native); + // Update http_request from native + $http_request = Request::unmarshall($http_request->toBlob()); + } +}
\ No newline at end of file |