Commit | Line | Data |
---|---|---|
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 | |
12 | namespace Civi\API\Event; | |
13 | ||
6550386a EM |
14 | /** |
15 | * Class ResolveEvent | |
16 | * @package Civi\API\Event | |
39b870b8 TO |
17 | * |
18 | * Determine which API provider executes the given request. For successful | |
19 | * execution, at least one listener must invoke | |
20 | * $event->setProvider($provider). | |
21 | * | |
22 | * Event name: 'civi.api.resolve' | |
6550386a | 23 | */ |
787604ff | 24 | class ResolveEvent extends Event { |
34f3bbd9 | 25 | |
6550386a | 26 | /** |
8882ff5c TO |
27 | * @param array $apiRequest |
28 | * The full description of the API request. | |
c98e9ee3 TO |
29 | * @param \Civi\API\Kernel $apiKernel |
30 | * The kernel which fired the event. | |
6550386a | 31 | */ |
c98e9ee3 TO |
32 | public function __construct($apiRequest, $apiKernel) { |
33 | parent::__construct(NULL, $apiRequest, $apiKernel); | |
787604ff TO |
34 | } |
35 | ||
36 | /** | |
37 | * @param \Civi\API\Provider\ProviderInterface $apiProvider | |
8882ff5c | 38 | * The API provider responsible for executing the request. |
787604ff TO |
39 | */ |
40 | public function setApiProvider($apiProvider) { | |
41 | $this->apiProvider = $apiProvider; | |
42 | } | |
43 | ||
44 | /** | |
45 | * @param array $apiRequest | |
8882ff5c | 46 | * The full description of the API request. |
787604ff TO |
47 | */ |
48 | public function setApiRequest($apiRequest) { | |
49 | $this->apiRequest = $apiRequest; | |
50 | } | |
96025800 | 51 | |
787604ff | 52 | } |