PHPackages                             light/functions - 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. light/functions

ActiveLibrary

light/functions
===============

Yii2 shortcut functions

1.0.2(10y ago)13MITPHP

Since Sep 29Pushed 10y ago1 watchersCompare

[ Source](https://github.com/lichunqiang/functions)[ Packagist](https://packagist.org/packages/light/functions)[ RSS](/packages/light-functions/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (4)Used By (0)

functions
---------

[](#functions)

[![version](https://camo.githubusercontent.com/31c802c87b452ca9e8c99146b83093e6af734e5b19184203b956acd97909c9a4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c696768742f66756e6374696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/light/functions)[![Download](https://camo.githubusercontent.com/c56493cfe6f62013857487d2549d9d33123e6a08421f8adcb82a4d4859920648/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64642f6c696768742f66756e6374696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/light/functions)

Easily using some helpers handsome.

Functions
---------

[](#functions-1)

- `route` =&gt; `yii\helpers\Url::toRoute`
- `url` =&gt; 'yii\\helpers\\Url::to'
- `session` Set or get session
- `flash` =&gt; `Yii::$app->session->setFlash($type, $message[, $removeAfterAccess])`
- `cookie` Set or get cookie
- `del_cookie` delete the cookie
- `__` =&gt; `Yii::t($category, $messsage[, $params][, $language])`

Validators
----------

[](#validators)

- `is_email($string[, $options])` Check string if a valid email.
- `is_url($string[, $options])` Check string if a valid url.

###  Health Score

27

—

LowBetter than 51% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

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

Total

3

Last Release

3766d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ead2ef2c9862aa3d75a97de86af1e3cfa919886e8981bf0808cddd93f563777?d=identicon)[light](/maintainers/light)

---

Top Contributors

[![lichunqiang](https://avatars.githubusercontent.com/u/2433916?v=4)](https://github.com/lichunqiang "lichunqiang (10 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/light-functions/health.svg)

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

###  Alternatives

[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1356.4k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

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