Segment
class Segment
Represents a segment in a resource template. This is used internally by RelativeResourceTemplate, but is not intended for public use and may change without notice.
Constants
LITERAL_SEGMENT |
|
WILDCARD_SEGMENT |
|
DOUBLE_WILDCARD_SEGMENT |
|
VARIABLE_SEGMENT |
|
Methods
__construct(int $segmentType, string|null $value = null, string|null $key = null, RelativeResourceTemplate $template = null)
Segment constructor.
string
__toString()
No description
bindTo(string $value)
Checks if $value matches the current segment, and creates a new literal Segment with value equal to $value. If $value does not match the current Segment, throws a ValidationException.
bool
matches(string $value)
Checks if $value matches this Segment.
int
getSegmentType()
No description
string|null
getKey()
No description
string|null
getValue()
No description
getTemplate()
No description
Details
at line 72
__construct(int $segmentType, string|null $value = null, string|null $key = null, RelativeResourceTemplate $template = null)
Segment constructor.
at line 102
string
__toString()
at line 115
Segment
bindTo(string $value)
Checks if $value matches the current segment, and creates a new literal Segment with value equal to $value. If $value does not match the current Segment, throws a ValidationException.
at line 134
bool
matches(string $value)
Checks if $value matches this Segment.