xref: /plugin/upgrade/myvendor/splitbrain/php-cli/src/PSR3CLIv3.php (revision ab8e5256dbaece2751c4414d6cf7b761cb71998a)
1*ab8e5256SAndreas Gohr<?php
2*ab8e5256SAndreas Gohr
3*ab8e5256SAndreas Gohrnamespace splitbrain\phpcli;
4*ab8e5256SAndreas Gohr
5*ab8e5256SAndreas Gohruse Psr\Log\LoggerInterface;
6*ab8e5256SAndreas Gohruse Psr\Log\LoggerTrait;
7*ab8e5256SAndreas Gohr
8*ab8e5256SAndreas Gohr/**
9*ab8e5256SAndreas Gohr * Class PSR3CLI
10*ab8e5256SAndreas Gohr *
11*ab8e5256SAndreas Gohr * This class can be used instead of the CLI class when a class implementing
12*ab8e5256SAndreas Gohr * PSR3 version 3 is needed.
13*ab8e5256SAndreas Gohr *
14*ab8e5256SAndreas Gohr * @see PSR3CLI for a version 2 compatible class
15*ab8e5256SAndreas Gohr */
16*ab8e5256SAndreas Gohrabstract class PSR3CLIv3 extends Base implements LoggerInterface
17*ab8e5256SAndreas Gohr{
18*ab8e5256SAndreas Gohr    use LoggerTrait;
19*ab8e5256SAndreas Gohr
20*ab8e5256SAndreas Gohr    public function log($level, string|\Stringable $message, array $context = []): void
21*ab8e5256SAndreas Gohr    {
22*ab8e5256SAndreas Gohr        $this->logMessage($level, $message, $context);
23*ab8e5256SAndreas Gohr    }
24*ab8e5256SAndreas Gohr}
25