PHPackages                             myzero1/yii2-z1site - 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. myzero1/yii2-z1site

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

myzero1/yii2-z1site
===================

Simple captcha for yii2.Just add the module in config file and use the widget.

1.0.2(7y ago)013BSD-3-ClausePHP

Since Nov 8Pushed 7y agoCompare

[ Source](https://github.com/myzero1/yii2-z1site)[ Packagist](https://packagist.org/packages/myzero1/yii2-z1site)[ RSS](/packages/myzero1-yii2-z1site/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (2)Versions (6)Used By (0)

yii2-z1site
===========

[](#yii2-z1site)

It is a module for site.It will loading config file according to the conditions.and there are the common pages of site. It use the [myzero1/yii2-theme-layui](https://github.com/myzero1/yii2-theme-layui) as it's theme.

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require-dev myzero1/yii2-z1site：*

```

or add

```
"myzero1/yii2-z1site：": "*"

```

to the require-dev section of your `composer.json` file.

Setting
-------

[](#setting)

Once the extension is installed, simply modify your application configuration as follows:

#### in main.php

[](#in-mainphp)

```
return [
    ......
    'basePath' => myzero1\z1site\components\MainLoader::getAppPath(),
    'runtimePath' => myzero1\z1site\components\MainLoader::getAppPath() . '/runtime', //basePath,runtimePath,vendorPath,timeZone
    'controllerNamespace' => 'myzero1\z1site\controllers',
    'bootstrap' => [
        'classMap' => function(){
            \Yii::$classMap['yii\captcha\CaptchaAction'] = '@app/components/libs/CaptchaAction.php';
            // \Yii::$classMap['myzero1\z1site\controllers\ActController'] = '@vendor/myzero1/yii2-z1site/src/controllers/act/ActController.php';
            // \Yii::$classMap['myzero1\z1site\models\LoginForm'] = '@vendor/myzero1/yii2-z1site/src/models/rewrite/LoginForm.php';
        }
    ],
    'modules' => [
        ......
        'z1siteid' => [ // z1siteid mybe ajust
            'class' => 'myzero1\z1site\Module',
        ],
        ......
    ],
    'components' => [
        ......
        'errorHandler' => [
            'errorAction' => 'z1siteid/site/error', // z1siteid mybe ajust
        ],
        'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
            'rules' => [
                '/' => 'z1siteid//' // z1siteid mybe ajust
            ],
        ],
        'user' => [
            'identityClass' => 'myzero1\z1site\models\User',
            'enableAutoLogin' => true,
            'identityCookie' => ['name' => '_identity-backend', 'httpOnly' => true],
        ],
        'view' => [
            'theme' => [
                'pathMap' => [
                    '@app/views' => '@vendor/myzero1/yii2-theme-layui/src/views', // using the layui theme
                ],
            ],
        ],
        'assetManager' => [
            'class' => 'yii\web\AssetManager',
            'forceCopy' => true,
            // 'linkAssets' => true,//link to assets,no cache.used in develop.
        ],
        ......
    ],
    ......
];
```

Usage
-----

[](#usage)

You can then access home page to watch the theme.

```
http://localhost/path/to/index.php

```

#### rewrite

[](#rewrite)

- `set rewrite`

```
return [
    ......
    'bootstrap' => [
        'classMap' => function(){
            \Yii::$classMap['yii\captcha\CaptchaAction'] = '@app/components/libs/CaptchaAction.php';
            \Yii::$classMap['myzero1\z1site\controllers\ActController'] = '@vendor/myzero1/yii2-z1site/src/controllers/act/ActController.php';
            \Yii::$classMap['myzero1\z1site\models\LoginForm'] = '@vendor/myzero1/yii2-z1site/src/models/rewrite/LoginForm.php';
        }
    ],
    ......
];
```

- `rewrite controller`

Add and Modify action by classMap.

Rewrite the view of action.through rewrite the beforeAction of controller.

- `rewrite class`

You can add and rewrite the function of class, only use the classMap.

LICENSE
-------

[](#license)

MIT

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

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

Total

3

Last Release

2742d ago

### Community

Maintainers

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

---

Top Contributors

[![myzero1](https://avatars.githubusercontent.com/u/22048203?v=4)](https://github.com/myzero1 "myzero1 (19 commits)")

### Embed Badge

![Health badge](/badges/myzero1-yii2-z1site/health.svg)

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

###  Alternatives

[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)

PHPackages © 2026

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