eZPublishCommunityProject  2013.9
eZ\Publish\Core\Persistence\Solr\Content\Search\Gateway\HttpClient\Stream Class Reference

Simple PHP stream based HTTP client. More...

+ Inheritance diagram for eZ\Publish\Core\Persistence\Solr\Content\Search\Gateway\HttpClient\Stream:
+ Collaboration diagram for eZ\Publish\Core\Persistence\Solr\Content\Search\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 = array()
 
 $server
 

Detailed Description

Simple PHP stream based HTTP client.

Constructor & Destructor Documentation

eZ\Publish\Core\Persistence\Solr\Content\Search\Gateway\HttpClient\Stream::__construct (   $server)

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

Parameters
string$serverRemote server location. Must include the used protocol.

Member Function Documentation

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

Get formatted request headers.

Merged with the default values.

Parameters
array$headers
Returns
string

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

eZ\Publish\Core\Persistence\Solr\Content\Search\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
Message$message
Returns
Message

Implements eZ\Publish\Core\Persistence\Solr\Content\Search\Gateway\HttpClient.

Member Data Documentation

eZ\Publish\Core\Persistence\Solr\Content\Search\Gateway\HttpClient\Stream::$headers = array()
private
eZ\Publish\Core\Persistence\Solr\Content\Search\Gateway\HttpClient\Stream::$server
private

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