HourTransformer.php 801 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Polyfill\Intl\Icu\DateFormat;
  11. /**
  12. * Base class for hour transformers.
  13. *
  14. * @author Eriksen Costa <eriksen.costa@infranology.com.br>
  15. *
  16. * @internal
  17. */
  18. abstract class HourTransformer extends Transformer
  19. {
  20. /**
  21. * Returns a normalized hour value suitable for the hour transformer type.
  22. *
  23. * @param int $hour The hour value
  24. * @param string $marker An optional AM/PM marker
  25. *
  26. * @return int The normalized hour value
  27. */
  28. abstract public function normalizeHour(int $hour, string $marker = null): int;
  29. }