# yaf高性能Api **Repository Path**: qqdavin/high_performance_api ## Basic Information - **Project Name**: yaf高性能Api - **Description**: 这是基于c写底层的yaf框架集成PDO+predis+读写分离+composer+全局异常处理+多模块开发+Log日志记录+Elasticsearch - **Primary Language**: PHP - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2020-04-02 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # yaf封装高可用高性能Api框架 #### 更新说明 2018年5月19日 21:50:19,添加了elasticsearch全文索引功能,以及其基于ELK配置的环境包,和使用logstash_jdbc同步mysql里面数据的例子。 #### 项目介绍 为了window下开发环境配置的yaf框架。这是基于c写底层的yaf框架集成PDO+predis+读写分离+composer+全局异常处理+多模块开发+Log日志记录简单容易上手的框架 #### 软件架构 软件架构说明,并没用使用命名空间(可以提高一点点性能),使用了单例模式,使用了自动加载,配置了全局异常处理,和数据库异常日志记录还有应用异常日记记录,封装了读写分离db(主库)以及db_c(从库)PDO类,使用了predis作为redis缓存,需要什么功能可以通过composer快速添加,每个控制器都有基本控制器可以进行sign校验和token校验,还有curl的引入等等 目录结构 > ​ > > > C:. > > ├─application > │ ├─common > │ ├─controllers > │ ├─extra > │ ├─library > │ │ ├─Db > │ │ │ └─log > │ │ └─exception > │ ├─log > │ ├─models > │ ├─modules > │ │ ├─admin > │ │ │ └─controllers > | | | └─ElasticsearchTest.php > | | | └─Index.php > | | | └─RedisTest.php > │ │ └─app > │ │ └─controllers > │ ├─plugins > │ └─views > │ ├─error > │ └─index > ├─conf > └─vendor > ├─bin > ├─composer > ├─curl > │ └─curl > │ ├─build > │ ├─src > │ │ └─Curl > │ └─tests > │ ├─data > │ └─server > │ └─php-curl-tes > ├─nette > │ ├─mail > │ │ └─src > │ │ ├─Bridges > │ │ │ └─MailDI > │ │ └─Mail > │ └─utils > │ └─src > │ ├─Iterators > │ └─Utils > ├─php-curl-class > │ └─php-curl-class > │ ├─.github > │ ├─docs > │ ├─examples > │ ├─scripts > │ ├─src > │ │ └─Curl > │ ├─tests > │ │ └─PHPCurlClass > │ └─www > │ └─img > ├─phpdocumentor > │ └─phpdocumentor > ├─pingplusplus > │ └─pingpp-php > │ ├─data > │ ├─example > │ │ ├─balance > │ │ ├─batch_refund > │ │ ├─batch_transfer > │ │ │ └─channel_recipi > │ │ ├─batch_withdrawal > │ │ ├─charge > │ │ │ └─channel_extra > │ │ ├─coupon > │ │ ├─order > │ │ ├─recharge > │ │ ├─refund > │ │ ├─settle_account > │ │ │ └─recipient > │ │ ├─sub_app > │ │ ├─transfer > │ │ │ └─channel_extra > │ │ └─withdrawal > │ │ └─extra > │ └─lib > │ ├─Error > │ └─Util > └─predis > └─predis > ├─bin > ├─examples > └─src > ├─Cluster > │ ├─Distributor > │ └─Hash > ├─Collection > │ └─Iterator > ├─Command > │ └─Processor > ├─Configuration > ├─Connection > │ └─Aggregate > ├─Monitor > ├─Pipeline > ├─Profile > ├─Protocol > │ └─Text > │ └─Handler > ├─PubSub > ├─Replication > ├─Response > │ └─Iterator > ├─Session > └─Transaction #### 安装教程 1. 安装LANP 2. 安装redis扩展 3. 安装yaf扩展 4. 安装node.js 5. 安装composer 6. 配置elasticsearch环境,修改其启动,并启动服务,ELK+head+es_log环境 链接:https://pan.baidu.com/s/16LNjzENzha1tP4MNf0qfQw 密码:ud8x #### 使用说明 1. 路由是使用Yaf_Route_Regex(是为了restful API而配置)和默认路由是为了多模块开发使用 2. 使用前先导入res_tab.sql数据库 3. 修改好数据库配置文件db_settings.ini.php(主库配置)、db_settings_c.ini.php(从库配置) #### 参与贡献 1. 鸟叔yaf框架 #### 后续 将会在此框架引入swoole,敬请关注....