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 | |
리턴 | boolean |
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'))); }