class Illuminate / Console / Signals

Signals

Properties

protected

$registry Symfony\...\SignalRegistry

The signal registry instance.

Default: null
protected

$previousHandlers array>|null

The signal registry's previous list of handlers.

Default: null
protected static

$availabilityResolver callable|null

The current availability resolver, if any.

Default: null

Methods

public

__construct ( $registry ) : void

Create a new signal registrar instance.

Parameters

  • $registry Symfony\...\SignalRegistry
public

register ( $signal , $callback ) : void

Register a new signal handler.

Parameters

  • $signal int
  • $ callable
    void $callback
protected

initializeSignal ( $signal ) : array

Gets the signal's existing handler in array format.

public

unregister ( ) : void

Unregister the current signal handlers.

public static

whenAvailable ( $callback ) : void

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

Parameters

  • $callback callable
protected

getHandlers ( ) : array>

Get the registry's handlers.

protected

setHandlers ( $handlers ) : void

Set the registry's handlers.

Parameters

  • $handlers array>
public static

resolveAvailabilityUsing ( $resolver ) : void

Set the availability resolver.

Parameters

  • $ callable
    bool