src/Entity/Compteur.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CompteurRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity(repositoryClass=CompteurRepository::class)
  7. */
  8. class Compteur
  9. {
  10. /**
  11. * @ORM\Id
  12. * @ORM\GeneratedValue
  13. * @ORM\Column(type="integer")
  14. */
  15. private $id;
  16. /**
  17. * @ORM\Column(type="string", length=255)
  18. */
  19. private $icon;
  20. /**
  21. * @ORM\Column(type="integer")
  22. */
  23. private $chiffre;
  24. /**
  25. * @ORM\Column(type="text")
  26. */
  27. private $texte;
  28. public function getId(): ?int
  29. {
  30. return $this->id;
  31. }
  32. public function getIcon(): ?string
  33. {
  34. return $this->icon;
  35. }
  36. public function setIcon(string $icon): self
  37. {
  38. $vars = explode('/',$icon);
  39. if(isset($vars[4])){
  40. $vars[4] = 80;
  41. }
  42. $icon = implode('/',$vars);
  43. $this->icon = $icon;
  44. return $this;
  45. }
  46. public function getChiffre(): ?int
  47. {
  48. return $this->chiffre;
  49. }
  50. public function setChiffre(int $chiffre): self
  51. {
  52. $this->chiffre = $chiffre;
  53. return $this;
  54. }
  55. public function getTexte(): ?string
  56. {
  57. return $this->texte;
  58. }
  59. public function setTexte(string $texte): self
  60. {
  61. $this->texte = $texte;
  62. return $this;
  63. }
  64. }