AWS Credentials support, StaticCredentials Provider (#17)

* added credentials API, disabled FFI backend for now

* Added CredentialsTest

* Added support for specifying CMAKE_BUILD_TYPE on the command line

* Added support for AwsCredentials and StaticCredentialsProvider
This commit is contained in:
Justin Boswell
2021-03-17 13:59:05 -04:00
committed by GitHub
parent 9171857448
commit 73ecd3bc8a
16 changed files with 585 additions and 86 deletions
+32
View File
@@ -0,0 +1,32 @@
<?php
namespace AWS\CRT;
final class Options {
private $options = [];
public function __construct($opts = []) {
$this->options = $opts;
}
public function __get($name) {
return (isset($this->options[$name])) ? $this->options[$name] : null;
}
public function asArray() {
return $this->options;
}
public function toArray() {
return array_merge_recursive([], $this->options);
}
public function getInt($name) {
$val = $this->$name;
return (is_null($val)) ? 0 : (int)$val;
}
public function getString($name) {
return !empty($this->options[$name]) ? strval($this->options[$name]) : "";
}
}