1 | <?php |
||
22 | class SitemapManager |
||
23 | { |
||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | protected $defaults; |
||
28 | |||
29 | /** |
||
30 | * @var int |
||
31 | */ |
||
32 | protected $maxPerSitemap; |
||
33 | |||
34 | /** |
||
35 | * @var \Dpn\XmlSitemapBundle\Sitemap\Entry[]|null |
||
36 | */ |
||
37 | protected $entries; |
||
38 | |||
39 | /** |
||
40 | * @var GeneratorInterface[] |
||
41 | */ |
||
42 | protected $generators = array(); |
||
43 | |||
44 | /** |
||
45 | * @var EngineInterface |
||
46 | */ |
||
47 | protected $templating; |
||
48 | |||
49 | /** |
||
50 | * @param array $defaults |
||
51 | * @param int $maxPerSitemap |
||
52 | * @param EngineInterface $templating |
||
53 | */ |
||
54 | 17 | public function __construct(array $defaults, $maxPerSitemap, EngineInterface $templating) |
|
67 | |||
68 | /** |
||
69 | * @param GeneratorInterface $generator |
||
70 | */ |
||
71 | 15 | public function addGenerator(GeneratorInterface $generator) |
|
75 | |||
76 | /** |
||
77 | * @return \Dpn\XmlSitemapBundle\Sitemap\Entry[] |
||
78 | */ |
||
79 | 15 | public function getSitemapEntries() |
|
95 | |||
96 | /** |
||
97 | * @return int |
||
98 | */ |
||
99 | 14 | public function countSitemapEntries() |
|
103 | |||
104 | /** |
||
105 | * @return int |
||
106 | */ |
||
107 | 13 | public function getNumberOfSitemaps() |
|
117 | |||
118 | /** |
||
119 | * @param int $number |
||
120 | * |
||
121 | * @return \Dpn\XmlSitemapBundle\Sitemap\Entry[] |
||
122 | * |
||
123 | * @throws \InvalidArgumentException |
||
124 | */ |
||
125 | 6 | public function getEntriesForSitemap($number) |
|
141 | |||
142 | /** |
||
143 | * @param int|null $number |
||
144 | * |
||
145 | * @return string |
||
146 | */ |
||
147 | 8 | public function renderSitemap($number = null) |
|
160 | |||
161 | /** |
||
162 | * @param string $host |
||
163 | * |
||
164 | * @return string |
||
165 | */ |
||
166 | 5 | public function renderSitemapIndex($host) |
|
176 | } |
||
177 |