public static function getPrinter() : Printer { static $printer; if ($printer === null) { $printer = new Printer(); } return $printer; }