enlighten/framework 问题修复 & 功能扩展

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

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

enlighten/framework

最新稳定版本:v0.1-alpha

Composer 安装命令:

composer require enlighten/framework

包简介

A lightweight PHP micro framework that helps you get shit done.

README 文档

README

Documentation Status Build Status Latest Stable Version Latest Unstable Version License Test Coverage

Enlighten is a simple, lean, high-performance PHP micro framework that acts as the foundation for your web application.

This is a modern framework for PHP 5 that doesn't get in your way. Just the building blocks you need to accelerate your application development and simply get shit done.

  • Easy HTTP request and response management: forms, headers, cookies, files and more.
  • Razor fast routing with dynamic URL variables and dependency injection.
  • Application and route filters for handling authentication, exceptions, etc.

It's easy to use:

$app->get('/hello/$name', function ($name) {
    echo "Hi there, $name";
});

It is awesome because it is:

  • Built for ease of use and performance.
  • Low on fat: small code base with minimal external dependencies.
  • Stable: tested extensively with a battery of unit tests.
  • Future-proof: Fully compatible with HHVM and PHP 7.

Getting started

To get started, add Enlighten as a Composer dependency to your project:

composer require enlighten/framework

In the entry point (index.php) of your application, initialize and start Enlighten:

$app = new Enlighten();
$app->start();

You'll need to make sure that your web server redirects all requests you want to handle with Enlighten to this script. This code will initialize a blank application and process all incoming requests.

Next, you will want to define routes. Routes map an incoming request to an appropriate function or controller that can respond to it. It's easy to set up:

$app->get('/articles/$name', function ($name) {
    // Triggered for all GET requests to /articles/*
    echo "You requested an article with this name: $name";
});

Check out the full documentation and quickstart guide at https://enlighten.readthedocs.org/en/latest/.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-07-06