Merge "rdbms: cleanup runMasterPostTrxCallbacks() transaction check"
[lhc/web/wiklou.git] / includes / Storage / RevisionSlots.php
index 8d3d7e3..7fa5431 100644 (file)
@@ -110,6 +110,19 @@ class RevisionSlots {
                }
        }
 
+       /**
+        * Returns whether the given slot is set.
+        *
+        * @param string $role The role name of the desired slot
+        *
+        * @return bool
+        */
+       public function hasSlot( $role ) {
+               $slots = $this->getSlots();
+
+               return isset( $slots[$role] );
+       }
+
        /**
         * Returns the slot names (roles) of all slots present in this revision.
         * getContent() will succeed only for the names returned by this method.