src/Event.php
public function trigger($event, $data = null) {
		$event = strtolower(trim($event));
		if (!isset($this->_events[$event])) return $data;

		foreach ($this->_events[$event] as $callback) {
			// we don't want to affect the data if someone forgets to return the original data in his callback. 
			$result = call_user_func($callback, $event, $data);
			if ($result !== null) $data = $result;
		}

		return $data;
	}
public function trigger($event, $data = null) {
		$event = strtolower(trim($event));
		if (!isset($this->_events[$event])) return $data;

		foreach ($this->_events[$event] as $callback) {
			// we don't want to affect the data if someone forgets to return the original data in his callback. 
			$result = call_user_func($callback, $event, $data);
			if ($result !== null) $data = $result;
		}

		return $data;
	}
public function trigger ( $ event , $ data = null ) { $ event = strtolower ( trim ( $ event ) ) ; if ( ! isset ( $ this -> _events [ $ event ] ) ) return $ data ; foreach ( $ this -> _events [ $ event ] as $ callback ) { // we don't want to affect the data if someone forgets to return the original data in his callback.  $ result = call_user_func ( $ callback , $ event , $ data ) ; if ( $ result !== null ) $ data = $ result ; } return $ data ; }
Triggers an event.
@param  string  $event The case insensitive event name that should be triggered.
@param  mixed $data The data that should be passed to one or many callbacks.
@return mixed $data The data that was changed by one or many callbacks.
Triggers an event .