Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. UriInterface.php

function UriInterface::withUserInfo

Return an instance with the specified user information.

This method MUST retain the state of the current instance, and return an instance that contains the specified user information.

Password is optional, but the user information MUST include the user; an empty string for the user is equivalent to removing user information.

Parameters

string $user The user name to use for authority.:

null|string $password The password associated with $user.:

Return value

static A new instance with the specified user information.

1 method overrides UriInterface::withUserInfo()
Uri::withUserInfo in vendor/guzzlehttp/psr7/src/Uri.php
Return an instance with the specified user information.

File

vendor/psr/http-message/src/UriInterface.php, line 208

Class

UriInterface
Value object representing a URI.

Namespace

Psr\Http\Message

Code

public function withUserInfo(string $user, ?string $password = null) : UriInterface;

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal