mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-19 05:34:53 +08:00
27 lines
493 B
PHP
27 lines
493 B
PHP
<?php
|
||
|
||
declare(strict_types=1);
|
||
|
||
namespace Module\Example;
|
||
|
||
use ZM\Annotation\Framework\Setup;
|
||
use ZM\Annotation\Http\Route;
|
||
use ZM\Annotation\Middleware\Middleware;
|
||
use ZM\Middleware\TimerMiddleware;
|
||
|
||
class Hello123
|
||
{
|
||
#[Setup]
|
||
public function onRequest()
|
||
{
|
||
echo "OK\n";
|
||
}
|
||
|
||
#[Route('/route', request_method: ['GET'])]
|
||
#[Middleware(TimerMiddleware::class)]
|
||
public function route()
|
||
{
|
||
return 'Hello Zhamao!This is the first 3.0 page!';
|
||
}
|
||
}
|