public function createClient($name, array $args = []) { // Get information about the service from the manifest file. $service = manifest($name); $namespace = $service['namespace']; // Instantiate the client class. $client = "Aws\\{$namespace}\\{$namespace}Client"; return new $client($this->mergeArgs($namespace, $service, $args)); }
/** * @param AWSCredentials $AWSCredentials * @param $service * * @throws \InvalidArgumentException * * @return mixed */ public function get(AWSCredentials $AWSCredentials, $service) { $aws = new Aws($AWSCredentials->getParameters()); return $aws->createClient($service, $AWSCredentials->getParameters($service)); }