LoggerAwareInterface abstract
This commit is contained in:
19
app/common/Ideal/LoggerEnabled.php
Normal file
19
app/common/Ideal/LoggerEnabled.php
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
namespace Incoviba\Common\Ideal;
|
||||||
|
|
||||||
|
use Psr\Log\LoggerAwareInterface;
|
||||||
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
|
abstract class LoggerEnabled implements LoggerAwareInterface
|
||||||
|
{
|
||||||
|
protected LoggerInterface $logger;
|
||||||
|
public function setLogger(LoggerInterface $logger): self
|
||||||
|
{
|
||||||
|
$this->logger = $logger;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
public function getLogger(): LoggerInterface
|
||||||
|
{
|
||||||
|
return $this->logger;
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user