Class \Prado\Util\Behaviors\TApplicationSignals
TApplicationSignals class.
This behavior installs the TSignalsDispatcher (or subclass) for the application when PHP pcntl_* is available. The signals dispatcher class can be specified with self::setSignalsClass() and is installed when the TApplicationSignals behavior is attached to the TApplication owner.
There is a TSignalsDispatcher getter self::getSignalsDispatcher added to the owner (TApplication) for retrieving the dispatcher.
There are two properties of TApplicationSignals for TSignalsDispatcher. self::setAsyncSignals changes how signals are handled. When synchronous, TSignalsDispatcher::syncDispatch() must be called for signals to be processed. When asynchronous, the signals will be handled by atomic interrupt.
<behavior name="appSignals" AttachToClass="Prado\TApplication" class="Prado\Util\Behaviors\TApplicationSignals" PriorHandlerPriority="5" />
Class hierarchy
- \Prado\Util\Behaviors\TApplicationSignals
- \Prado\Util\TBehavior implements IBehavior
- \Prado\Util\TBaseBehavior implements IBaseBehavior uses TPriorityPropertyTrait
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 4.3.0
public
|
|
public
|
getPriorHandlerPriority() : float|null
When the original signal handlers are placed into the Signals Events this is the
priority of original signal handlers.
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
protected
|
attachEventHandlers(TComponent $component) : bool
Attaches the TSignalsDispatcher to handle the process signals.
|
protected
|
detachEventHandlers(TComponent $component) : bool
Detaches the TSignalsDispatcher from handling the process signals.
|
\Prado\TApplicationComponent::FX_CACHE_FILE, \Prado\TComponent::GLOBAL_RAISE_EVENT_LISTENER |