Ejemplo n.º 1
0
 /**
  * Constructs the Message Validator object and ensures that openssl is
  * installed.
  *
  * @param callable $httpHandler HTTP handler used to fetch a certificate.
  *                              The handler accepts a PSR7 RequestInterface
  *                              and array of request options and returns a
  *                              promise that fufills with a PSR7
  *                              ResponseInterface.
  *
  * @throws \RuntimeException If openssl is not installed
  */
 public function __construct(callable $httpHandler = null)
 {
     if (!extension_loaded('openssl')) {
         //@codeCoverageIgnoreStart
         throw new \RuntimeException('The openssl extension is required to ' . 'use the SNS message validator. Please install this ' . 'extension in order to use this feature.');
         //@codeCoverageIgnoreEnd
     }
     $this->client = $httpHandler ?: \Aws\default_http_handler();
 }
 /**
  * The constructor accepts the following options:
  *
  * - timeout: Connection timeout, in seconds.
  * - profile: Optional EC2 profile name, if known.
  *
  * @param array $config Configuration options.
  */
 public function __construct(array $config = [])
 {
     $this->timeout = isset($config['timeout']) ? $config['timeout'] : 1.0;
     $this->profile = isset($config['profile']) ? $config['profile'] : null;
     $this->client = isset($config['client']) ? $config['client'] : \Aws\default_http_handler();
 }
 /**
  * @param array $config Configuration options
  */
 public function __construct(array $config = [])
 {
     $this->client = isset($config['client']) ? $config['client'] : \Aws\default_http_handler();
 }