File "MpdfPsrLogAwareTrait.php"
Full Path: /home/clickysoft/public_html/jmapi5.clickysoft.net/vendor/mpdf/psr-log-aware-trait/src/MpdfPsrLogAwareTrait.php
File size: 508 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace Mpdf\PsrLogAwareTrait;
use Psr\Log\LoggerInterface;
trait MpdfPsrLogAwareTrait
{
/**
* @var \Psr\Log\LoggerInterface
*/
protected $logger;
public function setLogger(LoggerInterface $logger): void
{
$this->logger = $logger;
if (property_exists($this, 'services') && is_array($this->services)) {
foreach ($this->services as $name) {
if ($this->$name && $this->$name instanceof \Psr\Log\LoggerAwareInterface) {
$this->$name->setLogger($logger);
}
}
}
}
}