| 1 |
<?php |
| 2 |
|
| 3 |
namespace FluentBooking\Framework\Http; |
| 4 |
|
| 5 |
class Group |
| 6 |
{ |
| 7 |
protected $router = null; |
| 8 |
protected $callback = null; |
| 9 |
|
| 10 |
public function __construct($router, $callback) |
| 11 |
{ |
| 12 |
$this->router = $router; |
| 13 |
$this->callback = $callback; |
| 14 |
} |
| 15 |
|
| 16 |
public function __call($method, $params) |
| 17 |
{ |
| 18 |
$this->router->{$method}(...$params); |
| 19 |
|
| 20 |
return $this; |
| 21 |
} |
| 22 |
|
| 23 |
public function __destruct() |
| 24 |
{ |
| 25 |
$this->router->executeGroupCallback($this->callback); |
| 26 |
} |
| 27 |
} |
| 28 |
|