You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

VisitorFactory.php 523B

3 anni fa
3 anni fa
3 anni fa
3 anni fa
1234567891011121314151617181920212223
  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\User;
  3. use App\Entity\User\Visitor;
  4. use Lc\CaracoleBundle\Model\User\VisitorInterface;
  5. use Lc\SovBundle\Factory\AbstractFactory;
  6. class VisitorFactory extends AbstractFactory
  7. {
  8. public function create(string $cookie, string $ip): VisitorInterface
  9. {
  10. $visitor = new Visitor();
  11. $visitor->setCookie($cookie);
  12. $visitor->setIp($ip);
  13. $visitor->setTotalVisit(1);
  14. $visitor->setLastAccess(new \DateTime());
  15. return $visitor;
  16. }
  17. }