code: public function handleEvent($eventName, array $params)
      {
          if (method_exists($this, $eventName)) {
              call_user_func_array(array($this, $eventName), $params);
          }
      }
docs: Handles an event that was triggered by Pico
  
  @param string $eventName Name of the Pico event
  @param array $params Event parameters