Html.php 350 B

1234567891011121314151617
  1. <?php
  2. namespace App;
  3. class Html {
  4. public static function selected($value, $selected): string {
  5. return ((string) $value === (string) $selected) ? "selected" : "";
  6. }
  7. public static function checked($value): string {
  8. return $value ? "checked" : "";
  9. }
  10. public static function disabled($value): string {
  11. return $value ? "disabled" : "";
  12. }
  13. }