PHPackages                             sammaye/yii2-keycdn - 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. sammaye/yii2-keycdn

ActiveYii-extension

sammaye/yii2-keycdn
===================

A Yii2 extension for some keyCDN lovin'

06871PHP

Since Mar 30Pushed 10y ago1 watchersCompare

[ Source](https://github.com/Sammaye/yii2-keycdn)[ Packagist](https://packagist.org/packages/sammaye/yii2-keycdn)[ RSS](/packages/sammaye-yii2-keycdn/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-keycdn
===========

[](#yii2-keycdn)

A Yii2 extension for some KeyCDN lovin' that's so simple even your cat will be able to use it.

Defining the Extension
----------------------

[](#defining-the-extension)

Here is the full definition, from an example:

```
'keycdn' => [
	'class' => 'sammaye\keycdn\KeyCdn',
	'apiKey' => 'your_api_key'
]

```

Using It
--------

[](#using-it)

Everything is quite self explanatory. Let's dive straight in and use this sucker with examples.

### Example 1: `GET` zones

[](#example-1-get-zones)

```
var_dump(Yii::$app->keycdn->get('zones.json'));

```

### Example 2: `DELETE` `purgezone` by URL

[](#example-2-delete-purgezone-by-url)

```
var_dump(Yii::$app->keycdn->delete(
    'zones/purgeurl/xxx.json',
    [
        'urls' =>
        [
            'xxx-111.kxcdn.com/css/all-e007231ec83260807e00650a0c274b86.css'
        ]
    ]
));

```

### Responses

[](#responses)

Responses are raw, converted from JSON to the `stdClass` primative in PHP, for example: here is the response from `purgeurl`:

```
object(stdClass)[194]
  public 'status' => string 'success' (length=7)
  public 'description' => string 'Cache has been cleared for URL(s).' (length=34)

```

### Errors

[](#errors)

The extension will throw a `yii\base\Exception` when the body of the response cannot be decoded from JSON or if the JSON field `status` is `error`.

Links
-----

[](#links)

- [Issue Tracker](https://github.com/Sammaye/yii2-keycdn/issues)
- [Github](https://github.com/Sammaye/yii2-keycdn)
- [Packagist](https://packagist.org/packages/sammaye/yii2-keycdn)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7357836d822160350576f98b85244f4d5f960be303a2fcaa15a330187966cbd4?d=identicon)[Sammaye](/maintainers/Sammaye)

---

Top Contributors

[![Sammaye](https://avatars.githubusercontent.com/u/323996?v=4)](https://github.com/Sammaye "Sammaye (7 commits)")

### Embed Badge

![Health badge](/badges/sammaye-yii2-keycdn/health.svg)

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

PHPackages © 2026

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