PHPackages                             gozoro/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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. gozoro/yii2-helpers

ActiveYii2-extension[Parsing &amp; Serialization](/categories/parsing)

gozoro/yii2-helpers
===================

Helpers for Yii2 Framework. Extends standard helpers.

v1.0.0(2y ago)072MITPHPPHP &gt;=5.5.9

Since Apr 3Pushed 2y ago1 watchersCompare

[ Source](https://github.com/gozoro/yii2-helpers)[ Packagist](https://packagist.org/packages/gozoro/yii2-helpers)[ Docs](https://github.com/gozoro/yii2-helpers)[ RSS](/packages/gozoro-yii2-helpers/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (2)

yii2-helpers
============

[](#yii2-helpers)

Helpers for Yii2 Framework as static functions.

HTML helpers
------------

[](#html-helpers)

```
Html::rus2translit("привет мир"); // privet mir

Html::str2url("привет мир!") // privet-mir

Html::text("это ссылка http://example.com") // это ссылка http://example.com

Html::csrfHiddenInput(); //  Return string with CSRF hidden input

Html::video("./example.mp4") // Returns string with video tag or youtube-iframe.
```

JSON helpers
------------

[](#json-helpers)

```
$options = [
	'valueString' => 'string',
	'valueInt'    => 5,
	'valueFloat'  => 4.3,
	'valueNull'   => null,
	'valueBool'   => true,
	'valArray'    => ['a', 'b', 'c'],
	'valAssoc'    => ['a'=>'apple', 'b'=>2, 'c'=>1],
	'func'        => 'function(val){return val;}',
];

Json::optionsEncode($options);
```

Returns string with JavaScript code:

```

 {
 	"valueString": "string",
 	"valueInt": 5,
 	"valueFloat": 4.3,
 	"valueNull": null,
 	"valueBool": true,
 	"valArray": ["a", "b", "c"],
 	"valAssoc": {"a":"apple", "b":2, "c":1},
 	"func": function(val){return val;},
 }
```

URL helper
----------

[](#url-helper)

Now you can parse and edit URLs

```
$url = new Url("https://example.com/my-path");
echo $url->getScheme(); // https
echo $url->getHost(); // example.com
echo $url->getPath(); // /my-path
// etc
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

775d ago

### Community

Maintainers

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

---

Top Contributors

[![gozoro](https://avatars.githubusercontent.com/u/13768280?v=4)](https://github.com/gozoro "gozoro (5 commits)")

---

Tags

urljsonhelpershtmlyii2

### Embed Badge

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

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

###  Alternatives

[craftcms/store-hours

This plugin adds a new “Store Hours” field type to Craft, for collecting the opening and closing hours of a business for each day of the week.

61102.9k1](/packages/craftcms-store-hours)[kdn/yii2-json-editor

JSON editor widget (josdejong/jsoneditor) for Yii 2.

22570.0k3](/packages/kdn-yii2-json-editor)[nizsheanez/yii2-json-rpc

A lightweight JsonRpc Server and Client for PHP

2034.0k](/packages/nizsheanez-yii2-json-rpc)[devgroup/yii2-jsoneditor

Yii2 jsoneditor widget

1199.6k1](/packages/devgroup-yii2-jsoneditor)

PHPackages © 2026

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