UriInfo
in package
since version 7.0.0
Tags
Table of Contents
Methods
- getOrigin() : string|null
- Returns the URI origin property as defined by WHATWG URL living standard.
- isAbsolute() : bool
- Tells whether the URI represents an absolute URI.
- isAbsolutePath() : bool
- Tells whether the URI represents an absolute path.
- isCrossOrigin() : bool
- Tells whether two URI do not share the same origin.
- isNetworkPath() : bool
- Tell whether the URI represents a network path.
- isRelativePath() : bool
- Tell whether the URI represents a relative path.
- isSameDocument() : bool
- Tells whether both URI refers to the same document.
- __construct() : mixed
Methods
getOrigin()
Returns the URI origin property as defined by WHATWG URL living standard.
public
static getOrigin(UriInterface|UriInterface $uri) : string|null
use League\Uri\BaseUri::origin() instead
https://url.spec.whatwg.org/#origin
For URI without a special scheme the method returns null For URI with the file scheme the method will return null (as this is left to the implementation decision) For URI with a special scheme the method returns the scheme followed by its authority (without the userinfo part)
Parameters
- $uri : UriInterface|UriInterface
Return values
string|nullisAbsolute()
Tells whether the URI represents an absolute URI.
public
static isAbsolute(UriInterface|UriInterface $uri) : bool
use League\Uri\BaseUri::isAbsolute() instead
Parameters
- $uri : UriInterface|UriInterface
Return values
boolisAbsolutePath()
Tells whether the URI represents an absolute path.
public
static isAbsolutePath(UriInterface|UriInterface $uri) : bool
use League\Uri\BaseUri::isAbsolutePath() instead
Parameters
- $uri : UriInterface|UriInterface
Return values
boolisCrossOrigin()
Tells whether two URI do not share the same origin.
public
static isCrossOrigin(UriInterface|UriInterface $uri, UriInterface|UriInterface $baseUri) : bool
use League\Uri\BaseUri::isCrossOrigin() instead
Parameters
- $uri : UriInterface|UriInterface
- $baseUri : UriInterface|UriInterface
Tags
Return values
boolisNetworkPath()
Tell whether the URI represents a network path.
public
static isNetworkPath(UriInterface|UriInterface $uri) : bool
use League\Uri\BaseUri::isNetworkPath() instead
Parameters
- $uri : UriInterface|UriInterface
Return values
boolisRelativePath()
Tell whether the URI represents a relative path.
public
static isRelativePath(UriInterface|UriInterface $uri) : bool
use League\Uri\BaseUri::isRelativePath() instead
Parameters
- $uri : UriInterface|UriInterface
Return values
boolisSameDocument()
Tells whether both URI refers to the same document.
public
static isSameDocument(UriInterface|UriInterface $uri, UriInterface|UriInterface $baseUri) : bool
use League\Uri\BaseUri::isSameDocument() instead
Parameters
- $uri : UriInterface|UriInterface
- $baseUri : UriInterface|UriInterface
Return values
bool__construct()
private
__construct() : mixed