PHPackages                             farwish/alcon - 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. farwish/alcon

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

farwish/alcon
=============

communal library for developing app in phalcon framework or others

v4.1.1(8y ago)6832Apache-2.0PHPPHP &gt;=7.0

Since Dec 12Pushed 7y ago1 watchersCompare

[ Source](https://github.com/farwish/alcon)[ Packagist](https://packagist.org/packages/farwish/alcon)[ RSS](/packages/farwish-alcon/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (3)Versions (9)Used By (0)

Alcon
=====

[](#alcon)

[![](https://camo.githubusercontent.com/0fd9ef7b2ca28eb072adf77947d6739e16cd858144466fda2d79fb39641c31b3/68747470733a2f2f6170692e7472617669732d63692e6f72672f666172776973682f616c636f6e2e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/0fd9ef7b2ca28eb072adf77947d6739e16cd858144466fda2d79fb39641c31b3/68747470733a2f2f6170692e7472617669732d63692e6f72672f666172776973682f616c636f6e2e7376673f6272616e63683d6d6173746572)[![](https://camo.githubusercontent.com/4f320391c732a972a97b20bb808b6ddebd09cf4db2edb78b6d4c59a8154ea9c2/68747470733a2f2f706f7365722e707567782e6f72672f666172776973682f616c636f6e2f762f737461626c65)](https://camo.githubusercontent.com/4f320391c732a972a97b20bb808b6ddebd09cf4db2edb78b6d4c59a8154ea9c2/68747470733a2f2f706f7365722e707567782e6f72672f666172776973682f616c636f6e2f762f737461626c65)[![](https://camo.githubusercontent.com/3ce4d64d1a5ced03641a6a57d73cfe38d26f8a348313f1de0f150af7d1c93396/68747470733a2f2f706f7365722e707567782e6f72672f666172776973682f616c636f6e2f646f776e6c6f616473)](https://camo.githubusercontent.com/3ce4d64d1a5ced03641a6a57d73cfe38d26f8a348313f1de0f150af7d1c93396/68747470733a2f2f706f7365722e707567782e6f72672f666172776973682f616c636f6e2f646f776e6c6f616473)[![](https://camo.githubusercontent.com/ffe6cfa4e1645ccbb8bc10b122ea08c28e109d33ef4519a605cacb910430851f/68747470733a2f2f706f7365722e707567782e6f72672f666172776973682f616c636f6e2f762f756e737461626c65)](https://camo.githubusercontent.com/ffe6cfa4e1645ccbb8bc10b122ea08c28e109d33ef4519a605cacb910430851f/68747470733a2f2f706f7365722e707567782e6f72672f666172776973682f616c636f6e2f762f756e737461626c65)[![](https://camo.githubusercontent.com/a77f90ff869717aa221995264221781c331ebb35c116ffff3574511af441542a/68747470733a2f2f706f7365722e707567782e6f72672f666172776973682f616c636f6e2f6c6963656e7365)](https://camo.githubusercontent.com/a77f90ff869717aa221995264221781c331ebb35c116ffff3574511af441542a/68747470733a2f2f706f7365722e707567782e6f72672f666172776973682f616c636f6e2f6c6963656e7365)

[中文文档](https://github.com/farwish/alcon/blob/master/README.cn.md "alcon中文文档")

Synopsis
--------

[](#synopsis)

Alcon is a light communal lib for your program.

Usage
-----

[](#usage)

1. With Composer

```
$ composer require farwish/alcon -v

```

or custom your composer.json like:

```
{
    "require": {
        "farwish/alcon": "4.1.x-dev"
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/farwish/alcon"
        }
    ]
}

```

2. Without Composer:

```
$ git clone https://github.com/farwish/alcon.git

include "/your_path/farwish/alcon/autoload.php";

```

Suggest:
--------

[](#suggest)

You are encouraged to read it by yourself, its few and simple.

```
Status Code:
$status = \Alcon\Supports\Codes::ACTION_SUC;         // 0
$messag = \Alcon\Supports\Codes::get($status);       // 操作成功
$messag = \Alcon\Supports\Codes::map('ACTION_SUC');  // 操作成功
```

```
Helper Class:
\Alcon\Supports\Helper::isInWechat();
\Alcon\Supports\Helper::arrayColumnCombine($array, $column);
\Alcon\Supports\Helper::buildInsertSql($table, $column, array $data);
...
```

```
Design Pattern:
\Alcon\Design\Event
\Alcon\Design\Container
\Alcon\Design\Singleton
...
```

```
Thirdparty Wechat sdk:
\Alcon\Thirdparty\Wx::get_sns_token($token);
\Alcon\Thirdparty\Wx::get_userinfo($access_token, $openid);
...
```

```
Thirdparty Alipay sdk:
------ Create order
$trade = new \Alcon\Thirdparty\Alipay\AlipayTrade();
$trade->setPid('xx');
$trade->setAppid('xx');
$trade->setAlipayPublicKeyPath('xx');
$trade->setAlipayAppPrivateKeyPath('xx');
$trade->setNotifyUrl('http://xx');
$trade->precreateSet('xx', 'xx', 'xx', 'xx');
$trade->precreate();

------ Refund order
$trade = new \Alcon\Thirdparty\Alipay\AlipayTrade();
$trade->setPid('xx');
$trade->setAppid('xx');
$trade->setAlipayPublicKeyPath('xx');
$trade->setAlipayAppPrivateKeyPath('xx');
$trade->refundSet('xx', 'xx');
$trade->refund();

------ Signature can use standalone
self::signature($decoded_query_string);
```

Structure:
----------

[](#structure)

```
Design/
    |_ Container.php
    |_ Decorator.php
    |_ Event.php
    |_ Singleton.php
    |_ Strategy.php

Projects/
    |_ Alconseek/

Scripts/
    |_ model_header.php
    |_ produce_all_models.php

Services/
    |_ ServiceBase.php

Supports/
    |_ Codes.php
    |_ Helper.php
    |_ StatusTrait.php

Thirdparty/
    |_ Alipay/
        |_ AlipayHelperTrait.php
        |_ AlipayTrade.php
    |_ Wechat/
        |_ Wx.php
        |_ WxAbstract.php

Traits/
    |_ ControllerTrait.php
    |_ JsonRespondTrait.php
    |_ ModelTrait.php
    |_ ModelAdvanceTrait.php
    |_ SentryClientClass.php
    |_ SentryClientTrait.php

```

Unit test
---------

[](#unit-test)

```
$ composer update
$ phpunit

```

Maintain or Join
----------------

[](#maintain-or-join)

```
Join Qq Group: 377154148

If you do use this package, please let me know; welcome to give pull request.

```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

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

Total

7

Last Release

3051d ago

Major Versions

v2.0.13 → v3.0.22016-12-15

v3.0.2 → v4.0.12017-04-18

PHP version history (2 changes)v2.0.13PHP &gt;=5.5.9

v4.0.2PHP &gt;=7.0

### Community

Maintainers

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

---

Top Contributors

[![farwish](https://avatars.githubusercontent.com/u/6552412?v=4)](https://github.com/farwish "farwish (88 commits)")

---

Tags

alconlibrarylnmpphalconlibraryphalconsupportthirdpartyalcon

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/farwish-alcon/health.svg)

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

###  Alternatives

[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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