public static function getInstance($method, $url = false)
{
if ($url === false) {
if (!(list($method, $url) = explode(';', $method))) {
throw new dropr_Client_Exception("Could not explode method and url from '{$method}'");
}
}
$key = $method . ';' . $url;
if (!isset(self::$instances[$key])) {
// Guess the classname from transport method
$className = 'dropr_Client_Peer_' . ucfirst($method);
self::$instances[$key] = new $className($method, $url);
}
return self::$instances[$key];
}