From bccd879a46e095c90232a76b8dac377d2da6b1db Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Fri, 25 Mar 2011 10:56:54 +0000 Subject: [PATCH] Add/tweak/update documentation and add some explicit defintions with type descriptions --- includes/objectcache/MemcachedClient.php | 4 ++-- includes/objectcache/MemcachedPhpBagOStuff.php | 6 ++++++ includes/objectcache/SqlBagOStuff.php | 15 ++++++++++++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/includes/objectcache/MemcachedClient.php b/includes/objectcache/MemcachedClient.php index 2cb3b29bce..1d64f45374 100644 --- a/includes/objectcache/MemcachedClient.php +++ b/includes/objectcache/MemcachedClient.php @@ -554,7 +554,7 @@ class MWMemcached { * with a \n. This is with the PHP flag auto_detect_line_endings set * to falase (the default). * - * @param $sock Ressource: socket to send command on + * @param $sock Resource: socket to send command on * @param $cmd String: command to run * * @return Array: output array @@ -857,7 +857,7 @@ class MWMemcached { /** * Load items into $ret from $sock * - * @param $sock Ressource: socket to read from + * @param $sock Resource: socket to read from * @param $ret Array: returned values * * @access private diff --git a/includes/objectcache/MemcachedPhpBagOStuff.php b/includes/objectcache/MemcachedPhpBagOStuff.php index 7bac31964d..73281c816f 100644 --- a/includes/objectcache/MemcachedPhpBagOStuff.php +++ b/includes/objectcache/MemcachedPhpBagOStuff.php @@ -4,6 +4,12 @@ * A wrapper class for the pure-PHP memcached client, exposing a BagOStuff interface. */ class MemcachedPhpBagOStuff extends BagOStuff { + + /** + * @var MemCachedClientforWiki + */ + protected $client; + /** * Constructor. * diff --git a/includes/objectcache/SqlBagOStuff.php b/includes/objectcache/SqlBagOStuff.php index bed2e1287b..7d87a24b77 100644 --- a/includes/objectcache/SqlBagOStuff.php +++ b/includes/objectcache/SqlBagOStuff.php @@ -6,7 +6,17 @@ * @ingroup Cache */ class SqlBagOStuff extends BagOStuff { - var $lb, $db, $serverInfo; + + /** + * @var LoadBalancer + */ + var $lb; + + /** + * @var DatabaseBase + */ + var $db; + var $serverInfo; var $lastExpireAll = 0; /** @@ -21,6 +31,9 @@ class SqlBagOStuff extends BagOStuff { } } + /** + * @return DatabaseBase + */ protected function getDB() { if ( !isset( $this->db ) ) { # If server connection info was given, use that -- 2.20.1