* @link https://www.oxidmodule.com */ declare(strict_types=1); namespace D3\LinkmobilityClient; use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; class LoggerHandler { private static $instance = null; private $logger; public static function getInstance(): ?LoggerHandler { if (self::$instance === null) { self::$instance = new self(); } return self::$instance; } public function __construct() { $this->setLogger(new NullLogger()); } /** * @param mixed $logger */ public function setLogger(LoggerInterface $logger) { $this->logger = $logger; } /** * @return LoggerInterface */ public function getLogger(): LoggerInterface { return $this->logger; } }