"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "includes/libs/MultiHttpClient.php" between
mediawiki-1.31.1.tar.gz and mediawiki-1.32.0.tar.gz

About: MediaWiki is a wiki engine (the collaborative editing software that runs for e.g. Wikipedia, the free encyclopedia).

MultiHttpClient.php  (mediawiki-1.31.1):MultiHttpClient.php  (mediawiki-1.32.0)
skipping to change at line 26 skipping to change at line 26
* with this program; if not, write to the Free Software Foundation, Inc., * with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html * http://www.gnu.org/copyleft/gpl.html
* *
* @file * @file
*/ */
use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger; use Psr\Log\NullLogger;
use MediaWiki\MediaWikiServices;
/** /**
* Class to handle concurrent HTTP requests * Class to handle multiple HTTP requests
*
* If curl is available, requests will be made concurrently.
* Otherwise, they will be made serially.
* *
* HTTP request maps are arrays that use the following format: * HTTP request maps are arrays that use the following format:
* - method : GET/HEAD/PUT/POST/DELETE * - method : GET/HEAD/PUT/POST/DELETE
* - url : HTTP/HTTPS URL * - url : HTTP/HTTPS URL
* - query : <query parameter field/value associative array> (uses RFC 3986 ) * - query : <query parameter field/value associative array> (uses RFC 3986 )
* - headers : <header name/value associative array> * - headers : <header name/value associative array>
* - body : source to get the HTTP request body from; * - body : source to get the HTTP request body from;
* this can simply be a string (always), a resource for * this can simply be a string (always), a resource for
* PUT requests, and a field/value array for POST request; * PUT requests, and a field/value array for POST request;
* array bodies are encoded as multipart/form-data and strings * array bodies are encoded as multipart/form-data and strings
skipping to change at line 53 skipping to change at line 57
* - relayResponseHeaders : write out header via header() * - relayResponseHeaders : write out header via header()
* Request maps can use integer index 0 instead of 'method' and 1 instead of 'ur l'. * Request maps can use integer index 0 instead of 'method' and 1 instead of 'ur l'.
* *
* @since 1.23 * @since 1.23
*/ */
class MultiHttpClient implements LoggerAwareInterface { class MultiHttpClient implements LoggerAwareInterface {
/** @var resource */ /** @var resource */
protected $multiHandle = null; // curl_multi handle protected $multiHandle = null; // curl_multi handle
/** @var string|null SSL certificates path */ /** @var string|null SSL certificates path */
protected $caBundlePath; protected $caBundlePath;
/** @var int */ /** @var float */
protected $connTimeout = 10; protected $connTimeout = 10;
/** @var int */ /** @var float */
protected $reqTimeout = 300; protected $reqTimeout = 300;
/** @var bool */ /** @var bool */
protected $usePipelining = false; protected $usePipelining = false;
/** @var int */ /** @var int */
protected $maxConnsPerHost = 50; protected $maxConnsPerHost = 50;
/** @var string|null proxy */ /** @var string|null proxy */
protected $proxy; protected $proxy;
/** @var string */ /** @var string */
protected $userAgent = 'wikimedia/multi-http-client v1.0'; protected $userAgent = 'wikimedia/multi-http-client v1.0';
/** @var LoggerInterface */ /** @var LoggerInterface */
protected $logger; protected $logger;
// In PHP 7 due to https://bugs.php.net/bug.php?id=76480 the request/conn
ect
// timeouts are periodically polled instead of being accurately respected
.
// The select timeout is set to the minimum timeout multiplied by this fa
ctor.
const TIMEOUT_ACCURACY_FACTOR = 0.1;
/** /**
* @param array $options * @param array $options
* - connTimeout : default connection timeout (seconds) * - connTimeout : default connection timeout (seconds)
* - reqTimeout : default request timeout (seconds) * - reqTimeout : default request timeout (seconds)
* - proxy : HTTP proxy to use * - proxy : HTTP proxy to use
* - usePipelining : whether to use HTTP pipelining if possible (for all hosts) * - usePipelining : whether to use HTTP pipelining if possible (for all hosts)
* - maxConnsPerHost : maximum number of concurrent connections (per ho st) * - maxConnsPerHost : maximum number of concurrent connections (per ho st)
* - userAgent : The User-Agent header value to send * - userAgent : The User-Agent header value to send
* - logger : a \Psr\Log\LoggerInterface instance for debug lo
gging
* - caBundlePath : path to specific Certificate Authority bundle (i
f any)
* @throws Exception * @throws Exception
*/ */
public function __construct( array $options ) { public function __construct( array $options ) {
if ( isset( $options['caBundlePath'] ) ) { if ( isset( $options['caBundlePath'] ) ) {
$this->caBundlePath = $options['caBundlePath']; $this->caBundlePath = $options['caBundlePath'];
if ( !file_exists( $this->caBundlePath ) ) { if ( !file_exists( $this->caBundlePath ) ) {
throw new Exception( "Cannot find CA bundle: " . $this->caBundlePath ); throw new Exception( "Cannot find CA bundle: " . $this->caBundlePath );
} }
} }
static $opts = [ static $opts = [
skipping to change at line 103 skipping to change at line 114
} }
if ( $this->logger === null ) { if ( $this->logger === null ) {
$this->logger = new NullLogger; $this->logger = new NullLogger;
} }
} }
/** /**
* Execute an HTTP(S) request * Execute an HTTP(S) request
* *
* This method returns a response map of: * This method returns a response map of:
* - code : HTTP response code or 0 if there was a serious cURL erro * - code : HTTP response code or 0 if there was a serious error
r * - reason : HTTP response reason (empty if there was a serious error
* - reason : HTTP response reason (empty if there was a serious cURL )
error)
* - headers : <header name/value associative array> * - headers : <header name/value associative array>
* - body : HTTP response body or resource (if "stream" was set) * - body : HTTP response body or resource (if "stream" was set)
* - error : Any cURL error string * - error : Any error string
* The map also stores integer-indexed copies of these values. This lets callers do: * The map also stores integer-indexed copies of these values. This lets callers do:
* @code * @code
* list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $http->ru n( $req ); * list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $http->ru n( $req );
* @endcode * @endcode
* @param array $req HTTP request array * @param array $req HTTP request array
* @param array $opts * @param array $opts
* - connTimeout : connection timeout per request (seconds) * - connTimeout : connection timeout per request (seconds)
* - reqTimeout : post-connection timeout per request (seconds) * - reqTimeout : post-connection timeout per request (seconds)
* @return array Response array for request * @return array Response array for request
*/ */
public function run( array $req, array $opts = [] ) { public function run( array $req, array $opts = [] ) {
return $this->runMulti( [ $req ], $opts )[0]['response']; return $this->runMulti( [ $req ], $opts )[0]['response'];
} }
/** /**
* Execute a set of HTTP(S) requests concurrently * Execute a set of HTTP(S) requests.
*
* If curl is available, requests will be made concurrently.
* Otherwise, they will be made serially.
* *
* The maps are returned by this method with the 'response' field set to a map of: * The maps are returned by this method with the 'response' field set to a map of:
* - code : HTTP response code or 0 if there was a serious cURL erro * - code : HTTP response code or 0 if there was a serious error
r * - reason : HTTP response reason (empty if there was a serious error
* - reason : HTTP response reason (empty if there was a serious cURL )
error)
* - headers : <header name/value associative array> * - headers : <header name/value associative array>
* - body : HTTP response body or resource (if "stream" was set) * - body : HTTP response body or resource (if "stream" was set)
* - error : Any cURL error string * - error : Any error string
* The map also stores integer-indexed copies of these values. This lets callers do: * The map also stores integer-indexed copies of these values. This lets callers do:
* @code * @code
* list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $req['response' ]; * list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $req['response' ];
* @endcode * @endcode
* All headers in the 'headers' field are normalized to use lower case na mes. * All headers in the 'headers' field are normalized to use lower case na mes.
* This is true for the request headers and the response headers. Integer -indexed * This is true for the request headers and the response headers. Integer -indexed
* method/URL entries will also be changed to use the corresponding strin g keys. * method/URL entries will also be changed to use the corresponding strin g keys.
* *
* @param array $reqs Map of HTTP request arrays * @param array $reqs Map of HTTP request arrays
* @param array $opts * @param array $opts
* - connTimeout : connection timeout per request (seconds) * - connTimeout : connection timeout per request (seconds)
* - reqTimeout : post-connection timeout per request (seconds) * - reqTimeout : post-connection timeout per request (seconds)
* - usePipelining : whether to use HTTP pipelining if possible * - usePipelining : whether to use HTTP pipelining if possible
* - maxConnsPerHost : maximum number of concurrent connections (per ho st) * - maxConnsPerHost : maximum number of concurrent connections (per ho st)
* @return array $reqs With response array populated for each * @return array $reqs With response array populated for each
* @throws Exception * @throws Exception
*/ */
public function runMulti( array $reqs, array $opts = [] ) { public function runMulti( array $reqs, array $opts = [] ) {
$this->normalizeRequests( $reqs );
if ( $this->isCurlEnabled() ) {
return $this->runMultiCurl( $reqs, $opts );
} else {
return $this->runMultiHttp( $reqs, $opts );
}
}
/**
* Determines if the curl extension is available
*
* @return bool true if curl is available, false otherwise.
*/
protected function isCurlEnabled() {
return extension_loaded( 'curl' );
}
/**
* Execute a set of HTTP(S) requests concurrently
*
* @see MultiHttpClient::runMulti()
*
* @param array $reqs Map of HTTP request arrays
* @param array $opts
* - connTimeout : connection timeout per request (seconds)
* - reqTimeout : post-connection timeout per request (seconds)
* - usePipelining : whether to use HTTP pipelining if possible
* - maxConnsPerHost : maximum number of concurrent connections (per ho
st)
* @return array $reqs With response array populated for each
* @throws Exception
*/
private function runMultiCurl( array $reqs, array $opts = [] ) {
$chm = $this->getCurlMulti(); $chm = $this->getCurlMulti();
// Normalize $reqs and add all of the required cURL handles... $selectTimeout = $this->getSelectTimeout( $opts );
// Add all of the required cURL handles...
$handles = []; $handles = [];
foreach ( $reqs as $index => &$req ) { foreach ( $reqs as $index => &$req ) {
$req['response'] = [
'code' => 0,
'reason' => '',
'headers' => [],
'body' => '',
'error' => ''
];
if ( isset( $req[0] ) ) {
$req['method'] = $req[0]; // short-form
unset( $req[0] );
}
if ( isset( $req[1] ) ) {
$req['url'] = $req[1]; // short-form
unset( $req[1] );
}
if ( !isset( $req['method'] ) ) {
throw new Exception( "Request has no 'method' fie
ld set." );
} elseif ( !isset( $req['url'] ) ) {
throw new Exception( "Request has no 'url' field
set." );
}
$this->logger->debug( "{$req['method']}: {$req['url']}" )
;
$req['query'] = isset( $req['query'] ) ? $req['query'] :
[];
$headers = []; // normalized headers
if ( isset( $req['headers'] ) ) {
foreach ( $req['headers'] as $name => $value ) {
$headers[strtolower( $name )] = $value;
}
}
$req['headers'] = $headers;
if ( !isset( $req['body'] ) ) {
$req['body'] = '';
$req['headers']['content-length'] = 0;
}
$req['flags'] = isset( $req['flags'] ) ? $req['flags'] :
[];
$handles[$index] = $this->getCurlHandle( $req, $opts ); $handles[$index] = $this->getCurlHandle( $req, $opts );
if ( count( $reqs ) > 1 ) { if ( count( $reqs ) > 1 ) {
// https://github.com/guzzle/guzzle/issues/349 // https://github.com/guzzle/guzzle/issues/349
curl_setopt( $handles[$index], CURLOPT_FORBID_REU SE, true ); curl_setopt( $handles[$index], CURLOPT_FORBID_REU SE, true );
} }
} }
unset( $req ); // don't assign over this by accident unset( $req ); // don't assign over this by accident
$indexes = array_keys( $reqs ); $indexes = array_keys( $reqs );
if ( isset( $opts['usePipelining'] ) ) { if ( isset( $opts['usePipelining'] ) ) {
skipping to change at line 227 skipping to change at line 241
// Do any available work... // Do any available work...
do { do {
$mrc = curl_multi_exec( $chm, $active ); $mrc = curl_multi_exec( $chm, $active );
$info = curl_multi_info_read( $chm ); $info = curl_multi_info_read( $chm );
if ( $info !== false ) { if ( $info !== false ) {
$infos[(int)$info['handle']] = $i nfo; $infos[(int)$info['handle']] = $i nfo;
} }
} while ( $mrc == CURLM_CALL_MULTI_PERFORM ); } while ( $mrc == CURLM_CALL_MULTI_PERFORM );
// Wait (if possible) for available work... // Wait (if possible) for available work...
if ( $active > 0 && $mrc == CURLM_OK ) { if ( $active > 0 && $mrc == CURLM_OK ) {
if ( curl_multi_select( $chm, 10 ) == -1 ) { if ( curl_multi_select( $chm, $selectTime out ) == -1 ) {
// PHP bug 63411; https://curl.ha xx.se/libcurl/c/curl_multi_fdset.html // PHP bug 63411; https://curl.ha xx.se/libcurl/c/curl_multi_fdset.html
usleep( 5000 ); // 5ms usleep( 5000 ); // 5ms
} }
} }
} while ( $active > 0 && $mrc == CURLM_OK ); } while ( $active > 0 && $mrc == CURLM_OK );
} }
// Remove all of the added cURL handles and check for errors... // Remove all of the added cURL handles and check for errors...
foreach ( $reqs as $index => &$req ) { foreach ( $reqs as $index => &$req ) {
$ch = $handles[$index]; $ch = $handles[$index];
skipping to change at line 288 skipping to change at line 302
* @param array &$req HTTP request map * @param array &$req HTTP request map
* @param array $opts * @param array $opts
* - connTimeout : default connection timeout * - connTimeout : default connection timeout
* - reqTimeout : default request timeout * - reqTimeout : default request timeout
* @return resource * @return resource
* @throws Exception * @throws Exception
*/ */
protected function getCurlHandle( array &$req, array $opts = [] ) { protected function getCurlHandle( array &$req, array $opts = [] ) {
$ch = curl_init(); $ch = curl_init();
curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT_MS,
isset( $opts['connTimeout'] ) ? $opts['connTimeout'] : $t ( $opts['connTimeout'] ?? $this->connTimeout ) * 1000 );
his->connTimeout ); curl_setopt( $ch, CURLOPT_PROXY, $req['proxy'] ?? $this->proxy );
curl_setopt( $ch, CURLOPT_PROXY, isset( $req['proxy'] ) ? $req['p curl_setopt( $ch, CURLOPT_TIMEOUT_MS,
roxy'] : $this->proxy ); ( $opts['reqTimeout'] ?? $this->reqTimeout ) * 1000 );
curl_setopt( $ch, CURLOPT_TIMEOUT,
isset( $opts['reqTimeout'] ) ? $opts['reqTimeout'] : $thi
s->reqTimeout );
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 );
curl_setopt( $ch, CURLOPT_MAXREDIRS, 4 ); curl_setopt( $ch, CURLOPT_MAXREDIRS, 4 );
curl_setopt( $ch, CURLOPT_HEADER, 0 ); curl_setopt( $ch, CURLOPT_HEADER, 0 );
if ( !is_null( $this->caBundlePath ) ) { if ( !is_null( $this->caBundlePath ) ) {
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, true ); curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, true );
curl_setopt( $ch, CURLOPT_CAINFO, $this->caBundlePath ); curl_setopt( $ch, CURLOPT_CAINFO, $this->caBundlePath );
} }
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
$url = $req['url']; $url = $req['url'];
skipping to change at line 387 skipping to change at line 401
$matches = []; $matches = [];
if ( preg_match( "/^(HTTP\/1\.[01]) (\d{3}) (.*)/ ", $header, $matches ) ) { if ( preg_match( "/^(HTTP\/1\.[01]) (\d{3}) (.*)/ ", $header, $matches ) ) {
$req['response']['code'] = (int)$matches[ 2]; $req['response']['code'] = (int)$matches[ 2];
$req['response']['reason'] = trim( $match es[3] ); $req['response']['reason'] = trim( $match es[3] );
return $length; return $length;
} }
if ( strpos( $header, ":" ) === false ) { if ( strpos( $header, ":" ) === false ) {
return $length; return $length;
} }
list( $name, $value ) = explode( ":", $header, 2 ); list( $name, $value ) = explode( ":", $header, 2 );
$req['response']['headers'][strtolower( $name )] $name = strtolower( $name );
= trim( $value ); $value = trim( $value );
if ( isset( $req['response']['headers'][$name] )
) {
$req['response']['headers'][$name] .= ',
' . $value;
} else {
$req['response']['headers'][$name] = $val
ue;
}
return $length; return $length;
} }
); );
if ( isset( $req['stream'] ) ) { if ( isset( $req['stream'] ) ) {
// Don't just use CURLOPT_FILE as that might give: // Don't just use CURLOPT_FILE as that might give:
// curl_setopt(): cannot represent a stream of type Outpu t as a STDIO FILE* // curl_setopt(): cannot represent a stream of type Outpu t as a STDIO FILE*
// The callback here handles both normal files and php:// temp handles. // The callback here handles both normal files and php:// temp handles.
curl_setopt( $ch, CURLOPT_WRITEFUNCTION, curl_setopt( $ch, CURLOPT_WRITEFUNCTION,
function ( $ch, $data ) use ( &$req ) { function ( $ch, $data ) use ( &$req ) {
skipping to change at line 420 skipping to change at line 440
return $ch; return $ch;
} }
/** /**
* @return resource * @return resource
* @throws Exception * @throws Exception
*/ */
protected function getCurlMulti() { protected function getCurlMulti() {
if ( !$this->multiHandle ) { if ( !$this->multiHandle ) {
if ( !function_exists( 'curl_multi_init' ) ) { if ( !function_exists( 'curl_multi_init' ) ) {
throw new Exception( "PHP cURL extension missing. " . throw new Exception( "PHP cURL function curl_mult i_init missing. " .
"Check h ttps://www.mediawiki.org/wiki/Manual:CURL" ); "Check h ttps://www.mediawiki.org/wiki/Manual:CURL" );
} }
$cmh = curl_multi_init(); $cmh = curl_multi_init();
curl_multi_setopt( $cmh, CURLMOPT_PIPELINING, (int)$this- >usePipelining ); curl_multi_setopt( $cmh, CURLMOPT_PIPELINING, (int)$this- >usePipelining );
curl_multi_setopt( $cmh, CURLMOPT_MAXCONNECTS, (int)$this ->maxConnsPerHost ); curl_multi_setopt( $cmh, CURLMOPT_MAXCONNECTS, (int)$this ->maxConnsPerHost );
$this->multiHandle = $cmh; $this->multiHandle = $cmh;
} }
return $this->multiHandle; return $this->multiHandle;
} }
/** /**
* Execute a set of HTTP(S) requests sequentially.
*
* @see MultiHttpClient::runMulti()
* @todo Remove dependency on MediaWikiServices: use a separate HTTP clie
nt
* library or copy code from PhpHttpRequest
* @param array $reqs Map of HTTP request arrays
* @param array $opts
* - connTimeout : connection timeout per request (seconds)
* - reqTimeout : post-connection timeout per request (seconds)
* @return array $reqs With response array populated for each
* @throws Exception
*/
private function runMultiHttp( array $reqs, array $opts = [] ) {
$httpOptions = [
'timeout' => $opts['reqTimeout'] ?? $this->reqTimeout,
'connectTimeout' => $opts['connTimeout'] ?? $this->connTi
meout,
'logger' => $this->logger,
'caInfo' => $this->caBundlePath,
];
foreach ( $reqs as &$req ) {
$reqOptions = $httpOptions + [
'method' => $req['method'],
'proxy' => $req['proxy'] ?? $this->proxy,
'userAgent' => $req['headers']['user-agent'] ?? $
this->userAgent,
'postData' => $req['body'],
];
$url = $req['url'];
$query = http_build_query( $req['query'], '', '&', PHP_QU
ERY_RFC3986 );
if ( $query != '' ) {
$url .= strpos( $req['url'], '?' ) === false ? "?
$query" : "&$query";
}
$httpRequest = MediaWikiServices::getInstance()->getHttpR
equestFactory()->create(
$url, $reqOptions );
$sv = $httpRequest->execute()->getStatusValue();
$respHeaders = array_map(
function ( $v ) {
return implode( ', ', $v );
},
$httpRequest->getResponseHeaders() );
$req['response'] = [
'code' => $httpRequest->getStatus(),
'reason' => '',
'headers' => $respHeaders,
'body' => $httpRequest->getContent(),
'error' => '',
];
if ( !$sv->isOk() ) {
$svErrors = $sv->getErrors();
if ( isset( $svErrors[0] ) ) {
$req['response']['error'] = $svErrors[0][
'message'];
// param values vary per failure type (ex
. unknown host vs unknown page)
if ( isset( $svErrors[0]['params'][0] ) )
{
if ( is_numeric( $svErrors[0]['pa
rams'][0] ) ) {
if ( isset( $svErrors[0][
'params'][1] ) ) {
$req['response'][
'reason'] = $svErrors[0]['params'][1];
}
} else {
$req['response']['reason'
] = $svErrors[0]['params'][0];
}
}
}
}
$req['response'][0] = $req['response']['code'];
$req['response'][1] = $req['response']['reason'];
$req['response'][2] = $req['response']['headers'];
$req['response'][3] = $req['response']['body'];
$req['response'][4] = $req['response']['error'];
}
return $reqs;
}
/**
* Normalize request information
*
* @param array $reqs the requests to normalize
*/
private function normalizeRequests( array &$reqs ) {
foreach ( $reqs as &$req ) {
$req['response'] = [
'code' => 0,
'reason' => '',
'headers' => [],
'body' => '',
'error' => ''
];
if ( isset( $req[0] ) ) {
$req['method'] = $req[0]; // short-form
unset( $req[0] );
}
if ( isset( $req[1] ) ) {
$req['url'] = $req[1]; // short-form
unset( $req[1] );
}
if ( !isset( $req['method'] ) ) {
throw new Exception( "Request has no 'method' fie
ld set." );
} elseif ( !isset( $req['url'] ) ) {
throw new Exception( "Request has no 'url' field
set." );
}
$this->logger->debug( "{$req['method']}: {$req['url']}" )
;
$req['query'] = $req['query'] ?? [];
$headers = []; // normalized headers
if ( isset( $req['headers'] ) ) {
foreach ( $req['headers'] as $name => $value ) {
$headers[strtolower( $name )] = $value;
}
}
$req['headers'] = $headers;
if ( !isset( $req['body'] ) ) {
$req['body'] = '';
$req['headers']['content-length'] = 0;
}
$req['flags'] = $req['flags'] ?? [];
}
}
/**
* Get a suitable select timeout for the given options.
*
* @param array $opts
* @return float
*/
private function getSelectTimeout( $opts ) {
$connTimeout = $opts['connTimeout'] ?? $this->connTimeout;
$reqTimeout = $opts['reqTimeout'] ?? $this->reqTimeout;
$timeouts = array_filter( [ $connTimeout, $reqTimeout ] );
if ( count( $timeouts ) === 0 ) {
return 1;
}
$selectTimeout = min( $timeouts ) * self::TIMEOUT_ACCURACY_FACTOR
;
// Minimum 10us for sanity
if ( $selectTimeout < 10e-6 ) {
$selectTimeout = 10e-6;
}
return $selectTimeout;
}
/**
* Register a logger * Register a logger
* *
* @param LoggerInterface $logger * @param LoggerInterface $logger
*/ */
public function setLogger( LoggerInterface $logger ) { public function setLogger( LoggerInterface $logger ) {
$this->logger = $logger; $this->logger = $logger;
} }
function __destruct() { function __destruct() {
if ( $this->multiHandle ) { if ( $this->multiHandle ) {
 End of changes. 20 change blocks. 
67 lines changed or deleted 248 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)