ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ 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
}
string
Add rich text string
Definition:
05featuredemo.inc.php:117
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
$name
if($format !==null) $name
Definition:
metadata.php:146
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
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 Tue Jan 28 2025 19:01:36 for ILIAS by
1.8.13 (using
Doxyfile
)