PHPackages                             vxm/yii2-gateway-clients - 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. vxm/yii2-gateway-clients

ActiveYii2-extension

vxm/yii2-gateway-clients
========================

An abstraction layer provide the skeleton for build rest api client (1-n).

2.0.1(7y ago)48482BSD-3-ClausePHPPHP &gt;=7.1.0

Since May 7Pushed 7y agoCompare

[ Source](https://github.com/vuongxuongminh/yii2-gateway-clients)[ Packagist](https://packagist.org/packages/vxm/yii2-gateway-clients)[ RSS](/packages/vxm-yii2-gateway-clients/feed)WikiDiscussions master Synced yesterday

READMEChangelog (8)Dependencies (3)Versions (13)Used By (2)

YII2 Gateway Clients
====================

[](#yii2-gateway-clients)

**Skeleton for build rest api client (1-n).**

[![Latest Stable Version](https://camo.githubusercontent.com/347facab15ad316e76f595040a4fd5107a205f4464149206a6740dc2155a67bb/68747470733a2f2f706f7365722e707567782e6f72672f76786d2f796969322d676174657761792d636c69656e74732f762f737461626c65)](https://packagist.org/packages/vxm/yii2-gateway-clients)[![Total Downloads](https://camo.githubusercontent.com/ebe6fd5a09a4ed98db8714d4586811d512f882790f4e771d47976d14c25f4dc3/68747470733a2f2f706f7365722e707567782e6f72672f76786d2f796969322d676174657761792d636c69656e74732f646f776e6c6f616473)](https://packagist.org/packages/vxm/yii2-gateway-clients)[![Build Status](https://camo.githubusercontent.com/ba4f1525c879d0d8747f29387550cb703115633fe4bc7188a1b3a6bba73b7fad/68747470733a2f2f7472617669732d63692e6f72672f76756f6e6778756f6e676d696e682f796969322d676174657761792d636c69656e74732e7376673f6272616e63683d312e302e30)](https://travis-ci.org/vuongxuongminh/yii2-gateway-clients)[![Code Coverage](https://camo.githubusercontent.com/608929a80dcef9fc9a124b65744daa781bbe786dfd28605d8456b455ad8fc3e0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f76756f6e6778756f6e676d696e682f796969322d676174657761792d636c69656e74732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/vuongxuongminh/yii2-gateway-clients/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/f0a7e9e139c0b004a61479137a33e95ea808f6f5f098dbba673e659a85900a8c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f76756f6e6778756f6e676d696e682f796969322d676174657761792d636c69656e74732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/vuongxuongminh/yii2-gateway-clients/?branch=master)[![Yii2](https://camo.githubusercontent.com/d6b0929173e28cc627430d2519ca1853466a70f37395877eaf4820cb3e1e1909/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506f77657265645f62792d5969695f4672616d65776f726b2d677265656e2e7376673f7374796c653d666c6174)](http://www.yiiframework.com/)

This Yii2 extension is an abstraction layer provide the skeleton for build an api client (1-n).

Requirements
------------

[](#requirements)

- [PHP &gt;= 7.1](http://php.net)
- [yiisoft/yii2 ~ 2.0.13](https://github.com/yiisoft/yii2)
- [yiisoft/yii2-httpclient ~ 2.0.0](https://github.com/yiisoft/yii2-httpclient)
- [vxm/gateway-clients ~ 1.0.0](https://github.com/vuongxuongminh/gateway-clients)

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

[](#installation)

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

```
composer require "vxm/yii2-gateway-clients"
```

or add

```
"vxm/yii2-gateway-clients": "*"
```

to the require section of your composer.json.

Usage
-----

[](#usage)

This is an abstraction layer, you MUST be create your own classes implements it. It designed for DRY principle when you need to build rest api client.

Abstract Classes Introduce
--------------------------

[](#abstract-classes-introduce)

An abstract classes have been designed for implemented an interfaces. You should extends it for easier implements interfaces on your own classes.

Abstract ClassDetails[**BaseGateway**](src/BaseGateway.php)Implemented [**GatewayInterface**](https://github.com/vuongxuongminh/gateway-clients/blob/master/src/GatewayInterface.php), abstract method your own class must create: `requestInternal`, `getBaseUrl`.[**BaseClient**](src/BaseClient.php)Implemented [**ClientInterface**](https://github.com/vuongxuongminh/gateway-clients/blob/master/src/ClientInterface.php), it not have an abstract method your own class should add properties an information for access gateway server api.[**ResponseData**](src/ResponseData.php)Abstract method your own class must create is `getIsOk` for end-user checking response data get from gateway server api is valid or not.Need an example?
----------------

[](#need-an-example)

Click [**here**](examples/example.php) to read simple example.

Project using it
----------------

[](#project-using-it)

- [yiiviet/yii2-esms](https://github.com/yiiviet/yii2-esms)
- [yiiviet/yii2-payment](https://github.com/yiiviet/yii2-payment)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

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

Recently: every ~38 days

Total

12

Last Release

2773d ago

Major Versions

1.0.9 → 2.0.02018-06-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/8901d64a1059726b851dbdd91463ad1d3169f9dba6a2dcff11d05f97d9bccaea?d=identicon)[vuongxuongminh](/maintainers/vuongxuongminh)

---

Top Contributors

[![vuongxuongminh](https://avatars.githubusercontent.com/u/38932626?v=4)](https://github.com/vuongxuongminh "vuongxuongminh (45 commits)")

---

Tags

rest-apiyii2yii2-extensionyii2extensionREST API

### Embed Badge

![Health badge](/badges/vxm-yii2-gateway-clients/health.svg)

```
[![Health](https://phpackages.com/badges/vxm-yii2-gateway-clients/health.svg)](https://phpackages.com/packages/vxm-yii2-gateway-clients)
```

PHPackages © 2026

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