Download the PHP package zoujingli/think-library without Composer

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

ThinkLibrary for ThinkAdmin

Latest Stable Version Latest Unstable Version Total Downloads Monthly Downloads Daily Downloads PHP Version License

ThinkLibrary 是 ThinkAdmin 面向 ThinkPHP 6 & 8 的核心封装库,提供控制器、模型、服务、队列、存储、配置、HTTP、JWT 和常用数据处理能力。

业务功能特性

核心架构功能:

技术特性:

功能说明

  1. 数据列表展示组件
  1. 表单处理模块
  1. 数据状态快速处理模块
  1. 数据安全删除模块
  1. 文件存储通用组件
  1. 通用数据保存更新模块
  1. 通用网络请求模块
  1. 系统参数通用 g-k-v 配置模块
  1. UTF8 加密算法支持模块
  1. 接口 CORS 跨域默认支持模块
  1. 表单 CSRF 安全验证模块

参考项目

ThinkAdmin - V6

代码仓库

ThinkLibrary 遵循 MIT 开源协议发布,并免费提供使用。

部分代码来自互联网,若有异议可以联系作者进行删除。

版权所有 Copyright © 2014-2026 by ThinkAdmin (https://thinkadmin.top) All rights reserved。

数据库安装包兼容性

php think xadmin:package 可从 MySQL 或 SQLite 生成结构及数据安装包。字段优先使用 integer、string、text、binary、float、decimal,日期时间及 JSON 按实际用途保留。MySQL 的整数宽度、长文本、二进制等原始定义通过选项保存,在 MySQL 上恢复时保持原有类型;SQLite 使用对应通用类型,不依赖不同版本 Phinx 的长度常量。

MySQL 的 ENUM / SET、BIT、YEAR、ZEROFILL、ON UPDATE 及全文/前缀等专有索引不能直接转换到 SQLite,迁移会在操作对应表之前报错。SQLite 的部分索引、表达式索引、生成列及 CHECK、外键、ON CONFLICT、STRICT、WITHOUT ROWID 等尚不支持导出的结构也会明确报错。--force 会更新字段和同名索引,保留其他字段及索引;已有表的主键不同或 SQLite 表被外键引用时停止,需要另写专用迁移。SQLite 升级失败会回滚,重建表保留原有触发器和自增序号。

安装包始终使用迁移配置的连接和表前缀。新版逐行备份支持二进制、空值和大整数,并兼容读取旧 JSONL 数据文件。恢复到 SQLite 整数列时,超出 64 位有符号整数范围的记录会明确报错并回滚本次恢复,避免自动转为浮点数丢失精度。SQLite 的时间默认表达式与同名字符串、主键字段的可空属性分别保留。更新后请重新生成原来的安装包;运行新生成的脚本也需要同步更新 ThinkLibrary。生成或写入失败时保留同类旧脚本及备份,成功发布后才替换。

打包忽略名单同时接受带前缀的物理表名和不带前缀的逻辑表名。迁移记录表始终排除;未配置忽略名单时,数据备份默认排除任务队列与操作日志,带表前缀时同样生效。

SQLite 数据备份使用 v2 记录每个值的实际存储类型,保留 TEXT 列中的 BLOB、BLOB 列中的文本与数值以及浮点精度;读取时仍兼容 v1 和原 JSONL。INT、BIGINT 等主键不会被改成有自动编号语义的 INTEGER PRIMARY KEY。MySQL 备份在读取日期时间字段时保留小数秒,兼容 PHP 7.2 的旧驱动。MySQL 8 的文本常量默认值和 CURRENT_TIMESTAMP 表达式可再次导出,其他未支持的默认表达式仍会明确报错。

SQLite 的原字段声明通过 sqlite_type 保留,避免 DATETIME、JSON 等字段恢复后改变存储类型与排序行为;浮点字段迁移到 MySQL 时使用 DOUBLE 保留双精度。旧版 Phinx 的普通列继续使用原适配器编译,仅对原始类型、精度、默认表达式及非空约束等缺失能力补充兼容处理。

SQLite 自增表的数据文件首行另存历史序号,即使记录已全部删除也会打包;恢复时不会降低目标表已有序号。无序号头的旧备份仍可读取,含序号头的新备份需要同步更新 ThinkLibrary。

SQLite 回归测试直接使用内存数据库。可通过 PHINX_TEST_MYSQL_PORT=端口 vendor/bin/phpunit -c phpunit.xml.dist 额外运行 MySQL 往返验证(在 ThinkLibrary 目录执行)。该测试只用于可丢弃的本机 MySQL 实例:数据库名为 phinx_fixture,账号 root、空密码,会创建并清理结构、默认值和备份测试表及空的 system_menu 表。测试覆盖真实打包入口和带前缀恢复,不应指向业务数据库。

使用说明

  1. 依赖管理:ThinkLibrary 需要 Composer 支持进行安装和依赖管理。
  2. 安装指南:您可以使用以下命令通过 Composer 安装 ThinkLibrary:composer require zoujingli/think-library。
  3. 使用示例:在使用 ThinkLibrary 时,确保您的控制器类继承自 think\admin\Controller。一旦继承完成,您就可以通过 $this 对象访问并使用全部功能。

列表处理

表单处理

删除处理

禁用启用处理

文件存储组件( oss 及 qiniu 需要配置参数)

通用数据保存

通用网络请求

系统参数配置(基于 system_config 数据表)

数据加密

自研 UTF8 加密

数据解密

文本转 UTF8 编码

文本 Base64 URL 编码

数据压缩处理

数组结构处理


use think\admin\extend\CodeExtend;

// 二维数组 转为 立体数据结构,需要存在 id 及 pid 关系
$tree = CodeExtend::arr2tree($list);

// 二维数组 转为 扁平数据结构,需要存在 id 及 pid 关系
$tree = CodeExtend::arr2table($list);

All versions of think-library with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
ext-gd Version *
ext-curl Version *
ext-json Version *
ext-zlib Version *
ext-iconv Version *
ext-openssl Version *
ext-mbstring Version *
symfony/process Version ^5.4|^6.0|*
topthink/think-orm Version ^2.0|^3.0
topthink/framework Version ^6.0|^8.0|*
topthink/think-migration Version ^3.0|*
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 zoujingli/think-library contains the following files

Loading the files please wait ...