From: Siebrand Mazeland Date: Thu, 26 Dec 2013 22:47:37 +0000 (+0100) Subject: Declare visibility for class properties of LBFactoryMulti X-Git-Tag: 1.31.0-rc.0~17395^2 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=f9fd37cfc4eb7df4ce83447b8c9630e41f43d0c5;p=lhc%2Fweb%2Fwiklou.git Declare visibility for class properties of LBFactoryMulti Punctuation in some comments was updated for consistency. Change-Id: Idaac104b4f39ce3a4de135cebea9eb20b0c3b5df --- diff --git a/includes/db/LBFactoryMulti.php b/includes/db/LBFactoryMulti.php index 2f4cb57bd9..2ab0554811 100644 --- a/includes/db/LBFactoryMulti.php +++ b/includes/db/LBFactoryMulti.php @@ -26,7 +26,7 @@ * Ignores the old configuration globals * * Configuration: - * sectionsByDB A map of database names to section names + * sectionsByDB A map of database names to section names. * * sectionLoads A 2-d map. For each section, gives a map of server names to * load ratios. For example: @@ -55,16 +55,16 @@ * * hostsByName A map of hostname to IP address. * - * externalLoads A map of external storage cluster name to server load map + * externalLoads A map of external storage cluster name to server load map. * * externalTemplateOverrides A set of server info keys overriding serverTemplate for external - * storage + * storage. * * templateOverridesByServer A 2-d map overriding serverTemplate and * externalTemplateOverrides on a server-by-server basis. Applies * to both core and external storage. * - * templateOverridesByCluster A 2-d map overriding the server info by external storage cluster + * templateOverridesByCluster A 2-d map overriding the server info by external storage cluster. * * masterTemplateOverrides An override array for all master servers. * @@ -75,14 +75,78 @@ */ class LBFactoryMulti extends LBFactory { // Required settings - var $sectionsByDB, $sectionLoads, $serverTemplate; + + /** @var array A map of database names to section names */ + protected $sectionsByDB; + + /** + * @var array A 2-d map. For each section, gives a map of server names to + * load ratios + */ + protected $sectionLoads; + + /** + * @var array A server info associative array as documented for + * $wgDBservers. The host, hostName and load entries will be + * overridden + */ + protected $serverTemplate; + // Optional settings - var $groupLoadsBySection = array(), $groupLoadsByDB = array(), $hostsByName = array(); - var $externalLoads = array(), $externalTemplateOverrides, $templateOverridesByServer; - var $templateOverridesByCluster, $masterTemplateOverrides, $readOnlyBySection = array(); + + /** @var array A 3-d map giving server load ratios for each section and group */ + protected $groupLoadsBySection = array(); + + /** @var array A 3-d map giving server load ratios by DB name */ + protected $groupLoadsByDB = array(); + + /** @var array A map of hostname to IP address */ + protected $hostsByName = array(); + + /** @var array A map of external storage cluster name to server load map */ + protected $externalLoads = array(); + + /** + * @var array A set of server info keys overriding serverTemplate for + * external storage + */ + protected $externalTemplateOverrides; + + /** + * @var array A 2-d map overriding serverTemplate and + * externalTemplateOverrides on a server-by-server basis. Applies to both + * core and external storage + */ + protected $templateOverridesByServer; + + /** @var array A 2-d map overriding the server info by external storage cluster */ + protected $templateOverridesByCluster; + + /** @var array An override array for all master servers */ + protected $masterTemplateOverrides; + + /** + * @var array|bool A map of section name to read-only message. Missing or + * false for read/write + */ + protected $readOnlyBySection = array(); + // Other stuff - var $conf, $mainLBs = array(), $extLBs = array(); - var $lastWiki, $lastSection; + + /** @var array Load balancer factory configuration */ + protected $conf; + + /** @var LoadBalancer[] */ + protected $mainLBs = array(); + + /** @var LoadBalancer[] */ + protected $extLBs = array(); + + /** @var string */ + protected $lastWiki; + + /** @var string */ + protected $lastSection; /** * @param $conf array