ADD GRAPPER BETICA GOLDBET WIP

This commit is contained in:
salam committed 2026-01-15 16:14:10 +01:00
1 parent 9cf4b5ffd1
commit 128d3e5d99
7 files changed
+131 -28

No files matched your search

@@ -1,9 +1,9 @@
<?php
namespace App\Console\Commands\Maintenance;
namespace App\Console\Commands\Services;
use App\Console\Commands\Maintenance\Tasks\CallTxoddsMarkets;
use App\Console\Commands\Nuh;
use App\Console\Commands\Services\Tasks\CallTxoddsMarkets;
class Services
{
@@ -13,6 +13,9 @@ class Services
case 'Txodds Markets':
CallTxoddsMarkets::call();
break;
case 'Mapper':
Mapper::run();
break;
}
}
}
@@ -1,6 +1,6 @@
<?php
namespace App\Console\Commands\Maintenance\Tasks;
namespace App\Console\Commands\Services\Tasks;
use App\Console\Commands\Nuh;
use App\Console\Commands\Xml;
@@ -0,0 +1,53 @@
<?php
namespace App\Console\Commands\Services\Tasks\Helper;
class ExplodeElement
{
public static function grap($str)
{
$tmp = str_replace(',', ' ', $str);
// $tmp = str_replace('-', ' ', $tmp);
$tmp = str_replace('/', ' ', $tmp);
$tmp = preg_replace('"\([^\)]*\)"', '', $tmp);
$tmp = preg_replace('/[^a-zA-Z0-9 ] /', '', $tmp);
$tmp = str_replace(' ', ' ', $tmp);
$elements = explode(' ', $tmp);
$_return = [];
foreach ($elements as $value) {
if (\strlen($value) > 2) {
$_return[] = $value;
}
}
usort($_return, function ($a, $b) {
return strlen($b) <=> strlen($a);
});
$remove = [
'fc',
'city',
'new',
'real',
'united',
'dinamo',
'town',
'club',
'union',
'sport',
'sports',
'basket',
'hapoel',
'maccabi',
'east'];
return array_diff($_return, $remove);
}
}
@@ -0,0 +1,40 @@
<?php
namespace App\Console\Commands\Services\Tasks;
use App\Console\Commands\Nuh;
use App\Utilities\Notice;
class Mapper
{
public static function run()
{
$debug = Nuh::$options['d'] ?? 0;
switch (Nuh::$options['sport_id']) {
case 1:
$bookmakers = [10, 14, 16, 35, 36, 46, 128];
break;
case 2:
$bookmakers = [10, 16, 35, 36, 46, 128];
break;
case 3:
$bookmakers = [128, 10, 16, 35, 36, 46];
break;
case 5:
$bookmakers = [128, 10, 16, 35, 36, 46];
break;
}
if ($debug) {
Notice::note('MAPPER SOCCER', 'g');
}
$results = [];
foreach ($bookmakers as $$bookmaker_id) {
// code...
}
}
}
@@ -74,6 +74,15 @@ class SupervisorsTable
*/
return [
'Txodds Markets' => 'Txodds Markets',
'Mapper Soccer' => 'Mapper Soccer',
'Mapper Ice Hockey' => 'Mapper Ice Hockey',
'Mapper Basketball' => 'Mapper Basketball',
'Mapper Tennis' => 'Mapper Tennis',
];
case 9:
case 10:
return [
'GRAPPER DIRCET' => 'GRAPPER DIRCET',
];
default:
return [];