Endpoint
Less than 1 minute
Endpoint
Properties
target
private $targetmethod
private string $methodparams
private array $paramsMethods
__construct
public __construct(mixed $target, string $method, array $params): voidParameters
| Parameter | Type | Description |
|---|---|---|
$target | mixed | |
$method | string | The method name to call on the callable |
$params | array | Parameters to pass to the method |
create
Creates an Endpoint instance from a callable or a string representation.
public create(mixed $callable, array $params): ?selfParameters
| Parameter | Type | Description |
|---|---|---|
$callable | mixed | A callable, a string in the format 'Class::method' or 'object->method', or a stdClass object |
$params | array | Parameters to pass to the method |
getName
public getName(): stringgetTarget
public getTarget(): mixedgetMethod
public getMethod(): stringgetParams
Retrieves the parameters associated with the endpoint.
public getParams(): voidsetParams
Sets the parameters for the Endpoint.
public setParams(array $params): voidParameters
| Parameter | Type | Description |
|---|---|---|
$params | array |
run
public run(mixed $constructorArgs): mixedParameters
| Parameter | Type | Description |
|---|---|---|
$constructorArgs | mixed |
toArray
Converts the Endpoint to an array representation.
public toArray(): voidjsonSerialize
Converts the Endpoint to a JSON representation.
public jsonSerialize(): voidGenerated by Hazaar API Doc Generator on Mon, 27 Oct 2025 13:01:29 +0000