Returns an array containing each argument as array of type and name.

Please note that the argument sub-array may only contain 1 element if no
type was specified.

@return string[]
18941
public function getArguments()
    {
        if (empty($this->arguments)) {
            return array();
        }

        $arguments = explode(',', $this->arguments);
        foreach ($arguments as $key => $value) {
            $arguments[$key] = explode(' ', trim($value));
        }

        return $arguments;
    }
1142144
protected function getArguments(): array
    {
        Factory::helper('string');
        $aArguments = [];

        if (!empty($this->aArguments)) {
            foreach ($this->aArguments as $aArgument) {
                $aArguments[] = (object) [
                    'name'     => getFromArray('name', $aArgument),
                    'value'    => $this->oInput->getArgument(getFromArray('name', $aArgument)),
                    'required' => getFromArray('required', $aArgument),
                ];
            }
        } else {
            $aArgumentsRaw = array_slice($this->oInput->getArguments(), 1);
            foreach ($aArgumentsRaw as $sField => $sValue) {
                $sField       = strtoupper(camelcase_to_underscore($sField));
                $aArguments[] = (object) [
                    'name'     => $sField,
                    'value'    => $sValue,
                    'required' => true,
                ];
            }
        }

        unset($sField);
        unset($sValue);

        foreach ($aArguments as &$oArgument) {
            if (empty($oArgument->value)) {
                $sLabel = str_replace('_', ' ', $oArgument->name);
                $sLabel = ucwords(strtolower($sLabel));
                $sError = '';
                do {
                    $oArgument->value = $this->ask($sError . $sLabel . ':', '');
                    $sError           = '<error>Please specify</error> ';
                    if ($oArgument->required && empty($oArgument->value)) {
                        $bAskAgain = true;
                    } else {
                        $bAskAgain = false;
                    }
                } while ($bAskAgain);
            }
        }
        unset($oArgument);

        //  Finally set as key values
        $aOut = [];
        foreach ($aArguments as $oArgument) {
            $aOut[strtoupper($oArgument->name)] = $oArgument->value;
        }

        return $aOut;
    }
544729
public function toArray()
    {
        $prototypes = $this->getPrototypes();
        $signatures = array();
        foreach ($prototypes as $prototype) {
            $signatures[] = $prototype->toArray();
        }

        return array(
            'name'            => $this->getName(),
            'callback'        => $this->getCallback()->toArray(),
            'prototypes'      => $signatures,
            'methodHelp'      => $this->getMethodHelp(),
            'invokeArguments' => $this->getInvokeArguments(),
            'object'          => $this->getObject(),
        );
    }
88782
public function getNamedArguments() : \ArrayObject
    {
        $args = $this->getArguments();
        $paramas = $this->getMethod()->getParameters();
        $namedParams = new \ArrayObject;
        foreach ($paramas as $param) {
            $namedParams[$param->getName()] = $args[$param->getPosition()];
        }

        return $namedParams;
    }
905466
protected function getFilterArray()
    {
        return array_merge(parent::getFilterArray(), [
      self::ARGUMENT_FILTER_OFFSET => $this->arguments[self::ARGUMENT_FILTER_OFFSET],
      self::ARGUMENT_FILTER_LIMIT => $this->arguments[self::ARGUMENT_FILTER_LIMIT],
      self::ARGUMENT_FILTER_CHILDS => $this->arguments[self::ARGUMENT_FILTER_CHILDS],
      self::ARGUMENT_FILTER_TEXT => $this->arguments[self::ARGUMENT_FILTER_TEXT],
      self::ARGUMENT_FILTER_DATESTART => $this->checkDateTime($this->arguments[self::ARGUMENT_FILTER_DATESTART]),
      self::ARGUMENT_FILTER_DATEEND => $this->checkDateTime($this->arguments[self::ARGUMENT_FILTER_DATEEND]),
      self::ARGUMENT_FILTER_ZIPSTART => $this->arguments[self::ARGUMENT_FILTER_ZIPSTART],
      self::ARGUMENT_FILTER_ZIPEND => $this->arguments[self::ARGUMENT_FILTER_ZIPEND],
      self::ARGUMENT_FILTER_LOCATION => $this->arguments[self::ARGUMENT_FILTER_LOCATION],
      self::ARGUMENT_FILTER_EVENTTYPEID => $this->arguments[self::ARGUMENT_FILTER_EVENTTYPEID],
      self::ARGUMENT_FILTER_PRIVATEEVENTS => $this->arguments[self::ARGUMENT_FILTER_PRIVATEEVENTS]
    ]);
    }
1189968
public function toArray()
    {
        return array(
            'type'         => $this->getType(),
            'name'         => $this->getName(),
            'optional'     => $this->isOptional(),
            'defaultValue' => $this->getDefaultValue(),
            'description'  => $this->getDescription(),
        );
    }
965985
protected function getArguments()
    {
        $arguments = [];
       foreach ($this->getOptionArguments() as $argument) {
            if ($argument instanceof Argument) {
                $arguments[] = $this->getServiceManager()->propagate($argument);
            }
        }
        return $arguments;
    }
1145401
public function toArray()
    {
        return [
            'openId'        => $this->openId,
            'unionId'       => $this->unionId,
            'nickName'      => $this->nickName,

            'sex'           => $this->sex->getValue(),
            'city'          => $this->city,
            'province'      => $this->province,
            'country'       => $this->country,
            'headImgUrl'    => $this->headImgUrl,

            'subscribe'     => $this->subscribe->getValue(),
            'subscribeTime' => $this->subscribeTime,
            'groupId'       => $this->groupId,
        ];
    }
479351
public function toArray()
    {
        $result = [];

        if (!empty($this->name)) {
            $result['name'] = $this->name;
        }

        if (!empty($this->family)) {
            $result['family'] = $this->family->toArray();
        }

        if (!empty($this->alias)) {
            $result['alias'] = $this->alias;
        }

        if (!empty($this->edition)) {
            $result['edition'] = $this->edition;
        }

        if (!empty($this->version)) {
            $result['version'] = $this->version->toArray();
        }

        if (isset($result['version']) && empty($result['version'])) {
            unset($result['version']);
        }

        return $result;
    }
1307089
public function getArguments()
    {
        if (count($this->arguments) < 1) {
            return [];
        }

        asort($this->arguments);
        $lastArgument = end($this->arguments);
        $argumentsCount = $lastArgument->getIndex();
        $sortedArguments = [];
        for ($index = 1; $index <= $argumentsCount; $index++) {
            $sortedArguments[$index] = isset($this->arguments[$index]) ? $this->arguments[$index] : null;
        }
        return $sortedArguments;
    }
359788
public function toArray()
    {
        $array = ['name' => $this->getName()];

        foreach (static::$propertyMap[static::class] as $name => $property) {
            $value = $this->{$name};
            $array[$name] = $value instanceof XType ? $value->toArray() : $value;
        }

        if (!count($this->constraints)) {
            return $array;
        }

        $array['constraints'] = [];

        foreach ($this->constraints as $name=>$parameters) {
            $array['constraints'][$name] = $parameters;
        }

        return $array;
    }
191084
public function toArray()
    {
        return [
            'userAgent'          => $this->userAgent,
            'browser'            => $this->browser,
            'version'            => $this->version,
            'majorVersion'       => $this->majorVersion,
            'minorVersion'       => $this->minorVersion,
            'browserWithVersion' => $this->browserWithVersion,
            'publisher'          => $this->publisher,
            'platform'           => $this->platform,
            'device'             => $this->device,
            'devicePointer'      => $this->devicePointer,
            'isMobile'           => $this->isMobile,
            'isTablet'           => $this->isTablet(),
            'isCrawler'          => $this->isCrawler,
        ];
    }
188659
public function toArray(): array
    {
        return array_filter([
            'name' => $this->name,
            'field' => 'uuid.type' === $this->field
                ? null
                : $this->field,
            'application_type' => Filter::AT_LEAST_ONE === $this->applicationType
                ? null
                : $this->applicationType,
            'filter_type' => Filter::TYPE_FIELD === $this->filterType
                ? null
                : $this->filterType,
            'subgroup' => empty($this->subgroup)
                ? null
                : $this->subgroup,
            'sort' => self::SORT_BY_COUNT_DESC === $this->sort
                ? null
                : $this->sort,
            'limit' => self::NO_LIMIT === $this->limit
                ? null
                : $this->limit,
        ], function ($element) {
            return
            !(
                is_null($element) ||
                (is_array($element) && empty($element))
            );
        });
    }
1047350
public function getArgs()
    {
        $args = array(
            '--' . $this->getType()
        );

        foreach ($this as $name => $value) {
            if (!in_array($name, array('inbuffer')) && $value !== null && $value !== false && !is_array($value)) {
                $name = $this->decamelize($name);

                if ($value !== true) {
                    // append value if this is not a boolean arg
                    $name .= '=' . $value;
                }

                // all arguments start with a double dash
                $args []= '--' . $name;
            }
        }

        return $args;
    }
689158
public function getArgumentDefaults()
    {
        $values = [];
        foreach ($this->arguments as $argument) {
            $values[$argument->getName()] = $argument->getDefault();
        }

        return $values;
    }
1317678
public function toArray()
    {
        $types = [];
        foreach ($this->collection as $type) {
            $types[$type->getName()] = $type->toArray();
        }

        return $types;
    }
417644
protected function getArguments()
    {
        return array(
            array('name', InputArgument::REQUIRED, false),
            array('type', InputArgument::OPTIONAL, false),
            array('folder', InputArgument::OPTIONAL, false),
        );
    }