コード例 #1
0
 /**
  * Construct an instance of a FrontModule.
  */
 public function __construct()
 {
     parent::__construct();
     $this->register('index', FrontModuleController::class, 'getIndex', 'Home');
     $this->register('modules', FrontModuleController::class, 'getModules', 'Modules');
     $this->register('issues', FrontModuleController::class, 'getIssues', 'Module issues');
 }
コード例 #2
0
ファイル: JobsModule.php プロジェクト: MarkVaughn/illuminated
 public function boot()
 {
     parent::boot();
     if (!$this->container->bound(JobSchedulerInterface::class)) {
         throw new CoreException('This module requires the Jobs component to be loaded. ' . 'Please make sure that `JobsServiceProvider` ' . 'is in your application\'s `config/app.php` file.');
     }
 }
コード例 #3
0
 /**
  * Boot the module.
  *
  * @throws CoreException
  */
 public function boot()
 {
     parent::boot();
     if (!$this->container->bound(ApplicationManifestInterface::class)) {
         throw new CoreException('An instance of ApplicationManifest must be bound to in the ' . 'container in order to provide application reflection data.');
     }
 }
コード例 #4
0
ファイル: HttpModule.php プロジェクト: MarkVaughn/illuminated
 /**
  * Construct an instance of a HttpModule.
  */
 public function __construct()
 {
     parent::__construct();
     $this->register('index', HttpModuleController::class, 'getIndex', 'All Routes');
     $this->register('middleware', HttpModuleController::class, 'getRouterMiddleware', 'Middleware');
     $this->register('patterns', HttpModuleController::class, 'getPatterns', 'Patterns');
 }
コード例 #5
0
 /**
  * Boot the module.
  *
  * @throws CoreException
  */
 public function boot()
 {
     parent::boot();
     if (!$this->container->bound(StructuredStatusInterface::class)) {
         throw new CoreException('This module requires the Structured service to be loaded. ' . 'Please make sure that `StructuredMigrationsServiceProvider` ' . 'is in your application\'s `config/app.php` file.');
     }
     if (!$this->container->bound(Batch::class)) {
         throw new CoreException('While the Structured service is loaded, there isn\'t a ' . 'Batch defined at the moment. Please define a Batch class ' . 'for your application and bind it using a service provider.');
     }
 }
コード例 #6
0
ファイル: Dashboard.php プロジェクト: MarkVaughn/illuminated
 /**
  * Resolve a method inside a module.
  *
  * @param Module $module
  * @param null $methodName
  *
  * @throws MethodNotFoundException
  * @return mixed
  */
 protected function resolveMethod(Module $module, $methodName = null)
 {
     $selected = $methodName;
     if ($methodName === null) {
         $selected = $module->getDefaultMethodName();
     }
     if (!$module->hasMethod($selected)) {
         throw new MethodNotFoundException($module->getName(), $methodName);
     }
     return $module->getMethod($selected);
 }