Merge "Get better error message for duplicate names in MagicWordArray"
[lhc/web/wiklou.git] / includes / search / SearchIndexFieldDefinition.php
index 04344fd..a11dff9 100644 (file)
@@ -9,24 +9,28 @@
  * @since 1.28
  */
 abstract class SearchIndexFieldDefinition implements SearchIndexField {
+
        /**
         * Name of the field
         *
         * @var string
         */
        protected $name;
+
        /**
         * Type of the field, one of the constants above
         *
         * @var int
         */
        protected $type;
+
        /**
         * Bit flags for the field.
         *
         * @var int
         */
        protected $flags = 0;
+
        /**
         * Subfields
         * @var SearchIndexFieldDefinition[]
@@ -39,9 +43,8 @@ abstract class SearchIndexFieldDefinition implements SearchIndexField {
        private $mergeCallback;
 
        /**
-        * SearchIndexFieldDefinition constructor.
         * @param string $name Field name
-        * @param int    $type Index type
+        * @param int $type Index type
         */
        public function __construct( $name, $type ) {
                $this->name = $name;
@@ -67,7 +70,7 @@ abstract class SearchIndexFieldDefinition implements SearchIndexField {
        /**
         * Set global flag for this field.
         *
-        * @param int  $flag Bit flag to set/unset
+        * @param int $flag Bit flag to set/unset
         * @param bool $unset True if flag should be unset, false by default
         * @return $this
         */
@@ -82,7 +85,7 @@ abstract class SearchIndexFieldDefinition implements SearchIndexField {
 
        /**
         * Check if flag is set.
-        * @param $flag
+        * @param int $flag
         * @return int 0 if unset, !=0 if set
         */
        public function checkFlag( $flag ) {
@@ -140,4 +143,11 @@ abstract class SearchIndexFieldDefinition implements SearchIndexField {
        public function setMergeCallback( $callback ) {
                $this->mergeCallback = $callback;
        }
+
+       /**
+        * @inheritDoc
+        */
+       public function getEngineHints( SearchEngine $engine ) {
+               return [];
+       }
 }