diff --git a/app/Libraries/MyCrawler/YamapCrawler.php b/app/Libraries/MyCrawler/YamapCrawler.php index 9cad4fb..8826abb 100644 --- a/app/Libraries/MyCrawler/YamapCrawler.php +++ b/app/Libraries/MyCrawler/YamapCrawler.php @@ -26,7 +26,7 @@ class YamapCrawler extends MyCrawler final protected function getMyStorage() { if ($this->_myStorage === null) { - $this->_myStorage = new MangboardStorage($this->_category, $this->_user_entity); + $this->_myStorage = new MangboardStorage($this->_category); } return $this->_myStorage; } diff --git a/app/Libraries/MyCrawler/YamoonCrawler.php b/app/Libraries/MyCrawler/YamoonCrawler.php index 9dcde66..56ad515 100644 --- a/app/Libraries/MyCrawler/YamoonCrawler.php +++ b/app/Libraries/MyCrawler/YamoonCrawler.php @@ -26,7 +26,7 @@ class YamoonCrawler extends MyCrawler final protected function getMyStorage() { if ($this->_myStorage === null) { - $this->_myStorage = new MangboardStorage($this->_category, $this->_user_entity); + $this->_myStorage = new MangboardStorage($this->_category); } return $this->_myStorage; } diff --git a/app/Libraries/MyStorage/MangboardStorage.php b/app/Libraries/MyStorage/MangboardStorage.php index 1b206ce..5a16d3a 100644 --- a/app/Libraries/MyStorage/MangboardStorage.php +++ b/app/Libraries/MyStorage/MangboardStorage.php @@ -3,38 +3,12 @@ namespace App\Libraries\MyStorage; use App\Entities\Mangboard\UserEntity; -use App\Libraries\Mangboard\Board; -use App\Libraries\Mangboard\Boards; -use App\Libraries\Mangboard\File; -use App\Libraries\Mangboard\Image; class MangboardStorage extends FileStorage { - private $_boards = null; - private $_board = null; - private $_file = null; - private $_image = null; - private $_category = ""; - private $_user_entity = null; - public function __construct(string $category, UserEntity $user_entity) + public function __construct(string $path) { - parent::__construct($category); - $this->_category = $category; - $this->_user_entity = $user_entity; - } - private function getCategory(): string - { - if ($this->_category == "") { - throw new \Exception("저장할 Category가 정의되지 않았습니다."); - } - return $this->_category; - } - private function getUserEntity(): UserEntity - { - if ($this->_user_entity === null) { - throw new \Exception("사용자정보가 없습니다."); - } - return $this->_user_entity; + parent::__construct($path); } final public function getBasePath(): string {