ecom
E-commerce cms
 All Data Structures Namespaces Files Functions Variables
HookEvent.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Tools;
4 
9 class HookEvent
10 {
16  private $context;
17 
23  private $hookName;
24 
30  private $params;
31 
35  public function __construct($hookName, $context, $params)
36  {
37  $this->context = $context;
38  $this->hookName = $hookName;
39  $this->params = $params;
40  }
41 
45  public function __get($key)
46  {
47  switch ($key)
48  {
49  case "hookName": return $this->hookName; break;
50  case "params": return $this->params; break;
51  }
52  throw new \Exception("Cannot access attribute {$key}");
53  }
54 }
55 
__construct($hookName, $context, $params)
Definition: HookEvent.php:35