2022-08-14 18:15:45 +08:00

27 lines
493 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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 ZhamaoThis is the first 3.0 page';
}
}