*/ protected array $storageServices = [ AttachmentService::class, BoardService::class, ]; /** * CacheInterface가 필요한 서비스 클래스 목록 * * 이 배열에 정의된 서비스들은 모듈별 ModuleCacheDriver 가 * `CacheInterface` 로 자동 주입됩니다 (접두사: `g7:module.sirsoft-board:`). * * @var array */ protected array $cacheServices = [ BoardService::class, CommentService::class, PostService::class, ReportService::class, ]; /** * Repository 인터페이스와 구현체 매핑 * * @var array */ protected array $repositories = [ AttachmentRepositoryInterface::class => AttachmentRepository::class, BoardRepositoryInterface::class => BoardRepository::class, BoardStatRepositoryInterface::class => BoardStatRepository::class, BoardTypeRepositoryInterface::class => BoardTypeRepository::class, CommentRepositoryInterface::class => CommentRepository::class, PostRepositoryInterface::class => PostRepository::class, ReactionRepositoryInterface::class => ReactionRepository::class, ReactionTypeRepositoryInterface::class => ReactionTypeRepository::class, ReportRepositoryInterface::class => ReportRepository::class, UserNotificationSettingRepositoryInterface::class => UserNotificationSettingRepository::class, ]; /** * 등록할 Artisan 커맨드 목록 * * @var array */ protected array $commands = [ AggregateBoardStatsCommand::class, ]; /** * 서비스 부트스트랩 */ public function boot(): void { parent::boot(); // Artisan 커맨드 등록 if ($this->app->runningInConsole()) { $this->commands($this->commands); } // Sitemap 기여자 등록 $this->app->booted(function () { if ($this->app->bound(SitemapGenerator::class)) { // Repository 주입을 위해 컨테이너로 해석합니다. $this->app->make(SitemapGenerator::class)->registerContributor( $this->app->make(BoardSitemapContributor::class) ); } }); } }