ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilMailLuceneSearcher Class Reference
+ Collaboration diagram for ilMailLuceneSearcher:

Public Member Functions

 __construct (ilLuceneQueryParser $query_parser, ilMailSearchResult $result)
 
 search (int $user_id, int $mail_folder_id)
 

Protected Attributes

ilLuceneQueryParser $query_parser
 
ilMailSearchResult $result
 
ilSetting $settings
 

Detailed Description

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de

Definition at line 25 of file class.ilMailLuceneSearcher.php.

Constructor & Destructor Documentation

◆ __construct()

ilMailLuceneSearcher::__construct ( ilLuceneQueryParser  $query_parser,
ilMailSearchResult  $result 
)

Definition at line 31 of file class.ilMailLuceneSearcher.php.

References $DIC, $query_parser, $result, and ILIAS\Repository\settings().

32  {
33  global $DIC;
34  $this->settings = $DIC->settings();
35  $this->query_parser = $query_parser;
36  $this->result = $result;
37  }
global $DIC
Definition: feed.php:28
ilLuceneQueryParser $query_parser
+ Here is the call graph for this function:

Member Function Documentation

◆ search()

ilMailLuceneSearcher::search ( int  $user_id,
int  $mail_folder_id 
)

Definition at line 39 of file class.ilMailLuceneSearcher.php.

References Vendor\Package\$e, $xml, CLIENT_ID, ilRpcClientFactory\factory(), ilLoggerFactory\getLogger(), and ILIAS\Repository\settings().

39  : void
40  {
41  if (!$this->query_parser->getQuery()) {
42  throw new ilException('mail_search_query_missing');
43  }
44 
45  try {
46  $xml = ilRpcClientFactory::factory('RPCSearchHandler')->searchMail(
47  CLIENT_ID . '_' . $this->settings->get('inst_id', '0'),
48  $user_id,
49  $this->query_parser->getQuery(),
50  $mail_folder_id
51  );
52  } catch (Exception $e) {
53  ilLoggerFactory::getLogger('mail')->critical($e->getMessage());
54  throw $e;
55  }
56 
57  $parser = new ilMailSearchLuceneResultParser($this->result, $xml);
58  $parser->parse();
59  }
static getLogger(string $a_component_id)
Get component logger.
static factory(string $a_package, int $a_timeout=0)
Creates an ilRpcClient instance to our ilServer.
const CLIENT_ID
Definition: constants.php:41
$xml
Definition: metadata.php:351
+ Here is the call graph for this function:

Field Documentation

◆ $query_parser

ilLuceneQueryParser ilMailLuceneSearcher::$query_parser
protected

Definition at line 27 of file class.ilMailLuceneSearcher.php.

Referenced by __construct().

◆ $result

ilMailSearchResult ilMailLuceneSearcher::$result
protected

Definition at line 28 of file class.ilMailLuceneSearcher.php.

Referenced by __construct().

◆ $settings

ilSetting ilMailLuceneSearcher::$settings
protected

Definition at line 29 of file class.ilMailLuceneSearcher.php.


The documentation for this class was generated from the following file: