Get the options to pass to the factory.

@param \Symfony\Component\Console\Input\InputInterface $input

@return bool[]
346397
protected function getOptions(InputInterface $input)
    {
        return [
            'dir'    => (bool) $input->getOption('fix_dir'),
            'file'   => (bool) $input->getOption('fix_file'),
            'skip'   => (bool) $input->getOption('skip_dir_file'),
            'strict' => (bool) $input->getOption('strict_types'),
        ];
    }
43942
public static function getFieldValue(InputInterface $input, $fieldName)
    {
        $value = null;

        if ($input->hasArgument($fieldName)) {
            $value = $input->getArgument($fieldName);
        } elseif ($input->hasOption($fieldName)) {
            $value = $input->getOption($fieldName);
        }

        return $value;
    }
235251
protected function configureOptions(InputInterface $input, OutputInterface $output, array $options)
    {
        if (empty($options)) {
            return;
        }

        foreach ($options as $module => $moduleOptions) {
            if (!is_array($moduleOptions) || empty($moduleOptions)) {
                continue;
            }

            foreach ($moduleOptions as $code => $value) {
                if (is_array($value)) {
                    if (isset($value['value']) && isset($value['siteId'])) {
                        Option::set($module, $code, $value['value'], $value['siteId']);
                    } else {
                        $output->writeln('<error>Invalid option for module "' . $module . '" with code "' . $code . '"</error>');
                    }
                } else {
                    Option::set($module, $code, $value);

                    $output->writeln('   option: "' . $code . '", module: "' . $module . '"');
                }
            }
        }
    }
703469
protected function processOptions(InputInterface $input, OutputInterface $output): void
    {
        $exclude = TypeCast::castString($input->getOption('exclude'));
        $format = $input->getOption('format');
        $this->format = is_string($format) ? $format : null;
        $basePath = $input->getOption('directory');
        $this->basePath = is_string($basePath) ? $basePath : './';

        // Add slash to the path
        if (substr($this->basePath, -1) !== '/') {
            $this->basePath .= '/';
        }

        $this->verbose = $output->isVerbose();
        $this->output = $output;
        $this->skipClasses = (bool)$input->getOption('skip-classes');
        $this->skipMethods = (bool)$input->getOption('skip-methods');
        $this->skipSignatures = (bool)$input->getOption('skip-signatures');

        // Set up excludes:
        if (!empty($exclude)) {
            $this->exclude = array_map('trim', explode(',', $exclude));
        }
    }
572527
protected function selectApp(InputInterface $input)
    {
        $appName = $input->getOption('app');
        if ($appName) {
            return $appName;
        }

        try {
            $apps = array_map(function (WebApp $app) {
                return $app->name;
            }, $this->api()->getCurrentDeployment($this->getSelectedEnvironment())->webapps);
            if (!count($apps)) {
                return null;
            }
        } catch (EnvironmentStateException $e) {
            if (!$e->getEnvironment()->isActive()) {
                throw new EnvironmentStateException(
                    sprintf('Could not find applications: the environment "%s" is not currently active.', $e->getEnvironment()->id),
                    $e->getEnvironment()
                );
            }
            throw $e;
        }

        $this->debug('Found app(s): ' . implode(',', $apps));
        if (count($apps) === 1) {
            $appName = reset($apps);
        } elseif ($input->isInteractive()) {
            /** @var \Platformsh\Cli\Service\QuestionHelper $questionHelper */
            $questionHelper = $this->getService('question_helper');
            $choices = array_combine($apps, $apps);
            $appName = $questionHelper->choose($choices, 'Enter a number to choose an app:');
        }

        $input->setOption('app', $appName);

        return $appName;
    }
241093
public function input($input) {
        if(isset($this->inputs->$input)) 
            return $this->inputs->$input;
        return null;
    }
292587
public function load($input)
    {
        foreach ($this->strategies as $strategy) {
            if ($strategy->supports($input)) {
                return array_map([$this, 'createJsonDefinition'], $strategy->load($input));
            }
        }

        return [];
    }
819208
protected function setup(InputInterface $input)
    {
        return $this->setup
            ->setForcedRollback($input->getOption('force-rollback'))
            ->setExecuteQueries($input->getOption('execute'))
            ->setRollbackedFirst($input->getOption('rollback-first'))
            ->run();
    }
218661
public function execute(InputInterface $input): OutputInterface
    {
        $this->validator->validateInput($this, $input);
        $output = $this->generateOutput($input);
        $this->validator->validateOutput($this, $output);
        return $output;
    }
1366933
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $inputs = array_merge($input->getArguments(), $input->getOptions());

        $parameters = array();

        //
        $reflection = new ReflectionFunction($this->callback);

        foreach ($reflection->getParameters() as $parameter) {
            if (isset($inputs[$parameter->name])) {
                $parameters[$parameter->name] = $inputs[$parameter->name];
            }
        }

        return $this->container->call(
            $this->callback->bindTo($this, $this), $parameters
        );
    }
736776
protected function repoName(InputInterface $input) {
        $name = $input->getArgument('name');
        return isset($name) ? $name : basename(getcwd());
    }
1254706
public function getOptionFromDboptions($option, InputInterface $input)
    {
        $dbOptionReturnValue = null;
        if (!empty($input->getOption('dboptions'))) {
            $dbOptions = explode(',', $input->getOption('dboptions'));
            if (is_array($dbOptions)) {
                foreach ($dbOptions as $dbOption) {
                    $dbOptionParts = explode(':', $dbOption);
                    if (!empty($dbOptionParts[1])) {
                        $dbOptionValue = $dbOptionParts[1];
                    }
                    if ($option === $dbOptionParts[0]) {
                        if (!empty($dbOptionValue)) {
                            $dbOptionReturnValue = $dbOptionValue;
                        } else {
                            $dbOptionReturnValue = true;
                        }
                    }
                }
            }
        }
        return $dbOptionReturnValue;
    }
908121
public function getOptions($includeBase = true)
    {
        Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s');

        $options = $this->options;

        if ($includeBase && $this->baseFormat) {
            // append base options
            $options = array_replace($options, $this->baseFormat->getOptions());
        }

        return $options;
    }
1339338
protected function getCommandOptions($input)
    {
        return [
            'model-name' => $this->argument('model-name'),
            '--resource-filename' => $this->option('resource-filename'),
            '--fields' => $this->option('fields'),
            '--translation-for' => $this->option('translation-for'),
            '--relations' => $this->option('relations'),
            '--indexes' => $this->option('indexes'),
        ];
    }
609079
protected function generateRequestOptions( $input ) {
    $options = [
      'dataType' => 'json',
      'headers' => array_merge(self::$header, (array)$input['header']),
    ];
    $options = array_merge($options, ArrayUtils::array_pick($input, 'json', 'form', 'query'));
    return $options;
  }
39397
public function getOptions(): array
    {
        if ($this->options === null && $this->_repository !== null) {
            $this->_repository->injectOptions($this);
        }

        return $this->options ?: [];
    }
1099802
protected function validateInput(InputInterface $input)
    {
        $options = ['tags', 'tag', 'parameters', 'parameter'];

        $optionsCount = 0;
        foreach ($options as $option) {
            if ($input->getOption($option)) {
                ++$optionsCount;
            }
        }

        $name = $input->getArgument('name');
        if ((null !== $name) && ($optionsCount > 0)) {
            throw new InvalidArgumentException('The options tags, tag, parameters & parameter can not be combined with the service name argument.');
        } elseif ((null === $name) && $optionsCount > 1) {
            throw new InvalidArgumentException('The options tags, tag, parameters & parameter can not be combined together.');
        }
    }