composer update

This commit is contained in:
Manish Verma
2018-12-05 10:50:52 +05:30
parent 9eabcacfa7
commit 4addd1e9c6
3328 changed files with 156676 additions and 138988 deletions

View File

@@ -274,6 +274,25 @@ function default_http_handler()
throw new \RuntimeException('Unknown Guzzle version: ' . $version);
}
/**
* Gets the default user agent string depending on the Guzzle version
*
* @return string
*/
function default_user_agent()
{
$version = (string) ClientInterface::VERSION;
if ($version[0] === '5') {
return \GuzzleHttp\Client::getDefaultUserAgent();
}
if ($version[0] === '6') {
return \GuzzleHttp\default_user_agent();
}
throw new \RuntimeException('Unknown Guzzle version: ' . $version);
}
/**
* Serialize a request for a command but do not send it.
*
@@ -353,3 +372,18 @@ function manifest($service = null)
"The service \"{$service}\" is not provided by the AWS SDK for PHP."
);
}
/**
* Checks if supplied parameter is a valid hostname
*
* @param string $hostname
* @return bool
*/
function is_valid_hostname($hostname)
{
return (
preg_match("/^([a-z\d](-*[a-z\d])*)(\.([a-z\d](-*[a-z\d])*))*\.?$/i", $hostname)
&& preg_match("/^.{1,253}$/", $hostname)
&& preg_match("/^[^\.]{1,63}(\.[^\.]{0,63})*$/", $hostname)
);
}