2amigos / yiiaws

Amazon Web Services SDK PHP 2 Wrapper
21 stars 15 forks source link

Added option to pass custom configuration #24

Closed tonydspaniard closed 11 years ago

tonydspaniard commented 11 years ago

From now on, you can pass custom configurations like this:

$s3 = new A2S3(array(
    'key'    => '{YOUR-AWS-KEY}',
    'secret' => '{YOUR-AWS-SECRET}',
    'region' => 'us-east-1'     
));

try
{
    return $s3->getClient()->deleteObject(array(
        'Bucket' => $bucket,
        'Key' => $image->filename
    ));
} catch (Aws\S3\Exception\S3Exception $e)
{
    throw $e;
    return false;
}

Fixes #23