|
static | _addEvent ($event, $call, $priority=0) |
| Adds events to the class. More...
|
|
static | _run ($event, $data) |
| Runs an event with call_user_func_array. More...
|
|
static | _debug ($string, $statement=null, $category=null) |
| Send messsages to the PtcDebug class if present. More...
|
|
static _addEvent |
( |
|
$event, |
|
|
|
$call, |
|
|
|
$priority = 0 |
|
) |
| |
|
staticprotected |
Adds events to the class.
- Parameters
-
string | $event | some name for the event |
mixed | $call | some valid callback |
numeric | $priority | the priority for the event |
Definition at line 180 of file PtcEvent.php.
static _debug |
( |
|
$string, |
|
|
|
$statement = null , |
|
|
|
$category = null |
|
) |
| |
|
staticprotected |
Send messsages to the PtcDebug class if present.
- Parameters
-
mixed | $string | the string to pass |
mixed | $statement | some statement if required |
string | $category | a category for the messages panel |
Definition at line 214 of file PtcEvent.php.
static _run |
( |
|
$event, |
|
|
|
$data |
|
) |
| |
|
staticprotected |
Runs an event with call_user_func_array.
- Parameters
-
string | $event | a valid callback |
mixed | $data | arguments for the event callbacks |
Definition at line 203 of file PtcEvent.php.
static fire |
( |
|
$event, |
|
|
|
$data |
|
) |
| |
|
static |
Fires an event.
See Firing Events
- Parameters
-
string | $event | the event name to fire |
array | $data | an array with the data you wish to pass to the listeners |
Definition at line 129 of file PtcEvent.php.
static getEvent |
( |
|
$name = null | ) |
|
|
static |
static getEvents |
( |
|
$name = null | ) |
|
|
static |
static listen |
( |
|
$event, |
|
|
|
$callback, |
|
|
|
$priority = 0 |
|
) |
| |
|
static |
Adds a listener to an event.
See Adding Event Listeners
- Parameters
-
string | $event | the event name, ex: "event.sub_event" |
mixed | $callback | a valid callback ( closure , function , class ) |
numeric | $priority | a numeric value, higher values will execute first |
- Returns
- true if event was added succefully, throws an error otherwise
Definition at line 37 of file PtcEvent.php.
static remove |
( |
|
$event, |
|
|
|
$key = null |
|
) |
| |
|
static |
Removes previously added event listeners.
See Removing Event Listeners
- Parameters
-
string | $event | the name of the event |
numeric | $key | the numeric key for the event |
Definition at line 91 of file PtcEvent.php.
Property that holds the events.
Definition at line 169 of file PtcEvent.php.
Property that holds the wildcards.
Definition at line 173 of file PtcEvent.php.
The documentation for this class was generated from the following file: