public function on($event, $handler)
{
list($componentId, $eventName) = explode('.', $event, 2);
$component = $this->getComponent($componentId);
// Normalize the event name
if (strncmp($eventName, 'on', 2) !== 0) {
$eventName = 'on' . ucfirst($eventName);
}
$component->{$eventName} = $handler;
}