25 lines
641 B
PHP
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;
|
|
}
|
|
}
|
|
}
|