Documentation

PathInterface extends UriComponentInterface
in

Table of Contents

Methods

__toString()  : string
Returns the instance string representation.
decoded()  : string
Returns the decoded path.
getUriComponent()  : string
Returns the instance string representation with its optional URI delimiters.
hasTrailingSlash()  : bool
Tells whether the path has a trailing slash.
isAbsolute()  : bool
Tells whether the path is absolute or relative.
jsonSerialize()  : string|null
Returns the instance json representation.
toString()  : string
Returns the instance string representation.
value()  : string|null
Returns the instance string representation.
withLeadingSlash()  : self
Returns an instance with a leading slash.
withoutDotSegments()  : self
Returns an instance without dot segments.
withoutLeadingSlash()  : self
Returns an instance without a leading slash.
withoutTrailingSlash()  : self
Returns an instance without a trailing slash.
withTrailingSlash()  : self
Returns an instance with a trailing slash.

Methods

__toString()

Returns the instance string representation.

public __toString() : string

If the instance is defined, the value returned MUST be percent-encoded, but MUST NOT double-encode any characters. To determine what characters to encode, please refer to RFC 3986, Sections 2 and 3.

If the instance is not defined, an empty string is returned

Return values
string

decoded()

Returns the decoded path.

public decoded() : string
Return values
string

getUriComponent()

Returns the instance string representation with its optional URI delimiters.

public getUriComponent() : string

The value returned MUST be percent-encoded, but MUST NOT double-encode any characters. To determine what characters to encode, please refer to RFC 3986, Sections 2 and 3.

If the instance is not defined, an empty string is returned

Return values
string

hasTrailingSlash()

Tells whether the path has a trailing slash.

public hasTrailingSlash() : bool
Return values
bool

isAbsolute()

Tells whether the path is absolute or relative.

public isAbsolute() : bool
Return values
bool

jsonSerialize()

Returns the instance json representation.

public jsonSerialize() : string|null

If the instance is defined, the value returned MUST be percent-encoded, but MUST NOT double-encode any characters. To determine what characters to encode, please refer to RFC 3986 or RFC 1738.

If the instance is not defined, null is returned

Return values
string|null

toString()

Returns the instance string representation.

public toString() : string

If the instance is defined, the value returned MUST be percent-encoded, but MUST NOT double-encode any characters. To determine what characters to encode, please refer to RFC 3986, Sections 2 and 3.

If the instance is not defined, an empty string is returned

Return values
string

value()

Returns the instance string representation.

public value() : string|null

If the instance is defined, the value returned MUST be percent-encoded, but MUST NOT double-encode any characters. To determine what characters to encode, please refer to RFC 3986, Sections 2 and 3.

If the instance is not defined null is returned

Return values
string|null

withLeadingSlash()

Returns an instance with a leading slash.

public withLeadingSlash() : self

This method MUST retain the state of the current instance, and return an instance that contains the path component with a leading slash

Tags
throws
SyntaxError

for invalid component or transformations that would result in a object in invalid state.

Return values
self

withoutDotSegments()

Returns an instance without dot segments.

public withoutDotSegments() : self

This method MUST retain the state of the current instance, and return an instance that contains the path component normalized by removing the dot segment.

Tags
throws
SyntaxError

for invalid component or transformations that would result in a object in invalid state.

Return values
self

withoutLeadingSlash()

Returns an instance without a leading slash.

public withoutLeadingSlash() : self

This method MUST retain the state of the current instance, and return an instance that contains the path component without a leading slash

Tags
throws
SyntaxError

for invalid component or transformations that would result in a object in invalid state.

Return values
self

withoutTrailingSlash()

Returns an instance without a trailing slash.

public withoutTrailingSlash() : self

This method MUST retain the state of the current instance, and return an instance that contains the path component without a trailing slash

Tags
throws
SyntaxError

for invalid component or transformations that would result in a object in invalid state.

Return values
self

withTrailingSlash()

Returns an instance with a trailing slash.

public withTrailingSlash() : self

This method MUST retain the state of the current instance, and return an instance that contains the path component with a trailing slash

Tags
throws
SyntaxError

for invalid component or transformations that would result in a object in invalid state.

Return values
self

        
On this page

Search results