2020-03-20 22:10:01 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Plugin\Test;
|
|
|
|
|
2020-08-03 21:53:40 +01:00
|
|
|
use App\Core\Module;
|
|
|
|
use App\Core\Router\RouteLoader;
|
|
|
|
use Plugin\Test\Controller\TestController;
|
|
|
|
|
|
|
|
class Test extends Module
|
2020-03-20 22:10:01 +00:00
|
|
|
{
|
|
|
|
public function onTest(string $foo)
|
|
|
|
{
|
2020-08-03 21:53:40 +01:00
|
|
|
var_dump('Event handled: ' . $foo);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function onAddRoute(RouteLoader $r)
|
|
|
|
{
|
|
|
|
$r->connect('test_foo', '/foo', TestController::class);
|
2020-03-20 22:10:01 +00:00
|
|
|
}
|
|
|
|
}
|