1
0

test_pdf.php 446 B

123456789101112131415161718192021222324
  1. <?php
  2. class TestPDF {
  3. /**
  4. * @param string $value
  5. * @return string
  6. */
  7. public static function getValueHtml(?string $value): string {
  8. if(empty($value)) {
  9. return "<span class=\"text-muted\">None</span>";
  10. }
  11. return htmlspecialchars($value);
  12. }
  13. public static function getBooleanHtml($value): string {
  14. return $value ? "Yes" : "No";
  15. }
  16. public static function getNumericHtml($value): string {
  17. return number_format($value);
  18. }
  19. }