Lines Matching refs:type
11 * @param String $type name of the event to dispatch
13 function add_event($type) { argument
14 $this->_callbacks[$type] = array();
17 function add_observer($type, $callback) { argument
18 $this->_check_event_type($type);
19 $this->_callbacks[$type][] = $callback;
22 function fire($type, $params) { argument
23 $this->_check_event_type($type);
25 foreach ($this->_callbacks[$type] as $callback) {
30 function _check_event_type($type) { argument
31 if (!isset($this->_callbacks[$type])) {
32 die(sprintf("Invalid event type: %s", $type));