public __construct ( null | string | Psr\Http\Message\UriInterface $uri = null, null | string $method = null, string | resource | Psr\Http\Message\StreamInterface $body = 'php://temp', array $headers = [] ) | ||
$uri | null | string | Psr\Http\Message\UriInterface | URI for the request, if any. |
$method | null | string | HTTP method for the request, if any. |
$body | string | resource | Psr\Http\Message\StreamInterface | Message body, if any. |
$headers | array | Headers for the message, if any. |
/** * @param null|string $uri URI for the request, if any. * @param null|string $method HTTP method for the request, if any. * @param string|resource|StreamInterface $body Message body, if any. * @param array $headers Headers for the message, if any. * * @throws \InvalidArgumentException for any invalid value. */ public function __construct($uri = null, $method = null, $body = 'php://input', array $headers = []) { parent::__construct($uri, $method, $body, $headers); }
/** * Create notify request object */ public function __construct() { parent::__construct(sprintf('%s:%s', Client::MULTICAST_ADDRESS, Client::MULTICAST_PORT), self::METHOD); }
/** * @param null|string|\Psr\Http\Message\UriInterface $uri The request uri. * @param null|string $method The request method. * @param string|resource|\Psr\Http\Message\StreamInterface $body The request body. * @param array $headers The request headers. * @param array $parameters The request parameters. */ public function __construct($uri = null, $method = null, $body = 'php://memory', array $headers = array(), array $parameters = array()) { parent::__construct($uri, $method, $body, $headers); $this->parameters = $parameters; }