murph-skeleton/core/Factory/Analytic/ViewFactory.php

23 lines
464 B
PHP
Raw Normal View History

2022-02-19 23:33:46 +01:00
<?php
namespace App\Core\Factory\Analytic;
2022-02-19 23:33:46 +01:00
use App\Core\Entity\Analytic\View as Entity;
2022-02-19 23:33:46 +01:00
use App\Core\Entity\Site\Node;
use App\Core\Factory\FactoryInterface;
2022-02-19 23:33:46 +01:00
class ViewFactory implements FactoryInterface
2022-02-19 23:33:46 +01:00
{
public function create(Node $node, string $path): Entity
{
$entity = new Entity();
$entity
->setNode($node)
->setPath($path)
->setDate(new \DateTime())
;
return $entity;
}
}