ausus/api-runtime
Composer 安装命令:
composer require ausus/api-runtime
包简介
AUSUS L4 — HTTP API Runtime. Consumes SchemaRepository / EntityEngine / RuntimeEntity only: resolve → bind → invoke/read. Never compiles, canonicalises, hashes, or loads DSL.
README 文档
README
AUSUS 2.0 — HTTP API Runtime (L4). A framework-agnostic HTTP surface over a
compiled domain: resolve → bind → invoke/read. It consumes only the
SchemaRepository / EntityEngine / RuntimeEntity contracts — it never
compiles, canonicalises, hashes, or loads the DSL. No PSR-7 dependency; requests
and responses are plain arrays.
Installation
composer require ausus/api-runtime:^2.0
Dependencies
- PHP 8.3+
ausus/kernel,ausus/entity-engine
Public surface
Ausus\Api\Runtime\Http\RuntimeApi—new RuntimeApi($repo, $engine, $driver, $contextFactory)anddispatch(string $method, string $path, array $headers = [], array $body = []): array{status:int, body:array}.Ausus\Api\Runtime\Http\RequestContextFactory— builds aContextfrom HTTP headers (X-Tenant-ID,X-Actor-Type, …).
Routes: GET /api/entities/{entity}, GET …/projections/{projection},
POST …/actions/{action}.
Minimal example
<?php use Ausus\Api\Runtime\Http\RuntimeApi; use Ausus\Api\Runtime\Http\RequestContextFactory; $api = new RuntimeApi($repository, $engine, $driver, new RequestContextFactory(new DateTimeImmutable())); $res = $api->dispatch('GET', '/api/entities/customer/projections/board', ['X-Tenant-ID' => 'acme', 'X-Actor-Type' => 'user']); // $res === ['status' => 200, 'body' => [...]]
Documentation
See the canonical reference docs/v2/ and the
Quick Start.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-29