Exemplo n.º 1
0
 /**
  * Constructor - if you're not using the class statically
  *
  * @param string $accessKey Access key
  * @param string $secretKey Secret key
  * @param boolean $useSSL Enable SSL
  * @param string $endpoint Amazon URI
  * @return void
  */
 public function __construct($accessKey = null, $secretKey = null, $useSSL = false, $endpoint = 's3.amazonaws.com')
 {
     if ($accessKey !== null && $secretKey !== null) {
         self::$__iamInstanceProfileAuth = false;
         self::setAuth($accessKey, $secretKey);
     } else {
         self::$__iamInstanceProfileAuth = true;
         self::setAuthToken();
     }
     self::$useSSL = $useSSL;
     self::$endpoint = $endpoint;
 }