Class - XPSPL\Handle

A handle is the function which will execute upon a signal call.

Though attached to a signal the object itself contains no information on what a signal even is, it is possible to couple it within the object, but the handle will unknownly receive an event which contains the same.

As of v0.3.0 handles are now designed with an exhausting of 1 by default, this is done under the theory that any handle which is registered is done so to run at least once, otherwise it wouldn’t exist.

Methods

__construct

__construct($function[, $exhaust = 1[, $priority = false]])

Constructs a new handle object.

Parameters:
  • mixed – A callable php variable.
  • integer – Count to set handle exhaustion.
  • null|integer – Priority of the handle.
Return type:

void

decrement_exhaust

decrement_exhaust()

Decrements the exhaustion counter.

Return type:void

exhaustion

exhaustion()

Returns count until handle becomes exhausted

Return type:integer

is_exhausted

is_exhausted()

Determines if the handle has exhausted.

Return type:boolean

get_priority

get_priority()

Returns the priority of the handle.

Return type:integer

get_function

get_function()

Returns the function for the handle.

Return type:closure|array

set_exhaust

set_exhaust($rate)

Sets the handle exhaust rate.

Parameters:integer – Exhaust rate
Return type:void

set_priority

set_priority($priority)

Sets the handle priority.

Parameters:integer – Integer Priority
Return type:void

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

Project Versions

Table Of Contents

Previous topic

Class - XPSPL\Event

Next topic

Class - XPSPL\Idle

This Page