PHPackages                             liasica/yii2-helpers - 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. liasica/yii2-helpers

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

liasica/yii2-helpers
====================

使用在YII2的一些帮助函数

1.0.3(10y ago)15111GPLPHP

Since Jan 5Pushed 8y agoCompare

[ Source](https://github.com/liasica/yii2-helpers)[ Packagist](https://packagist.org/packages/liasica/yii2-helpers)[ RSS](/packages/liasica-yii2-helpers/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (2)Versions (12)Used By (1)

[![Latest Stable Version](https://camo.githubusercontent.com/b84db9152c832199285a3b441833c4e6da83807e760b1f19d5239060a5193122/68747470733a2f2f706f7365722e707567782e6f72672f6c6961736963612f796969322d68656c706572732f762f737461626c65)](https://packagist.org/packages/liasica/yii2-helpers) [![Total Downloads](https://camo.githubusercontent.com/8cd758542bd106464959cb58bb57fa96805395ca739c3df41a2b03fcd32ca283/68747470733a2f2f706f7365722e707567782e6f72672f6c6961736963612f796969322d68656c706572732f646f776e6c6f616473)](https://packagist.org/packages/liasica/yii2-helpers) [![Latest Unstable Version](https://camo.githubusercontent.com/fcac20ef9119609901b697d5eba24d35be128eafda593bb16a49bba623504b20/68747470733a2f2f706f7365722e707567782e6f72672f6c6961736963612f796969322d68656c706572732f762f756e737461626c65)](https://packagist.org/packages/liasica/yii2-helpers) [![License](https://camo.githubusercontent.com/cb91731586b2d6b8cfc7475da00362a7e0ef5157522e21c01275dad90f0910ab/68747470733a2f2f706f7365722e707567782e6f72672f6c6961736963612f796969322d68656c706572732f6c6963656e7365)](https://packagist.org/packages/liasica/yii2-helpers)

ArrayTOXml Usage
----------------

[](#arraytoxml-usage)

```
$xml = new ArrayToXML();
print $xml->buildXML($array);
```

SimpleArrayToXml Usage
----------------------

[](#simplearraytoxml-usage)

```
$xml = new SimpleArrayToXml($redpack->redpackData);
var_dump($xmlmodel->buildXML());
```

Curl Usage
----------

[](#curl-usage)

1.curl\_get
===========

[](#1curl_get)

```
$curl = new Curl($url);
var_dump($curl->Get());
```

2.curl\_post
============

[](#2curl_post)

```
$curl = new Curl($url);
$curl->setData($data);
var_dump($curl->Post());
```

3.curl\_post\_ssl
=================

[](#3curl_post_ssl)

```
$certs = [
    CURLOPT_SSLCERT => 'CURLOPT_SSLCERT.pem',
    CURLOPT_SSLKEY  => 'CURLOPT_SSLKEY.pem',
];
$curl = new Curl($url);
$curl->setData($data)->setCerts($certs);
var_dump($curl->postSSL());
```

\##Unicode Usage #1.encode

```
$unicode = new Unicode(null, $unicodeStr);
var_dump($unicode->encode());
```

\#2.decode

```
$unicode = new Unicode($encodeUnicodeStr);
var_dump($unicode->decode());
```

\##Radom Usage #1.Generate an radom str

```
$radom = new Radom();
var_dump($radom->RadomChars(32));
```

\#2.Get lottery

```
$proArr = [1 => 1, 2 => 10, 3 => 40];
$radom = new Radom();
var_dump($radom->lottery($proArr));
```

\##Url #1.Get real url

```
$Url = new Url($uri);
var_dump($Url->realurl());
```

or

```
$Url = Url::setUri($uri);
var_dump($Url->realurl());
```

\##Time #1.Get formated microtime

```
$Time = new Time();
var_dump($Time->microtime_format);
```

\#2. Get timestamp of microtime

```
$Time = new Time();
var_dump($Time->microtime_float());
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity70

Established project with proven stability

 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 ~2 days

Total

11

Last Release

3806d ago

Major Versions

0.0.7 → 1.0.02016-01-05

### Community

Maintainers

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

---

Top Contributors

[![liasica](https://avatars.githubusercontent.com/u/671431?v=4)](https://github.com/liasica "liasica (25 commits)")

### Embed Badge

![Health badge](/badges/liasica-yii2-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/liasica-yii2-helpers/health.svg)](https://phpackages.com/packages/liasica-yii2-helpers)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)

PHPackages © 2026

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