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

Public Member Functions | Public Attributes | List of all members
eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\DriverInterface Interface Reference

DriverInterface has the definition of the methods needed for our REST tests so Drivers need to implement this interface for a seamless interaction. More...

Inheritance diagram for eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\DriverInterface:

## Public Member Functions
| send ()
| Send the request. More...
| setHost ($host)
| Set request host. More...
| setResource ($resource)
| Set request resource url. More...
| setMethod ($method)
| Set request method. More...
| getStatusCode ()
| Get response status code. More...
| getStatusMessage ()
| Get response status message. More...
| getHeader ($header)
| Get response header. More...
| setHeader ($header, $value)
| Set request header. More...
| getHeaders ()
| Get all response headers. More...
| setHeaders ($headers)
| Set request headers. More...
| getBody ()
| Get response body. More...
| setBody ($body)
| Set request body. More...
| setAuthentication ($user, $password, $type=self::AUTH_TYPE_BASIC)
| Set authentication. More...

## Public Attributes
const | AUTH_TYPE_BASIC = 'BASIC'
| authentication types. More...

## Detailed Description

DriverInterface has the definition of the methods needed for our REST tests so Drivers need to implement this interface for a seamless interaction.

Notice: Setters are for request and Getters for response since no assertion is done on requests, and no set is done onto responses

Definition at line 16 of file DriverInterface.php.

## Member Function Documentation

## ◆ getBody()

eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\DriverInterface::getBody | ( |  | ) |

Get response body.

Returns
  string

Exceptions

Implemented in eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\GuzzleDriver, eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\Guzzle4Driver, and eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\BuzzDriver.

## ◆ getHeader()

eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\DriverInterface::getHeader | ( |  | $header | ) |

Get response header.

Parameters

  string | $header | Header to fetch

Returns
  string Header value, or a list if its more than one

Exceptions

## ◆ getHeaders()

eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\DriverInterface::getHeaders | ( |  | ) |

Get all response headers.

Returns
  array Associative array with $header => $value (value can be an array if it hasn't a single value)

Exceptions

Implemented in eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\GuzzleDriver, eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\Guzzle4Driver, and eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\BuzzDriver.

## ◆ getStatusCode()

eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\DriverInterface::getStatusCode | ( |  | ) |

Get response status code.

Returns
  string

Exceptions

Implemented in eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\GuzzleDriver, and eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\BuzzDriver.

## ◆ getStatusMessage()

eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\DriverInterface::getStatusMessage | ( |  | ) |

Get response status message.

Returns
  string

Exceptions

Implemented in eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\GuzzleDriver, and eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\BuzzDriver.

## ◆ send()

eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\DriverInterface::send | ( |  | ) |

Send the request.

Implemented in eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\GuzzleDriver, eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\Guzzle4Driver, and eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\BuzzDriver.

## ◆ setAuthentication()

eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\DriverInterface::setAuthentication | ( |  | $user,
|  |  | $password,
|  |  | $type = `self::AUTH_TYPE_BASIC`
| ) |  |

Set authentication.

Parameters

  string | $user |
  string | $password |
  string | $type | Authentication type

## ◆ setBody()

eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\DriverInterface::setBody | ( |  | $body | ) |

Set request body.

Parameters

  string | $body |

Implemented in eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\GuzzleDriver, eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\Guzzle4Driver, and eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\BuzzDriver.

## ◆ setHeader()

eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\DriverInterface::setHeader | ( |  | $header,
|  |  | $value
| ) |  |

Set request header.

Parameters

  string | $header | Header to be set

Implemented in eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\GuzzleDriver, and eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\BuzzDriver.

## ◆ setHeaders()

eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\DriverInterface::setHeaders | ( |  | $headers | ) |

Set request headers.

Parameters

  array | $headers | Associative array with $header => $value (value can be an array if it hasn't a single value)

## ◆ setHost()

eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\DriverInterface::setHost | ( |  | $host | ) |

Set request host.

Parameters

  string | $host |

Implemented in eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\GuzzleDriver, and eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\BuzzDriver.

## ◆ setMethod()

eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\DriverInterface::setMethod | ( |  | $method | ) |

Set request method.

Parameters

  string | $method | Can be GET, POST, PATCH, ...

Implemented in eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\GuzzleDriver, and eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\BuzzDriver.

## ◆ setResource()

eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\DriverInterface::setResource | ( |  | $resource | ) |

Set request resource url.

Parameters

  string | $resource |

Implemented in eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\GuzzleDriver, and eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\BuzzDriver.

## Member Data Documentation

## ◆ AUTH_TYPE_BASIC

const eZ\Bundle\EzPublishRestBundle\Features\Context\RestClient\DriverInterface::AUTH_TYPE_BASIC = 'BASIC'

authentication types.

Definition at line 21 of file DriverInterface.php.

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

- DriverInterface.php

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