轻量级PHP框架

v1.0.7 2024-05-10 07:23 UTC

This package is auto-updated.

Last update: 2024-09-13 10:01:46 UTC


README

Styx

安装

可以使用composer将Styx添加到项目中

composer require vojtechrichter/styx

使用方法

截至目前,您只需将以下调用添加到您的索引文件(或应用的入口点)中

\Styx\Startup::boot($config, $db_config);

示例索引文件

<?php

declare(strict_types=1);

require_once(__DIR__ . '/vendor/autoload');
require_once(__DIR__ . '/env_config.php');

$routes = [
  new \Styx\Routing\Route(
    '/',
    \Example\Controllers\HomeController::class,
    'process',
    'method::any'
  )
];

$styx_config = new \Styx\Config($routes, ENV);

\Styx\Startup::boot($styx_config);

重要提示

Styx正在接受测试,但我不能保证它完全没有错误。