Endpoint
Less than 1 minute
Endpoint
Properties
target
private $targetmethod
private string $methodMethods
__construct
public __construct(mixed $target, string $method): voidParameters
| Parameter | Type | Description |
|---|---|---|
$target | mixed | |
$method | string | The method name to call on the callable |
__toString
public __toString(): stringcreate
Creates an Endpoint instance from a callable or a string representation.
public create(mixed $callable): ?selfParameters
| Parameter | Type | Description |
|---|---|---|
$callable | mixed | A callable, a string in the format 'Class::method' or 'object->method', or a stdClass object |
getName
public getName(): stringgetTarget
public getTarget(): mixedgetMethod
public getMethod(): stringrun
Executes the Endpoint's target method with the provided parameters.
public run(array $constructorArgs, mixed $params): mixedParameters
| Parameter | Type | Description |
|---|---|---|
$constructorArgs | array | |
$params | mixed | Parameters to pass to the method |
toArray
Converts the Endpoint to an array representation.
public toArray(): voidjsonSerialize
Converts the Endpoint to a JSON representation.
public jsonSerialize(): voidgetCallable
Retrieves the callable representation of the Endpoint.
public getCallable(): voidGenerated by Hazaar API Doc Generator on Sun, 01 Mar 2026 09:22:26 +0000