Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Protected Member Functions | Private Attributes | List of all members
eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\HttpClient\Stream Class Reference

Simple PHP stream based HTTP client. More...

Inheritance diagram for eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\HttpClient\Stream:

## Public Member Functions
| __construct ($server)
| Constructs a new REST client instance for the given $server. More...
| request ($method, $path, Message $message=null)
| Execute a HTTP request to the remote server. More...

## Protected Member Functions
| getRequestHeaders (array $headers)
| Get formatted request headers. More...

## Private Attributes
| $headers = []
| $server

## Detailed Description

Simple PHP stream based HTTP client.

Definition at line 16 of file Search/Elasticsearch/Content/Gateway/HttpClient/Stream.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\HttpClient\Stream::__construct | ( |  | $server | ) |

Constructs a new REST client instance for the given $server.

Parameters

  string | $server | Remote server location. Must include the used protocol.

Definition at line 37 of file Search/Elasticsearch/Content/Gateway/HttpClient/Stream.php.

References eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\HttpClient\Stream\$server.

## Member Function Documentation

## ◆ getRequestHeaders()

eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\HttpClient\Stream::getRequestHeaders | ( | array | $headers | ) |
| protected

Get formatted request headers.

Merged with the default values.

Parameters

  array | $headers |

Returns
  string

Definition at line 139 of file Search/Elasticsearch/Content/Gateway/HttpClient/Stream.php.

References eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\HttpClient\Stream\$headers.

Referenced by eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\HttpClient\Stream\request().

## ◆ request()

eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\HttpClient\Stream::request | ( |  | $method,
|  |  | $path,
|  | Message | $message = `null`
| ) |  |

Execute a HTTP request to the remote server.

Returns the result from the remote server.

Parameters

  string | $method |
  string | $path |
  \eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Message | $message |

Returns
  \eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Message

Implements eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\HttpClient.

Definition at line 71 of file Search/Elasticsearch/Content/Gateway/HttpClient/Stream.php.

References eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\HttpClient\Stream\$headers, and eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\HttpClient\Stream\getRequestHeaders().

## Member Data Documentation

## ◆ $headers

eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\HttpClient\Stream::$headers = []
| private

Definition at line 23 of file Search/Elasticsearch/Content/Gateway/HttpClient/Stream.php.

Referenced by eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\HttpClient\Stream\getRequestHeaders(), and eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\HttpClient\Stream\request().

## ◆ $server

eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\HttpClient\Stream::$server
| private

Definition at line 30 of file Search/Elasticsearch/Content/Gateway/HttpClient/Stream.php.

Referenced by eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\HttpClient\Stream\__construct().

The documentation for this class was generated from the following file:

- Search/Elasticsearch/Content/Gateway/HttpClient/Stream.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.