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.

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.

Parameters

SignalRegistry $registry

Return Value

void

void register(int $signal, $callback)

Register a new signal handler.

Parameters

int $signal
$callback

Return Value

void

protected initializeSignal($signal)

Gets the signal's existing handler in array format.

Parameters

$signal

unregister()

Unregister the current signal handlers.

static void whenAvailable(callable $callback)

Execute the given callback if "signals" should be used and are available.

Parameters

callable $callback

Return Value

void

protected array<int,array<int,callable>> getHandlers()

Get the registry's handlers.

Return Value

array<int,array<int,callable>>

protected void setHandlers($handlers)

Set the registry's handlers.

Parameters

$handlers

Return Value

void

static resolveAvailabilityUsing($resolver)

No description

Parameters

$resolver