Automation/app/Controllers/CLI/Crawler.php
2024-09-08 03:51:23 +09:00

25 lines
641 B
PHP

<?php
namespace App\Controllers\CLI;
use App\Controllers\BaseController;
use App\Libraries\MyCrawler\YamapLibrary;
class Crawler extends BaseController
{
public function yamap(...$params): bool
{
try {
$isDebug = in_array("debug", $params);
$yamap = new YamapLibrary();
$yamap->setDebug($isDebug);
$yamap->execute();
log_message("notice", "Crawler->" . __FUNCTION__ . " 작업이 완료되었습니다.");
return true;
} catch (\Exception $e) {
log_message("error", $e->getMessage());
return false;
}
}
}