/** * @return bool */ public function getEnabled() { $enabled = $this->config->get(self::ENABLED); $disabled = $this->config->get(self::DISABLED); if ($enabled !== null) { return $enabled; } if ($disabled !== null) { return !$disabled; } return false; }
/** * Start App. */ public function start() { if ($this->started) { return; } $this->started = true; $this->getConfigLoader()->setEnvironment($this->getEnvironment()); $this->config = $this->getConfigLoader()->load(); $this->container->set([Config::class, IConfig::class], $this->config); $this->config->set('env', $this->getEnvironment()); $this->config->set('debug', $this->getDebug()); $this->eventer->dispatch(new ConfigLoadedEvent($this->config)); $this->kernel->initialize(); $this->eventer->dispatch(new KernelInitializedEvent($this->kernel)); $this->kernel->boot(); $this->eventer->dispatch(new KernelBootedEvent($this->kernel)); $this->eventer->dispatch(new AppStartedEvent($this)); }
/** * Load routes from config. */ protected function loadRoutesFromConfig() { $config = $this->config->getRaw('routing', []); $this->routerConfigurator->processConfig($this->router, $config); }
/** * @return mixed */ public function getErrorChannelName() { return $this->config->get(self::ERROR_CHANNEL_NAME); }
/** * @param $configName * * @return string */ public function getLogLevelForChannelConfig($configName) { return $this->config->get(self::LOG_CHANNEL_LOG_LEVEL($configName)); }
/** * @param IConfig $config * * @return IConfig */ public function extend(IConfig $config) { $this->merge($config->getConfig()); return $this; }
/** * @return string */ public function getMigrationsTable() { return $this->config->get(self::MIGRATIONS_TABLE); }
/** * @return array */ public function getNamespaces() { return $this->config->get(self::NAMESPACES, []); }
/** * @param string $name * * @return string|null */ public function getTransportType($name) { return $this->config->get(self::TRANSPORT_TYPE($name)); }
/** * @return int */ public function getNumberOfSkippedStackTraceLines() { return $this->config->get(self::NUMBER_OF_SKIPPED_STACK_TRACE_LINES, 0); }