1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
| private $cosConfig = [ 'scheme' => 'http', 'region' => null, 'credentials' => [ 'appId' => null, 'secretId' => '', 'secretKey' => '', 'anonymous' => false, 'token' => null, ], 'timeout' => 3600, 'connect_timeout' => 3600, 'ip' => null, 'port' => null, 'endpoint' => null, 'domain' => null, 'proxy' => null, 'retry' => 6, 'userAgent' => 'cos-php-sdk-v5.' . Client::VERSION, 'pathStyle' => false, 'signHost' => true, 'allow_redirects' => false, 'allow_accelerate' => false, 'timezone' => 'PRC', 'locationWithScheme' => false, 'autoChange' => false, 'limit_flag' => false, 'isCheckRequestPath' => true, ];
public function __construct( $accessKey, $secretKey, $options, $token = null ) { $this->accessKey = $accessKey; $this->secretKey = $secretKey; $this->options = $options; $this->token = $token; $this->signHeader = [ 'cache-control', 'content-disposition', 'content-encoding', 'content-length', 'content-md5', 'content-type', 'expires', 'host', 'if-match', 'if-modified-since', 'if-none-match', 'if-unmodified-since', 'origin', 'range', 'transfer-encoding', 'pic-operations', ]; date_default_timezone_set($this->options['timezone']); }
|