english/libraries/joomla/event/dispatcher.php
/**
	 * Triggers an event by dispatching arguments to all observers that handle
	 * the event and returning their return values.
	 *
	 * @param   string   $event  The event to trigger.
	 * @param   array    $args   An array of arguments.
	 *
	 * @return  array  An array of results from each function call.
	 *
	 * @since   11.1
	 */
Triggers an event by dispatching arguments to all observers that handle
the event and returning their return values.

@param   string   $event  The event to trigger.
@param   array    $args   An array of arguments.

@return  array  An array of results from each function call.


Triggers an event by dispatching arguments to all observers that handle the event and returning their return values . @param string $event The event to trigger . @param array $args An array of arguments . @return array An array of results from each function call .
public function trigger($event, $args = array())
	{
		$result = array();
		$args = (array)$args;
		$event = strtolower($event);
		if (!isset($this->_methods[$event]) || empty($this->_methods[$event])) {
			return $result;
		}
		foreach ($this->_methods[$event] AS $key)
		{
			if (!isset($this->_observers[$key])) {
				continue;
			}
			if (is_object($this->_observers[$key])) {
				$args['event'] = $event;
				$value = $this->_observers[$key]->update($args);
			}
			elseif (is_array($this->_observers[$key])) {
				$value = call_user_func_array($this->_observers[$key]['handler'], $args);
			}
			if (isset($value)) {
				$result[] = $value;
			}
		}
		return $result;
	}
public function trigger ( $ event , $ args = array ( ) ) { $ result = array ( ) ; $ args = ( array ) $ args ; $ event = strtolower ( $ event ) ; if ( ! isset ( $ this -> _methods [ $ event ] ) || empty ( $ this -> _methods [ $ event ] ) ) { return $ result ; } foreach ( $ this -> _methods [ $ event ] AS $ key ) { if ( ! isset ( $ this -> _observers [ $ key ] ) ) { continue ; } if ( is_object ( $ this -> _observers [ $ key ] ) ) { $ args [ 'event' ] = $ event ; $ value = $ this -> _observers [ $ key ] -> update ( $ args ) ; } elseif ( is_array ( $ this -> _observers [ $ key ] ) ) { $ value = call_user_func_array ( $ this -> _observers [ $ key ] [ 'handler' ] , $ args ) ; } if ( isset ( $ value ) ) { $ result [ ] = $ value ; } } return $ result ; }
Triggers an event by dispatching arguments to all observers that handle
 the event and returning their return values.
Triggers an event by dispatching arguments to all observers that handle the event and returning their return values .
// Initialise variables. /*
		 * If no arguments were passed, we still need to pass an empty array to
		 * the call_user_func_array function.
		 */ // Check if any plugins are attached to the event. // No Plugins Associated To Event! // Loop through all plugins having a method matching our event // Check if the plugin is present. // Fire the event for an object based observer. // Fire the event for a function based observer.