PHPackages                             biozahard/yii2-cloudflare-api - 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. biozahard/yii2-cloudflare-api

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

biozahard/yii2-cloudflare-api
=============================

Simple Yii2 cloudflare extension without any requirements.

1262PHP

Since Apr 11Pushed 9y ago1 watchersCompare

[ Source](https://github.com/biozahard/yii2-cloudflare)[ Packagist](https://packagist.org/packages/biozahard/yii2-cloudflare-api)[ RSS](/packages/biozahard-yii2-cloudflare-api/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Cloudflare API
==============

[](#cloudflare-api)

Yii2 Component for CloudFlare api v4.0.

Minimum requirements: Yii2, Curl

Installation via Composer:

`composer require biozahard/yii2-cloudflare-api`

Configuring in config.php:

```
'components' => [
//...
        'cloudflare' => [
            'class'         => 'biozahard\cloudflare\CloudflareApi',
            'apiurl'   => 'https://api.cloudflare.com/client/v4/',
            'authkey'       => '5gds0kfdsc024ndsofsj049jisdofjsd034jw',
            'authemail'     => 'admin@mail.com',
            'sites'         => [
                'mysite.com',
                'thebest-country.ua',
                'anotheronesite.biz',
            ],
        ],
//...
]
```

After this configuring you can use: `\Yii::$app->cloudflare`

So, let's see some examples:

1. Purge all cloudflare cache:

```
//get the CloudFlare api component
$cf = \Yii::$app->cloudflare;

//purge cache for specific website:
$cf->purgeCache('thebest-country.ua');

//Clear the cache for the first site from the specified list:
$cf->purgeCache();

```

---

License: LGPL v3 or later

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ccd30055d93c23ed3e9ebe719d9c1c70f864fe214b6f1df7fd659ff41ed4d00?d=identicon)[biozahard](/maintainers/biozahard)

### Embed Badge

![Health badge](/badges/biozahard-yii2-cloudflare-api/health.svg)

```
[![Health](https://phpackages.com/badges/biozahard-yii2-cloudflare-api/health.svg)](https://phpackages.com/packages/biozahard-yii2-cloudflare-api)
```

###  Alternatives

[shaozeming/aliyun-sts

基于阿里云openapi系列接口中STS最新版本的SDK进行封装的composer package

2021.1k1](/packages/shaozeming-aliyun-sts)

PHPackages © 2026

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