Download the PHP package orz/dbh without Composer

On this page you can find all versions of the php package orz/dbh. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dbh

DataBaseHandle 跨框架的数据库句柄

简述

当你不得不在多个PHP框架下为同一个项目编程时,你会发现80%的时间精力都在不同的PHP框架下写数据处理逻辑,在同一个需求开发涉汲多框架多端开发时,如:用laravel作API对接ios、android;用thinkphp作PC版前端和后台开发或作API对接miniprogram;你会发现你的CRUD编码时间会成倍增长且编码后的调试时间也会成倍增长。 提升代码复用率就是最好的解决之道,来吧,把数据处理从框架分离出来,用扩展库的方法引入项目。

Dbh类为常用PHP框架Thinkphp(5.0,5.1,6),Laravel(6TLS),Codeigniter(4),已封装好ServiceProvider,即可在框架中集成也可脱离框架使用。

用dbh来处理数据

用dbh来记录日志

框架引入Dbh功能

常用PHP框架Thinkphp(5.0,5.1,6),Laravel(6TLS),Codeigniter(4),Dbh已封装好ServiceProvider,Facade, Middleware, Event框架中引入即可。

引入Dbh服务提供者

引入Dbh的Facade

Thinkphp 5.1, Thinkphp 6, Laravel 6,这些框架的静态代理均用的是服务容器的单例模式,和使用服务容器一样的性能

引入Dbh中间件

为了方便调试程序,Dbh已封装好了如下几个功能的中间件,Thinkphp5.1,Thinkphp6,Laravel6,均已测试且在项目中真实应用过。
中间件,PlogBefore,通过数据表记录HTTP请时时的PHP超全局变量 $_SERVER, $_REQUEST, $_SESSION, $_ENV, $_FILES, 以及全部请求头信息。 
中间件,PlogAfter, 通过数据表记录HTTP响应时的PHP超全局变量 $_SESSION, 响应正文,以及全部响应头信息。
注:慢页面监控功能,记录超过3秒加载时间的页面,也是在PlogAfter中实现记录的。 

引入Dbh事件监听

为了方便调试程序,Dbh已封装好了如下几个功能的事件,Thinkphp5.0,Thinkphp5.1,Thinkphp6,Laravel6,CodeIgniter4均已测试且在项目中真实应用过。
事件名,SessionChange,通过数据表记录当前的会话变量数据。
事件名,CookieChange, 通过数据表记录当前的Cookie数据。
事件名,EnvChange,    通过数据表记录当前的环境变量数据。
事件名,GlobalsChange,通过数据表记录当前的全局变量数据。
事件名,ConfigChange, 通过数据表记录当前的配置文件数据。

更多技术细节可参考

用Composer为Framework引入Loaclhost第三方代码库

脱离框架用Dbh类处理数据代码示例

Medoo官方文档2.1版 Medoo中文手册1.6版

用composer安装最新版本

不用composer直接下载

Download ZIP See demo/Dbt2.php.

致谢

感谢 Thinkphp, Laravel, CodeIgniterMedoo, SimplePhpLogger, GUMP, 这些优秀类库的作者,是你们类库方便了日常编程开发。


All versions of dbh with dependencies

PHP Build Version
Package Version
Requires catfan/medoo Version ^2.1
wixel/gump Version ^1.12
orz/plog Version ^0.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package orz/dbh contains the following files

Loading the files please wait ....