Get all grouped arguments from options

@return Argument[]
965985
protected function getArguments()
    {
        $arguments = [];
       foreach ($this->getOptionArguments() as $argument) {
            if ($argument instanceof Argument) {
                $arguments[] = $this->getServiceManager()->propagate($argument);
            }
        }
        return $arguments;
    }
1068972
public function arguments()
    {
        
        if ($this->optind < $this->argc) {
            for ($i = $this->optind; $i < $this->argc; $i++) {
                $this->arguments[] = $this->argv[$i];
            }
            
        }
        
        return $this->arguments;
    }
1278828
public function getArguments()
    {
        $arguments = array();
        foreach ($this->commandArguments as $argument) {
            $arguments[] = $this->$argument;
        }
        return $arguments;
    }
175750
public function getArgumentValues()
    {
        $this->parseIfNotParsed();
        return array_map(function(Option $argument) {
            return $argument->getValue();
        }, $this->arguments);
    }
161083
private function extractArguments(): array
    {
        $parameters = [];

        //Use the Reflection API to create Parameter Value object
        foreach ($this->getReflectionInstance()->getParameters() as $param) {
            $name = $param->getName();
            $hasDefault = $param->isDefaultValueAvailable();

            //Default value. To null if the parameter has no default value
            $defaultValue = null;
            if (true === $hasDefault) {
                $defaultValue = $param->getDefaultValue();
            }
            $class = $param->getClass();

            $parameters[$name] = new Parameter($name, $hasDefault, $defaultValue, $class);
        }

        return $parameters;
    }
925378
public function getOptionsPreconditions()
    {
        $result = [];
        foreach ($this->getAllPreconditions() as $instance) {
            if ($instance instanceof OptionsPreconditionInterface) {
                $result[] = $instance;
            }
        }

        return $result;
    }
556132
public function getOptionParamNames() : array
   {

      $out = [];

      foreach ( $this->_attributes as $attributeName => $attribute )
      {
         if ( Type::OPTION_PARAM === $attribute->getType() )
         {
            $out[] = $attributeName;
         }
      }

      return $out;

   }
166666
protected function getTripodOptions()
    {
        $statsConfig = $this->getStatsConfig();
        $options = [];
        if (!empty($statsConfig)) {
            $options['statsConfig'] = $statsConfig;
        }
        return $options;
    }
537469
private function getArguments($argsNumber, $arguments)
    {
        if ($argsNumber == 1 && is_string($arguments)) {
            return [$arguments];
        } elseif ($argsNumber === count($arguments)) {
            return $arguments;
        }

        for ($i = 0; $i < $argsNumber; $i++) {
            if (array_key_exists($i, $arguments)) {
                $args[] = $arguments[$i];
                continue;
            }

            return $args;
        }

        return [];
    }
1066233
public function getAllOptions()
    {
        $result = [];

        foreach (self::getOptionArray() as $index => $value) {
            $result[] = ['value' => $index, 'label' => $value];
        }

        return $result;
    }
585107
protected function getCoreArguments()
    {
        if ($this->coreArguments !== null) {
            return $this->coreArguments;
        }

        $argvWithoutConfig = [];
        if (isset($_SERVER['argv'])) {
            $argv = $_SERVER['argv'];

            for ($i = 0; $i < count($argv); $i++) {
                if (preg_match('/^(?:-([^c-]*)?c|--config(?:=|$))(.*)$/', $argv[$i], $match)) {
                    if (!empty($match[2])) { //same index
                        $this->preloadConfiguration($match[2]);
                    } elseif (isset($argv[$i + 1])) { //next index
                        $this->preloadConfiguration($argv[++$i]);
                    }
                    if (!empty($match[1])) {
                        $argvWithoutConfig[] = "-" . $match[1]; //rest commands
                    }
                    continue;
                }
                $argvWithoutConfig[] = $argv[$i];
            }
        }

        return $this->coreArguments = new ArgvInput($argvWithoutConfig);
    }
37415
private static function getArguments(array $arguments = [])
    {
        $args = [];

        foreach ($arguments as $argument) {
            $args[] = $argument instanceof self ? $argument->getMoney() : $argument;
        }

        return $args;
    }
544129
protected function getGlobalOptionNames(): array
	{
		$names = [];

		foreach($this->options as $group)
		{
			$names = array_merge($names, array_keys($group));
		}

		return $names;
	}
261175
protected function getKeyArguments($arguments)
    {
        $keys = [];
        foreach ($arguments as $argument) {
            if (is_array($argument)) {
                $keys = array_merge($keys, $this->getKeyArguments($argument));
            }
            if (is_string($argument)) {
                $keys = array_merge($keys, $this->parseKeysString($argument));
            }
        }

        return $keys;
    }
143612
public function getArguments(): array
    {
        // We will need to process the arguments and merge them.
        $arguments = parent::getArguments();

        // If we have outfile setup don't act!
        foreach ($arguments as $argument) {
            if (strstr($argument, '-outfile') !== false) {
                return $arguments;
            }
        }

        if ($this->isOutSourceEqual()) // Check if not already specified
        {
            $this->outFileTemp = tempnam(sys_get_temp_dir(), 'img-prfy-');
            $arguments[] = '-outfile '.escapeshellarg($this->outFileTemp);
        } else {
            $arguments[] = '-outfile '.escapeshellarg($this->getOutFile());
        }

        return $arguments;
    }
1106728
protected function getMappedArguments()
    {
        $requiredArgs = array(
            'client'       => 'Prefix',
            'tool-title'   => 'Tool title',
            'transparent'  => '(1 or 0)',
            'rotatable'    => '(1 or 0)',
            'movable'      => '(1 or 0)',
            'adjustable-x' => '(1 or 0)',
            'adjustable-y' => '(1 or 0)',
        );
        $argHelp = "<p>Required arguments are:</p><ul>";
        foreach ($requiredArgs as $key => $value) {
            $argHelp .= '<li>' . $key . ': ' . $value . '</li>';
        }
        $argHelp .= '</ul>';

        foreach ($requiredArgs as $key => $value) {
            // !string '0' is a valid entry!
            if (!isset($_POST[$key]) || $_POST[$key] === '') {
                throw new \Exception($argHelp);
                break;
            }
            // trim all, cast 0|1 to bool
            $_POST[$key] = trim($_POST[$key]);
            if (in_array($_POST[$key], array('0', '1'))) {
                $_POST[$key] = (bool)$_POST[$key];
            }
        }

        $_POST['client']           = strtoupper($_POST['client']);
        $_POST['tool-base']        = StringUtils::removeSpecChars($_POST['tool-title']);
        $_POST['tool-fn']          = StringUtils::camelize($_POST['tool-base']);
        $_POST['tool-obj']         = ucfirst($_POST['tool-fn']);
        $_POST['tool-id']          = strtolower($_POST['client']) . $_POST['tool-obj'];
        $_POST['is-transparent']   = json_encode($_POST['transparent']);
        $_POST['is-rotatable-tl']  = json_encode($_POST['rotatable']); // default position of rotator

                                        // only visible when not adjustable
        $_POST['is-rotatable-tr']  = json_encode($_POST['rotatable'] && (!$_POST['adjustable-x'] && !$_POST['adjustable-y']));
        $_POST['is-rotatable-br']  = json_encode($_POST['rotatable'] && (!$_POST['adjustable-x'] && !$_POST['adjustable-y']));

        $_POST['is-rotatable-bl']  = json_encode($_POST['rotatable']); // also default position of rotator

        // alternative positions, need to be configured manually
        $_POST['is-rotatable-t']  = json_encode(false);
        $_POST['is-rotatable-r']  = json_encode(false);
        $_POST['is-rotatable-b']  = json_encode(false);
        $_POST['is-rotatable-l']  = json_encode(false);

        $_POST['is-movable']       = json_encode($_POST['movable']);
        $_POST['is-adjustable-x']  = json_encode($_POST['adjustable-x']);
        $_POST['is-adjustable-y']  = json_encode($_POST['adjustable-y']);
        $_POST['is-adjustable-xy'] = json_encode($_POST['adjustable-x'] && $_POST['adjustable-y']);

        unset($_POST['transparent']);
        unset($_POST['rotatable']);
        unset($_POST['movable']);
        unset($_POST['adjustable-x']);
        unset($_POST['adjustable-y']);

        return $_POST;
    }
250396
protected function getOptionalParameters()
    {
        preg_match_all('/\{(\w+?)\?\}/', $this->route->uri(), $matches);

        return isset($matches[1]) ? array_fill_keys($matches[1], null) : [];
    }