setScheme() публичный Метод

Sets the URI's scheme / protocol
public setScheme ( string $scheme ) : void
$scheme string The scheme. Allowed values are "http" and "https"
Результат void
Пример #1
0
 /**
  * Checks round trips for various URIs
  *
  * @test
  */
 public function settingSchemeAndHostOnUriDoesNotConfuseToString()
 {
     $uri = new Uri('/no/scheme/or/host');
     $uri->setScheme('http');
     $uri->setHost('localhost');
     $this->assertSame('http://localhost/no/scheme/or/host', (string) $uri);
 }