original_string: public static function load($param) {
          global $DB;
          if (is_object($param)) {
              $event = new calendar_event($param);
          } else {
              $event = $DB->get_record('event', array('id' => (int)$param), '*', MUST_EXIST);
              $event = new calendar_event($event);
          }
          return $event;
      }
code: public static function load($param) {
          global $DB;
          if (is_object($param)) {
              $event = new calendar_event($param);
          } else {
              $event = $DB->get_record('event', array('id' => (int)$param), '*', MUST_EXIST);
              $event = new calendar_event($event);
          }
          return $event;
      }
code_tokens: public static function load ( $ param ) { global $ DB ; if ( is_object ( $ param ) ) { $ event = new calendar_event ( $ param ) ; } else { $ event = $ DB -> get_record ( 'event' , array ( 'id' => ( int ) $ param ) , '*' , MUST_EXIST ) ; $ event = new calendar_event ( $ event ) ; } return $ event ; }
docstring: Returns an event object when provided with an event id.
  
  This function makes use of MUST_EXIST, if the event id passed in is invalid
  it will result in an exception being thrown.
  
  @param int|object $param event object or event id
  @return calendar_event
docstring_tokens: Returns an event object when provided with an event id .