File: /home4/cca63905/www/nueva/modules/btecommercecopilot/vendor/guzzlehttp/psr7/src/functions.php
<?php
namespace GuzzleHttp\Psr7;
use Psr\Http\Message\MessageInterface;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\StreamInterface;
use Psr\Http\Message\UriInterface;
/**
* Returns the string representation of an HTTP message.
*
* @param MessageInterface $message Message to convert to a string.
*
* @return string
*
* @deprecated str will be removed in guzzlehttp/psr7:2.0. Use Message::toString instead.
*/
function str(MessageInterface $message)
{
return Message::toString($message);
}
/**
* Returns a UriInterface for the given value.
*
* This function accepts a string or UriInterface and returns a
* UriInterface for the given value. If the value is already a
* UriInterface, it is returned as-is.
*
* @param string|UriInterface $uri
*
* @return UriInterface
*
* @throws \InvalidArgumentException
*
* @deprecated uri_for will be removed in guzzlehttp/psr7:2.0. Use Utils::uriFor instead.
*/
function uri_for($uri)
{
return Utils::uriFor($uri);
}
function stream_for($resource = '', array $options = [])
{
return Utils::streamFor($resource, $options);
}
function parse_header($header)
{
return Header::parse($header);
}
function normalize_header($header)
{
return Header::normalize($header);
}
function modify_request(RequestInterface $request, array $changes)
{
return Utils::modifyRequest($request, $changes);
}
function rewind_body(MessageInterface $message)
{
Message::rewindBody($message);
}
function try_fopen($filename, $mode)
{
return Utils::tryFopen($filename, $mode);
}
function copy_to_string(StreamInterface $stream, $maxLen = -1)
{
return Utils::copyToString($stream, $maxLen);
}
function copy_to_stream(StreamInterface $source, StreamInterface $dest, $maxLen = -1)
{
return Utils::copyToStream($source, $dest, $maxLen);
}
function hash(StreamInterface $stream, $algo, $rawOutput = false)
{
return Utils::hash($stream, $algo, $rawOutput);
}
function readline(StreamInterface $stream, $maxLength = null)
{
return Utils::readLine($stream, $maxLength);
}
function parse_request($message)
{
return Message::parseRequest($message);
}
function parse_response($message)
{
return Message::parseResponse($message);
}
function parse_query($str, $urlEncoding = true)
{
return Query::parse($str, $urlEncoding);
}
function build_query(array $params, $encoding = PHP_QUERY_RFC3986)
{
return Query::build($params, $encoding);
}
function mimetype_from_filename($filename)
{
return MimeType::fromFilename($filename);
}
function mimetype_from_extension($extension)
{
return MimeType::fromExtension($extension);
}
function _parse_message($message)
{
return Message::parseMessage($message);
}
function _parse_request_uri($path, array $headers)
{
return Message::parseRequestUri($path, $headers);
}
function get_message_body_summary(MessageInterface $message, $truncateAt = 120)
{
return Message::bodySummary($message, $truncateAt);
}
function _caseless_remove($keys, array $data)
{
return Utils::caselessRemove($keys, $data);
}