Signals
class Signals (View source)
| internal |
Properties
| protected SignalRegistry | $registry | The signal registry instance. |
|
| protected array<int, array<int, callable>>|null | $previousHandlers | The signal registry's previous list of handlers. |
|
| static protected callable(): bool|null | $availabilityResolver | The current availability resolver, if any. |
Methods
Create a new signal registrar instance.
Register a new signal handler.
Gets the signal's existing handler in array format.
Unregister the current signal handlers.
Execute the given callback if "signals" should be used and are available.
Get the registry's handlers.
Set the registry's handlers.
Set the availability resolver.
Details
void
__construct(SignalRegistry $registry)
Create a new signal registrar instance.
void
register(int $signal, callable(int $signal): void $callback)
Register a new signal handler.
protected array<int, callable(int $signal): void>|null
initializeSignal($signal)
Gets the signal's existing handler in array format.
void
unregister()
Unregister the current signal handlers.
static void
whenAvailable(callable $callback)
Execute the given callback if "signals" should be used and are available.
protected array<int, array<int, callable>>
getHandlers()
Get the registry's handlers.
protected void
setHandlers(array<int, array<int, callable(int $signal): void>> $handlers)
Set the registry's handlers.
static void
resolveAvailabilityUsing(callable(): bool $resolver)
Set the availability resolver.
Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.