Retrieve a default request option from the client

@param string $keyOrPath request.options key (e.g. allow_redirects) or path to a nested key (e.g. headers/foo)

@return mixed|null
431007
public function getDefaultOption($keyOrPath)
    {
        $keyOrPath = self::REQUEST_OPTIONS . '/' . $keyOrPath;

        return $this->config->getPath($keyOrPath);
    }
614955
public static function reqDefault($keys, $defaultValue) {
    try {
      $value = self::req($keys);
    } catch (MissingConfigVariableException $e) {
      
      if (is_string($defaultValue) && !Preg::match($defaultValue,'/^(\'|")/') && !self::NEW_ARRAY) {
        $defaultValue = "'".$defaultValue."'";
      }
      
      $e->setDefault($defaultValue);
      throw $e;
    }
    
    return $value;
  }
320480
public function getAuthCodeRequestParam($key, $default = null)
    {
        if (array_key_exists($key, $this->authCodeRequestParams)) {
            return $this->authCodeRequestParams[$key];
        }

        return $default;
    }
611751
public function get($path = '', $options = array())
    {
        return $this->client->get(
            $this->addDataToPathURI($path, $options),
            $this->addDataToRequest($options),
            $this->requestHeader
        );
    }
626504
public function route($key, $default = null)
    {
        if (isset($this->routeParams[$key])){
            return $this->routeParams[$key];
        }
        return $default;
    }
1037748
public function lookupIn($searchKeyPath)
    {
        $path = ArrayList::of($searchKeyPath);

        if ($path->count() === 0) {
            return Maybe::nothing();
        }

        if ($path->count() === 1) {
            return $this->lookup($path->head());
        }

        $value = $this->lookup($path->head());

        if ($value->isNothing()) {
            return $value;
        }

        $innerValue = Maybe::fromJust($value);

        if ($innerValue instanceof Iterable) {
            return $innerValue->lookupIn($path->tail());
        }

        return Maybe::nothing();
    }
1219475
public function getSafeRedirectUrl($default, $data = null, $key = 'redirect') {
		$redirectUrl = $data ?: ($this->Controller->getRequest()->getData($key) ?: $this->Controller->getRequest()->getQuery($key));
		if ($redirectUrl && (mb_substr($redirectUrl, 0, 1) !== '/' || mb_substr($redirectUrl, 0, 2) === '//')) {
			$redirectUrl = null;
		}

		return $redirectUrl ?: $default;
	}
189179
public function get($idOrKey, array $fields = null)
    {
        $parameters = $fields ?
            sprintf(
                '?%s',
                $this->createUriParameters(
                    ['fields' => implode(',', $fields)]
                )
            )
            : ''
        ;

        return $this->getRequest(sprintf('issue/%s%s', $idOrKey, $parameters));
    }
1108350
public function get($path, $default = null)
    {
        $keys       = $this->explode($path);
        $parameters = $this->parameters;

        foreach ($keys as $key) {
            if (isset($parameters[$key])) {
                $parameters = $parameters[$key];
            } else {
                return $default;
            }
        }
        return $parameters;
    }
1285567
public function request( $key = null, $default = null ) {
		return func_num_args() === 0 ? $_REQUEST : $this->app->utility->array_get( $_REQUEST, $key, $default );
	}
859227
public function getHeader($key, $defaultValue = null) {
		if (!is_string($key) || $key === '') {
			return $defaultValue;
		}

		$key = strtoupper(str_replace('-', '_', $key));

		return $_SERVER['HTTP_' . $key] ?? $_SERVER[$key] ?? $defaultValue;
	}
894064
public function getQuery($key = null, $default = null, $type = 'string')
    {
        return $this->request->get($key, $default, $type);
    }
280809
public function getOptions($key = null, $default = null)
    {
        if ($key !== null) {
            return isset($this->_options[$key]) ? $this->_options[$key] : $default;
        } else {
            return $this->_options;
        }
    }
273751
public function Get($Key = NULL, $Default = NULL) {
      if ($Key === NULL)
         return $this->GetRequestArguments (self::INPUT_GET);
      else
         return $this->GetValueFrom(self::INPUT_GET, $Key, $Default);
   }
1061021
public function urlFor($path)
    {
        $root = $this->options['api_root'][$this->options['mode']];
        return rtrim($root, '/') . '/' . ltrim($path, '/');
    }
385830
private function getServiceFromPath($path)
    {
        /* Ensure the path is in a standard form, removing empty elements. */
        $path = implode('/', array_filter(array_map('trim', explode('/', $path)), 'strlen'));

        /* If using the basePath option, strip the basePath. Otherwise, the path becomes the basename of the URI. */
        if (isset($this->options[self::KEY_BASE_PATH])) {
            $basePathPosition = strpos($path, $this->options[self::KEY_BASE_PATH]);
            if (false !== $basePathPosition) {
                $path = substr($path, $basePathPosition + strlen($this->options[self::KEY_BASE_PATH]));
            }

            return trim(dirname($path), "/") . '/' .  basename($path, '.php'); /* For example, x/y/z/FooService */
        } else {
            return basename($path, '.php'); /* For example: FooService, from /x/y/z/FooService.php */
        }
    }
342525
public static function lookupByPath($path)
    {
        if (empty($path)) {
            throw new \InvalidArgumentException('Argument "path" cannot be empty');
        }

        foreach (self::$methods_config as $key => $val) {
            if ($val['path'] === $path) {
                return $val;
            }
        }

        return null;
    }