Dmyers\Storage\Adapter\AmazonS3::__construct PHP Method

__construct() public method

public __construct ( )
    public function __construct()
    {
        $key = $this->config('key');
        $region = $this->config('region');
        if (empty($key)) {
            throw new \RuntimeException('AmazonS3 key config required.');
        }
        $secret = $this->config('secret');
        if (empty($secret)) {
            throw new \RuntimeException('AmazonS3 secret config required.');
        }
        $bucket = $this->config('bucket');
        if (empty($bucket)) {
            throw new \RuntimeException('AmazonS3 bucket config required.');
        }
        $this->bucket = $bucket;
        $this->client = S3Client::factory(array('key' => $key, 'secret' => $secret, 'region' => $region));
    }