/** * Get S3 client * * @return \XLite\Module\CDev\AmazonS3Images\Core\S3 */ protected function getS3() { if (!isset($this->s3)) { $this->s3 = \XLite\Module\CDev\AmazonS3Images\Core\S3::getInstance(); if (!$this->s3->isValid()) { $this->s3 = false; } } return $this->s3; }