2017 © Pedro Peláez
 

library alcon

communal library for developing app in phalcon framework or others

image

farwish/alcon

communal library for developing app in phalcon framework or others

  • Friday, July 20, 2018
  • by farwish
  • Repository
  • 1 Watchers
  • 4 Stars
  • 44 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 9 Versions
  • 16 % Grown

The README.md

Alcon

, (*1)

中文文档  , (*2)

Synopsis

Alcon is a light communal lib for your program., (*3)

Usage

  1. With Composer
$ composer require farwish/alcon -v   

or custom your composer.json like:, (*4)

{  
    "require": {  
        "farwish/alcon": "4.1.x-dev"  
    },  
    "repositories": [  
        {  
            "type": "vcs",  
            "url": "https://github.com/farwish/alcon"  
        }  
    ]  
}  
  1. Without Composer:
$ git clone https://github.com/farwish/alcon.git  

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

Suggest:

You are encouraged to read it by yourself, its few and simple., (*5)

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:

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

$ composer update   
$ phpunit  

Maintain or Join

Join Qq Group: 377154148  

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

The Versions

20/07 2018

dev-master

9999999-dev

communal library for developing app in phalcon framework or others

  Sources   Download

MIT Apache-2.0 Apache

The Requires

 

The Development Requires

by Avatar farwish

library support phalcon alcon thirdparty

14/02 2018

v4.1.1

4.1.1.0

communal library for developing app in phalcon framework or others

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Avatar farwish

library support phalcon alcon thirdparty

19/10 2017

dev-develop

dev-develop

communal library for developing app in phalcon framework or others

  Sources   Download

MIT Apache

The Requires

  • php >=7.0

 

The Development Requires

by Avatar farwish

library support phalcon alcon

10/10 2017

v4.1.0

4.1.0.0

communal library for developing app in phalcon framework or others

  Sources   Download

Apache

The Requires

  • php >=7.0

 

The Development Requires

by Avatar farwish

library support phalcon alcon

03/08 2017

v4.0.2

4.0.2.0

communal library for developing app in phalcon framework or others

  Sources   Download

Apache

The Requires

  • php >=7.0

 

The Development Requires

by Avatar farwish

library support phalcon alcon

18/04 2017

v4.0.1

4.0.1.0

communal library for developing app in phalcon framework

  Sources   Download

MIT

The Requires

  • php >=5.5.9
  • ext-phalcon ~3.0.2

 

The Development Requires

by Avatar farwish

support phalcon alcon

18/04 2017

v4

4.0.0.0

communal library for developing app in phalcon framework

  Sources   Download

MIT

The Requires

  • php >=5.5.9
  • ext-phalcon ~3.0.2

 

The Development Requires

by Avatar farwish

support phalcon alcon

15/12 2016

v3.0.2

3.0.2.0

communal library for developing app in phalcon framework

  Sources   Download

MIT

The Requires

  • php >=5.5.9
  • ext-phalcon ~3.0.2

 

by Avatar farwish

support phalcon alcon

12/12 2016

v2.0.13

2.0.13.0

communal library for developing app in phalcon framework

  Sources   Download

MIT

The Requires

  • php >=5.5.9
  • ext-phalcon ~2.0.13

 

by Avatar farwish

support phalcon alcon