booted ) { return; } $this->booted = true; foreach ( $this->modules() as $module ) { $module->register(); } } /** * Lazily built so that merely loading the plugin never touches the filesystem. */ public function jobStore(): JobStore { if ( null === $this->store ) { $this->store = new JobStore( Paths::jobs() ); } return $this->store; } public function jobRunner(): JobRunner { if ( null === $this->runner ) { $this->runner = new JobRunner( $this->jobStore(), array( 'export' => new ExportPipeline(), 'import' => new ImportPipeline(), 'reset' => new ResetPipeline(), ) ); } return $this->runner; } /** * @return Hookable[] */ private function modules(): array { return array( new Router( $this ), new Menu( $this ), new Download(), new ExposureNotice(), new RemoteStreamController( new Auth( new OptionStore() ) ), new Janitor( $this ), new Scheduler( $this ), ); } }