Beispiel #1
0
 /**
  * @param $method
  *
  * @return array
  */
 private function get_log_count($method)
 {
     $args = array();
     $args['select'] = 'COUNT(*)';
     $args['method'] = $method;
     return $this->log->find($args);
 }
 /**
  * @return array
  */
 private function get_log_items()
 {
     $args = array();
     $args['offset'] = ($this->get_pagenum() - 1) * $this->per_page;
     $args['limit'] = $this->per_page;
     if (isset($_GET['s'])) {
         $args['email'] = sanitize_text_field($_GET['s']);
     }
     if (isset($_GET['view']) && $_GET['view'] !== 'all') {
         $args['type'] = sanitize_text_field($_GET['view']);
     }
     if (isset($_GET['orderby'])) {
         $args['orderby'] = sanitize_text_field($_GET['orderby']);
     }
     if (isset($_GET['order'])) {
         $args['order'] = sanitize_text_field($_GET['order']);
     }
     return $this->log->find($args);
 }
 /**
  * @return array
  */
 public function get_logs()
 {
     return $this->logger->find($this->log_filter);
 }