ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilMailLuceneSearcher Class Reference
+ Collaboration diagram for ilMailLuceneSearcher:

Public Member Functions

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

Protected Attributes

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 ( protected ilLuceneQueryParser  $query_parser,
protected ilMailSearchResult  $result 
)

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

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

30  {
31  global $DIC;
32  $this->settings = $DIC->settings();
33  }
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

Member Function Documentation

◆ search()

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

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

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

35  : void
36  {
37  if ($this->query_parser->getQuery() === '') {
38  throw new ilMailException('mail_search_query_missing');
39  }
40 
41  try {
42  $xml = ilRpcClientFactory::factory('RPCSearchHandler')->searchMail(
43  CLIENT_ID . '_' . $this->settings->get('inst_id', '0'),
44  $user_id,
45  $this->query_parser->getQuery(),
46  $mail_folder_id
47  );
48  } catch (Exception $e) {
49  ilLoggerFactory::getLogger('mail')->critical($e->getMessage());
50  throw $e;
51  }
52 
53  $parser = new ilMailSearchLuceneResultParser($this->result, $xml);
54  $parser->parse();
55  }
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
+ Here is the call graph for this function:

Field Documentation

◆ $settings

ilSetting ilMailLuceneSearcher::$settings
protected

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


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