Closure
Less than 1 minute
Closure
The Hazaar Closure Class.
This class is a wrapper around PHP's Closure class that allows for the serialization of closures. This is useful for storing closures in a database or transmitting them over a network.
Properties
public $
public $
code
private string $code
Methods
__construct
public __construct(\stdClass $function): void
Parameters
Parameter | Type | Description |
---|---|---|
$function | \stdClass |
__invoke
public __invoke(): mixed
__toString
public __toString(): string
__sleep
public __sleep(): void
__wakeup
public __wakeup(): void
getClosure
public getClosure(): void
getCode
public getCode(): string
loadCodeFromString
public loadCodeFromString(string $string): void
Parameters
Parameter | Type | Description |
---|---|---|
$string | string |
getParameters
public getParameters(): void
jsonSerialize
public jsonSerialize(): void
fetchCode
protected fetchCode(): string
Generated by Hazaar API Doc Generator