ronmi/fthlc

此包最新版本(0.1)没有可用的许可证信息。

简单但快速的PHP框架

0.1 2015-04-01 08:04 UTC

This package is auto-updated.

Last update: 2024-09-10 07:14:18 UTC


README

FTHLC框架 - 亦称“为热爱C9s框架的人” - 是一个简单但快速的PHP 5.3+ Web框架。

简介

厌倦了使用庞大、缓慢、难以阅读的框架如$ymfoning?使用FTHLC,你会在一瞬间爱上它!

FTHLC代码行数为零,这使得它成为世界上速度最快的Web框架!无需额外努力,无性能损失,只做你想做的事!

我们使用Pux进行路由,LazyRecord进行ORM,以及CLIFramework来拯救你的生命!少步骤,更多C9s!它绝对是C9s全栈解决方案!

入门指南

php composer.phar require ronmi/fthlc

概要

路由

$mux = new Pux\Mux;
$mux->mount('', (new Your/App/Controller())->expand());

控制器

class YourController extends Pux\Controller
{
    public function indexAction($arg1, $arg2)
    {
        // do something
    }
}

模型

class YourModelSchema extends LazyRecord\Schema
{
    public function schema()
    {
        $this->column('column1')->integer()->default(1);
    }
}

vendor/bin/lazy init
vendor/bin/lazy conf
vendor/bin/lazy build-schema
vendor/bin/lazy create-db
vendor/bin/lazy sql

vendor/bin/lazy migrate

命令行界面

class YourCLICommand extends CLIFramework\Command
{
    public function brief() {
        return 'Only for test.';
    }
    public function arguments($args)
    {
        $args->add('arg1');
    }
    public function execute($arg1)
    {
        $this->logger->info($arg1);
    }
}

客户评价