ILIAS
trunk Revision v11.0_alpha-1761-g6dbbfa7b760
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
Searcher.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\MetaData\Services\Search
;
22
23
use
ILIAS\MetaData\Elements\RessourceID\RessourceIDInterface
;
24
use
ILIAS\MetaData\Search\Clauses\FactoryInterface
as
ClauseFactory
;
25
use
ILIAS\MetaData\Search\Clauses\ClauseInterface
;
26
use
ILIAS\MetaData\Search\Filters\FilterInterface
;
27
use
ILIAS\MetaData\Search\Filters\FactoryInterface
as FilterFactory;
28
use
ILIAS\MetaData\Repository\RepositoryInterface
;
29
use
ILIAS\MetaData\Search\Filters\Placeholder
;
30
31
class
Searcher
implements
SearcherInterface
32
{
33
protected
ClauseFactory
$clause_factory
;
34
protected
FilterFactory
$filter_factory
;
35
protected
RepositoryInterface
$repository
;
36
37
public
function
__construct
(
38
ClauseFactory
$clause_factory,
39
FilterFactory $filter_factory,
40
RepositoryInterface
$repository
41
) {
42
$this->clause_factory =
$clause_factory
;
43
$this->filter_factory =
$filter_factory
;
44
$this->
repository
=
$repository
;
45
}
46
47
public
function
getClauseFactory
():
ClauseFactory
48
{
49
return
$this->clause_factory
;
50
}
51
52
public
function
getFilter
(
53
int
|
Placeholder
$obj_id =
Placeholder::ANY
,
54
int
|
Placeholder
$sub_id =
Placeholder::ANY
,
55
string
|
Placeholder
$type =
Placeholder::ANY
56
):
FilterInterface
{
57
if
($sub_id === 0) {
58
$sub_id = Placeholder::OBJ_ID;
59
}
60
return
$this->filter_factory->get($obj_id, $sub_id, $type);
61
}
62
66
public
function
execute
(
67
ClauseInterface
$clause,
68
?
int
$limit,
69
?
int
$offset,
70
FilterInterface
...$filters
71
): \
Generator
{
72
yield
from
$this->
repository
->searchMD(
73
$clause,
74
$limit,
75
$offset,
76
...$filters
77
);
78
}
79
}
ILIAS\MetaData\Services\Search\Searcher\$clause_factory
ClauseFactory $clause_factory
Definition:
Searcher.php:33
ILIAS\MetaData\Search\Filters\FilterInterface
Definition:
FilterInterface.php:23
FactoryInterface
ILIAS\File\Capabilities\ANY
Definition:
Permissions.php:38
ILIAS\UI\examples\Deck\repository
repository()
description: > Example for rendering a repository card
Definition:
repository.php:33
ILIAS\MetaData\Services\Search\SearcherInterface
Definition:
SearcherInterface.php:29
ILIAS\MetaData\Search\Filters\Placeholder
Placeholder
Definition:
Placeholder.php:23
ClauseInterface
ILIAS\MetaData\Search\Filters\FactoryInterface
Definition:
FactoryInterface.php:23
ILIAS\MetaData\Services\Search\Searcher\getFilter
getFilter(int|Placeholder $obj_id=Placeholder::ANY, int|Placeholder $sub_id=Placeholder::ANY, string|Placeholder $type=Placeholder::ANY)
Get a filter with which the results of a search can be restricted.
Definition:
Searcher.php:52
ILIAS\MetaData\Services\Search\Searcher\__construct
__construct(ClauseFactory $clause_factory, FilterFactory $filter_factory, RepositoryInterface $repository)
Definition:
Searcher.php:37
ILIAS\MetaData\Services\Search
Definition:
Searcher.php:21
RessourceIDInterface
ILIAS\MetaData\Services\Search\Searcher\getClauseFactory
getClauseFactory()
Get a factory where you can assemble your search clause.
Definition:
Searcher.php:47
ILIAS\MetaData\Services\Search\Searcher
Definition:
Searcher.php:31
Generator
ILIAS\MetaData\Search\Clauses\ClauseInterface
Definition:
ClauseInterface.php:26
RepositoryInterface
ILIAS\MetaData\Services\Search\Searcher\execute
execute(ClauseInterface $clause, ?int $limit, ?int $offset, FilterInterface ... $filters)
Definition:
Searcher.php:66
FilterInterface
ILIAS\ResourceStorage\Flavour\Machine\DefaultMachines\from
from(FileStream $stream)
Definition:
GdImageToStreamTrait.php:48
ILIAS\MetaData\Repository\RepositoryInterface
Definition:
RepositoryInterface.php:29
ILIAS\MetaData\Services\Search\Searcher\$filter_factory
FilterFactory $filter_factory
Definition:
Searcher.php:34
ILIAS\MetaData\Services\Search\Searcher\$repository
RepositoryInterface $repository
Definition:
Searcher.php:35
components
ILIAS
MetaData
classes
Services
Search
Searcher.php
Generated on Fri Apr 11 2025 23:03:35 for ILIAS by
1.8.13 (using
Doxyfile
)