original_string: public function get_events_select($selectwhere, array $params, $sort, $limitfrom, $limitnum) {
          if (!$this->init()) {
              return array();
          }
  
          if (!$dbtable = $this->get_config('dbtable')) {
              return array();
          }
  
          $sort = self::tweak_sort_by_id($sort);
  
          $events = array();
          $records = $this->extdb->get_records_select($dbtable, $selectwhere, $params, $sort, '*', $limitfrom, $limitnum);
  
          foreach ($records as $data) {
              if ($event = $this->get_log_event($data)) {
                  $events[$data->id] = $event;
              }
          }
  
          return $events;
      }
code: public function get_events_select($selectwhere, array $params, $sort, $limitfrom, $limitnum) {
          if (!$this->init()) {
              return array();
          }
  
          if (!$dbtable = $this->get_config('dbtable')) {
              return array();
          }
  
          $sort = self::tweak_sort_by_id($sort);
  
          $events = array();
          $records = $this->extdb->get_records_select($dbtable, $selectwhere, $params, $sort, '*', $limitfrom, $limitnum);
  
          foreach ($records as $data) {
              if ($event = $this->get_log_event($data)) {
                  $events[$data->id] = $event;
              }
          }
  
          return $events;
      }
code_tokens: public function get_events_select ( $ selectwhere , array $ params , $ sort , $ limitfrom , $ limitnum ) { if ( ! $ this -> init ( ) ) { return array ( ) ; } if ( ! $ dbtable = $ this -> get_config ( 'dbtable' ) ) { return array ( ) ; } $ sort = self :: tweak_sort_by_id ( $ sort ) ; $ events = array ( ) ; $ records = $ this -> extdb -> get_records_select ( $ dbtable , $ selectwhere , $ params , $ sort , '*' , $ limitfrom , $ limitnum ) ; foreach ( $ records as $ data ) { if ( $ event = $ this -> get_log_event ( $ data ) ) { $ events [ $ data -> id ] = $ event ; } } return $ events ; }
docstring: Get an array of events based on the passed on params.
  
  @param string $selectwhere select conditions.
  @param array $params params.
  @param string $sort sortorder.
  @param int $limitfrom limit constraints.
  @param int $limitnum limit constraints.
  
  @return array|\core\event\base[] array of events.
docstring_tokens: Get an array of events based on the passed on params .