matecat /
simple-s3
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * This file is part of the Simple S3 package. |
||
| 4 | * |
||
| 5 | * (c) Mauro Cassani<https://github.com/mauretto78> |
||
| 6 | * |
||
| 7 | * For the full copyright and license information, please view the LICENSE |
||
| 8 | * file that was distributed with this source code. |
||
| 9 | * |
||
| 10 | */ |
||
| 11 | |||
| 12 | namespace Matecat\SimpleS3\Commands; |
||
| 13 | |||
| 14 | use Matecat\SimpleS3\Client; |
||
| 15 | use Matecat\SimpleS3\Components\Logger\CommandHandlerLogger; |
||
| 16 | |||
| 17 | abstract class CommandHandler implements CommandHandlerInterface |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var Client |
||
| 21 | */ |
||
| 22 | protected Client $client; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var CommandHandlerLogger|null |
||
| 26 | */ |
||
| 27 | protected ?CommandHandlerLogger $commandHandlerLogger = null; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * CommandHandler constructor. |
||
| 31 | * |
||
| 32 | * @param Client $client |
||
| 33 | */ |
||
| 34 | 40 | public function __construct(Client $client) |
|
| 35 | { |
||
| 36 | 40 | $this->client = $client; |
|
| 37 | 40 | if ($this->client->hasLogger()) { |
|
| 38 | 36 | $this->commandHandlerLogger = new CommandHandlerLogger($client->getLogger()); |
|
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 39 | } |
||
| 40 | } |
||
| 41 | } |
||
| 42 |