From: Reedy Date: Wed, 4 Jul 2012 22:27:30 +0000 (+0100) Subject: Add some explicit member variable definitions X-Git-Tag: 1.31.0-rc.0~23122 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22messagerie%22%29%20.%20%22?a=commitdiff_plain;h=ea3c298777709029261abc31aa4ed0ea95a24e81;p=lhc%2Fweb%2Fwiklou.git Add some explicit member variable definitions Bits of parameter documentation Change-Id: If99a344222900a6715114fa61eadcd4dd3e13db6 --- diff --git a/includes/SquidPurgeClient.php b/includes/SquidPurgeClient.php index 7cd2b033b0..8eb0f6bfc8 100644 --- a/includes/SquidPurgeClient.php +++ b/includes/SquidPurgeClient.php @@ -44,7 +44,15 @@ class SquidPurgeClient { * The socket resource, or null for unconnected, or false for disabled due to error */ var $socket; - + + var $readBuffer; + + var $bodyRemaining; + + /** + * @param $server string + * @param $options array + */ public function __construct( $server, $options = array() ) { $parts = explode( ':', $server, 2 ); $this->host = $parts[0]; @@ -340,6 +348,9 @@ class SquidPurgeClient { $this->bodyRemaining = null; } + /** + * @param $msg string + */ protected function log( $msg ) { wfDebugLog( 'squid', __CLASS__." ($this->host): $msg\n" ); } @@ -353,6 +364,9 @@ class SquidPurgeClientPool { var $clients = array(); var $timeout = 5; + /** + * @param $options array + */ function __construct( $options = array() ) { if ( isset( $options['timeout'] ) ) { $this->timeout = $options['timeout']; @@ -372,6 +386,9 @@ class SquidPurgeClientPool { $startTime = microtime( true ); while ( !$done ) { $readSockets = $writeSockets = array(); + /** + * @var $client SquidPurgeClient + */ foreach ( $this->clients as $clientIndex => $client ) { $sockets = $client->getReadSocketsForSelect(); foreach ( $sockets as $i => $socket ) {