Merge "Search: Allow searchContainedSyntax to be defined by constructor"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 21 May 2015 17:54:21 +0000 (17:54 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 21 May 2015 17:54:21 +0000 (17:54 +0000)
includes/search/SearchResultSet.php

index 406d322..0a05eef 100644 (file)
  * @ingroup Search
  */
 class SearchResultSet {
+       protected $containedSyntax = false;
+
+       public function __construct( $containedSyntax = false ) {
+               $this->containedSyntax = $containedSyntax;
+       }
+
        /**
         * Fetch an array of regular expression fragments for matching
         * the search terms as parsed by this engine in a text extract.
@@ -120,7 +126,7 @@ class SearchResultSet {
         * @return bool
         */
        public function searchContainedSyntax() {
-               return false;
+               return $this->containedSyntax;
        }
 }