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.      */
  24.     private $name;
  25.     /**
  26.      * priority of tag.
  27.      *
  28.      * @var int
  29.      *
  30.      * @Type("integer")
  31.      */
  32.     private $priority;
  33.     /**
  34.      * attributes of the tag.
  35.      *
  36.      * @var array
  37.      *
  38.      * @Type("array")
  39.      */
  40.     private $attributes = [];
  41.     /**
  42.      * @param string $name
  43.      * @param int $priority
  44.      */
  45.     public function __construct($name$priority$attributes = [])
  46.     {
  47.         $this->name $name;
  48.         $this->priority $priority;
  49.         $this->attributes $attributes;
  50.     }
  51.     /**
  52.      * returns name of tag.
  53.      *
  54.      * @return string
  55.      */
  56.     public function getName()
  57.     {
  58.         return $this->name;
  59.     }
  60.     /**
  61.      * returns priority of tag.
  62.      *
  63.      * @return int
  64.      */
  65.     public function getPriority()
  66.     {
  67.         return $this->priority;
  68.     }
  69.     /**
  70.      * returns the attributes of the tag.
  71.      *
  72.      * @return array
  73.      */
  74.     public function getAttributes()
  75.     {
  76.         return $this->attributes;
  77.     }
  78. }