english/libraries/joomla/event/dispatcher.php
/**
	 * Registers an event handler to the event dispatcher
	 *
	 * @param   string   $event    Name of the event to register handler for
	 * @param   string   $handler  Name of the event handler
	 *
	 * @return  void
	 * @since   11.1
	 */
Registers an event handler to the event dispatcher
@param   string   $event    Name of the event to register handler for
@param   string   $handler  Name of the event handler


Registers an event handler to the event dispatcher @param string $event Name of the event to register handler for @param string $handler Name of the event handler
public function register($event, $handler)
	{
				if (function_exists($handler))
		{
			$method = array('event' => $event, 'handler' => $handler);
			$this->attach($method);
		}
		elseif (class_exists($handler))
		{
			$this->attach(new $handler($this));
		}
		else
		{
			JError::raiseWarning('SOME_ERROR_CODE', JText::sprintf('JLIB_EVENT_ERROR_DISPATCHER', $handler));
		}
	}
public function register ( $ event , $ handler ) { if ( function_exists ( $ handler ) ) { $ method = array ( 'event' => $ event , 'handler' => $ handler ) ; $ this -> attach ( $ method ) ; } elseif ( class_exists ( $ handler ) ) { $ this -> attach ( new $ handler ( $ this ) ) ; } else { JError :: raiseWarning ( 'SOME_ERROR_CODE' , JText :: sprintf ( 'JLIB_EVENT_ERROR_DISPATCHER' , $ handler ) ) ; } }
Registers an event handler to the event dispatcher
 @param   string   $event    Name of the event to register handler for
 @param   string   $handler  Name of the event handler
Registers an event handler to the event dispatcher @param string $event Name of the event to register handler for @param string $handler Name of the event handler
// Are we dealing with a class or function type handler?
 // Ok, function type event handler... let's attach it. // Ok, class type event handler... let's instantiate and attach it.