PHPackages                             cinling/ext-lib - 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. cinling/ext-lib

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

cinling/ext-lib
===============

General code base for work.

3.0.0.beta(3y ago)111MITPHPPHP ^7.3||^8.0

Since Dec 31Pushed 3y ago1 watchersCompare

[ Source](https://github.com/cinling/php-ext-lib)[ Packagist](https://packagist.org/packages/cinling/ext-lib)[ RSS](/packages/cinling-ext-lib/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (21)Used By (0)

cinling/ext-lib
===============

[](#cinlingext-lib)

[简体中文版](./README-zh-Hans.md)

[![Packagist license](https://camo.githubusercontent.com/32e7675b239c4c5520941f71240d6934b37b09202928ee2d91f6bb567e80ca89/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f63696e6c696e672f7068702d6578742d6c6962)](https://camo.githubusercontent.com/32e7675b239c4c5520941f71240d6934b37b09202928ee2d91f6bb567e80ca89/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f63696e6c696e672f7068702d6578742d6c6962)[![Packagist version](https://camo.githubusercontent.com/903258cc0ba9ccc410cf9060fd24d0708d59652422b1cb2edb39ee4f59e73a17/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63696e6c696e672f6578742d6c6962)](https://camo.githubusercontent.com/903258cc0ba9ccc410cf9060fd24d0708d59652422b1cb2edb39ee4f59e73a17/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63696e6c696e672f6578742d6c6962)[![GitHub last commit](https://camo.githubusercontent.com/3943ae934afe155fe833192887f33a491ac8e212427a07707385a2b7266d5cb5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f63696e6c696e672f7068702d6578742d6c6962)](https://camo.githubusercontent.com/3943ae934afe155fe833192887f33a491ac8e212427a07707385a2b7266d5cb5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f63696e6c696e672f7068702d6578742d6c6962)

Install
=======

[](#install)

```
composer require "cinling/ext-lib"

```

Document
========

[](#document)

- [Service](#Service)
    - [FileCacheService](#FileCacheService)
    - [LogService](#LogService)
- [Util](#Util)
    - [ArrayUtil](#ArrayUtil)
    - ConsoleUtil
    - CronParseUtil
    - DevelUtil
    - EncryptUtil
    - EnvUtil
    - ExcelUtil
    - FileUtil
    - GeoUtil
- Value Object(vo)...
- Enums...

---

Service
-------

[](#service)

- Encapsulation of a function
- Provides configurable parameters

---

### FileCacheService

[](#filecacheservice)

- Save data to file

##### Config

[](#config)

nametypenotedefaultpathstringCache file save path./runtime/cin-cachepathDeepsintPath depth2pathUnitLenintThe number of characters in a single directory2##### Example

[](#example)

Set cache

```
use cin\extLib\services\FileCacheService;

FileCacheService::getIns()->set("CacheKeyCin", "cin");
```

Get cache

```
use cin\extLib\services\FileCacheService;

$srv = FileCacheService::getIns();
$srv->set("CacheKeyCin", "cin");
$value = FileCacheService::getIns()->get("CacheKeyCin");
echo $value; // output: cin
```

Delete cache

```
use cin\extLib\services\FileCacheService;

$srv = FileCacheService::getIns();
$srv->set("CacheKeyCin", "cin");
$srv->del("CacheKeyCin");
$value = $srv->get("CacheKeyCin");
echo $value; // output: null
```

Set cache with expiration time

```
use cin\extLib\services\FileCacheService;

FileCacheService::getIns()->set("CacheKeyCin", "cin", 3600); // expire after 3600s
```

---

### LogService

[](#logservice)

- Output the log and save it in the log file

##### Config

[](#config-1)

nametypenotedefaultpathstringLog file save path./runtime/cin-logfileMaxSizestringLog file max bytes2MB##### Example

[](#example-1)

```
use cin\extLib\services\LogService;

LogService::getIns()->info("Content...", "Title");
```

output in `runtime/cin-log/cin.log`:

> \[2021-01-18 14:54:31 INFO Title\] Content...

---

Util
----

[](#util)

- Provides encapsulation of static methods
- It can be inserted by `trait`

---

### ArrayUtil

[](#arrayutil)

##### toArray($attrs): array

[](#toarrayattrs-array)

Convert `$attrs` to an array。 `$attrs` can be an `array`, an `object`, a `BaseVo` derived class, or any collation of the above

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~40 days

Recently: every ~176 days

Total

20

Last Release

1193d ago

Major Versions

2.2.10 → 3.0.0.beta2023-02-08

PHP version history (2 changes)2.1.1PHP &gt;=5.6

3.0.0.betaPHP ^7.3||^8.0

### Community

Maintainers

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

---

Top Contributors

[![cinling](https://avatars.githubusercontent.com/u/22724167?v=4)](https://github.com/cinling "cinling (150 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cinling-ext-lib/health.svg)

```
[![Health](https://phpackages.com/badges/cinling-ext-lib/health.svg)](https://phpackages.com/packages/cinling-ext-lib)
```

###  Alternatives

[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[in2code/powermail

Powermail is a well-known, editor-friendly, powerful and easy to use mailform extension for TYPO3 with a lots of features

982.5M38](/packages/in2code-powermail)[blair2004/nexopos

The Free Modern Point Of Sale System build with Laravel, TailwindCSS and Vue.js.

1.2k2.3k](/packages/blair2004-nexopos)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

52664.9k12](/packages/solspace-craft-freeform)[pimcore/data-importer

Adds a comprehensive import functionality to Pimcore Datahub

44763.4k2](/packages/pimcore-data-importer)[portphp/spreadsheet

PhpSpreadsheet reader and writer for Port

14796.4k4](/packages/portphp-spreadsheet)

PHPackages © 2026

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