Merge "Add dotall modifier to EDITSECTION_REGEX"
[lhc/web/wiklou.git] / includes / libs / rdbms / lbfactory / LBFactoryMulti.php
index a7cc16c..1d22873 100644 (file)
@@ -284,6 +284,26 @@ class LBFactoryMulti extends LBFactory {
                return $this->extLBs[$cluster];
        }
 
+       public function getAllMainLBs() {
+               $lbs = [];
+               foreach ( $this->sectionsByDB as $db => $section ) {
+                       if ( !isset( $lbs[$section] ) ) {
+                               $lbs[$section] = $this->getMainLB( $db );
+                       }
+               }
+
+               return $lbs;
+       }
+
+       public function getAllExternalLBs() {
+               $lbs = [];
+               foreach ( $this->externalLoads as $cluster => $unused ) {
+                       $lbs[$cluster] = $this->getExternalLB( $cluster );
+               }
+
+               return $lbs;
+       }
+
        /**
         * Make a new load balancer object based on template and load array
         *