ILIAS
release_10 Revision v10.1-43-ga1241a92c2f
◀ ilDoc Overview
Factory.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\MetaData\Search\Clauses
;
22
23
use
ILIAS\MetaData\Paths\PathInterface
;
24
use
ILIAS\MetaData\Search\Clauses\Properties\JoinProperties
;
25
use
ILIAS\MetaData\Search\Clauses\Properties\BasicProperties
;
26
27
class
Factory
implements
FactoryInterface
28
{
29
public
function
getBasicClause
(
30
PathInterface
$path
,
31
Mode
$mode,
32
string
$value,
33
bool
$is_mode_negated =
false
34
):
ClauseInterface
{
35
if
(count(iterator_to_array($path->
steps
())) === 0) {
36
throw
new \ilMDRepositoryException(
'Paths in search clauses must not be empty.'
);
37
}
38
39
return
new
Clause
(
40
false
,
41
false
,
42
null,
43
new
BasicProperties
(
44
$path,
45
$mode,
46
$value,
47
$is_mode_negated
48
)
49
);
50
}
51
52
public
function
getJoinedClauses
(
53
Operator
$operator,
54
ClauseInterface
$first_clause,
55
ClauseInterface
...$further_clauses
56
):
ClauseInterface
{
57
if
(count($further_clauses) === 0) {
58
return
$first_clause;
59
}
60
return
new
Clause
(
61
false
,
62
true
,
63
new
JoinProperties
(
64
$operator,
65
$first_clause,
66
...$further_clauses
67
),
68
null
69
);
70
}
71
72
public
function
getNegatedClause
(
ClauseInterface
$clause):
ClauseInterface
73
{
74
return
new
Clause
(
75
!$clause->
isNegated
(),
76
$clause->
isJoin
(),
77
$clause->
joinProperties
(),
78
$clause->
basicProperties
()
79
);
80
}
81
}
ILIAS\MetaData\Search\Clauses\ClauseInterface\isJoin
isJoin()
ILIAS\MetaData\Paths\PathInterface\steps
steps()
Get all steps in the path.
ILIAS\MetaData\Search\Clauses\Factory
Definition:
Factory.php:27
ILIAS\MetaData\Search\Clauses\Factory\getNegatedClause
getNegatedClause(ClauseInterface $clause)
Negating a clause does not negate the condition on values, e.g.
Definition:
Factory.php:72
ILIAS\MetaData\Paths\PathInterface
Definition:
PathInterface.php:25
ILIAS\MetaData\Search\Clauses\ClauseInterface\joinProperties
joinProperties()
ILIAS\MetaData\Search\Clauses\Properties\JoinProperties
Definition:
JoinProperties.php:26
$path
$path
Definition:
ltiservices.php:30
JoinProperties
ILIAS\MetaData\Search\Clauses\FactoryInterface
Definition:
FactoryInterface.php:25
ILIAS\MetaData\Search\Clauses\ClauseInterface\basicProperties
basicProperties()
ILIAS\MetaData\Search\Clauses
Definition:
Clause.php:21
ILIAS\MetaData\Search\Clauses\Factory\getJoinedClauses
getJoinedClauses(Operator $operator, ClauseInterface $first_clause, ClauseInterface ... $further_clauses)
Joins multiple clauses with an operator, leading to search clauses like: "Find all LOM sets that have...
Definition:
Factory.php:52
ILIAS\MetaData\Search\Clauses\ClauseInterface
Definition:
ClauseInterface.php:26
ILIAS\MetaData\Search\Clauses\Factory\getBasicClause
getBasicClause(PathInterface $path, Mode $mode, string $value, bool $is_mode_negated=false)
Basic search clause with the following semantics: "Find all LOM sets that have at least one element a...
Definition:
Factory.php:29
ILIAS\MetaData\Search\Clauses\Clause
Definition:
Clause.php:26
PathInterface
BasicProperties
ILIAS\MetaData\Search\Clauses\Properties\BasicProperties
Definition:
BasicProperties.php:26
ILIAS\MetaData\Search\Clauses\ClauseInterface\isNegated
isNegated()
ILIAS\MetaData\Search\Clauses\Operator
Operator
Definition:
Operator.php:23
ILIAS\MetaData\Search\Clauses\Mode
Mode
Definition:
Mode.php:23
components
ILIAS
MetaData
classes
Search
Clauses
Factory.php
Generated on Wed Sep 10 2025 15:14:40 for ILIAS by
1.8.13 (using
Doxyfile
)