AbstractRequest

Implements \Dumkaaa\Boxberry\Api\Common\Message\RequestInterface

Абстрактный класс запроса

package

Dumkaaa\Boxberry\Api\Common\Message\Request

Methods

__construct

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

Arguments

$httpRequest

\Symfony\Component\HttpFoundation\Request

getEndPoint

getEndPoint() : string

Response

string

Возвращает заголовки запроса

getHeaders() : array

Response

array

getHttpMethod

getHttpMethod() : string

Response

string

Возвращает метод api boxberry

getMethod() : string
abstract

Response

string

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

getParameter(string $key) : mixed

Arguments

$key

string

The parameter key

Response

mixed

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

getParameters() : array
inheritdoc

Response

array

Возвращает поодготовленные к отправке параметры запроса

getPreparedData() : array

Response

array

Возвращает полученный ответ

getResponse() : \Dumkaaa\Boxberry\Api\Common\Message\ResponseInterface

Возвращает токен api boxberry

getToken() : string
abstract

Response

string

Возвращает правила валидации

getValidationRules() : array
Throws
\Symfony\Component\Validator\Exception\MissingOptionsException
\Symfony\Component\Validator\Exception\InvalidOptionsException
\Symfony\Component\Validator\Exception\ConstraintDefinitionException

Response

array

Инициализация параметров запроса

initialize(array $parameters = array()) : $this
inheritdoc
Throws
\Dumkaaa\Boxberry\Api\Common\Exception\RuntimeException

Arguments

$parameters

array

Response

$this

Отправка запроса

send() : \Dumkaaa\Boxberry\Api\Common\Message\ResponseInterface
inheritdoc
Throws
\ReflectionException

Response

\Dumkaaa\Boxberry\Api\Common\Message\ResponseInterface

sendData

sendData( $data) 
inheritdoc
Throws
\Dumkaaa\Boxberry\Api\Common\Exception\RuntimeException
\ReflectionException

Arguments

$data

setEndPoint

setEndPoint( $endPoint) : \Dumkaaa\Boxberry\Api\Common\Message\Request\AbstractRequest

Устанавливает параметр запроса

setParameter( $key,  $value) : $this
Throws
\Dumkaaa\Boxberry\Api\Common\Exception\RuntimeException

Arguments

$key

$value

Response

$this

setToken

setToken( $token) 
abstract

Arguments

$token

Валидация параметров запроса

validateData() 
Throws
\Symfony\Component\Validator\Exception\MissingOptionsException
\Symfony\Component\Validator\Exception\InvalidOptionsException
\Symfony\Component\Validator\Exception\ConstraintDefinitionException

Properties

Параметры запроса

parameters : \Symfony\Component\HttpFoundation\ParameterBag
var

Type(s)

\Symfony\Component\HttpFoundation\ParameterBag

Валидатор параметров запроса

validator : \Symfony\Component\Validator\Validator\ValidatorInterface
var

Type(s)

\Symfony\Component\Validator\Validator\ValidatorInterface

HttpClient, отправляющий запросы

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

HTTP запрос

httpRequest : \Symfony\Component\HttpFoundation\Request
var

Type(s)

\Symfony\Component\HttpFoundation\Request

Полученный ответ

response : \Dumkaaa\Boxberry\Api\Common\Message\ResponseInterface