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