Merge pull request #6226 from eileenmcnaughton/CRM-16856
[civicrm-core.git] / Civi / API / Event / Event.php
index b205a6eaa47d01ca7b31c5e4ea066eb8528e37dc..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.                                    |
  |                                                                    |
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 namespace Civi\API\Event;
 
@@ -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
    */
@@ -70,4 +84,5 @@ class Event extends \Symfony\Component\EventDispatcher\Event {
   public function getApiRequest() {
     return $this->apiRequest;
   }
+
 }