Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  *
  * @return Installer
  */
 public static function getInstaller(ContainerInterface $container, DefinitionInterface $definition)
 {
     //Let's create default Installer
     return $container->get(Installer::class, ['moduleDirectory' => $definition->getLocation()]);
 }
Ejemplo n.º 2
0
 /**
  * Register module by it's definition, all module start up requirements (bindings, bootstrap)
  * will be copied into modules configuration and be performed when ModuleManager started.
  *
  * @param DefinitionInterface $definition
  */
 public function registerModule(DefinitionInterface $definition)
 {
     $this->modules[$definition->getName()] = ['class' => $definition->getClass(), 'bootstrap' => $definition->getInstaller()->needsBootstrapping(), 'bindings' => $definition->getInstaller()->getBindings()];
     //Update modules configuration config
     $this->updateConfig();
 }
Ejemplo n.º 3
0
 /**
  * Installation logger (if needed).
  *
  * @param DefinitionInterface $definition
  * @return ConsoleFormatter
  */
 protected function createLogger(DefinitionInterface $definition)
 {
     return new ConsoleFormatter($this->output, $this->formats, $definition->getName());
 }