vendor/sulu/sulu/src/Sulu/Component/Content/Compat/PropertyTag.php line 19

Open in your IDE?
  1. <?php
  2. /*
  3. * This file is part of Sulu.
  4. *
  5. * (c) Sulu GmbH
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. namespace Sulu\Component\Content\Compat;
  11. use JMS\Serializer\Annotation\Type;
  12. /**
  13. * Tag for property.
  14. */
  15. class PropertyTag
  16. {
  17. /**
  18. * name of tag.
  19. *
  20. * @var string
  21. */
  22. #[Type('string')]
  23. private $name;
  24. /**
  25. * priority of tag.
  26. *
  27. * @var int
  28. */
  29. #[Type('integer')]
  30. private $priority;
  31. /**
  32. * attributes of the tag.
  33. *
  34. * @var array
  35. */
  36. #[Type('array')]
  37. private $attributes = [];
  38. /**
  39. * @param string $name
  40. * @param int $priority
  41. */
  42. public function __construct($name, $priority, $attributes = [])
  43. {
  44. $this->name = $name;
  45. $this->priority = $priority;
  46. $this->attributes = $attributes;
  47. }
  48. /**
  49. * returns name of tag.
  50. *
  51. * @return string
  52. */
  53. public function getName()
  54. {
  55. return $this->name;
  56. }
  57. /**
  58. * returns priority of tag.
  59. *
  60. * @return int
  61. */
  62. public function getPriority()
  63. {
  64. return $this->priority;
  65. }
  66. /**
  67. * returns the attributes of the tag.
  68. *
  69. * @return array
  70. */
  71. public function getAttributes()
  72. {
  73. return $this->attributes;
  74. }
  75. }