@param Request $request
@param string  $name

@return string
437002
public function getLoginUrl(Request $request, $name)
    {
        // Just to check that this resource owner exists
        $this->getResourceOwner($name);

        $request->attributes->set('service', $name);

        return $this->httpUtils->generateUri($request, 'hwi_oauth_service_redirect');
    }
924141
protected function fetchToken(Request $request): string
    {
        if ($request->hasHeader(self::HEADER)) {
            return (string)$request->getHeaderLine(self::HEADER);
        }

        $data = $request->getParsedBody();
        if (is_array($data) && isset($data[self::PARAMETER])) {
            if (is_string($data[self::PARAMETER])) {
                return (string)$data[self::PARAMETER];
            }
        }

        return '';
    }
819608
public static function getNameId($request, $key = null)
    {
        $nameId = self::getNameIdData($request, $key);
        return $nameId['Value'];
    }
516566
public static function getCookie(ServerRequestInterface $request, string $name): string
    {
        $cookies = $request->getCookieParams();

        return isset($cookies[$name]) ? $cookies[$name] : '-';
    }
529961
public function apply(Request $request)
    {
        if (IpUtils::checkIp($request->getClientIp(), $this->subnet)) {
            $name = $this->extractFieldInfo($request->headers, $this->headerField);
            if (!empty($name)) {
                return $name;
            }
        }

        return '';
    }
1168564
public function show(string $name, Request $request)
    {
        $availableMenus = config('press.menu');
        $currentLocale = $request->get('lang', app()->getLocale());

        $menu = Dashboard::modelClass(Menu::class)
            ->where('lang', $currentLocale)
            ->where('parent', 0)
            ->where('type', $name)
            ->orderBy('sort', 'asc')
            ->with('children')
            ->get();

        return view('platform::container.systems.menu', [
            'name'           => $name,
            'locales'        => config('press.locales'),
            'currentLocale'  => $currentLocale,
            'menu'           => $menu,
            'availableMenus' => $availableMenus,
        ]);
    }
688871
private function getLanguage(Request $request)
    {
        $locale = $this->getRequestParameter($request, 'locale', false, null);

        if ($locale) {
            return $locale;
        }

        return $this->getRequestParameter($request, 'language', true);
    }
498371
private function getTraceKey(Request $request): string
    {
        $path = $request->getPathInfo();
        if ($qs = $request->getQueryString()) {
            $path .= '?'.$qs;
        }

        return $request->getMethod().' '.$path;
    }
866412
public static function request_header($name)
    {
        if (function_exists('getallheaders')) {
            $hdrs = array_change_key_case(getallheaders(), CASE_UPPER);
            $key  = strtoupper($name);
        }
        else {
            $key  = 'HTTP_' . strtoupper(strtr($name, '-', '_'));
            $hdrs = array_change_key_case($_SERVER, CASE_UPPER);
        }

        return $hdrs[$key];
    }
531824
public static function toUriString(Request $request)
    {
        $uri = clone $request->getUri();

        $uri->setQuery(array_merge($uri->getQueryAsArray(),
            $request->getQuery()->toArray()));

        return $uri->toString();
    }
160874
public static String getParameter(ServletRequest request, String name) {
    String s = request.getParameter(name);
    if (s == null) {
      return null;
    }
    s = s.trim();
    return s.length() == 0? null: s;
  }
903235
public function get(string $name): string {
		$forms = $this->forms;
		foreach ($forms as $id => $item) {
			$val = $item->get();
			if (isset($val[$name]) && $val[$name]) {
				return $id;
			}
		}

		return false;
	}
535380
private function getDefaultAction(Request $request)
    {
        if (!preg_match('/(\w+)Action$/', $request->attributes->get('_controller'), $match)) {
            throw new \RuntimeException('Unable to determine controller name');
        }

        return strtolower(preg_replace('/(?<!^)[A-Z]/', '_$0', $match[1]));
    }
504851
protected function dumpRequest(Request $request) {
    $body = $request->getBody();
    
    $dump = "Body of request is:\n";
    
    if (is_object($body) || is_array($body)) {
      $dump .= json_encode($body);
    } elseif(is_string($body)) {
      $dump .= sprintf('"%s"',$body);
    }
    
    return $dump;
  }
977958
public static function requestString($name, $default = null)
    {
        if (isset($_REQUEST[$name]) && $_REQUEST[$name] !== '') return self::parseInputToString($_REQUEST[$name]);
        return $default;
    }
776366
protected function getRequestContent($name)
    {
        if (!$stub = $this->getRequestStub($name)) {
            return '';
        }

        $namespace = $this->appNs.'\Http\Requests\\'.implode('\\', $this->sectionSegmentsStudly);

        return strtr($stub, array_merge($this->getCommonReplacements(), [
            '{{namespace}}' => $namespace,
        ]));
    }
202435
private function getDefaultName(Request $request)
    {
        if (!preg_match('/Bundle\\\\Controller\\\\([\w\\\\]+)Controller:/', $request->attributes->get('_controller'), $match)) {
            throw new \RuntimeException('Unable to determine controller name');
        }

        return strtolower(str_replace('\\', '_', $match[1]));
    }