PHPackages                             ethercap/watermark - 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. ethercap/watermark

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

ethercap/watermark
==================

用来给内部系统打水印的包

1.0.4(6y ago)41.6k↓33.3%41MITJavaScript

Since Jan 19Pushed 5y ago3 watchersCompare

[ Source](https://github.com/ethercap/yii2-watermark)[ Packagist](https://packagist.org/packages/ethercap/watermark)[ RSS](/packages/ethercap-watermark/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (6)Used By (1)

yii2-watermark
==============

[](#yii2-watermark)

yii2框架的水印代码，可以自动给页面打水印。

前端代码主要来自于 ，感谢saucxs的付出，如有版权问题，欢迎联系我！

安装
--

[](#安装)

推荐的方式是通过composer 进行下载安装[composer](http://getcomposer.org/download/)。

在命令行执行

```
php composer.phar require "ethercap/watermark" "1.0.3"

```

或加入

```
"ethercap/watermark": "1.0.3"

```

到你的`composer.json`文件中的require段。

使用
--

[](#使用)

在后台需要有水印的页面上，加入如下的代码即可：

```
\ethercap\watermark\WaterMark::widget([]);
```

会出现如下的水印： [![image](./docs/img/example.png)](./docs/img/example.png)

如果对默认的参数不满意，可以通过参数修改配置：

```
\ethercap\watermark\WaterMark::widget([
    'id' => 'xxx',             //水印总体的id
    'txt' => "测试水印",        //水印的内容
    'x' => 20,                 //水印起始位置x轴坐标
    'y' => 20,                 //水印起始位置Y轴坐标
    'rows' => 0,               //水印行数
    'cols' => 0,               //水印列数
    'xSpace' => 100,           //水印x轴间隔
    'ySpace' => 50,            //水印y轴间隔
    'font' => '微软雅黑',       //水印字体
    'color' => 'black',        //水印字体颜色
    'fontSize' => '18px',      //水印字体大小
    'alpha' => 0.15,           //水印透明度，要求设置在大于等于0.003
    'width' => 150,            //水印宽度
    'height' => 100,           //水印长度
    'angle' => 15,             //水印倾斜度数
]);
```

广告
--

[](#广告)

我们是一群热爱技术，追求卓越的极客，我们乐于做一些对整个社会都有作用的事情，我们希望通过我们的努力来推动整个社会的创新，如果你也一样，欢迎加入我们（）！你也可以通过 来了解更多！

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

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

Total

5

Last Release

2218d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/23f3710882e5d3771ba0a1f81ef432345da7eba06ead50b479c0d574b94bc281?d=identicon)[ethercap](/maintainers/ethercap)

---

Top Contributors

[![buptlsp](https://avatars.githubusercontent.com/u/3291512?v=4)](https://github.com/buptlsp "buptlsp (6 commits)")

---

Tags

watermarkyiiyii2watermarkyii2extension

### Embed Badge

![Health badge](/badges/ethercap-watermark/health.svg)

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

###  Alternatives

[vyants/yii2-daemon

Extension provides functionality for simple daemons creation and control

7859.0k](/packages/vyants-yii2-daemon)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

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

PHPackages © 2026

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