From dfb5808584db8e26dff9eec98940357685ddeaec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Wed, 11 Sep 2024 22:36:19 +0900 Subject: [PATCH] Automation init...3 --- app/Libraries/MyCrawler/MyCrawlerLibrary.php | 4 ++-- app/Libraries/MyCrawler/YamapLibrary.php | 1 - app/Models/CommonModel.php | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/Libraries/MyCrawler/MyCrawlerLibrary.php b/app/Libraries/MyCrawler/MyCrawlerLibrary.php index 72f016b..aaecd9a 100644 --- a/app/Libraries/MyCrawler/MyCrawlerLibrary.php +++ b/app/Libraries/MyCrawler/MyCrawlerLibrary.php @@ -48,7 +48,7 @@ abstract class MyCrawlerLibrary extends CommonLibrary $this->getMyStorage()->setOriginContent($content); $this->getMyStorage()->setOriginType($mediaType); $this->getMyStorage()->setOriginSequence($file_sequence); - $results[] = $this->getMyStorage()->save(); + $myStorageLibrarys[] = $this->getMyStorage()->save(); $file_sequence++; log_message("notice", __FUNCTION__ . " OriginType->{$mediaType} 작업 완료"); } catch (\Exception $e) { @@ -60,6 +60,6 @@ abstract class MyCrawlerLibrary extends CommonLibrary )); } } - return $results; + return $myStorageLibrarys; } } diff --git a/app/Libraries/MyCrawler/YamapLibrary.php b/app/Libraries/MyCrawler/YamapLibrary.php index 19dfcc3..74a803d 100644 --- a/app/Libraries/MyCrawler/YamapLibrary.php +++ b/app/Libraries/MyCrawler/YamapLibrary.php @@ -6,7 +6,6 @@ use App\Libraries\MySocket\WebLibrary as MySocketLibrary; use App\Libraries\MyStorage\Mangboard\FileLibrary as MyStorageLibrary; use App\Models\Mangboard\UserModel; use App\Models\Mangboard\BoardModel; -use App\Entities\Mangboard\BoardEntity; use App\Entities\Mangboard\UserEntity; use Symfony\Component\DomCrawler\Crawler; diff --git a/app/Models/CommonModel.php b/app/Models/CommonModel.php index 0675b42..52238e6 100644 --- a/app/Models/CommonModel.php +++ b/app/Models/CommonModel.php @@ -64,7 +64,7 @@ abstract class CommonModel extends Model { return $this->_action = $action; } - final public function getFields(string $key = "", array $fields): array + final public function getFields(string $key = "", array $fields = []): array { $allowedFields = array_filter( $this->allowedFields,