Request implementation

This class represents the http request for the zend server api. Takes care of a method and builds the request from the given information.

license New BSD License
link for the canonical source repository
author Ingo Walz
category Zend
package Zend_Service
subpackage ZendServerAPI

 Methods

Return the current action object

getAction() : \ZendService\ZendServerAPI\Method\Method

Get HTTP client

getClient() : \Zend\Http\Client

Returns

\Zend\Http\Client

Get the Zend Http Client adapter interface

getClientAdapter() : \Client\Adapter\AdapterInterface | null

Returns

\Client\Adapter\AdapterInterfacenull

Returns the currently used config

getConfig() : \ZendService\ZendServerAPI\Config

Get request logger

getLogger() : \Zend\Log\Logger

Returns

\Zend\Log\Logger$logger

Returns the user agent

getUserAgent() : string

Returns

string

Set method implementation object

setAction(\ZendService\ZendServerAPI\Method\Method $action) : \ZendService\ZendServerAPI\Request

Set the client for requests

setClient(\Zend\Http\Client $client) 

Parameters

$client

\Zend\Http\Client

Set an adapter to the Zend Http Client.

setClientAdapter(\Zend\Http\Client\Adapter\AdapterInterface $adapter) : void

Most likely for testing

Parameters

$adapter

\Zend\Http\Client\Adapter\AdapterInterface

Get the used config object

setConfig(\ZendService\ZendServerAPI\Config $config) 

Set request logger

setLogger(\Zend\Log\LoggerInterface $logger) 

Parameters

$logger

\Zend\Log\LoggerInterface

Set the service manager

setServiceManager(\Zend\ServiceManager\ServiceManager $serviceManager) : void

Parameters

$serviceManager

\Zend\ServiceManager\ServiceManager

Set the user agent used by the request

setUserAgent(string $userAgent) 

Parameters

$userAgent

string

Set the headers

addHeaders(\Zend\Http\Headers $header) : \Zend\Http\Headers

Parameters

$header

\Zend\Http\Headers

Returns

\Zend\Http\Headers

Calculate the request signature used for authentification

generateRequestSignature(string $date) : string

Parameters

$date

string

Returns

string

Get a special formatted date string, needed by the server api

getDate() : string

Returns

string

Prepare the request

prepareRequest(\Zend\Http\Request $request) : \Zend\Http\Request

Parameters

$request

\Zend\Http\Request

Returns

\Zend\Http\Request

 Properties

   

$adapter : \Zend\Http\Client\Adapter\AdapterInterface
 

$client : \Zend\Http\Client
   

$logger : \Zend\Log\Logger
 

$sm : \Zend\ServiceManager\ServiceManager
 

$userAgent : string