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 | $availabilityResolver |
Methods
void
__construct(SignalRegistry $registry)
Create a new signal registrar instance.
void
register(int $signal, $callback)
Register a new signal handler.
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.
array<int,array<int,callable>>
getHandlers()
Get the registry's handlers.
void
setHandlers($handlers)
Set the registry's handlers.
static
resolveAvailabilityUsing($resolver)
No description
Details
void
__construct(SignalRegistry $registry)
Create a new signal registrar instance.
void
register(int $signal, $callback)
Register a new signal handler.
protected
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($handlers)
Set the registry's handlers.
static
resolveAvailabilityUsing($resolver)
No description