| Total Complexity | 7 |
| Total Lines | 75 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | abstract class AbstractXmlSitemapDataProvider implements XmlSitemapDataProviderInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $key; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var int |
||
| 21 | */ |
||
| 22 | protected $lastModified; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var array |
||
| 26 | */ |
||
| 27 | protected $items = []; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var array |
||
| 31 | */ |
||
| 32 | protected $config = []; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @var ContentObjectRenderer |
||
| 36 | */ |
||
| 37 | protected $cObj; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * AbstractXmlSitemapDataProvider constructor |
||
| 41 | * |
||
| 42 | * @param \Psr\Http\Message\ServerRequestInterface $request |
||
| 43 | * @param string $key |
||
| 44 | * @param array $config |
||
| 45 | * @param ContentObjectRenderer $cObj |
||
| 46 | */ |
||
| 47 | public function __construct(ServerRequestInterface $request, string $key, array $config = [], ContentObjectRenderer $cObj = null) |
||
| 48 | { |
||
| 49 | $this->key = $key; |
||
| 50 | $this->config = $config; |
||
| 51 | |||
| 52 | if ($cObj === null) { |
||
| 53 | $cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class); |
||
| 54 | } |
||
| 55 | $this->cObj = $cObj; |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @return string |
||
| 60 | */ |
||
| 61 | public function getKey(): string |
||
| 64 | } |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @return int |
||
| 68 | */ |
||
| 69 | public function getLastModified(): int |
||
| 79 | } |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @return array |
||
| 83 | */ |
||
| 84 | public function getItems(): array |
||
| 89 |