Esempio n. 1
0
 protected function load()
 {
     if (!$this->client) {
         $this->client = DependencyRegistry::load("RedisCache", function () {
             return new Client(["host" => $this->host]);
         });
     }
 }
Esempio n. 2
0
 protected function load()
 {
     if (!$this->s3Client) {
         $this->s3Client = DependencyRegistry::load("S3V2", function () {
             return S3Client::factory(["region" => "us-east-1"]);
         });
     }
 }
Esempio n. 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();
         });
     }
 }