assegaiphp/core 问题修复 & 功能扩展

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

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

assegaiphp/core

最新稳定版本:0.9.1

Composer 安装命令:

composer require assegaiphp/core

包简介

A progressive PHP framework for building efficient and scalable server-side applications.

README 文档

README

Assegai Logo

Latest release Tests PHP 8.4+ License Status active

A progressive PHP framework for building effecient and scalable server-side applications.

Description

Assegai is a framework for building efficient, scalable PHP server-side applications. It uses modern PHP (PHP 8.4+) and combines elements of OOP (Object Oriented Programming) and FP (Functional Programming).

Contribution workflow

For commit and pull request conventions in this repo, see:

Philosophy

In recent years, PHP has gained a lot of features out the box that make it a really compelling language for developers. Assegai aims to take advantage of these wonderful features and provide an application architecture which allows for the effortless creation of highly testable, scalable, loosely coupled and easily maintainable applications. The architecture is heavily inspired by Nestjs.

Getting started

Quick Start

$ composer require assegaiphp/core

For a real application, the recommended path is still the CLI:

$ assegai new my-app

Then use Core directly when you want to understand or extend the framework runtime itself.

Minimal bootstrap

<?php
// <path-to-project>/index.php

if (!isset($_GET['path']) || $_GET['path'] === '') {
  $_GET['path'] = trim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '/');
}

require_once __DIR__ . '/bootstrap.php';

Bootstrap the app:

<?php
// <path-to-project>/bootstrap.php

use Assegai\Core\AssegaiFactory;
use App\AppModule;

require __DIR__ . '/vendor/autoload.php';

function bootstrap(): void
{
  $app = AssegaiFactory::createFromProject(AppModule::class, __DIR__);
  $app->run();
}

bootstrap();

Start the development server:

$ assegai serve

For the fuller walkthrough, start with Getting Started.

Server-rendered UI, HTMX, and Web Components

Assegai is not JSON-only. The framework supports classic server-rendered views through view(...), component-backed pages through render(...), automatic HTMX inclusion in rendered HTML, and first-class Web Components hydration through safe data-props helpers plus automatic bundle injection.

For the full walkthrough, see Pages and Components.

Data, ORM, and Relations

For data-backed applications, Assegai ships with a TypeORM-inspired workflow around modules, repositories, entities, and migrations. The fuller persistence track now lives in:

Constrained Route Params

Assegai routes support constrained dynamic params using angle-bracket syntax:

#[Get(':id<int>')]
public function findById(#[Param('id')] int $id): object
{
  // ...
}

Built-in constraints currently include int, slug, uuid, alpha, alnum, hex, and ulid.

For the full guide set, visit assegaiphp.com/guide.

Questions

For questions and support, use the official guide and support pages:

The issue list of this repo is exclusively for bug reports and feature requests.

Issues

Please make sure to read the Issues Reporting Checklist before opening an issue. Issues not conforming to the guidelines may be closed immediately.

Consulting

With official support, you can get expert help straight from the Assegai core team. We provide dedicated technical support, migration strategies, advice on best practices and design decisions, PR reviews, and team augmentation. Read more about support here.

Support

Assegai is an MIT-licensed open source project. It can grow thanks to sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Assegai is MIT licensed.

统计信息

  • 总下载量: 424
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 2

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固