SitemapItem.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Sitemap\Model;
  7. class SitemapItem implements SitemapItemInterface
  8. {
  9. /**
  10. * @var string
  11. */
  12. private $url;
  13. /**
  14. * @var string
  15. */
  16. private $priority;
  17. /**
  18. * @var string
  19. */
  20. private $changeFrequency;
  21. /**
  22. * @var array
  23. */
  24. private $images;
  25. /**
  26. * @var string
  27. */
  28. private $updatedAt;
  29. /**
  30. * SitemapItem constructor.
  31. *
  32. * @param string $url
  33. * @param string $priority
  34. * @param string $changeFrequency
  35. * @param string|null $updatedAt
  36. * @param array|null $images
  37. */
  38. public function __construct($url, $priority, $changeFrequency, $updatedAt = null, $images = null)
  39. {
  40. $this->url = $url;
  41. $this->priority = $priority;
  42. $this->changeFrequency = $changeFrequency;
  43. $this->updatedAt = $updatedAt;
  44. $this->images = $images;
  45. }
  46. /**
  47. * {@inheritdoc}
  48. */
  49. public function getUrl()
  50. {
  51. return $this->url;
  52. }
  53. /**
  54. * {@inheritdoc}
  55. */
  56. public function getPriority()
  57. {
  58. return $this->priority;
  59. }
  60. /**
  61. * {@inheritdoc}
  62. */
  63. public function getChangeFrequency()
  64. {
  65. return $this->changeFrequency;
  66. }
  67. /**
  68. * {@inheritdoc}
  69. */
  70. public function getImages()
  71. {
  72. return $this->images;
  73. }
  74. /**
  75. * {@inheritdoc}
  76. */
  77. public function getUpdatedAt()
  78. {
  79. return $this->updatedAt;
  80. }
  81. }