using Vendor from composer

This commit is contained in:
Ibnu Maksum
2023-06-15 10:17:00 +07:00
parent 54ec065e98
commit 1b51881f9b
1288 changed files with 128840 additions and 135772 deletions

View File

@ -0,0 +1,27 @@
<?php
namespace Mpdf\PsrLogAwareTrait;
use Psr\Log\LoggerInterface;
trait MpdfPsrLogAwareTrait
{
/**
* @var \Psr\Log\LoggerInterface
*/
protected $logger;
public function setLogger(LoggerInterface $logger)
{
$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);
}
}
}
}
}