Endpoint
Less than 1 minute
Endpoint
Properties
target
private $target
method
private string $method
params
private array $params
Methods
__construct
public __construct(mixed $target, string $method, array $params): void
Parameters
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): ?self
Parameters
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(): string
getTarget
public getTarget(): mixed
getMethod
public getMethod(): string
getParams
Retrieves the parameters associated with the endpoint.
public getParams(): void
setParams
Sets the parameters for the Endpoint.
public setParams(array $params): void
Parameters
Parameter | Type | Description |
---|---|---|
$params | array |
run
public run(mixed $constructorArgs): mixed
Parameters
Parameter | Type | Description |
---|---|---|
$constructorArgs | mixed |
toArray
Converts the Endpoint to an array representation.
public toArray(): void
jsonSerialize
Converts the Endpoint to a JSON representation.
public jsonSerialize(): void
Generated by Hazaar API Doc Generator on Wed, 25 Jun 2025 06:07:12 +0000