3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
12 namespace Civi\API\Event
;
16 * @package Civi\API\Event
18 * Apply post-execution filtering to the API request/response.
20 * Event name: 'civi.api.respond'
22 class RespondEvent
extends Event
{
29 * @param \Civi\API\Provider\ProviderInterface $apiProvider
30 * The API provider responsible for executing the request.
31 * @param array $apiRequest
32 * The full description of the API request.
33 * @param mixed $response
34 * The response to return to the client.
35 * @param \Civi\API\Kernel $apiKernel
36 * The kernel which fired the event.
38 public function __construct($apiProvider, $apiRequest, $response, $apiKernel) {
39 $this->response
= $response;
40 parent
::__construct($apiProvider, $apiRequest, $apiKernel);
46 public function getResponse() {
47 return $this->response
;
51 * @param mixed $response
52 * The response to return to the client.
54 public function setResponse($response) {
55 $this->response
= $response;