tyler/limon 问题修复 & 功能扩展

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

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

tyler/limon

最新稳定版本:v0.3.0

Composer 安装命令:

composer require tyler/limon

包简介

Dependency-less, Simple PHP Framework

README 文档

README

Dependency-less PHP Micro Framework with a focus on simplicity to get you prototyping and delivering new APIs and Websites quickly.

Basic Usage

<?php // example basic index.php

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

(function() {
    $app = new Limon\App(
        new Limon\Kernel(
            new ActionResolver
        )
    );

    /** @var Psr\Http\Message\ServerRequestInterface $request */
    $request = captureServerRequest();

    // Reguster a handler, this can be replaced 
    // with middleware that sets the request-handler attribute
    // with a routing package
    $request = $request->withAttribute(
        'requst-handler', 
        fn(ServerRequestInterface $request) => new Response()
    );

    $res = $app->handle($request);

    Limon\emit($res);
})();

Getting Started

This getting started is based on XAMPP

  1. Require the composer package
composer require tylersriver/limon
  1. Create index.php at Apache web root
  2. Create .htaccess with below
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>

Packages

Limon adheres to the PSR standards for request, response, middleware handling and can be used with any compliant packages. There are some default packages wired to the example skeleton app here

Actions

Yocto is built around the idea of ADR and includes a base Action interface that can be implemented for splitting your http routes into separate objects.

Router

Container

Views

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-09-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固