Download the PHP package dingqing/e-php without Composer

On this page you can find all versions of the php package dingqing/e-php. 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 e-php

web-frame

手动实现web框架(PHP)

目录 二级目录
理解 框架的工作
实现 文件目录
  初始化:服务容器
  处理请求:ORM,视图
  测试与工具:Git钩子

使用


理解

框架的工作

完成“基础设施”建设:方便的路由定义、错误处理、配置管理、服务管理、ORM等等,使得业务开发更加简洁、方便。


实现

文件目录

目录 说明
app 应用目录
.git-hooks git钩子
framework 框架
public 公共资源目录,暴露到万维网
tests 单元测试
.env.example 业务配置示例

框架入口

framework/start.php

自动加载

framework/Load.php 类别 说明
使用 use 命名空间类名
实现 调用spl_autoload_register()注册自加载函数到__autoload队列中

错误与异常处理

framework/hanles/ErrorHandle.php 方案 作用
通过set_error_handler()注册错误处理方法 处理常规错误
register_shutdown_function() + error_get_last() 在脚本终止执行时,处理set_error_handler()不能处理的错误,包括:E_ERROR、 E_PARSE、 E_CORE_ERROR、 E_CORE_WARNING、 E_COMPILE_ERROR、 E_COMPILE_WARNING,以及在调用set_error_handler()所在文件中产生的大多数E_STRICT

通过set_exception_handler()注册异常处理方法

配置加载

framework/hanles/ConfigHandle.php

服务容器

framework/Container.php

初级版买菜:直接去农户家购买,可能遇到农户没法提供想要的菜,总之出现各种问题,

改进版:去菜市场,比如想要买土豆,市场里面有很多农户提供服务。

即,增加中间层,将服务方与调用方解耦,农户专注为提供服务,买方去集市获取服务、不用关心服务的实现。

路由

framework/hanles/RouterHandle.php

对象关系映射

framework/orm/

把对象的链式操作解析成具体的sql语句。

DB类使用示例

Model类使用示例

单元测试

phpunit断言文档语法参考

基于phpunit的单元测试。

如何使用?

tests目录下编写测试文件,具体参考tests/demo目录下的DemoTest文件,然后运行:

测试断言示例:

钩子

目的:规范化项目代码和commit记录。


使用

nginx配置虚拟主机根目录设置为项目中的public,然后访问虚拟主机地址。

All versions of e-php with dependencies

PHP Build Version
Package Version
Requires catfan/medoo Version ^1.6
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 dingqing/e-php contains the following files

Loading the files please wait ....