| Total Complexity | 2 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class Event implements JsonSerializable |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * The constructor. |
||
| 12 | * |
||
| 13 | * @param string $sMode The event mode: 'jq' or 'js' |
||
| 14 | * @param string $sName The event name |
||
| 15 | * @param JsExpr $xHandler The event handler |
||
| 16 | */ |
||
| 17 | public function __construct(private string $sMode, |
||
| 18 | private string $sName, private JsExpr $xHandler) |
||
| 19 | {} |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Convert this call to array, when converting the response into json. |
||
| 23 | * |
||
| 24 | * @return array |
||
| 25 | */ |
||
| 26 | public function jsonSerialize(): array |
||
| 33 | ]; |
||
| 34 | } |
||
| 36 |