2amigos / yiiaws

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

Enhancement : support custom named services/prefix (in configuration) other than deafult settings #7

Closed VoBB-Technologies closed 11 years ago

VoBB-Technologies commented 11 years ago

hi,

it is better if we can use custom prefix in aws-config , as some may have few instance(multiple accounts) for the same service .

if you can implement http://bit.ly/ZpPgtS , that would be a huge advantage .

tonydspaniard commented 11 years ago

What about the following procedure for custom named services? You know that you can also use the library directly right? Yii-aws is a simple wrapper.

use Aws\Ses\SesClient;
use Aws\Common\Enum\Region;

$ses = SesClient::factory(array(
    'key' => Yii::app()->params['aws.ses.key'],
    'secret' => Yii::app()->params['aws.ses.secret'],
    'region' => Region::US_EAST_1
));

Nevertheless, I totally agree that provide support custom named services/prefix is something to look at. When I have some free time I may refactor its base class. Ideas?

VoBB-Technologies commented 11 years ago

@tonydspaniard : yeah i know but , I don't like to put yii wrapper connection initialization and another direct initialization (using library directly) and jumble all together .

please follow https://github.com/2amigos/yii-aws/issues/5#issuecomment-15100616 for my code modification for custom name prefixes

tonydspaniard commented 11 years ago

I have refactored the base class to be able to pass custom configurations (you can use Yii::app()->params['my.aws.configuration.array'] for this effect.

See #24