hydephp /
develop
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace Hyde\RealtimeCompiler; |
||
| 6 | |||
| 7 | use Desilva\Microserve\Response; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * @public This class is part of the public API and is covered by the backward compatibility promise. |
||
| 11 | */ |
||
| 12 | class RealtimeCompiler |
||
| 13 | { |
||
| 14 | /** @var array<string, callable(\Desilva\Microserve\Request): Response> */ |
||
|
0 ignored issues
–
show
Documentation
Bug
introduced
by
Loading history...
|
|||
| 15 | protected array $virtualRoutes = []; |
||
| 16 | |||
| 17 | /** @param callable(\Desilva\Microserve\Request): Response $route */ |
||
| 18 | public function registerVirtualRoute(string $uri, callable $route): void |
||
| 19 | { |
||
| 20 | $this->virtualRoutes[$uri] = $route; |
||
| 21 | } |
||
| 22 | |||
| 23 | /** @return array<string, callable(\Desilva\Microserve\Request): Response> */ |
||
|
0 ignored issues
–
show
|
|||
| 24 | public function getVirtualRoutes(): array |
||
| 25 | { |
||
| 26 | return $this->virtualRoutes; |
||
| 27 | } |
||
| 28 | } |
||
| 29 |