Merge pull request #16484 from yashodha/dev_1580
[civicrm-core.git] / Civi / API / Event / ResolveEvent.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
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 +--------------------------------------------------------------------+
10 */
11
12 namespace Civi\API\Event;
13
14 /**
15 * Class ResolveEvent
16 * @package Civi\API\Event
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'
23 */
24 class ResolveEvent extends Event {
25
26 /**
27 * @param array $apiRequest
28 * The full description of the API request.
29 * @param \Civi\API\Kernel $apiKernel
30 * The kernel which fired the event.
31 */
32 public function __construct($apiRequest, $apiKernel) {
33 parent::__construct(NULL, $apiRequest, $apiKernel);
34 }
35
36 /**
37 * @param \Civi\API\Provider\ProviderInterface $apiProvider
38 * The API provider responsible for executing the request.
39 */
40 public function setApiProvider($apiProvider) {
41 $this->apiProvider = $apiProvider;
42 }
43
44 /**
45 * @param array $apiRequest
46 * The full description of the API request.
47 */
48 public function setApiRequest($apiRequest) {
49 $this->apiRequest = $apiRequest;
50 }
51
52 }