您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

24 行
530B

  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 static 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. }