ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilMailLuceneSearcher.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
24
25 public function __construct(protected ilLuceneQueryParser $query_parser, protected ilMailSearchResult $result)
26 {
27 global $DIC;
28 $this->settings = $DIC->settings();
29 }
30
31 public function search(int $user_id, int $mail_folder_id): void
32 {
33 if ($this->query_parser->getQuery() === '') {
34 throw new ilMailException('mail_search_query_missing');
35 }
36
37 try {
38 $xml = ilRpcClientFactory::factory('RPCSearchHandler')->searchMail();
39 } catch (Exception $e) {
40 ilLoggerFactory::getLogger('mail')->critical($e->getMessage());
41 throw $e;
42 }
43
44 $parser = new ilMailSearchLuceneResultParser($this->result, $xml);
45 $parser->parse();
46 }
47}
static getLogger(string $a_component_id)
Get component logger.
__construct(protected ilLuceneQueryParser $query_parser, protected ilMailSearchResult $result)
search(int $user_id, int $mail_folder_id)
static factory(string $a_package, int $a_timeout=0)
Creates an ilRpcClient instance to our ilServer.
ILIAS Setting Class.
global $DIC
Definition: shib_login.php:26