ViewLocationBase.php 775 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace CMText\RichContent\Common;
  3. /**
  4. * Class ViewLocationBase
  5. * @package CMText\RichContent\Common
  6. */
  7. abstract class ViewLocationBase implements \JsonSerializable
  8. {
  9. /**
  10. * @var string
  11. */
  12. protected $label;
  13. /**
  14. * @var int Available in some RCS channels to display a radius instead of a pointer on the map.
  15. */
  16. protected $radius;
  17. /**
  18. * @const int Value to force omitting the radius attribute.
  19. */
  20. const RADIUS_OMIT_VALUE = -1;
  21. /**
  22. * ViewLocationBase constructor.
  23. * @param string $Label
  24. * @param int $Radius
  25. */
  26. public function __construct(
  27. $Label,
  28. $Radius = self::RADIUS_OMIT_VALUE
  29. )
  30. {
  31. $this->label = $Label;
  32. $this->radius = $Radius;
  33. }
  34. }