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