/** * Instantiate a GlacierClient object. * * @param string $accessKey * @param string $secretKey * @param array $config * @throws \InvalidArgumentException */ public function __construct($accessKey, $secretKey, array $config = array()) { if (empty($config['vault'])) { throw new InvalidArgumentException('Please provide a Glacier vault'); } parent::__construct($accessKey, $secretKey, $config); $this->_client = GlacierClient::factory($this->_config); }
/** * Instantiate an S3Client object. * * @uses Aws\S3\S3Client * * @param string $accessKey * @param string $secretKey * @param array $config * @throws \InvalidArgumentException */ public function __construct($accessKey, $secretKey, array $config = array()) { if (empty($config['bucket'])) { throw new InvalidArgumentException('Please provide an S3 bucket'); } parent::__construct($accessKey, $secretKey, $config); $this->_client = S3Client::factory($this->getConfig()); }