Setup settings on start.
@return void
979690
protected function prepareSystemEnv()
    {
        proc_nice(Daemon::$config->workerpriority->value);

        register_shutdown_function(function () {
            $this->shutdown(true);
        });

        $this->setTitle(
            Daemon::$runName . ': worker process'
            . (Daemon::$config->pidfile->value !== Daemon::$config->defaultpidfile->value
                ? ' (' . Daemon::$config->pidfile->value . ')' : '')
        );


        if (isset(Daemon::$config->group->value)) {
            $sg = posix_getgrnam(Daemon::$config->group->value);
        }

        if (isset(Daemon::$config->user->value)) {
            $su = posix_getpwnam(Daemon::$config->user->value);
        }

        $flushCache = false;
        if (Daemon::$config->chroot->value !== '/') {
            if (posix_getuid() != 0) {
                Daemon::log('You must have the root privileges to change root.');
                exit(0);
            } elseif (!chroot(Daemon::$config->chroot->value)) {
                Daemon::log('Couldn\'t change root to \'' . Daemon::$config->chroot->value . '\'.');
                exit(0);
            }
            $flushCache = true;
        }

        if (isset(Daemon::$config->group->value)) {
            if ($sg === false) {
                Daemon::log('Couldn\'t change group to \'' . Daemon::$config->group->value . '\'. You must replace config-variable \'group\' with existing group.');
                exit(0);
            } elseif (($sg['gid'] != posix_getgid()) && (!posix_setgid($sg['gid']))) {
                Daemon::log('Couldn\'t change group to \'' . Daemon::$config->group->value . "'. Error (" . ($errno = posix_get_last_error()) . '): ' . posix_strerror($errno));
                exit(0);
            }
            $flushCache = true;
        }

        if (isset(Daemon::$config->user->value)) {
            if ($su === false) {
                Daemon::log('Couldn\'t change user to \'' . Daemon::$config->user->value . '\', user not found. You must replace config-variable \'user\' with existing username.');
                exit(0);
            } elseif ($su['uid'] != posix_getuid() & !posix_setuid($su['uid'])) {
                Daemon::log('Couldn\'t change user to \'' . Daemon::$config->user->value . "'. Error (" . ($errno = posix_get_last_error()) . '): ' . posix_strerror($errno));
                exit(0);
            }
            $flushCache = true;
        }
        if ($flushCache) {
            clearstatcache(true);
        }
        if (Daemon::$config->cwd->value !== '.') {
            if (!@chdir(Daemon::$config->cwd->value)) {
                Daemon::log('Couldn\'t change directory to \'' . Daemon::$config->cwd->value . '.');
            }
            clearstatcache(true);
        }
    }
1289133
private function setup()
    {
        if ($this->started) {
            return;
        }

        if ($this->app['extend.writeable']) {
            // Do required JSON update/set up
            try {
                $this->updateJson();
            } catch (ParseException $e) {
                $this->app['logger.flash']->danger(Trans::__('Error reading extensions/composer.json file: %ERROR%', ['%ERROR%' => $e->getMessage()]));
                $this->started = false;

                return;
            }
        }

        $this->started = true;
    }
1230490
protected function configure()
    {
        $this
            ->setName($this->getName())
            ->setDescription($this->getDescription())
            ->addOption(
                'storage',
                null,
                InputOption::VALUE_OPTIONAL,
                'Environment Location Storage',
                $this->getDefaultFileName()
            );
    }
22641
protected function _setup()
    {
        foreach ($this->_properties as $property) {
            $element = $this->_createElement($property);
            if ($element) {
                $this->addElement($element['name'], $element);
            }
        }
        $this->add(
            new Submit(
                ['value' => 'Save']
            )
        );
    }
1252231
public function initializeConfig()
    {
        $this->configInitialized = true;

        $this->setThemePath($this->app['config']->get('general'));

        $theme = $this->app['config']->get('theme');
        if (isset($theme['template_directory'])) {
            $this->setPath('templatespath', $this->getPath('theme') . '/' . $theme['template_directory']);
        } else {
            $this->setPath('templatespath', $this->getPath('theme'));
        }

        $branding = '/' . trim($this->app['config']->get('general/branding/path'), '/') . '/';
        $this->setUrl('bolt', $branding);
    }
1093375
public function setup() {

		// run parents to setup sanitization filters
		parent::setup();
		if ( isset( $this->struct['value'] ) ) {
			$this->set_value( $this->struct['value'] );
		}
		// base attributes defined
		$this->attributes['name'] = $this->name();
		$this->attributes['id']   = $this->id() . '-control';
	}
386740
protected function setupDefaults()
    {
        $defaults = (isset($this->config['defaults'])) ?
            $this->config['defaults'] :
            [];

        foreach ($defaults as $key => $value) {
            if ($key == 'images') {
                if (empty($this->images)) {
                    $this->images = $value;
                }
            } elseif ($key == 'url' && $value === null) {
                $this->setUrl(app('url')->current());
            } elseif (! empty($value) && ! array_key_exists($key, $this->properties)) {
                $this->addProperty($key, $value);
            }
        }
    }
1097415
protected function setupConfig()
    {
        $path = realpath(__DIR__."/../../config/gravatar-helper.php");

        $this->publishes([$path => config_path("gravatar-helper.php")]);

        $this->mergeConfigFrom($path, 'gravatar-helper');
    }
1198218
protected function init()
	{
		$this->environment = $this->getConfig('app.settings.environment');

		// locale and timezone set
		\Locale::setDefault($this->getConfig('app.settings.locale'));
		date_default_timezone_set($this->getConfig('app.settings.timezone'));


		// load objects
		$this->eventDispatcher = $this->container->get('Emitter');
	}
638575
protected function configure()
    {
        $this->setName($this->name);
        $this->setDescription($this->description);

        foreach ($this->arguments as $argument) {
            $this->getDefinition()->addArgument($argument);
        }

        foreach ($this->options as $option) {
            $this->getDefinition()->addOption($option);
        }
    }
623977
private function setup_settings() {
		if ( defined( 'TECHNOTE_MOCK_REST_REQUEST' ) && TECHNOTE_MOCK_REST_REQUEST ) {
			$this->setting->remove_setting( 'use_admin_ajax' );
		}
		if ( $this->loader->api->is_empty() ) {
			$this->setting->remove_setting( 'use_admin_ajax' );
			$this->setting->remove_setting( 'get_nonce_check_referer' );
			$this->setting->remove_setting( 'check_referer_host' );
		}
		$key = $this->app->is_theme ? 'ThemeURI' : 'PluginURI';
		if ( ! empty( $this->_plugin_data[ $key ] ) && $this->utility->starts_with( $this->_plugin_data[ $key ], 'https://wordpress.org' ) ) {
			$this->setting->edit_setting( 'check_update', 'default', false );
		}
		if ( ! $this->log->is_valid() ) {
			$this->setting->remove_setting( 'save___log_term' );
			$this->setting->remove_setting( 'delete___log_interval' );
			$this->setting->remove_setting( 'capture_shutdown_error' );
		}
		if ( $this->get_config( 'config', 'prevent_use_log' ) ) {
			$this->setting->remove_setting( 'is_valid_log' );
		}
	}
1357230
public function initialize()
    {

        $this->title = '';
        $this->settings = array();
        $this->groupSets = null;
        $this->groups = null;
        $this->primaryResourceLinkId = null;
        $this->shareApproved = null;
        $this->created = null;
        $this->updated = null;

    }
920946
public function init()
    {
        if ($this->isEnabled()) {
            $this->client = \PHPDaemon\Clients\Valve\Pool::getInstance();
            $this->db = \MongoClient::getInstance();
            $this->servers = $this->db->{$this->config->dbname->value . '.servers'};
        }
    }
434225
def setup(self):
        
        [c.start() for c in self.controllers]
        [c.wait_to_start() for c in self.controllers]
978903
protected function _setup()
    {
            ini_set('session.name', $this->_name);
            ini_set('session.gc_maxlifetime', $this->_lifetime);
            session_set_cookie_params(
        $this->_expiry,
        $this->_path,
        $this->_host,
        $this->_secure,
        $this->_httponly
            );
    }
1246095
public function setup() {
		$input_keys = array_keys((array) elgg_get_config('input'));
		$request_keys = array_keys((array) $_REQUEST);
		$keys = array_unique(array_merge($input_keys, $request_keys));
		foreach ($keys as $key) {
			if ($key) {
				$this->params->$key = get_input($key);
			}
		}
	}
1222495
private function config()
    {
        $this->_library->setEnvironment();
        $this->_library->setCharset();
        $this->_library->setLog();
    }