Sets the walkmod configuration file.

@return updated OptionBuilder instance

@see Options#CONFIGURATION_FILE
501830
public OptionsBuilder configurationFile(String configFile) {
		if (configFile != null) {
			options.put(Options.CONFIGURATION_FILE, new File(configFile));
		} else {
			options.remove(Options.CONFIGURATION_FILE);
		}
		return this;
	}
942639
public function setUpMode()
    {
        $file = $this->maintenanceFilePath();

        if (file_exists($file) && !unlink($file)) {
            $message = sprintf(
                'Something went wrong on trying to remove maintenance file %s.',
                $file
            );

            throw new Exceptions\FileException($message);
        }

        return true;
    }
679772
public function defaultFileChanger()
    {
        $files = [
            base_path('config/auth.php'),
            base_path('config/services.php'),
        ];

        foreach ($files as $file) {
            $contents = file_get_contents($file);
            $contents = str_replace('App\User::class', 'App\Models\User::class', $contents);
            file_put_contents($file, $contents);
        }
    }
616520
private void setupModeOptions() {

        int versionsDeleted = OpenCms.getSystemInfo().getHistoryVersionsAfterDeletion();

        String mode;

        if (versionsDeleted == 0) {
            mode = CmsFileHistoryApp.MODE_DISABLED;
        } else if (versionsDeleted == 1) {
            mode = CmsFileHistoryApp.MODE_WITHOUTVERSIONS;
        } else if ((versionsDeleted > 1) || (versionsDeleted == -1)) {
            mode = CmsFileHistoryApp.MODE_WITHVERSIONS;
        } else {
            mode = CmsFileHistoryApp.MODE_DISABLED;
        }
        m_mode.setValue(mode);
    }
57636
public static function configure(){
        $args = func_get_args();
        $numArgs = func_num_args();

        switch ($numArgs) {
            case 1:{
                if (is_array($args[0])){
                    self::configureWithOptions($args[0]);
                } else {
                    self::configureWithDsnAndOptions($args[0]);
                }
                break;
            }
            case 2:{
                if (is_array($args[0])){
                    self::configureWithOptions($args[0], $args[1]);
                } else {
                    self::configureWithDsnAndOptions($args[0], $args[1]);
                }
                break;
            }
            case 3: {
                self::configureWithDsnAndOptions($args[0], $args[1], $args[2]);
                break;
            }
        }
    }
993984
@SuppressWarnings("static-access")
    private static synchronized Options buildOptions() {
        Options options = new Options();
        options.addOption(OptionBuilder.hasArg().withArgName("path").withDescription("Specify where to find the class files - must be first argument").create("classpath"));
        options.addOption(OptionBuilder.withLongOpt("classpath").hasArg().withArgName("path").withDescription("Aliases for '-classpath'").create("cp"));

        options.addOption(
            OptionBuilder.withLongOpt("define").
            withDescription("define a system property").
            hasArg(true).
            withArgName("name=value").
            create('D'));
        options.addOption(
            OptionBuilder.withLongOpt("disableopt").
            withDescription("disables one or all optimization elements. " +
                            "optlist can be a comma separated list with the elements: " +
                            "all (disables all optimizations), " +
                            "int (disable any int based optimizations)").
            hasArg(true).
            withArgName("optlist").
            create());
        options.addOption(
            OptionBuilder.hasArg(false)
            .withDescription("usage information")
            .withLongOpt("help")
            .create('h'));
        options.addOption(
            OptionBuilder.hasArg(false)
            .withDescription("debug mode will print out full stack traces")
            .withLongOpt("debug")
            .create('d'));
        options.addOption(
            OptionBuilder.hasArg(false)
            .withDescription("display the Groovy and JVM versions")
            .withLongOpt("version")
            .create('v'));
        options.addOption(
            OptionBuilder.withArgName("charset")
            .hasArg()
            .withDescription("specify the encoding of the files")
            .withLongOpt("encoding")
            .create('c'));
        options.addOption(
            OptionBuilder.withArgName("script")
            .hasArg()
            .withDescription("specify a command line script")
            .create('e'));
        options.addOption(
            OptionBuilder.withArgName("extension")
            .hasOptionalArg()
            .withDescription("modify files in place; create backup if extension is given (e.g. \'.bak\')")
            .create('i'));
        options.addOption(
            OptionBuilder.hasArg(false)
            .withDescription("process files line by line using implicit 'line' variable")
            .create('n'));
        options.addOption(
            OptionBuilder.hasArg(false)
            .withDescription("process files line by line and print result (see also -n)")
            .create('p'));
        options.addOption(
            OptionBuilder.withArgName("port")
            .hasOptionalArg()
            .withDescription("listen on a port and process inbound lines (default: 1960)")
            .create('l'));
        options.addOption(
            OptionBuilder.withArgName("splitPattern")
            .hasOptionalArg()
            .withDescription("split lines using splitPattern (default '\\s') using implicit 'split' variable")
            .withLongOpt("autosplit")
            .create('a'));
        options.addOption(
            OptionBuilder.withLongOpt("indy")
            .withDescription("enables compilation using invokedynamic")
            .create());
        options.addOption(
            OptionBuilder.withLongOpt("configscript")
            .hasArg().withDescription("A script for tweaking the configuration options")
            .create());
        options.addOption(
                OptionBuilder.withLongOpt("basescript")
                .hasArg().withArgName("class").withDescription("Base class name for scripts (must derive from Script)")
                .create('b'));
        return options;

    }
605832
private function setSettings() {
		$this->template->uploadUrl = $this->controller->link("upload");
		$this->template->renameLink = $this->controller->link("rename");
		$this->template->removeLink = $this->controller->link("//remove");
		$this->template->inputId = $this->renderer->getElements()["input"]->attrs["id"];
		
		$this->needTranslate();
		$this->template->messages = $this->controller->getUploadControl()->getMessages();
		
		/** @noinspection PhpInternalEntityUsedInspection */
		$this->template->maxFiles = $this->controller->getUploadControl()->getMaxFiles();
		/** @noinspection PhpInternalEntityUsedInspection */
		$this->template->maxFileSize = $this->controller->getUploadControl()->getMaxFileSize();
		/** @noinspection PhpInternalEntityUsedInspection */
		$this->template->fileSizeString = $this->controller->getUploadControl()->getFileSizeString();
		$this->template->productionMode = Debugger::$productionMode;
		/** @noinspection PhpInternalEntityUsedInspection */
		$this->template->token = $this->controller->getUploadControl()->getToken();
		$this->template->params = json_encode($this->controller->getUploadControl()->getParams());
		$this->template->settings = $this->controller->getUploadControl()->getUploadSettings();
		
		$default = $this->controller->getUploadControl()->getDefaultFiles();
		
		$defaultFiles = [];
		foreach($default as $file) {
			$defaultFiles[] = $file->toArray();
		}
		
		$this->template->defaultFiles = $defaultFiles;
	}
422131
protected function setOptions()
    {
        $options = $this->defaultOptions;

        if (array_key_exists('options', $this->config)) {
            $options = array_merge($options, $this->config['options']);
        }

        $this->connection->setOptions($options);
    }
1186439
protected static function _setAppConfig( )
		{
			/* paths */
			static::option( 'paths' , Module::merge( ptc_path( 'root' ) . '/app/config/paths.php' ) );
			ptc_add_path( ptc_array_get( static::$_config , 'paths' ) );
			/* application */
			static::option( 'app' , Module::merge( ptc_path( 'root' ) . '/app/config/app.php' ) );
			HandyMan::addAlias( ptc_array_get( static::$_config , 'app.aliases' ) );
			if ( $locale = ptc_array_get( static::$_config , 'app.locale' ) )
			{ 
				setlocale( LC_ALL , $locale . 'UTF-8' ); 
			} 
			if ( $timezone = ptc_array_get( static::$_config , 'app.timezone' ) )
			{ 
				date_default_timezone_set( $timezone ); 
			}
			ptc_add_file( ptc_array_get( static::$_config , 'app.files' ) );
			ptc_add_dir( ptc_array_get( static::$_config , 'app.directories' ) );
			ptc_add_dir( ptc_array_get( static::$_config , 'app.namespaces' ) );
			if ( $sep = ptc_array_get( static::$_config , 'app.separators' ) )
			{
				HandyMan::addSeparators( $sep );
			}
			if ( $conv = ptc_array_get( static::$_config , 'app.conventions' ) )
			{
				HandyMan::addConventions( $conv );
			}
			/* database */
			static::option( 'db' , Module::merge( ptc_path( 'root' ) . '/app/config/db.php' ) );
			if ( $db = ptc_array_get( static::$_config , 'db' ) )
			{
				$loop = ( static::option( 'app.test_env' ) ) ? $db[ 'develop' ] : $db[ 'prod' ];
				foreach ( $loop as $k => $v )
				{ 
					if ( ptc_array_get( $v , 'user' ) )
					{ 
						DB::add( $v , $k );
					}
				}
			}
			/* auth */
			static::option( 'auth' , Module::merge( ptc_path( 'root' ) . '/app/config/auth.php' ) );
		}
874775
public function setOption()
    {
        $args = func_get_args();

        $options = [];

        if (is_array($args[0])) {
            foreach ($args[0] as $key => $value)
                $options[$key] = $value;
        } else {
            $options[$args[0]] = $args[1];
        }

        $this->options += $options;

        return $this;
    }
551639
public function setDownMode()
    {
        $file = $this->maintenanceFilePath();

        if (!touch($file)) {
            $message = sprintf(
                'Something went wrong on trying to create maintenance file %s.',
                $file
            );

            throw new Exceptions\FileException($message);
        }

        return true;
    }
195995
protected function setAfterSaveRoute()
    {
        $filename = $this->getExportBatch(false)->getSessionVariable('filename');
        if ($filename) {
            // Now is a good moment to remove the temporary file
            @unlink($filename);
        }

       // Default is just go to the index
        if ($this->routeAction && ($this->request->getActionName() !== $this->routeAction)) {
            $this->afterSaveRouteUrl = array(
                $this->request->getControllerKey() => $this->request->getControllerName(),
                $this->request->getActionKey()     => $this->routeAction,
                \MUtil_Model::REQUEST_ID           => $this->request->getParam(\MUtil_Model::REQUEST_ID),
                );
        }

        return $this;
    }
691093
public Ftp setMode(FtpMode mode) {
		this.mode = mode;
		switch (mode) {
		case Active:
			this.client.enterLocalActiveMode();
			break;
		case Passive:
			this.client.enterLocalPassiveMode();
			break;
		}
		return this;
	}
1111335
public function setAction() {
        if (!ConfigService::isEnvironmentExists('local')) {
            if ($this->confirm('We need to create local environment to save your params. Ok', true)) {
                ConfigService::createEnvironment('local');
            };
        }
        $name = $this->ask('Enter name of environment');
        $config = ConfigService::getConfig('project', 'local');
        $config->set('activeEnvironment', 'local', 'local');
        $config->save();
        $this->notify('- You set active environment to <bold>' . $name . '</bold>');
    }
1154289
public function setConfigFile($configFile = '')
    {
        if (!is_readable($configFile)) {
            $this->activeConfig = [];

            throw ParserException::forFileUnreadable($configFile);
        }

        $this->configFile = $configFile;
        if (!$this->parseConfigFile()) {
            throw InvalidConfigException::forEmptyConfig($configFile);
        }

        return $this;
    }
930424
protected function updateParameters()
    {
        $filename = $this->projectDir.'/app/config/parameters.yml';

        if (!is_writable($filename)) {
            if ($this->output->isVerbose()) {
                $this->output->writeln(sprintf(
                    " <comment>[WARNING]</comment> The value of the <info>secret</info> configuration option cannot be updated because\n".
                    " the <comment>%s</comment> file is not writable.\n",
                    $filename
                ));
            }

            return $this;
        }

        $ret = str_replace('ThisTokenIsNotSoSecretChangeIt', $this->generateRandomSecret(), file_get_contents($filename));
        file_put_contents($filename, $ret);

        return $this;
    }
1215139
protected function configure()
    {
        $this
            ->setName('check')
            ->setDescription('Check PHP files within a directory for appropriate use of Docblocks.')
            ->addOption(
                'exclude',
                'x',
                InputOption::VALUE_REQUIRED,
                'Files and directories to exclude.'
            )
            ->addOption(
                'directory',
                'd',
                InputOption::VALUE_REQUIRED,
                'Directory to scan.',
                './'
            )
            ->addOption(
                'skip-classes',
                null,
                InputOption::VALUE_NONE,
                'Don\'t check classes for docblocks.'
            )
            ->addOption(
                'skip-methods',
                null,
                InputOption::VALUE_NONE,
                'Don\'t check methods for docblocks.'
            )
            ->addOption(
                'skip-signatures',
                null,
                InputOption::VALUE_NONE,
                'Don\'t check docblocks against method signatures.'
            )
            ->addOption(
                'only-signatures',
                null,
                InputOption::VALUE_NONE,
                'Ignore missing docblocks where method doesn\'t have parameters or return type.'
            )
            ->addOption(
                'json',
                'j',
                InputOption::VALUE_NONE,
                'Output JSON instead of a log.'
            )
            ->addOption(
                'files-per-line',
                'l',
                InputOption::VALUE_REQUIRED,
                'Number of files per line in progress',
                50
            )
            ->addOption(
                'fail-on-warnings',
                'w',
                InputOption::VALUE_NONE,
                'Consider the check failed if any warnings are produced.'
            )
            ->addOption(
                'info-only',
                'i',
                InputOption::VALUE_NONE,
                'Information-only mode, just show summary.'
            )
            ->addOption(
                'from-stdin',
                null,
                InputOption::VALUE_NONE,
                'Use list of files from stdin (e.g. git diff)'
            )
            ->addOption(
                'cache-file',
                null,
                InputOption::VALUE_REQUIRED,
                'Cache analysis of files based on filemtime.'
            )
            ->addOption(
                'config-file',
                null,
                InputOption::VALUE_REQUIRED,
                'File to read doccheck config from in yml format'
            );
    }