64 lines
1.7 KiB
PHP
64 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Console\Commands\Grapper;
|
|
|
|
use App\Console\Commands\Grapper\Sofascore\CreateZip;
|
|
use App\Console\Commands\Grapper\Sofascore\DaysTournament;
|
|
use App\Console\Commands\Grapper\Sofascore\Grapper;
|
|
use App\Console\Commands\Grapper\Sofascore\Helper\LoadDays;
|
|
use App\Console\Commands\Grapper\Sofascore\Helper\TaskConfig;
|
|
use App\Console\Commands\Grapper\Sofascore\PlayerPerSeason;
|
|
use App\Console\Commands\Grapper\Sofascore\SendMail;
|
|
use App\Console\Commands\Grapper\Sofascore\SettingsToLocal;
|
|
use App\Console\Commands\Nuh;
|
|
use App\Utilities\Notice;
|
|
|
|
ini_set('magic_quotes_runtime', false);
|
|
|
|
class Sofascore
|
|
{
|
|
|
|
public static string $source_path;
|
|
|
|
public static string $storage_path;
|
|
|
|
public static function switch()
|
|
{
|
|
self::$source_path = app_path('/Console/Commands/Grapper/Sofascore/Grapped');
|
|
|
|
self::$storage_path = storage_path('zip_sofascore_data');
|
|
|
|
$function = Nuh::$options['fun'];
|
|
|
|
switch($function){
|
|
case 1:
|
|
PlayerPerSeason::run();
|
|
break;
|
|
case 2:
|
|
SettingsToLocal::run();
|
|
break;
|
|
case 3:
|
|
CreateZip::run();
|
|
break;
|
|
case 4:
|
|
SendMail::run();
|
|
break;
|
|
case 5:
|
|
DaysTournament::run();
|
|
break;
|
|
case 6:
|
|
Grapper::load();
|
|
break;
|
|
case 7:
|
|
TaskConfig::start();
|
|
break;
|
|
case 8:
|
|
TaskConfig::end();
|
|
break;
|
|
|
|
default:
|
|
Notice::note('id not valid', 'br', 1);
|
|
}
|
|
}
|
|
}
|