Beispiel #1
0
 protected function load()
 {
     if (!$this->client) {
         $this->client = DependencyRegistry::load("RedisCache", function () {
             return new Client(["host" => $this->host]);
         });
     }
 }
Beispiel #2
0
 protected function load()
 {
     if (!$this->s3Client) {
         $this->s3Client = DependencyRegistry::load("S3V2", function () {
             return S3Client::factory(["region" => "us-east-1"]);
         });
     }
 }
Beispiel #3
0
 protected function load()
 {
     if (!$this->s3Client) {
         $this->s3Client = DependencyRegistry::load("S3V2", function () {
             $sdk = new Sdk(["region" => "us-east-1", "version" => "latest"]);
             return $sdk->createS3();
         });
     }
 }