1 | <?php |
||
14 | class PlainTextSitemapIndexRender implements SitemapIndexRender |
||
15 | { |
||
16 | /** |
||
17 | 3 | * @var string |
|
18 | */ |
||
19 | 3 | private $host = ''; |
|
20 | 3 | ||
21 | /** |
||
22 | * @param string $host |
||
23 | */ |
||
24 | public function __construct(string $host) |
||
25 | { |
||
26 | 3 | $this->host = $host; |
|
27 | } |
||
28 | 3 | ||
29 | /** |
||
30 | * @return string |
||
31 | */ |
||
32 | public function start(): string |
||
33 | { |
||
34 | return '<?xml version="1.0" encoding="utf-8"?>'.PHP_EOL. |
||
35 | '<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'; |
||
36 | } |
||
37 | 4 | ||
38 | /** |
||
39 | * @return string |
||
40 | 4 | */ |
|
41 | 4 | public function end(): string |
|
45 | |||
46 | /** |
||
47 | * @param string $path |
||
48 | * @param \DateTimeInterface|null $last_mod |
||
49 | * |
||
50 | * @return string |
||
51 | */ |
||
52 | public function sitemap(string $path, \DateTimeInterface $last_mod = null): string |
||
59 | } |
||
60 |