From a1789ddde42033f1b05cc4929491214ee6e79383 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 17 Dec 2015 09:15:42 +0100 Subject: Update to MediaWiki 1.26.0 --- .../elastica/lib/Elastica/Query/HasParent.php | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 vendor/ruflin/elastica/lib/Elastica/Query/HasParent.php (limited to 'vendor/ruflin/elastica/lib/Elastica/Query/HasParent.php') diff --git a/vendor/ruflin/elastica/lib/Elastica/Query/HasParent.php b/vendor/ruflin/elastica/lib/Elastica/Query/HasParent.php new file mode 100644 index 00000000..03aae13b --- /dev/null +++ b/vendor/ruflin/elastica/lib/Elastica/Query/HasParent.php @@ -0,0 +1,63 @@ +setQuery($query); + $this->setType($type); + } + + /** + * Sets query object. + * + * @param string|\Elastica\Query|\Elastica\Query\AbstractQuery $query + * + * @return $this + */ + public function setQuery($query) + { + $query = BaseQuery::create($query); + $data = $query->toArray(); + + return $this->setParam('query', $data['query']); + } + + /** + * Set type of the parent document. + * + * @param string $type Parent document type + * + * @return $this + */ + public function setType($type) + { + return $this->setParam('type', $type); + } + + /** + * Sets the scope. + * + * @param string $scope Scope + * + * @return $this + */ + public function setScope($scope) + { + return $this->setParam('_scope', $scope); + } +} -- cgit v1.2.3-54-g00ecf