|
1234567891011121314151617181920212223 |
- <?php
-
- namespace Lc\CaracoleBundle\Factory\User;
-
- use App\Entity\User\Visitor;
- use Lc\CaracoleBundle\Model\User\VisitorInterface;
- use Lc\SovBundle\Factory\AbstractFactory;
-
- class VisitorFactory extends AbstractFactory
- {
- public function create(string $cookie, string $ip): VisitorInterface
- {
- $visitor = new Visitor();
-
- $visitor->setCookie($cookie);
- $visitor->setIp($ip);
- $visitor->setTotalVisit(1);
- $visitor->setLastAccess(new \DateTime());
-
- return $visitor;
- }
-
- }
|