| 12345678910111213141516171819202122232425262728 |
- <?php
- namespace Tools;
- class HookEvent
- {
- private $context;
- private $hookName;
- private $params;
- public function __construct($hookName, $context, $params)
- {
- $this->context = $context;
- $this->hookName = $hookName;
- $this->params = $params;
- }
- public function __get($key)
- {
- switch ($key)
- {
- case "hookName": return $this->hookName; break;
- case "params": return $this->params; break;
- }
- throw new \Exception("Cannot access attribute {$key}");
- }
- }
|