ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Factory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26
27class Factory implements FactoryInterface
28{
29 public function getBasicClause(
31 Mode $mode,
32 string $value,
33 bool $is_mode_negated = false
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,
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
57 if (count($further_clauses) === 0) {
58 return $first_clause;
59 }
60 return new Clause(
61 false,
62 true,
64 $operator,
65 $first_clause,
66 ...$further_clauses
67 ),
68 null
69 );
70 }
71
73 {
74 return new Clause(
75 !$clause->isNegated(),
76 $clause->isJoin(),
77 $clause->joinProperties(),
78 $clause->basicProperties()
79 );
80 }
81}
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
getNegatedClause(ClauseInterface $clause)
Negating a clause does not negate the condition on values, e.g.
Definition: Factory.php:72
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
$path
Definition: ltiservices.php:30
if(!file_exists('../ilias.ini.php'))