configure

@see PommAwareCommand
969482
protected function configureRequiredArguments()
    {
        parent::configureRequiredArguments()
            ->addOption(
                'prefix-dir',
                'd',
                InputOption::VALUE_REQUIRED,
                'Indicate a directory prefix.',
                '.'
            )
            ->addOption(
                'prefix-ns',
                'a',
                InputOption::VALUE_REQUIRED,
                'Indicate a namespace prefix.',
                ''
            )
        ;

        return $this;
    }
395747
protected function configure() {
		parent::configure();
		
		if (!empty($this->options['tmpPath'])) {
			if ((is_dir($this->options['tmpPath']) || @mkdir($this->options['tmpPath'], 0755, true)) && is_writable($this->options['tmpPath'])) {
				$this->tmp = $this->options['tmpPath'];
			}
		}
		
		if (!$this->tmp && $this->tmbPath) {
			$this->tmp = $this->tmbPath;
		}
		
		if (!$this->tmp) {
			$this->disabled[] = 'mkfile';
			$this->disabled[] = 'paste';
			$this->disabled[] = 'duplicate';
			$this->disabled[] = 'upload';
			$this->disabled[] = 'edit';
			$this->disabled[] = 'archive';
			$this->disabled[] = 'extract';
		}
		
		// echo $this->tmp;
		
	}
214818
protected function configure()
    {
        $this
        ->setName($this->name)
        ->setDescription($this->description)
        ->setAliases($this->aliases)
        ->addOption(
          'env',
          null,
          InputOption::VALUE_REQUIRED,
          'Set the environment variable file',
          sprintf('%s/%s', getcwd(), '.craftsman')
        );
    }
532218
private function configureDaemonDefinition(): void
    {
        $this->addOption('run-once', null, InputOption::VALUE_NONE, 'Run the command just once.');
        $this->addOption('run-max', null, InputOption::VALUE_OPTIONAL, 'Run the command x time.');
        $this->addOption('memory-max', null, InputOption::VALUE_OPTIONAL, 'Gracefully stop running command when given memory volume, in bytes, is reached.', 0);
        $this->addOption('shutdown-on-exception', null, InputOption::VALUE_NONE, 'Ask for shutdown if an exception is thrown.');
        $this->addOption('show-exceptions', null, InputOption::VALUE_NONE, 'Display exception on command output.');
    }
414176
protected function configure()
    {
        $config = $this->config->get('app');

        $this->charset = $config['charset'];
        mb_internal_encoding($this->charset);

        date_default_timezone_set($config['timezone']);
    }
1050444
protected function configure() {
		// set thumbnails path
		$path = $this->options['tmbPath'];
		if ($path) {
			if (!file_exists($path)) {
				if (@mkdir($path)) {
					chmod($path, $this->options['tmbPathMode']);
				} else {
					$path = '';
				}
			} 
			
			if (is_dir($path) && is_readable($path)) {
				$this->tmbPath = $path;
				$this->tmbPathWritable = is_writable($path);
			}
		}

		// set image manipulation library
		$type = preg_match('/^(imagick|gd|auto)$/i', $this->options['imgLib'])
			? strtolower($this->options['imgLib'])
			: 'auto';

		if (($type == 'imagick' || $type == 'auto') && extension_loaded('imagick')) {
			$this->imgLib = 'imagick';
		} else {
			$this->imgLib = function_exists('gd_info') ? 'gd' : '';
		}
		
	}
524014
private function configure()
    {
        $keyCert = SignatureUtils::generateKeyCert($this->settings);
        $dir = dirname($this->settings['sp_key_file']);
        if (!is_dir($dir)) {
            throw new \InvalidArgumentException('The directory you selected for sp_key_file does not exist. Please create ' . $dir);
        }
        $dir = dirname($this->settings['sp_cert_file']);
        if (!is_dir($dir)) {
            throw new \InvalidArgumentException('The directory you selected for sp_cert_file does not exist. Please create ' . $dir);
        }
        file_put_contents($this->settings['sp_key_file'], $keyCert['key']);
        file_put_contents($this->settings['sp_cert_file'], $keyCert['cert']);
    }
260760
protected function configure()
    {
        $bits = explode('\\', get_class($this));

        $this->setName($this->getCommandNamePrefix() . Inflector::tableize(array_pop($bits)))
            ->addOption('debug', '', InputOption::VALUE_NONE, 'Output debug details')
            ->addOption('json', '', InputOption::VALUE_NONE, 'Output JSON')
            ->addOption('environment', 'e', InputOption::VALUE_REQUIRED, 'Environment in which we are are running (development, staging or production)', 'development');
    }
1044259
protected function configure()
    {
        $text = 'Make a list of view templates from a Concordat package';

        $this->setName('templates')->setDescription($text);

        parent::configure();

        $this->paths['default'] = 'app/views';

        $this->paths['laravel'] = 'resources/views';
    }
1290176
protected function configure(): void
    {
        $this->createDefinition()
            ->setExample($this->parseCommentsVars('{script} {command} john male 43 --opt1 value1'))
            ->addArgument('name', Input::ARG_REQUIRED, 'description for the argument [name], is required')
            ->addArgument('sex', Input::ARG_OPTIONAL, 'description for the argument [sex], is optional')
            ->addArgument('age', Input::ARG_OPTIONAL, 'description for the argument [age], is optional')
            ->addOption('yes', 'y', Input::OPT_BOOLEAN, 'description for the option [yes], is boolean')
            ->addOption('opt1', null, Input::OPT_REQUIRED, 'description for the option [opt1], is required')
            ->addOption('opt2', null, Input::OPT_OPTIONAL, 'description for the option [opt2], is optional')
            ;
    }
597020
protected function configure(): void
    {
        $this->setName('dependency-guard');
        $this->setDescription(
            'Check Composer dependencies for a --no-dev install.'
        );

        $this->addOption(
            'format',
            'f',
            InputOption::VALUE_REQUIRED,
            'The output format. '
                . implode(
                    ', ',
                    array_map(
                        function (string $format) : string {
                            return sprintf('<comment>%s</comment>', $format);
                        },
                        $this->exporterFactory->getOutputFormats()
                    )
                ),
            ViolationExporterFactoryInterface::DEFAULT_FORMAT
        );
    }
615613
protected function configure()
    {
        $this->basePath = getcwd();
        $this->projectName = basename($this->basePath);
        $this->defaultProjectName = $this->slug($this->projectName);

        $this
            ->setName('make')
            ->setDescription('Install Homestead into the current project')
            ->addOption('name', null, InputOption::VALUE_OPTIONAL, 'The name of the virtual machine.', $this->defaultProjectName)
            ->addOption('hostname', null, InputOption::VALUE_OPTIONAL, 'The hostname of the virtual machine.', $this->defaultProjectName)
            ->addOption('ip', null, InputOption::VALUE_OPTIONAL, 'The IP address of the virtual machine.')
            ->addOption('no-after', null, InputOption::VALUE_NONE, 'Determines if the after.sh file is not created.')
            ->addOption('no-aliases', null, InputOption::VALUE_NONE, 'Determines if the aliases file is not created.')
            ->addOption('example', null, InputOption::VALUE_NONE, 'Determines if a Homestead example file is created.')
            ->addOption('json', null, InputOption::VALUE_NONE, 'Determines if the Homestead settings file will be in json format.');
    }
1115508
public function configureApplication()
    {
        $config = file_get_contents($this->paths['app'].'/config/config.yml');
        $config = $this->parser->parse($config);

        $this->project_name     = $config['application']['project_name'];
        $this->routeCollection  = $this->bindRouteCollection($this->project_name);

        $this->addDbParams($config['database']['default'], $config['database']['types']);
        $this->createBaseEm($config['application']['environment']);
    }
673698
protected function configureApp ()
    {
        $this->envData['APP_ENV']   = $this->choice ("Choose environment. [local|production]", ['local', 'production'], 0);
        $this->envData['APP_KEY']   = "";
        $this->envData['APP_DEBUG'] = $this->confirm ("Enable debugging?", 'yes') ? "true" : "false";
        $this->envData['APP_URL']   = http_validate($this->ask ("Your application url", "http://localhost") . "\n");
        $this->info('By default application presumes the page is http://');
        //TODO implement the letsEncrypt
    }
815219
protected function _configure() {

			// Create my settings object
			$this->config = new Core\Configuration();
			
			// Define some paths
			define("CHICKENWIRE_PATH", dirname(__FILE__));
			define("APP_PATH", APP_ROOT . "/Application");
			define("CONFIG_PATH", APP_PATH . "/Config");
			define("CONTROLLER_PATH", APP_PATH . "/Controllers");
			define("LAYOUT_PATH", APP_PATH . "/Layouts");
			define("MODEL_PATH", APP_PATH . "/Models");
			define("VIEW_PATH", APP_PATH . "/Views");
			define("PUBLIC_PATH", APP_PATH . "/Public");
			define("MODULE_PATH", APP_ROOT . "/Modules");

			define("MODEL_NS", $this->config->applicationNamespace . "\\Models");

			// Include all php files in the config directory
			$dh = opendir(CONFIG_PATH);
			$configFiles = scandir(CONFIG_PATH, SCANDIR_SORT_ASCENDING);
			foreach ($configFiles as $file) {

				// PHP?
				if (preg_match("/\.php$/", $file)) {

					// Load it
					$this->config->load(CONFIG_PATH . '/' . $file);
					
				}

			}

			// Initalize database configuration
			$dbConnections = $this->config->allFor("database");
			$environment = $this->config->environment;
			\ActiveRecord\Config::initialize(function($config) use ($dbConnections, $environment) {

				// Set model path
				$config->setModelDirectory(MODEL_PATH);

				// Apply connections
				$config->setConnections($dbConnections);

				// Set default to my environment
				$config->setDefaultConnection($environment);

			});

			// Set the timezone
			if ($this->config->timezone == '') {
				throw new \Exception("You need to specify the timezone in the Application configuration.", 1);				
			}
			date_default_timezone_set($this->config->timezone);

			// Set self closing slash
			\HtmlObject\Traits\Tag::$useSelfClosingSlash = $this->config->htmlSelfClosingSlash;

			// Set the webPath
			$this->config->webPath = rtrim($this->config->webPath, ' /');

		}
351020
protected function configure(): void
    {
        parent::configure();

        $this->addOption(
            $this->getDisableLockCommandOptionName(),
            '',
            InputOption::VALUE_NONE,
            'Disable command locking'
        );
    }
540460
protected function configure()
    {
        $this->setName(self::COMMAND_NAME);
        $this->addOption('git-user', null, InputOption::VALUE_REQUIRED, 'The configured git user name.', '');
        $this->addOption('git-email', null, InputOption::VALUE_REQUIRED, 'The configured git email.', '');
        $this->addArgument('commit-msg-file', InputArgument::REQUIRED, 'The configured commit message file.');
    }