Download the PHP package webman-micro/base without Composer

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

说明

本包为开发中用到的基类,仅支持TP ORM

过滤条件设计

如上图所示,一个复杂的查询条件是可以分组逻辑or后与另外一个分组整体逻辑or,要实现这样逻辑有两种方案。

方案 说明
1、多维数组递归组装 缺点数据很难验证和处理
2、一维数组 + 一个字符串规则 ❤️优势处理简单,需要严格限制字符串规则,防止sql注入

当前我选择了方案2

方案参数说明

多条数据参数设计:

1. filter参数设计

filter 必须使用 {"param": {}, "rule": ""} 参数结构

1.1 param 格式必须为 id : ["-eq", 2](字段: [过滤方法, 过滤参数])

过滤方法 说明
-gt > 大于
-egt >= 大于等于
-lt >= 小于
-lk LIKE 包含
-not-lk NOT LIKE 不包含
-eq = 等于
-neq <> 不等于
-find_in_set find_in_set 在字符串里面
-bw BETWEEN 在两个参数之间范围
-not-bw NOT BETWEEN 不在两个参数之间范围
-in IN 在列表之中
-not-in NOT IN 不在列表之中

1.2 字段名为验证方法 queryFilter:id,name 后面跟着的rule是当前允许查询的字段

可能存在一个字段被表达式多次使用且参数和过滤方法不一样,可以采用如下方式:

param key 规则:字段名#数字

2.1 rule 只能包含,param里面字段名允许的字段和 () {} 空格

用()分组,{字段}这里会被参数替换的部分,字段等于param参数的key值


All versions of base with dependencies

PHP Build Version
Package Version
Requires taoser/webman-validate Version ^1.7
nicmart/string-template Version ^0.1.3
webman/think-orm Version ^1.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 webman-micro/base contains the following files

Loading the files please wait ....