mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
ajout compteurs
This commit is contained in:
31
src/Bundle/ChillMainBundle/Serializer/Model/Counter.php
Normal file
31
src/Bundle/ChillMainBundle/Serializer/Model/Counter.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Chill\MainBundle\Serializer\Model;
|
||||
|
||||
class Counter implements \JsonSerializable
|
||||
{
|
||||
private int $counter;
|
||||
|
||||
public function __construct(?int $counter)
|
||||
{
|
||||
$this->counter = $counter;
|
||||
}
|
||||
|
||||
public function getCounter(): ?int
|
||||
{
|
||||
return $this->counter;
|
||||
}
|
||||
|
||||
public function setCounter(?int $counter): Counter
|
||||
{
|
||||
$this->counter = $counter;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ['count' => $this->counter];
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user