Source of file S3Service.php
Size: 0,651 Bytes - Last Modified: 2021-12-23T10:34:06+00:00
/var/www/docs.ssmods.com/process/src/code/services/S3Service.php
12345678910111213141516171819202122232425262728293031 | <?php use Aws\S3\S3Client; use Aws\S3\Exception\S3Exception; /** * @author <marcus@symbiote.com.au> * @license BSD License http://www.silverstripe.org/bsd-license */ class S3Service { protected $s3; public function __construct($key, $secret, $region = 'us-east-1') { // Instantiate an S3 client $this->s3 = new S3Client(array( 'region' => $region, 'version' => '2006-03-01', 'credentials' => [ 'key' => $key, 'secret' => $secret ] )); } public function __call($name, $arguments) { return call_user_func_array(array($this->s3, $name), $arguments); } } |