Download the PHP package laocc/yaf without Composer
On this page you can find all versions of the php package laocc/yaf. 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 yaf
LastEdit: 2016/11/28 2:14
For YAF plugs
这是一个针对yaf的扩展插件包,须下列环境:
- PHP: >= v7.0.13
- YAF: >= v3.0.4
yaf设置
本插件目前只支持命名空间的yaf,其他设置不影响本插件。
使用示例:
请克隆另一个库:[https://github.com/laocc/yaf_example],这个库也是一个相对完整的yaf结构
功能
1.路由扩展:
- 正则路由中,可以通过正则匹配结果指定模块、控制器、动作
- 路由表中可以定义一些影响输出的东西
- 修正yaf原本默认模块无效的情况
2.视图扩展:
- 添加框架视图功能
- 控制器输出增加:json/xml/text,对于html除了视图输出外,可以直接输出html文本,相当于echo
- 在控制器动作中很多直接对视图的操作,如加js/css等,自动组织js/css连接
3.缓存扩展:
- 缓存控制器结果
- 视图标签可以使用smarty
- 自动文本静态化(也可设置过期时间)
4.错误处理:
- 完整的错误信息显示,可屏蔽网站根目录
- 出错报警(须自行设置发送程序,一个回调函数)
- 注意:处理不到 Bootstrap 里的错误
- 模拟某个错误信息:throw new \Error(404);
安装:
1,通过composer安装:(建议)
composer.json
2,自行下载本插件包,用自己的方式加载
引用:
Bootstrap.php
使用:
插件定义示例:
https://github.com/laocc/yaf_example/blob/master/config/plugs.ini
路由表示例:
https://github.com/laocc/yaf_example/blob/master/config/routes.ini
控制器中函数表:
https://github.com/laocc/yaf/blob/master/Controller.md
其他:
本插件包可能还不怎么完善,更多功能不断添加中。若有任何建议或意见,请联系我:QQ:459830045
All versions of yaf with dependencies
PHP Build Version
Package Version
Requires
php Version
>7.0.0
ext-yaf Version >3.0
laocc/dbs Version >1.0.1
laocc/plugs Version >1.0.1
ext-yaf Version >3.0
laocc/dbs Version >1.0.1
laocc/plugs Version >1.0.1
The package laocc/yaf contains the following files
Loading the files please wait ....