Merge pull request #19766 from WeMoveEU/faster-select2-groups
[civicrm-core.git] / Civi / API / Provider / ProviderInterface.php
CommitLineData
787604ff
TO
1<?php
2/*
3 +--------------------------------------------------------------------+
41498ac5 4 | Copyright CiviCRM LLC. All rights reserved. |
787604ff 5 | |
41498ac5
TO
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 |
787604ff 9 +--------------------------------------------------------------------+
d25dd0ee 10 */
787604ff
TO
11
12namespace Civi\API\Provider;
46bcf597 13
787604ff
TO
14/**
15 * An API "provider" provides a means to execute API requests.
16 */
17interface ProviderInterface {
34f3bbd9 18
82376c19
TO
19 /**
20 * @param array $apiRequest
8882ff5c 21 * The full description of the API request.
a6c01b45
CW
22 * @return array
23 * structured response data (per civicrm_api3_create_success)
82376c19
TO
24 * @see civicrm_api3_create_success
25 * @throws \API_Exception
26 */
8882ff5c 27 public function invoke($apiRequest);
82376c19
TO
28
29 /**
30 * @param int $version
8882ff5c 31 * API version.
82376c19
TO
32 * @return array<string>
33 */
8882ff5c 34 public function getEntityNames($version);
82376c19
TO
35
36 /**
37 * @param int $version
8882ff5c 38 * API version.
82376c19 39 * @param string $entity
8882ff5c 40 * API entity.
82376c19
TO
41 * @return array<string>
42 */
8882ff5c 43 public function getActionNames($version, $entity);
96025800 44
8882ff5c 45}