$host = $this->getOption( 'host' );
$serverCount = $lb->getServerCount();
for ( $index = 0; $index < $serverCount; ++$index ) {
- $serverInfo = $lb->getServerInfo( $index );
-
if ( $lb->getServerName( $index ) === $host ) {
break;
}
} elseif ( substr_count( $realServer, ':' ) == 1 ) {
// If we have a colon and something that's not a port number
// inside the hostname, assume it's the socket location
- $hostAndSocket = explode( ':', $realServer, 2 );
- $realServer = $hostAndSocket[0];
- $socket = $hostAndSocket[1];
+ list( $realServer, $socket ) = explode( ':', $realServer, 2 );
}
if ( $dbName === false ) {