Get default application settings
@return array
333543
public static function getDefaultSettings()
    {
        return array(
            // Application
            'mode' => 'development',
            // Debugging
            'debug' => true,
            // Logging
            'log.writer' => null,
            'log.level' => \Yee\Log::DEBUG,
            'log.enabled' => true,
            // View
            'templates.path' => './templates',
            'view' => '\Yee\View',
            // Cookies
            'cookies.encrypt' => false,
            'cookies.lifetime' => '20 minutes',
            'cookies.path' => '/',
            'cookies.domain' => null,
            'cookies.secure' => false,
            'cookies.httponly' => false,
            // Encryption
            'cookies.secret_key' => 'CHANGE_ME',
            'cookies.cipher' => MCRYPT_RIJNDAEL_256,
            'cookies.cipher_mode' => MCRYPT_MODE_CBC,
            // HTTP
            'http.version' => '1.1',
            // Routing
            'routes.case_sensitive' => true
        );
    }
197362
public function getApplyFormSettings()
    {
        if (!$this->applyFormSettings) {
            $settings = new DisableElementsCapableFormSettings();
            $settings->setForm('Applications/Apply');
            $this->applyFormSettings = $settings;
        }
        return $this->applyFormSettings;
    }
841521
public function get_defaultsetting() {
        $this->load_choices();
        $defaultsetting = parent::get_defaultsetting();
        if (empty($defaultsetting)) {
            return array('$@NONE@$');
        } else if (array_key_exists($defaultsetting, $this->choices)) {
                return $defaultsetting;
            } else {
                return '';
            }
    }
452995
protected function getDefaultContextVariables()
    {
        if ($this->defaultContextVariables === null) {
            $this->defaultContextVariables = [];
            if (isset($this->settings['defaultContext']) && is_array($this->settings['defaultContext'])) {
                $this->defaultContextVariables = EelUtility::getDefaultContextVariables($this->settings['defaultContext']);
            }
            $this->defaultContextVariables['request'] = $this->controllerContext->getRequest();
        }
        return $this->defaultContextVariables;
    }
847496
public function defaultSettings()
    {
        $handler = $this->get('handler');
        if (class_exists($handler)) {
            $handler = new $handler();

            return $handler->defaultSettings($this);
        }

        return [];
    }
31236
public function getDefaultResourceAdapterConfig(): array
    {
        if ($this->_defaultResourceAdapterConfig !== null) {
            return $this->_defaultResourceAdapterConfig;
        }

        return $this->_defaultResourceAdapterConfig = $this->getSettings()->defaults;
    }
202850
public function EnabledApplications() {
      if (!is_array($this->_EnabledApplications)) {
         $EnabledApplications = Gdn::Config('EnabledApplications', array('Dashboard' => 'dashboard'));
         // Add some information about the applications to the array.
         foreach($EnabledApplications as $Name => $Folder) {
            $EnabledApplications[$Name] = array('Folder' => $Folder);
            //$EnabledApplications[$Name]['Version'] = Gdn::Config($Name.'.Version', '');
            $EnabledApplications[$Name]['Version'] = '';
            $EnabledApplications[$Name]['Index'] = $Name;
            // Get the application version from it's about file.
            $AboutPath = PATH_APPLICATIONS.'/'.strtolower($Name).'/settings/about.php';
            if (file_exists($AboutPath)) {
               $ApplicationInfo = array();
               include $AboutPath;
               $EnabledApplications[$Name]['Version'] = GetValueR("$Name.Version", $ApplicationInfo, '');
            }
         }
         $this->_EnabledApplications = $EnabledApplications;
      }

      return $this->_EnabledApplications;
   }
1294501
public static function getSettings()
    {
        try {
            return self::getCurrent()->settings;
        } catch (Exception $exception) {
            // No application running.
            throw new SettingsException(
                $exception->getMessage(),
                $exception->getCode(),
                $exception
            );
        }
    }
8859
public function getDefaultEnvironment()
    {
        // if the user has configured a default database then use it,
        // providing it actually exists!
        if (isset($this->values['environments']['default_database'])) {
            if ($this->getEnvironment($this->values['environments']['default_database'])) {
                return $this->values['environments']['default_database'];
            }

            throw new \RuntimeException(sprintf(
                'The environment configuration for \'%s\' is missing',
                $this->values['environments']['default_database']
            ));
        }

        // else default to the first available one
        if (is_array($this->getEnvironments()) && count($this->getEnvironments()) > 0) {
            $names = array_keys($this->getEnvironments());

            return $names[0];
        }

        throw new \RuntimeException('Could not find a default environment');
    }
667817
public function get_defaultsetting() {
        global $CFG;

        if (during_initial_install()) {
            return null;
        }
        $result = array();
        foreach($this->types as $archetype) {
            if ($caproles = get_archetype_roles($archetype)) {
                foreach ($caproles as $caprole) {
                    $result[$caprole->id] = 1;
                }
            }
        }
        return $result;
    }
1372808
protected function getDefaultCommands()
    {
        $commands = parent::getDefaultCommands();

        $commands[] = new Command\App\AppAdd();
        $commands[] = new Command\App\AppRemove();
        $commands[] = new Command\Environment\EnvironmentAdd();
        $commands[] = new Command\Environment\EnvironmentRemove();
        $commands[] = new Command\Environment\EnvironmentEnable();
        $commands[] = new Command\Environment\EnvironmentDisable();
        $commands[] = new Command\Environment\EnvironmentDeploy();
        $commands[] = new Command\Environment\EnvironmentShell();
        $commands[] = new Command\Environment\EnvironmentScale();
        $commands[] = new Command\Environment\EnvironmentProxyEnable();
        $commands[] = new Command\Environment\EnvironmentTest();
        $commands[] = new Command\Environment\EnvironmentRebuild();
        $commands[] = new Command\Environment\EnvironmentDomains();
        $commands[] = new Command\Environment\EnvironmentDrush();
        $commands[] = new Command\Environment\EnvironmentRun();
        $commands[] = new Command\Environment\EnvironmentUpdate();
        $commands[] = new Command\Status();
        $commands[] = new Command\Queue();

        return $commands;
    }
309522
public function getDefaultValues()
    {
        preg_match('/([0-9.]+)([A-Z]{3})/', $this->config['price'], $matches);

        $this->defaults['price'] = array(
            'currency' => (!empty($this->defaults['price']['currency']) ? $this->defaults['price']['currency'] : $matches[2]),
            'amount' => (!empty($this->defaults['price']['amount']) ? $this->defaults['price']['amount'] : $matches[1]),
            'vat' => (!empty($this->defaults['price']['vat']) ? $this->defaults['price']['vat'] : null),
        );

        return $this->defaults;
    }
459024
public function get_config() {
        list($componentname, $varname) = $this->get_config_var_name();

        $config = [];
        $settingnames = self::get_settingnames();
        foreach ($settingnames as $name) {
            $config[$varname . $name] = get_config($componentname, $varname . $name);
        }

        // Search areas are enabled by default.
        if ($config[$varname . '_enabled'] === false) {
            $config[$varname . '_enabled'] = 1;
        }
        return $config;
    }
1111913
public function getGeneralSettings()
    {
        return [
            'guard' => [
                'path' => '/config/auth.php',
                'search' => "'guards' => [",
                'stub' => __DIR__ . '/../stubs/config/guards.stub',
                'prefix' => false,
            ],
            'provider' => [
                'path' => '/config/auth.php',
                'search' => "'providers' => [",
                'stub' => __DIR__ . '/../stubs/config/providers.stub',
                'prefix' => false,
            ],
            'passwords' => [
                'path' => '/config/auth.php',
                'search' => "'passwords' => [",
                'stub' => __DIR__ . '/../stubs/config/passwords.stub',
                'prefix' => false,
            ],
            'kernel' => [
                'path' => '/app/Http/Kernel.php',
                'search' => 'protected $routeMiddleware = [',
                'stub' => __DIR__ . '/../stubs/Middleware/Kernel.stub',
                'prefix' => false,
            ],
            'map_register' => [
                'path' => '/app/Providers/RouteServiceProvider.php',
                'search' => '$this->mapWebRoutes();',
                'stub' => __DIR__ . '/../stubs/routes/map-register.stub',
                'prefix' => false,
            ],
            'map_method' => [
                'path' => '/app/Providers/RouteServiceProvider.php',
                'search' => "    /**\n" . '     * Define the "web" routes for the application.',
                'stub' => __DIR__ . '/../stubs/routes/map-method.stub',
                'prefix' => true,
            ],
        ];
    }
517907
public function getDefaults()
    {
        $this->initInternals();

        if (null === $this->defaults) {
            $this->defaults = $this->blueprintSchema->getDefaults();
        }

        return $this->defaults;
    }
425243
public function getSettings()
    {
        $lucid = $this->option('lucid');
        $settings = $this->getGeneralSettings();

        // If the --domain was passed, but not --lucid
        if ($this->option('domain') && ! $lucid) {
            return array_replace_recursive($settings, $this->getDomainMapMethod());
        }

        // If --lucid was passed
        if ($lucid) {
            $lucidSettings = array_merge($settings, $this->getLucidSettings());
            unset($lucidSettings['map_method']);
            return $lucidSettings;
        }

        // Return the default general settings
        return $settings;
    }
567373
protected function getSettingsInstance()
    {
        if (isset($this->settings)) {
            return $this->settings;
        }

        $settingsConfig = $this->getSettingsConfig();

        return $this->settings = new Settings($settingsConfig, $this);
    }