Coder Social home page Coder Social logo

first's Introduction

我想要写一个WEB框架(基本**抄袭laravel)

DOC

目前只能写成一个简单的API框架,目标是一个全栈的框架。
    $route = new \Bin\Route\RouteCollection();
    $route::get('/get/callback', function(){
        return __LINE__;
    });

正则匹配 Route

    $route::get('/callback/{no}', function($a){
        return __LINE__ . $a;
    })->with('[0-9]+');

Class Route

    $route::get('/get/view', 'AA@BB');

多匹配 Route

$route::getArray(['/rel1' => 'AA@rel', '/a' => 'AA@postA']);

Middleware Route

//此处'a'对应的是\App\Middleware\A
//A的handle方法返回值为TRUE表示通过中间件
$route::middle(['a' => [1, 2]], function() use ($route){
    $route::get('/middle/1', 'AA@middle');
});

接下来要完善的功能

  • reflection(包含ioc、di部分功能)
  • aotuload
  • request
  • response
  • middleware
  • ioc
  • di
  • db builder
  • view template
  • helper function
  • db model
  • cache
  • route regex match(正则匹配)
  • route collection
  • route group
  • exception
  • log
  • session
  • php cli mode

已完成的功能

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.