Merge pull request #6226 from eileenmcnaughton/CRM-16856
[civicrm-core.git] / Civi / API / Event / Event.php
index 0fab1eda3a7c2de58d868980bd5fafc337c8793a..2a0e1130114ce3d12bae53e4628d4f88ff013d67 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | 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,25 +32,45 @@ 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.
    */
   protected $apiProvider;
 
   /**
    * @var array
+   *   The full description of the API request.
+   *
+   * @see \Civi\API\Request::create
    */
   protected $apiRequest;
 
   /**
-   * @param $apiProvider
-   * @param $apiRequest
+   * @param \Civi\API\Provider\ProviderInterface $apiProvider
+   *   The API responsible for executing the request.
+   * @param array $apiRequest
+   *   The full description of the API request.
    */
-  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
    */
@@ -64,4 +84,5 @@ class Event extends \Symfony\Component\EventDispatcher\Event {
   public function getApiRequest() {
     return $this->apiRequest;
   }
+
 }