Endpoint
in package
Define common HTTP REST endpoint object
This class represents a REST interface endpoint with properties for path as well as the linked widget.
Tags
Table of Contents
- $ : string
- $ : array<string|int, string>|string
- $ : bool
- $ : bool
- $ : string
- $ : string
- $ : array<string|int, mixed>
- $ : array<string|int, mixed>
- $ : mixed|null
- $_matches : array<string|int, mixed>|null
- Buffer for matches
- $data : array<string|int, mixed>
- $includePath : string|null
- Include path to widget
- $name : string
- Name of the widget
- __construct() : mixed
- Endpoint constructor.
- __get() : mixed|null
- Magic getter function
- Callback() : string
- Get the callback function directly
- IncludePath() : string
- Get path Get the absolute include path
- Matches() : mixed
- List of found matching groups in endpoint url
- Method() : string
- Get the method name
- Name() : string
- Get the name directly
- NamedSegment() : mixed|null
- Get a named request path
- NamedSegments() : array<string|int, mixed>|null
- Get the segments
- ProvideWidget() : Result
- Provide widget
- Regex() : string
- Get the regular expression matcher
- ToPlainObject() : stdClass
- Convert to class
Properties
$
public
string
$
callback
$
public
array<string|int, string>|string
$
description
$
public
bool
$
is_named_matcher
$
public
bool
$
active
$
public
string
$
regex
$
public
string
$
method
$
public
array<string|int, mixed>
$
responses
$
public
array<string|int, mixed>
$
named_arguments
$
public
mixed|null
$
_regex
$_matches
Buffer for matches
private
array<string|int, mixed>|null
$_matches
= null
$data
private
array<string|int, mixed>
$data
The storage
$includePath
Include path to widget
private
string|null
$includePath
$name
Name of the widget
private
string
$name
= ''
Methods
__construct()
Endpoint constructor.
public
__construct(string $name, string $include, array<string|int, mixed> $entry) : mixed
Create a new endpoint object and resolve the named endpoint arguments on the fly
Parameters
- $name : string
-
The endpoint name
- $include : string
-
The absolute include path
- $entry : array<string|int, mixed>
-
The raw array from endpoint item entry
Return values
mixed —__get()
Magic getter function
public
__get(string $name) : mixed|null
Parameters
- $name : string
-
The value name
Return values
mixed|null —Callback()
Get the callback function directly
public
Callback() : string
Return values
string —IncludePath()
Get path Get the absolute include path
public
IncludePath() : string
Return values
string —The absolute include path
Matches()
List of found matching groups in endpoint url
public
Matches( $matches) : mixed
Parameters
Return values
mixed —Method()
Get the method name
public
Method() : string
Return values
string —Name()
Get the name directly
public
Name() : string
Return values
string —NamedSegment()
Get a named request path
public
NamedSegment( $name) : mixed|null
Parameters
Return values
mixed|null —NamedSegments()
Get the segments
public
NamedSegments() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null —ProvideWidget()
Provide widget
public
ProvideWidget() : Result
Provide a widget instance
Return values
Result —A result object with widget instance
Regex()
Get the regular expression matcher
public
Regex([bool $original = false ]) : string
Parameters
- $original : bool = false
Return values
string —ToPlainObject()
Convert to class
public
ToPlainObject() : stdClass