ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilMailLuceneQueryParser.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
26 {
27  protected array $fields = [];
28 
29  public function parse(): void
30  {
31  if ($this->getFields()) {
32  $queried_fields = [];
33  foreach ($this->getFields() as $field => $status) {
34  if ($status) {
35  $queried_fields[] = $field . ':' . $this->query_string;
36  }
37  }
38 
39  if ($queried_fields) {
40  $this->parsed_query = implode(' OR ', $queried_fields);
41  } else {
42  $this->parsed_query = $this->query_string;
43  }
44  } else {
45  $this->parsed_query = $this->query_string;
46  }
47  }
48 
49  public function setFields(array $fields): void
50  {
51  $this->fields = $fields;
52  }
53 
54  public function getFields(): array
55  {
56  return $this->fields;
57  }
58 }
$errors fields
Definition: imgupload.php:67