PHPackages                             hiland/basiclibrary.php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hiland/basiclibrary.php

ActiveString[Utility &amp; Helpers](/categories/utility)

hiland/basiclibrary.php
=======================

RainyTop &amp; Hiland 's php basic library.

2.0.0(1y ago)3851Apache-2.0PHPPHP ^8.0CI failing

Since Jul 12Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/notinmood/BasicLibrary.PHP)[ Packagist](https://packagist.org/packages/hiland/basiclibrary.php)[ Docs](http://www.rainytop.com/)[ RSS](/packages/hiland-basiclibraryphp/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (2)Dependencies (3)Versions (10)Used By (0)

企业级的 PHP 类库
===========

[](#企业级的-php-类库)

```
@creator: ShanDong Xiedali
@emailto: 9727005@qq.com
@company: HiLand & RainyTop
```

配置注意事项
------

[](#配置注意事项)

1. 因为功能经常更新和增强，使用的时候请注意版本信息。
2. 里面发送短信使用的 aliyun 的短信接口，其中 composer.json 里面引入了 "alibabacloud/sdk": "^1.8" ，这个库还会引入其他的库，被引入的库 guzzle 如果是 7.X 版本，需要手动修改为 6.3。因为 7.X 版本是 php7 的语法。 （先删除掉 guzzlehttp 目录，然后把 composer.json,composer.lock 中涉及的 guzzle 从 6.3|7.0,改为 6.3；最后在composer update）

    或者暂时先把这个功能去掉

    ```
    "require": {
      "alibabacloud/sdk": "^1.8"
    },
    ```
3. 进行单元测试时候，请按照文件 tests/\_README.md的内容进行简单配置。
4. 使用数据库访问的时候，请按照文件 Utils/Config/\_README.md 的内容进行配置。
5. 涉及时间问题的时候，需要在 php.ini 内设置 date.timezone 为 Asia/Shanghai

开发注意事项
------

[](#开发注意事项)

### 关于"判断"动作的命名

[](#关于判断动作的命名)

1. 用于判断类型的方法名称时用单词 determine \[dɪ'tɜːrmɪn\]
2. 用于判断类型的属性名称时用单词 is\*\*\*\*

### 关于枚举的定义

[](#关于枚举的定义)

1. 枚举在某个类型(class)内用 const 定义
2. 普通枚举都统一定义在类型 Utils/DataValue/SystemEnum.php 内,用格式 "Xxx\_YYY" 定义，其中 Xxx 是这个变量的应用领域，YYY 是具体的变量意义(比如 RandCategory\_NUMBER,其中 RandCategory 表示当前在定义一个随机数种类，NUMBER表示定义的是数字类型的随机数种类)；
3. 特别的枚举可以单独开一个文件定义,建议跟 SystemEnum.php 一样位于 Utils/DataValue/ 目录下

### 关于类库文件的命名规则

[](#关于类库文件的命名规则)

1. 如果仅提供静态复制方法的代码逻辑，那么通常建议类型命名为 \*\*\*Helper
2. 如果提供实例方法的代码逻辑,那么建议类型命名为 \*\*\*Mate
3. 通常 \*\*\*Mate 类型不直接用 new() 构建:
    1. 用 Container.get(名称) 实现单例调用(得到的同一个实例可以在项目内复用)。比如(MateContainer.get).
    2. 包装在 \*\*\*Client 里面，调用静态方法。(比如 ConfigClient、DatabaseClient).

### 关于目录类型的路径定义

[](#关于目录类型的路径定义)

所有目录都要以路径分隔符结尾，这样在项目中使用的时候，可以不用做二次判断； 如果使用第三方的路径，要使用 `DirHelper.ensureEndWithPathSeparator` 进行确保。

发布与使用
-----

[](#发布与使用)

### 发布到packagist

[](#发布到packagist)

因为 BL.PHP 库在Github上，对packagist进行了自动同步，所以发布到packagist不需要做任何操作。

### 使用 BL.PHP库

[](#使用-blphp库)

因为BL.PHP更新频度比较高，第三方项目使用本库，建议在必要的时候，执行下面的命令更新此库(打开PHPStorm最下的终端窗口执行).

```
composer require hiland/basiclibrary.php
composer update hiland/basiclibrary.php
```

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance62

Regular maintenance activity

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 98.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~180 days

Recently: every ~270 days

Total

8

Last Release

508d ago

Major Versions

1.3.0 → 2.0.02024-12-26

PHP version history (3 changes)1.0.1PHP ^5.4||^7.0

1.1.0PHP ^5.3.3 || ^7.4

1.2.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/ce2e29f48689f4d77c693f10336ce24ab812e20c858b9e87ec1116d390620763?d=identicon)[notinmood](/maintainers/notinmood)

---

Top Contributors

[![notinmood](https://avatars.githubusercontent.com/u/262693?v=4)](https://github.com/notinmood "notinmood (278 commits)")[![zaozhiwenhua](https://avatars.githubusercontent.com/u/95066049?v=4)](https://github.com/zaozhiwenhua "zaozhiwenhua (5 commits)")

---

Tags

labaryphpphpcodecsbasic library

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hiland-basiclibraryphp/health.svg)

```
[![Health](https://phpackages.com/badges/hiland-basiclibraryphp/health.svg)](https://phpackages.com/packages/hiland-basiclibraryphp)
```

###  Alternatives

[php-soap/ext-soap-engine

An ext-soap engine implementation

443.2M7](/packages/php-soap-ext-soap-engine)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
