Download the PHP package mostanily/diy-api without Composer
On this page you can find all versions of the php package mostanily/diy-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package diy-api
diyApi
个人diy简易api框架
说明
思路来自laravel社区文章 PHP DIY 系列 ,做了一些改动。 此包仅供学习使用
目录说明
app
应用目录,主要进行逻辑处理config
配置信息目录,里面存放一些配置信息,包括路由等等library
核心类public
入口文件vendor
composer自动加载公共类
配置
配置信息全部放在了
config
目录中,以目录扫描(easyswoole中的File类,具体为:vendor\easyswoole\utility\src\File.php
)方式进行统一处理;
路由
支持以下类似路由设置,对于参数写在链接里的路由,还请放在
dynamic_route
这个数组里;具体的配置文件均在config
这个文件夹中。 注:框架里面app\Https\Controller
文件夹中的测试Controller可以全部删除
支持依赖注入
依赖注入核心类文件来自https://github.com/wazsmwazsm/IOCContainer/tree/master/src/IOC/Container.php ; 使用例子如下:
自己做了个简单的redis单例,支持读写分离,如果不需要,可以自己下载redis包
composer require predis/predis
。 mysql没有写,需要的话可以自己写或者参考这篇文章 在Laravel外独立使用Eloquent
All versions of diy-api with dependencies
PHP Build Version
Package Version
The package mostanily/diy-api contains the following files
Loading the files please wait ....