Uri Class
Aurora\Http Namespace
Interfaces
- I UriInterface
- I Stringable
Properties
scheme
Uri scheme
protected $scheme = '': string
host
Uri host
protected $host = '': string
port
Uri port
protected $port: mixed
authority
Uri authority
protected $authority: mixed
path
Uri path
protected $path = '': string
query
Uri query string
protected $query = '': string
fragment
Uri fragment
protected $fragment = '': string
Constructor
__construct
Parameters
string
$uri
— URI to parse and wrap.
Signature
public function __construct(string $uri = '')
Methods
__construct
Parameters
-
string
$uri
— URI to parse and wrap.
Signature
public function __construct(string $uri = '')
__toString
Return the string representation as a URI reference
Return Value
string
Signature
public function __toString()
getScheme
Retrieve the scheme component of the URI
Return Value
string
Signature
public function getScheme()
getAuthority
Retrieve the authority component of the URI
Return Value
string
Signature
public function getAuthority()
getUserInfo
Retrieve the user information component of the URI
Return Value
string
Signature
public function getUserInfo()
getHost
Retrieve the host component of the URI
Return Value
string
Signature
public function getHost()
getPort
Retrieve the port component of the URI
Return Value
mixed
Signature
public function getPort()
getPath
Retrieve the path component of the URI
Return Value
string The URI path
Signature
public function getPath()
getQuery
Retrieve the query string of the URI
Return Value
string
Signature
public function getQuery()
getFragment
Retrieve the fragment component of the URI
Return Value
string
Signature
public function getFragment()
withScheme
Return an instance with the specified scheme
Parameters
-
mixed
$scheme
— The scheme to use with the new instance
Return Value
\Uri
Signature
public function withScheme(mixed $scheme)
withUserInfo
Return an instance with the specified user information
Parameters
-
mixed
$user
— The user name to use for authority -
mixed
$password
— The password associated with $user
Return Value
\Uri
Signature
public function withUserInfo(mixed $user, mixed $password)
withHost
Return an instance with the specified host
Parameters
-
mixed
$host
— The hostname to use with the new instance
Return Value
\Uri
Signature
public function withHost(mixed $host)
withPort
Return an instance with the specified port
Parameters
-
mixed
$port
— The port to use with the new instance
Return Value
\Uri A new instance with the specified port
Signature
public function withPort(mixed $port)
withPath
Return an instance with the specified path
Parameters
-
mixed
$path
— The path to use with the new instance
Return Value
\Uri
Signature
public function withPath(mixed $path)
withQuery
Return an instance with the specified query string
Parameters
-
mixed
$query
— The query string to use with the new instance
Return Value
\Uri
Signature
public function withQuery(mixed $query)
withFragment
Return an instance with the specified URI fragment
Parameters
-
mixed
$fragment
— The fragment to use with the new instance
Return Value
\Uri
Signature
public function withFragment(mixed $fragment)
fromString
Parse the URI
Parameters
-
string
$uri
— URI to parse
Signature
protected function fromString(string $uri)
toUri
Convert to URI
Return Value
string
Signature
protected function toUri(): string