예제 #1
0
 public function __construct(string $moduleName, ModuleAdapter $adapter, Application $application, Config $config)
 {
     parent::__construct($config, new DI());
     $this->application = $application;
     $this->name = $moduleName;
     $this->adapter = $adapter;
     $adapter->initializeWith($this);
 }
 public function __construct(string $directory, ClassLoader $classLoader, array $options = [])
 {
     $di = new DirectoryDi($directory . '/services', [$this]);
     parent::__construct($directory, $di);
     $this->dev = (bool) ($options['dev'] ?? false);
     $this->classLoader = $classLoader;
     if ($this->isDev()) {
         $this->registerErrorHandler();
     }
     call_user_func(require $this->resolvePath('application.php'), $this);
 }
 public function __construct(string $moduleName, string $directory, Application $application, DI $di)
 {
     parent::__construct($directory, $di);
     $this->application = $application;
     $this->name = $moduleName;
 }
예제 #4
0
 public function __construct(Config $config, ClassLoader $classLoader, DI $di, $devMode = false)
 {
     parent::__construct($config, $di);
     $this->dev = $devMode;
     $this->classLoader = $classLoader;
 }