grapper logifuture wip
This commit is contained in:
1 parent
0bee21dc2d
commit
91ec9d11cc
10 files changed
+480
-324
No files matched your search
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands\Grapper\Logifuture;
|
||||
|
||||
use App\Console\Commands\Nuh;
|
||||
use DateTime;
|
||||
use DateTimeZone;
|
||||
|
||||
class ActiveEvent
|
||||
{
|
||||
public static function filter($sportid, $match)
|
||||
{
|
||||
$event = [];
|
||||
$event['status'] = 1;
|
||||
$event['bmoid'] = (int) $match['id'];
|
||||
$event['bkmid'] = Nuh::$options['bookmaker_id'];
|
||||
$event['sportid'] = $sportid;
|
||||
$event['brmatchid'] = (int) preg_replace('"\D"', '', $match['externalId']);
|
||||
|
||||
$date = new DateTime($match['startDate'], new DateTimeZone('UTC'));
|
||||
$date->setTimezone(new DateTimeZone('Europe/Vienna'));
|
||||
$event['starttime'] = $date->getTimestamp();
|
||||
|
||||
$event['groupname'] = addslashes($match['tournamentName']);
|
||||
$event['groupid'] = (int) $match['tournamentId'];
|
||||
$event['country'] = addslashes($match['sportCategory']);
|
||||
$str = str_replace('||', '|', $match['description']);
|
||||
$str = trim(str_replace('|', ' ', $str));
|
||||
$event['event'] = addslashes($str);
|
||||
if (Nuh::$options['bookmaker_id'] == 36) {
|
||||
$teams = explode(' v ', $str);
|
||||
} else {
|
||||
$teams = explode(' - ', $str);
|
||||
}
|
||||
$event['home'] = addslashes($teams[0]);
|
||||
$event['away'] = addslashes($teams[1]);
|
||||
|
||||
return $event;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user