Merge pull request #6226 from eileenmcnaughton/CRM-16856
[civicrm-core.git] / Civi / API / Event / Event.php
index 6ab0f92eef68a4ae8459c7b7c9021669906995f8..2a0e1130114ce3d12bae53e4628d4f88ff013d67 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -32,6 +32,12 @@ namespace Civi\API\Event;
  * @package Civi\API\Event
  */
 class Event extends \Symfony\Component\EventDispatcher\Event {
+
+  /**
+   * @var \Civi\API\Kernel
+   */
+  protected $apiKernel;
+
   /**
    * @var \Civi\API\Provider\ProviderInterface
    *   The API provider responsible for executing the request.
@@ -52,11 +58,19 @@ class Event extends \Symfony\Component\EventDispatcher\Event {
    * @param array $apiRequest
    *   The full description of the API request.
    */
-  public function __construct($apiProvider, $apiRequest) {
+  public function __construct($apiProvider, $apiRequest, $apiKernel) {
+    $this->apiKernel = $apiKernel;
     $this->apiProvider = $apiProvider;
     $this->apiRequest = $apiRequest;
   }
 
+  /**
+   * @return \Civi\API\Kernel
+   */
+  public function getApiKernel() {
+    return $this->apiKernel;
+  }
+
   /**
    * @return \Civi\API\Provider\ProviderInterface
    */