PHPackages                             yjtec/support - 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. yjtec/support

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

yjtec/support
=============

php support

1.0.19(6y ago)11.3k6MITPHP

Since May 31Pushed 6y agoCompare

[ Source](https://github.com/yjtec/support)[ Packagist](https://packagist.org/packages/yjtec/support)[ RSS](/packages/yjtec-support/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (19)Used By (6)

yjtec support
=============

[](#yjtec-support)

1.Curl
------

[](#1curl)

> php post和get请求

### 1.1 Curl::get($url)

[](#11-curlgeturl)

```
    Curl::get('http://www.baidu.com');

```

### 1.2 Curl::post($url,$data);

[](#12-curlposturldata)

```
    echo Curl::post('http://www.baidu.com',['a'=>1,'b'=>2]);

```

### 1.3 Curl::put($url,$data);

[](#13-curlputurldata)

```
    echo Curl::put('http://www.baidu.com',['a'=>1,'b'=>2]);

```

### 1.4 Curl::delete($url);

[](#14-curldeleteurl)

```
    echo Curl::delete('http://www.baidu.com');

```

2.sign
------

[](#2sign)

### 1.1 sign::make($secret,$timestamp,$data,\[debug:true|false\]);

[](#11-signmakesecrettimestampdatadebugtruefalse)

#### 参数

[](#参数)

$secret 密钥 $timestamp 当前时间戳（time()） $data 要加密的数据

### 返回 array

[](#返回-array)

\['sign'=&gt;'43ad8f0ab5573fc6fe0a60b5b6ed7216'\]

如果debug 为ture

\[ 'sign' =&gt; '43ad8f0ab5573fc6fe0a60b5b6ed7216', 'paramstr' =&gt; 'lbfK571EUHt7oDEYA46D0ylY5zZhbuIi-appidSxmfErjzem3ylFBAout\_trade\_no12312300123123-1559295437' \]

3.str
-----

[](#3str)

\###3.1 random

```
Str::random($len,[$big:true],[$num:true],[$lower:true],[$s:false])

```

#### 参数

[](#参数-1)

1. $length 生成长度
2. $Big 是否包含大写字母
3. $Num 是否包含数字
4. $lower 是否包含小写字母
5. $s 是否包含符号

### 3.2 cc2 驼峰转字符串

[](#32-cc2-驼峰转字符串)

```
Str::cc2($camelCaps,[$separator:'-'])

```

#### 参数

[](#参数-2)

1. $camelCaps \[string\] 驼峰命名字符串
2. $separator \[string\] 连接字符串 可选

### 3.3 uncc2 连接符转驼峰

[](#33-uncc2-连接符转驼峰)

```
Str::uncc2($uncamelized_words,[$separator:'-'])

```

同上

3.Nested
--------

[](#3nested)

\#无限级分类

3.1.unlimitedForLevel(cate,\[html='-'\],\[$pid=0\],$level=1) static
-------------------------------------------------------------------

[](#31unlimitedforlevelcatehtml-pid0level1-static)

> 无线分类组合成一位数组

```
Nested::unlimitedForLevel($arr)

```

3.2.unlimitedForlayer($cate,\[$name="child"\],\[$pid=0\])
---------------------------------------------------------

[](#32unlimitedforlayercatenamechildpid0)

> 返回多维数组

```
Nested::unlimitedForlayer($cate)

```

3.3.getParents($cate,$pid)
--------------------------

[](#33getparentscatepid)

> 返回子分类的所有父级ID

3.4.getChildrenId($cate,$pid)
-----------------------------

[](#34getchildrenidcatepid)

> s返回所有子分类的ID

3.5.getChildren($cate,$pid)
---------------------------

[](#35getchildrencatepid)

> 返回所有子级分类

4.URL操作
-------

[](#4url操作)

4.1 URL::parse(String $url)
---------------------------

[](#41-urlparsestring-url)

> 解析URL

4.2 URL::params(String $url)
----------------------------

[](#42-urlparamsstring-url)

> 解析URL上的参数

4.3 URL::build(Array $params,String $uri)
-----------------------------------------

[](#43-urlbuildarray-paramsstring-uri)

> 数组转为url参数

4.4 URL::uri(String $uri)
-------------------------

[](#44-urluristring-uri)

> 返回url中的url信息

4.5 URL::except(String|Array $filter,$url)
------------------------------------------

[](#45-urlexceptstringarray-filterurl)

> 清楚url参数中的某个值

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 73.9% 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 ~6 days

Total

18

Last Release

2425d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/48311842?v=4)[Yjtec](/maintainers/Yjtec)[@yjtec](https://github.com/yjtec)

---

Top Contributors

[![kidkang](https://avatars.githubusercontent.com/u/22092546?v=4)](https://github.com/kidkang "kidkang (17 commits)")[![um-why](https://avatars.githubusercontent.com/u/24377892?v=4)](https://github.com/um-why "um-why (4 commits)")[![li20094362760](https://avatars.githubusercontent.com/u/192505514?v=4)](https://github.com/li20094362760 "li20094362760 (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/yjtec-support/health.svg)

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

###  Alternatives

[tobai/magento2-geo-store-switcher

Switching websites/stores depending on current country.

3512.4k](/packages/tobai-magento2-geo-store-switcher)[hedger/laravel-envicon

Use a different favicon depending on your current runtime environment

193.2k](/packages/hedger-laravel-envicon)

PHPackages © 2026

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