predictator / co-visitation-counts
1.2.1
2017-04-04 09:20 UTC
Requires
- php: >= 7.0
Requires (Dev)
- fzaninotto/faker: ^1.6
- phpunit/phpunit: ^5.7
This package is not auto-updated.
Last update: 2024-10-26 21:03:51 UTC
README
Usage
Add visits
$coVisit = new CoVisitationCounts(); $visitedObject = new CoVisitationCounts\VisitedObject('10'); $visit = new CoVisitationCounts\Visit('userId-12', $visitedObject); $coVisit->addVisit($visit); $currentVisitedObject = new CoVisitationCounts\VisitedObject('11'); $currentVisit = new CoVisitationCounts\Visit('userId-16', $currentVisitedObject, new \DateTime()); $result = $coVisit->getResult($currentVisit);
Export model
$model = $coVisit->exportModel(new CoVisitationCounts\CoVisitationCountsModel()); $result = $model->getResult($currentVisit);
Process export
/** @var VisitedObjectInterface $item */ foreach ($result as $item) { $item->getId(); }
predictator.eu