summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/src/SPARQLStore/QueryEngine/Condition/WhereCondition.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/src/SPARQLStore/QueryEngine/Condition/WhereCondition.php')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/src/SPARQLStore/QueryEngine/Condition/WhereCondition.php45
1 files changed, 45 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/src/SPARQLStore/QueryEngine/Condition/WhereCondition.php b/www/wiki/extensions/SemanticMediaWiki/src/SPARQLStore/QueryEngine/Condition/WhereCondition.php
new file mode 100644
index 00000000..002282c2
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/src/SPARQLStore/QueryEngine/Condition/WhereCondition.php
@@ -0,0 +1,45 @@
+<?php
+
+namespace SMW\SPARQLStore\QueryEngine\Condition;
+
+/**
+ * Container class that represents a SPARQL (sub-)pattern and relevant pieces
+ * of associated information for using it in query building.
+ *
+ * @ingroup SMWStore
+ *
+ * @license GNU GPL v2+
+ * @since 1.6
+ *
+ * @author Markus Krötzsch
+ */
+class WhereCondition extends Condition {
+
+ /**
+ * The pattern string. Anything that can be used as a WHERE condition
+ * when put between "{" and "}".
+ * @var string
+ */
+ public $condition;
+
+ /**
+ * Whether this condition is safe.
+ * @see SMWSparqlCondition::isSafe().
+ * @var boolean
+ */
+ public $isSafe;
+
+ public function __construct( $condition, $isSafe, $namespaces = [] ) {
+ $this->condition = $condition;
+ $this->isSafe = $isSafe;
+ $this->namespaces = $namespaces;
+ }
+
+ public function getCondition() {
+ return $this->condition;
+ }
+
+ public function isSafe() {
+ return $this->isSafe;
+ }
+}