<?php

namespace App\Service\Moz\Adapters;

use App\Service\Moz\ConfigurableInterface;
use App\Service\Moz\Request;
use App\Service\Moz\Response;

/**
 * Interface for client adapters.
 *
 * The goal of an adapter is to accept a query, execute it and return the right
 * result object.
 *
 * The adapter structure allows for varying implementations of this task.
 *
 * Most adapters will use some sort of HTTP client. In that case the
 * query request builders and query response parsers can be used to simplify
 * HTTP communication.
 *
 * However an adapter may also implement all logic by itself if needed.
 */
interface AdapterInterface extends ConfigurableInterface
{
    /**
     * Execute a request.
     *
     * @param Request $request
     *
     * @return Response
     */
    public function execute(Request $request);
}
