API 参考
Kuiper 框架的完整 API 参考。
内容
快速查找
按模块
| 模块 | 属性 | 接口 |
|---|---|---|
| 依赖注入 | #[Bean], #[Command], #[Component], #[ConditionalOnClass], #[ConditionalOnMissingBean], #[ConditionalOnMissingClass], #[ConditionalOnProperty], #[Configuration], #[Service] | ContainerBuilderInterface 等 4 个 |
| Web 框架 | #[Controller], #[RequestMapping], #[GetMapping], #[PostMapping], #[PutMapping], #[PatchMapping], #[DeleteMapping], #[OptionsMapping], #[CsrfToken], #[LoginOnly], #[PreAuthorize], #[RateLimit], #[ErrorHandler] | ControllerInterface, SessionInterface, ViewInterface 等 20 个 |
| 数据库 | #[Entity], #[Table], #[Column], #[Id], #[NaturalId], #[Repository], #[ShardKey], #[Transient], #[Embeddable], #[Enumerated], #[GeneratedValue], #[CreationTimestamp], #[UpdateTimestamp], #[Convert] | ConnectionInterface, TransactionManagerInterface 等 23 个 |
| RPC | #[RpcClient], #[RpcService] | TransporterInterface, CodecInterface, RpcRequestInterface 等 31 个 |
| 序列化 | #[SerializeName], #[SerializeIgnore] | SerializerInterface, NormalizerInterface, JsonSerializerInterface |
| 事件 | #[EventListener], #[Async] | EventListenerInterface, AsyncEventDispatcherInterface 等 5 个 |
| HTTP 客户端 | #[HttpClient], #[GetMapping], #[HttpHeader], #[QueryParam] 等 10 个 | HttpClientFactoryInterface |
| 缓存 | - | CacheConstants, DriverInterface |
| 日志 | - | LoggerFactoryInterface |
| 可观测性 (OTel) | - | TelemetryFlushable |
| 容错 (Resilience) | - | CircuitBreaker, Retry, Metrics 等 14 个 |
| 反射 | - | ReflectionClassInterface, TypeParserInterface 等 10 个 |
| Swoole | - | PoolInterface, ConnectionInterface 等 11 个 |
| 工具 | - | ConfigInterface, ConfigAwareInterface |
| 运行时 / 控制台 | - | - |
按用途
| 用途 | 相关属性 |
|---|---|
| 定义组件 | #[Component], #[Service], #[Bean], #[Configuration], #[Command] |
| 路由定义 | #[RequestMapping], #[GetMapping], #[PostMapping], #[PutMapping], #[PatchMapping], #[DeleteMapping], #[OptionsMapping] |
| 条件装配 | #[ConditionalOnClass], #[ConditionalOnMissingBean], #[ConditionalOnMissingClass], #[ConditionalOnProperty] |
| 请求处理 | #[ErrorHandler], #[CsrfToken], #[LoginOnly], #[PreAuthorize], #[RateLimit] |
| HTTP 客户端 | #[HttpClient], #[HttpHeader], #[QueryParam] |
| 数据库映射 | #[Entity], #[Table], #[Column], #[Id], #[NaturalId], #[ShardKey], #[GeneratedValue] |
| 序列化控制 | #[SerializeName], #[SerializeIgnore] |
| 事件监听 | #[EventListener], #[Async] |
文档说明
属性、接口与异常参考由脚本自动生成,与代码保持同步。如需重新生成,请运行:
bash
php scripts/generate-api-docs.php