Page MenuHomePhorge
Diviner Tech Docs PhutilURIHelper

final class PhutilURIHelper
Phorge Technical Documentation ()

A simple wrapper for PhutilURI, to be aware of the relative/absolute context, and other minor things.

Methods

public function __get($name)
Inherited

This method is not documented.
Parameters
$name
Return
wild

public function __set($name, $value)
Inherited

This method is not documented.
Parameters
$name
$value
Return
wild

public function current()
Inherited

This method is not documented.
Return
wild

public function key()
Inherited

This method is not documented.
Return
wild

public function next()
Inherited

This method is not documented.
Return
wild

public function rewind()
Inherited

This method is not documented.
Return
wild

public function valid()
Inherited

This method is not documented.
Return
wild

private function throwOnAttemptedIteration()
Inherited

This method is not documented.
Return
wild

public function getPhobjectClassConstant($key, $byte_limit)
Inherited

Phobject

Read the value of a class constant.

This is the same as just typing self::CONSTANTNAME, but throws a more useful message if the constant is not defined and allows the constant to be limited to a maximum length.

Parameters
string$keyName of the constant.
int|null$byte_limitMaximum number of bytes permitted in the value.
Return
stringValue of the constant.

public function __construct($uri)

This method is not documented.
Parameters
string|PhutilURI$uri$uri
Return
this//Implicit.//

public function isSelf()

Check if the URI points to Phorge itself.

Return
bool

public function isAnchor()

Check whenever an URI is just a simple fragment without path and protocol.

Return
bool

public function isStartingWithSlash()

Check whenever an URI starts with a slash (no protocol, etc.)

Return
bool

public function __toString()

A sane default.

Return
wild

private function isStartingWithChar($char)

Check whenever the URI starts with the provided character.

Parameters
string$charString that MUST have length of 1.
Return
bool