blob: e03f90c547e12142cb8a0a0a8f10cd350fa7adb4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<?php
namespace SMW\SPARQLStore\QueryEngine\Condition;
/**
* A SPARQL condition that consists in a FILTER term only (possibly with some
* weak conditions to introduce the variables that the filter acts on).
*
* @ingroup SMWStore
*
* @license GNU GPL v2+
* @since 1.6
*
* @author Markus Krötzsch
*/
class FilterCondition extends Condition {
/**
* Additional filter condition, i.e. a string that could be placed in
* "FILTER( ... )".
* @var string
*/
public $filter;
public function __construct( $filter, $namespaces = [] ) {
$this->filter = $filter;
$this->namespaces = $namespaces;
}
public function getCondition() {
return "FILTER( {$this->filter} )\n";
}
public function isSafe() {
return false;
}
}
|