定制 daily-five/framework 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

daily-five/framework

Composer 安装命令:

composer require daily-five/framework

包简介

This is a basic php Framework

README 文档

README

>The Framework is in an early stage of development. So, don't use it in a production system. Contributors are welcome.

Yes, it is another lighweight php framework! The DailyFive framework is inspired by the silex and laravel framework. It is build with Symfony Components and Pimple.

The main goal of the framework is an easy to read, develop and testable application structure.

Who should not use the Farmework?

If you want to rapidly prototype an application, don't use this framework. For this purpose use an other framework like laravel.

Table of contents

Installation

Install daily-five framework with Composer

composer require daily-five/framework

If you have permission problems at installation, try this solution

Documentation

Usage

This is a very basic Hello World! example.

Create a new file called index.php

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

// Create a Controller
class HomeController extends \DailyFive\Controller\BasicController
{
    protected $msg;

    public function __construct($msg)
    {
        $this->msg = $msg;
    }

    public function index()
    {
        return $this->response($this->msg);
    }
}


// New Application instance
$app = new \DailyFive\Application();


// Register Service Providers
$app->register(new \DailyFive\Provider\LoggerServiceProvider());


$app['msg'] = 'Hello World';


// Register controller
$app[HomeController::class] = function ($app) {
    return new HomeController($app['msg']);
};


// Register Middleware
$app->addMiddleware('logger', function ($app) {
    return new \DailyFive\Middleware\LoggerMiddleware(
        $app['logger']
    );
});


// Register Routes
$app->get('/', 'HomeController::index', array('middleware' => array('logger')));


// Run Application
$app->run();

Service Providers

Available Service Providers

Tests

To run the test suite, you need Composer and PHPUnit:

composer install
vendor/bin/phpunit

Contribution

Any type of feedback, pull request or issue is welcome.

We use the PHP_CodeSniffer to check for Coding Standard Issues.

Check Coding Standard

vendor/bin/phpcs --standard=PSR1,PSR2,PSR12 --colors src

Fix Errors Automatically

vendor/bin/phpcbf --standard=PSR1,PSR2,PSR12 src

License

The DailyFive Framework is licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-07-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固