Endpoint
Endpoint
Serializable endpoint reference for deferred task execution.
class Endpoint implements \JsonSerializableImplements: JsonSerializable
Properties
target
private $targetmethod
Method name to invoke on the endpoint target.
private string $methodType: string
Methods
__construct
public __construct(mixed $target, string $method): voidParameters
| Parameter | Type | Description |
|---|---|---|
$target | mixed | |
$method | string | The method name to call on the callable |
__toString
Returns a readable endpoint signature.
public __toString(): stringReturns: string
create
Creates an Endpoint instance from a callable or a string representation.
public create(null|array|\Closure|string|\stdClass $callable): ?selfReturns: self
Parameters
| Parameter | Type | Description |
|---|---|---|
$callable | null | array |
getName
Returns endpoint name in Class::method form.
public getName(): stringReturns: string
getTarget
Returns endpoint target object/class.
public getTarget(): object|stringReturns: object|string
getMethod
Returns endpoint method name.
public getMethod(): stringReturns: string
run
Executes the Endpoint's target method with the provided parameters.
public run(array $constructorArgs, mixed $params): mixedReturns: mixed
Parameters
| Parameter | Type | Description |
|---|---|---|
$constructorArgs | array | |
$params | mixed | Parameters to pass to the method |
toArray
Converts the Endpoint to an array representation.
public toArray(): arrayReturns: array
jsonSerialize
Converts the Endpoint to a JSON representation.
public jsonSerialize(): arrayReturns: array
getCallable
Retrieves the callable representation of the Endpoint.
public getCallable(): callableReturns: callable
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:17 +0000