ausus/api-runtime 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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\RuntimeApinew RuntimeApi($repo, $engine, $driver, $contextFactory) and dispatch(string $method, string $path, array $headers = [], array $body = []): array{status:int, body:array}.
  • Ausus\Api\Runtime\Http\RequestContextFactory — builds a Context from 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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-29