AbstractDelivery

Implements \Dumkaaa\Boxberry\Api\Common\DeliveryInterface

Базовый класс достаки

package

Dumkaaa\Boxberry\Api\Common

Methods

Создает объект доставки

__construct(\Dumkaaa\Boxberry\Api\Common\Http\Client|null $httpClient = null, \Symfony\Component\HttpFoundation\Request|null $httpRequest = null) 

Arguments

$httpRequest

\Symfony\Component\HttpFoundation\Request|null

createRequest

createRequest(string $class, array $parameters) : \Dumkaaa\Boxberry\Api\Common\Message\Request\AbstractRequest
see \Dumkaaa\Boxberry\Api\Common\AbstractResponse

Arguments

$class

string

$parameters

array

Response

\Dumkaaa\Boxberry\Api\Common\Message\Request\AbstractRequest

getDefaultHttpClient

getDefaultHttpClient() : \Dumkaaa\Boxberry\Api\Common\Http\Client

getDefaultHttpRequest

getDefaultHttpRequest() : \Symfony\Component\HttpFoundation\Request

Response

\Symfony\Component\HttpFoundation\Request

Возвращает параметры по умолчанию для сервиса в формате: array( 'token' => '', 'endPoint' => '', );

getDefaultParameters() : array
inheritdoc

Response

array

getParameter

getParameter(string $key) : mixed

Arguments

$key

string

Response

mixed

Возвращает все параметры сервиса

getParameters() : array

Response

array

Возвращает короткое имя класса используемого сервиса

getShortName() : string
inheritdoc

Response

string

Заполняет сервис переданными параметрами

initialize(array $parameters = array()) : $this

$parameters = [ 'api_token' string (Required) Ключ доступа 'endPoint' string (Required) Урл api ]

inheritdoc

Arguments

$parameters

array

Входные параметры (см. выше)

Response

$this

setParameter

setParameter(string $key, mixed $value) : $this

Arguments

$key

string

$value

mixed

Response

$this

Properties

Параметры достаки

parameters : \Symfony\Component\HttpFoundation\ParameterBag
var

Type(s)

\Symfony\Component\HttpFoundation\ParameterBag

PSR-7 Http клиент

httpClient : \Dumkaaa\Boxberry\Api\Common\Http\Client

Объект запроса

httpRequest : \Symfony\Component\HttpFoundation\Request
var

Type(s)

\Symfony\Component\HttpFoundation\Request