wip
This commit is contained in:
1 parent
11189ec3d6
commit
2be791d63b
14 files changed
+344
-195
No files matched your search
@@ -2,15 +2,17 @@
|
||||
|
||||
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\Strings;
|
||||
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\Models\SofaScoreTask;
|
||||
use App\Utilities\Notice;
|
||||
use App\Utilities\ZipFolder;
|
||||
|
||||
ini_set('magic_quotes_runtime', false);
|
||||
|
||||
@@ -22,31 +24,40 @@ class Sofascore
|
||||
{
|
||||
$function = Nuh::$options['fun'];
|
||||
|
||||
self::$storage = storage_path('sofascore_data');
|
||||
|
||||
switch ($function) {
|
||||
|
||||
case 1:
|
||||
PlayerPerSeason::run();
|
||||
break;
|
||||
|
||||
case 2:
|
||||
SettingsToLocal::run();
|
||||
break;
|
||||
|
||||
case 3:
|
||||
TaskConfig::start();
|
||||
break;
|
||||
|
||||
case 4:
|
||||
DaysTournament::run();
|
||||
break;
|
||||
|
||||
case 5:
|
||||
self::setStorage();
|
||||
Grapper::load();
|
||||
break;
|
||||
|
||||
case 6:
|
||||
TaskConfig::end();
|
||||
break;
|
||||
|
||||
case 7:
|
||||
CreateZip::run();
|
||||
self::setStorage();
|
||||
ZipFolder::create(self::$storage);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
self::setStorage();
|
||||
SendMail::run();
|
||||
break;
|
||||
|
||||
@@ -54,4 +65,13 @@ class Sofascore
|
||||
Notice::note('id not valid', 'br', 1);
|
||||
}
|
||||
}
|
||||
|
||||
public static function setStorage()
|
||||
{
|
||||
$task = Nuh::$options['task'];
|
||||
|
||||
self::$storage = storage_path('sofascore_data') . '/' . Strings::clean(SofaScoreTask::where('id', $task)->value('name'));
|
||||
|
||||
dd(self::$storage);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user