1<?php
2
3namespace PHP81_BC\strftime;
4
5use DateTimeInterface;
6
7abstract class AbstractLocaleFormatter {
8
9  protected $locale;
10
11  /**
12   * Constructor
13   *
14   * @param string $locale The locale to use when formatting
15   */
16  public function __construct($locale)
17  {
18    $this->locale = $locale;
19  }
20
21  /**
22   * Format the given local dependent placeholder
23   *
24   * @param DateTimeInterface $timestamp
25   * @param string $format The strftime compatible, locale dependend placeholder
26   * @throws \RuntimeException when the given place holder is unknown
27   * @return false|string
28   */
29  abstract public function __invoke(DateTimeInterface $timestamp, string $format);
30
31}
32