ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
class.ilMailSearchLuceneResultParser.php
Go to the documentation of this file.
1
<?
php
2
/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
9
class
ilMailSearchLuceneResultParser
10
{
14
protected
$result
;
15
19
protected
$xml
;
20
25
public
function
__construct
(
ilMailSearchResult
$result
,
$xml
)
26
{
27
$this->result =
$result
;
28
$this->xml =
$xml
;
29
}
30
34
public
function
getXml
()
35
{
36
return
$this->xml
;
37
}
38
42
public
function
getResult
()
43
{
44
return
$this->result
;
45
}
46
50
public
function
parse
()
51
{
52
if
(!strlen($this->
getXml
())) {
53
return
;
54
}
55
56
$hits =
new
SimpleXMLElement
($this->
getXml
());
57
foreach
($hits->children() as
$user
) {
58
foreach
(
$user
->children() as $item) {
62
$fields = array();
63
foreach
($item->children() as $field) {
67
$name
= (string) $field[
'name'
];
68
$content = (string) $field;
69
$fields[] = array(
70
$name
, $content
71
);
72
}
73
$this->
getResult
()->addItem((
int
) $item[
'id'
], $fields);
74
}
75
}
76
}
77
}
SimpleXMLElement
ilMailSearchLuceneResultParser\$xml
$xml
Definition:
class.ilMailSearchLuceneResultParser.php:19
ilMailSearchLuceneResultParser
Definition:
class.ilMailSearchLuceneResultParser.php:9
ilMailSearchLuceneResultParser\__construct
__construct(ilMailSearchResult $result, $xml)
Definition:
class.ilMailSearchLuceneResultParser.php:25
ilMailSearchLuceneResultParser\$result
$result
Definition:
class.ilMailSearchLuceneResultParser.php:14
$user
$user
Definition:
migrateto20.php:57
Sabre\Uri\parse
parse($uri)
Parses a URI and returns its individual components.
Definition:
functions.php:181
$name
$name
Definition:
client_example.php:35
php
ilMailSearchLuceneResultParser\getResult
getResult()
Definition:
class.ilMailSearchLuceneResultParser.php:42
ilMailSearchLuceneResultParser\getXml
getXml()
Definition:
class.ilMailSearchLuceneResultParser.php:34
ilMailSearchResult
Definition:
class.ilMailSearchResult.php:9
Services
Mail
classes
class.ilMailSearchLuceneResultParser.php
Generated on Thu Jan 16 2025 19:02:24 for ILIAS by
1.8.13 (using
Doxyfile
)