src/Entity/VisitorCount.php line 11

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\VisitorCountRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassVisitorCountRepository::class)]
  6. class VisitorCount implements \Stringable
  7. {
  8.     const ARTICLE_READ_TYPE 'article_read';
  9.     const STATIC_PAGES_TYPE 'static_pages';
  10.     const NONE_TYPE 'none';
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column(type'integer')]
  14.     private $id;
  15.     #[ORM\Column(type'string'length255nullabletrue)]
  16.     private $category;
  17.     #[ORM\Column(type'string'length255)]
  18.     private $type '';
  19.     #[ORM\Column(type'integer'nullabletrue)]
  20.     private $counter 0;
  21.     #[ORM\Column(type'integer'nullabletrue)]
  22.     private $pageId;
  23.     #[ORM\Column(type'array')]
  24.     private $views;
  25.     #[ORM\Column(type'array')]
  26.     private $origins;
  27.     public function getId(): ?int
  28.     {
  29.         return $this->id;
  30.     }
  31.     public function getCategory(): ?string
  32.     {
  33.         return $this->category;
  34.     }
  35.     public function setCategory(string $category): self
  36.     {
  37.         $this->category $category;
  38.         return $this;
  39.     }
  40.     public function getCounter(): ?int
  41.     {
  42.         return $this->counter;
  43.     }
  44.     public function setCounter(?int $counter): self
  45.     {
  46.         $this->counter $counter;
  47.         return $this;
  48.     }
  49.     public function getPageId(): ?int
  50.     {
  51.         return $this->pageId;
  52.     }
  53.     public function setPageId(?int $pageId): self
  54.     {
  55.         $this->pageId $pageId;
  56.         return $this;
  57.     }
  58.     public function __toString(): string
  59.     {
  60.         return (string) $this->getCategory();
  61.     }
  62.     public function getType(): string
  63.     {
  64.         return $this->type;
  65.     }
  66.     public function setType(string $type): void
  67.     {
  68.         $this->type $type;
  69.     }
  70.     public function getViews()
  71.     {
  72.         return $this->views;
  73.     }
  74.     public function setViews($views)
  75.     {
  76.         $this->views $views;
  77.         return $this;
  78.     }
  79.     public function getOrigins()
  80.     {
  81.         return $this->origins;
  82.     }
  83.     public function setOrigins($origins)
  84.     {
  85.         $this->origins $origins;
  86.         return $this;
  87.     }
  88. }