container = $container; } /** * Register every controller. */ public function register(): void { foreach ( $this->controllers() as $controller ) { $controller->register_routes(); } } /** * The controllers to register. * * @return AbstractController[] */ private function controllers(): array { return array( new SystemController(), new SettingsController(), new SuppliersController( $this->container->get( SupplierService::class ) ), new ProductsController( $this->container->get( ProductPurchasingService::class ), $this->container->get( ForecastService::class ), $this->container->get( StockAdjustmentService::class ) ), new ProfitController( $this->container->get( ProfitService::class ), $this->container->get( ReconcileService::class ) ), new PurchaseOrdersController( $this->container->get( POService::class ), $this->container->get( ReceivingService::class ) ), new ReorderController( $this->container->get( ReorderService::class ), $this->container->get( ForecastService::class ), $this->container->get( ForecastScheduler::class ) ), new DashboardController( $this->container->get( DashboardService::class ) ), new ReportsController( $this->container->get( ReportService::class ) ), new NotificationsController( $this->container->get( NotificationSettings::class ), $this->container->get( NotificationService::class ), $this->container->get( NotificationTriggers::class ) ), ); } }