Function - signal

signal

signal($signal, $callable)

Creates a new signal handler.

Parameters:
  • string|integer|object – Signal to attach the handle.
  • object – Callable
Return type:

object|boolean Handle, boolean if error

Function - null_exhaust

null_exhaust

null_exhaust($handle)

Creates a never exhausting signal handler.

Parameters:callable|handle – PHP Callable or XPSPLHandle object.
Return type:object Handle

Function - high_priority

high_priority

high_priority($handle)

Creates or sets a handle with high priority.

Parameters:callable|handle – PHP Callable or XPSPLHandle object.
Return type:object Handle

Function - low_priority

low_priority

low_priority($handle)

Creates or sets a handle with low priority.

Parameters:callable|handle – PHP Callable or XPSPLHandle object.
Return type:object Handle

Function - priority

priority

priority($handle, $priority)

Sets a handle priority.

Parameters:
  • callable|handle – PHP Callable or XPSPLHandle object.
  • integer – Priority
Return type:

object Handle

Function - remove_handle

remove_handle

remove_handle($signal, $handle)

Remove a sig handler.

Parameters:
  • string|integer|object – Signal handle is attached to.
  • object – Handle instance.
Return type:

void

Function - emit

emit

emit($signal[, $event = false])

Signals an event.

Parameters:
  • string|integer|object – Signal or a signal instance.
  • array – Array of variables to pass the handles.
  • object – Event
Return type:

object XPSPLEvent

Function - signal_history

signal_history

signal_history()

Returns the signal history.

Return type:array

Function - register_signal

register_signal

register_signal($signal)

Registers a signal in the processor.

Parameters:string|integer|object – Signal
Return type:object Queue

Function - search_signals

search_signals

search_signals($signal[, $index = false])

Searches for a signal in storage returning its storage node if found, optionally the index can be returned.

Parameters:
  • string|int|object – Signal to search for.
  • boolean – Return the index of the signal.
Return type:

null|array [signal, queue]

Function - loop

loop

loop()

Starts the XPSPL loop.

Return type:void

Function - shutdown

shutdown

shutdown()

Sends the loop the shutdown signal.

Return type:void

Function - import

import

import($name[, $dir = false])

Import a module.

Parameters:
  • string – Module name.
  • string|null – Location of the module.
Return type:

void

Function - before

before

before($signal, $handle)

Registers a function to interrupt the signal stack before a signal fires, allowing for manipulation of the event before it is passed to handles.

Parameters:
  • string|object – Signal instance or class name
  • object – Handle to execute
Return type:

boolean True|False false is failure

Function - after

after

after($signal, $handle)

Registers a function to interrupt the signal stack after a signal fires. allowing for manipulation of the event after it is passed to handles.

Parameters:
  • string|object – Signal instance or class name
  • object – Handle to execute
Return type:

boolean True|False false is failure

Function - XPSPL

XPSPL

XPSPL()

Returns the XPSPL processor.

Return type:object XPSPLProcessor

Function - clean

clean

clean([$history = false])

Cleans any exhausted signal queues from the processor.

Parameters:boolean – Erase any history of the signals cleaned.
Return type:void

Function - delete_signal

delete_signal

delete_signal($signal[, $history = false])

Delete a signal from the processor.

Parameters:
  • string|object|int – Signal to delete.
  • boolean – Erase any history of the signal.
Return type:

boolean

Function - erase_signal_history

erase_signal_history

erase_signal_history($signal)

Erases any history of a signal.

Parameters:string|object – Signal to be erased from history.
Return type:void

Function - disable_signaled_exceptions

disable_signaled_exceptions

disable_signaled_exceptions([$history = false])

Disables the exception handler.

Parameters:boolean – Erase any history of exceptions signaled.
Return type:void

Function - erase_history

erase_history

erase_history()

Cleans out the entire event history.

Return type:void

Function - save_signal_history

save_signal_history

save_signal_history($flag)

Sets the flag for storing the event history.

Parameters:boolean
Return type:void

Function - listen

listen

listen($listener)

Registers a new event listener object in the processor.

Parameters:object – The event listening object
Return type:void

Function - dir_include

dir_include

dir_include($dir[, $listen = false[, $path = false]])

Performs a inclusion of the entire directory content, including subdirectories, with the option to start a listener once the file has been included.

Parameters:
  • string – Directory to include.
  • boolean – Start listeners.
  • string – Path to ignore when starting listeners.
Return type:

void

Function - current_signal

current_signal

current_signal([$offset = false])

Returns the current signal in execution.

Parameters:integer – In memory hierarchy offset +/-.
Return type:object

Function - current_event

current_event

current_event([$offset = false])

Returns the current event in execution.

Parameters:integer – In memory hierarchy offset +/-.
Return type:object

Function - on_shutdown

on_shutdown

on_shutdown($function)

Call the provided function on processor shutdown.

Parameters:callable|object – Function or handle object
Return type:object XPSPLHandle

Function - on_start

on_start

on_start($function)

Call the provided function on processor start.

Parameters:callable|object – Function or handle object
Return type:object XPSPLHandle

Function - XPSPL_flush

XPSPL_flush

XPSPL_flush()

Empties the storage, history and clears the current state.

Return type:void

Last updated on 02/01/13 07:27am