isAbsolutePathReference() public static method

A relative reference that begins with a single slash character is termed an absolute-path reference.
public static isAbsolutePathReference ( Psr\Http\Message\UriInterface $uri ) : boolean
$uri Psr\Http\Message\UriInterface
return boolean
Esempio n. 1
0
 public function testIsAbsolutePathReference()
 {
     $this->assertFalse(Uri::isAbsolutePathReference(new Uri('http://example.org')));
     $this->assertFalse(Uri::isAbsolutePathReference(new Uri('//example.org')));
     $this->assertTrue(Uri::isAbsolutePathReference(new Uri('/abs-path')));
     $this->assertTrue(Uri::isAbsolutePathReference(new Uri('/')));
     $this->assertFalse(Uri::isAbsolutePathReference(new Uri('rel-path')));
 }