Returns the possible value(s).

@param Request          $request
@param ArgumentMetadata $argument

@return \Generator
12019
public function resolve(Request $request, ArgumentMetadata $argument)
    {
        if (\array_key_exists($argument->getType(), $this->mappingParameters)) {
            yield $this->mappingParameters[$argument->getType()];
        }
        else {
            foreach ($this->mappingParameters as $value) {
                $classname = $argument->getType();
                if ($value instanceof $classname) {
                    yield $value;
                }
            }
        }
    }
723369
public function ListDatasets(\Google\Cloud\AutoMl\V1beta1\ListDatasetsRequest $argument,
      $metadata = [], $options = []) {
        return $this->_simpleRequest('/google.cloud.automl.v1beta1.AutoMl/ListDatasets',
        $argument,
        ['\Google\Cloud\AutoMl\V1beta1\ListDatasetsResponse', 'decode'],
        $metadata, $options);
    }
6407
public function cgetAction(Request $request)
    {
        $list = new CollectionRepresentation(
            $this->getManager()->findAll($this->getLocale($request)),
            self::$entityKey
        );

        $view = $this->view($list);

        return $this->handleView($view);
    }
116793
protected function _getArgumentValues($controller, $command, $argumentName)
    {
        $controllerClassName = $this->_getControllerClassName($controller);
        if (!class_exists($controllerClassName)) {
            return [];
        }

        $argument_values = [];
        $command = Text::camelize($command) . 'Completion';
        if (method_exists($controllerClassName, $command)) {
            try {
                $argument_values = (new $controllerClassName())->$command($argumentName);
            } catch (\Exception $e) {

            }
        }

        return $argument_values;
    }
1321117
public function Lookup(\Google\Cloud\Datastore\V1\LookupRequest $argument,
      $metadata = [], $options = []) {
        return $this->_simpleRequest('/google.datastore.v1.Datastore/Lookup',
        $argument,
        ['\Google\Cloud\Datastore\V1\LookupResponse', 'decode'],
        $metadata, $options);
    }
179189
protected function getData(Request $request)
    {
        $data = null;
        if ($request->query->has('dataId')) {
            $data = $this->get(DataRepository::class)->find($request->query->get('dataId'));
        }

        return $data;
    }
821514
public function run(Application $app, Request $request, array $arguments = [])
    {
        return $this->processRequest($app, $request, $this->callback, $arguments);
    }
769466
protected function processArgumentValue(stdClass $argument) {
		if (! isset($argument->value)) {
			throw new Exceptions\InvalidConfig('Argument of type "value" must contain a "value" property');
		}

		if (is_array($argument->value)) {
			return $this->processArguments($argument->value);
		}

		return $argument->value;
	}
991694
public function get_item( $request ) {
		$options  = $this->get_registered_options();
		$response = array();

		foreach ( $options as $name => $args ) {
			/**
			 * Filters the value of a setting recognized by the REST API.
			 *
			 * Allow hijacking the setting value and overriding the built-in behavior by returning a
			 * non-null value.  The returned value will be presented as the setting value instead.
			 *
			 * @since 4.7.0
			 *
			 * @param mixed  $result  Value to use for the requested setting. Can be a scalar
			 *                        matching the registered schema for the setting, or null to
			 *                        follow the default `get_option` behavior.
			 * @param string $name    Setting name (as shown in REST API responses).
			 * @param array  $args    Arguments passed to `register_setting()` for this setting.
			 */
			$response[ $name ] = apply_filters( 'rest_pre_get_setting', null, $name, $args );

			if ( is_null( $response[ $name ] ) ) {
				// Default to a null value as "null" in the response means "not set".
				$response[ $name ] = get_option( $args['option_name'], $args['schema']['default'] );
			}

			// Because get_option() is lossy, we have to
			// cast values to the type they are registered with.
			$response[ $name ] = $this->prepare_value( $response[ $name ], $args['schema'] );
		}

		return $response;
	}
723479
protected function getParameter($args, $key, $defaultValue = NULL)
    {
        $value = util::array_get($args[$key]);
        return is_null($value) ? $defaultValue : $value;
    }
989759
public function cgetAction(Request $request)
    {
        $locale = $this->getLocale($request);

        // if the type parameter is falsy, assign NULL to $type
        $type = $request->query->get('type', null) ?: null;

        $idsString = $request->get('ids');

        if ($idsString) {
            $ids = explode(',', $idsString);
            $snippets = $this->snippetRepository->getSnippetsByUuids($ids, $locale);
            $total = count($snippets);
        } else {
            $snippets = $this->snippetRepository->getSnippets(
                $locale,
                $type,
                $this->listRestHelper->getOffset(),
                $this->listRestHelper->getLimit(),
                $this->listRestHelper->getSearchPattern(),
                $this->listRestHelper->getSortColumn(),
                $this->listRestHelper->getSortOrder()
            );

            $total = $this->snippetRepository->getSnippetsAmount(
                $locale,
                $type,
                $this->listRestHelper->getSearchPattern(),
                $this->listRestHelper->getSortColumn(),
                $this->listRestHelper->getSortOrder()
            );
        }

        $data = new ListRepresentation(
            $snippets,
            'snippets',
            'get_snippets',
            $request->query->all(),
            $this->listRestHelper->getPage(),
            $this->listRestHelper->getLimit(),
            $total
        );

        return $this->viewHandler->handle(View::create($data));
    }
400252
public function parseArguments(array $args)
    {
        if (!isset($args['action']) || empty($args['action'])) {
            if (isset($args['version']) ||  isset($args['V'])) {
                $this->action = 'Version';
                $this->arguments = $args;
                return $this->arguments;
            }
            if (isset($args['help']) || isset($args['h'])) {
                $this->action = 'Help';
                $this->arguments = $args;
                return $this->arguments;
            }
            throw new RequestException($this, "No valid action argument specified.");
        }
        $this->action = $args['action'];
        unset($args['action']);
        $this->arguments = $args;
        return $this->arguments;
    }
34091
public function getValueFromRequest(\Illuminate\Http\Request $request)
    {
        if ($request->hasSession() && ! is_null($value = $request->old($this->getPath()))) {
            return $value;
        }

        return $request->input($this->getPath());
    }
1265569
public function GetDatabase(\Google\Cloud\Spanner\Admin\Database\V1\GetDatabaseRequest $argument,
      $metadata = [], $options = []) {
        return $this->_simpleRequest('/google.spanner.admin.database.v1.DatabaseAdmin/GetDatabase',
        $argument,
        ['\Google\Cloud\Spanner\Admin\Database\V1\Database', 'decode'],
        $metadata, $options);
    }
89920
public function query(...$arguments) // don't define return type, so user can
    {
        $query       = $arguments[0] ?? '';
        $queryParams = $arguments[1] ?? null;

        try {
            return $this->vendor->getDatabase()->getLink()->getAgent()->query($query, $queryParams);
        } catch (\Exception $e) {
            $this->setFail($e);
            return null;
        }
    }
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 [];
    }
673951
protected function getArgumentValues(): Collection
    {
        return (new Collection($this->fieldValue->getField()->arguments))
            ->map(function (InputValueDefinitionNode $inputValueDefinition): ArgumentValue {
                return new ArgumentValue($inputValueDefinition, $this->fieldValue);
            });
    }