- 授权协议: MIT
- 开发语言: PHP
- 操作系统: 跨平台
- 软件首页: http://easywechat.org/
- 软件文档: http://easywechat.org/
软件介绍
可能是目前最优雅的微信公众平台 SDK 了。 Laravel 5 拓展包: overtrue/laravel-wechat
不支持企业号,也不打算支持,原因?微信的API实在设计得太乱了,我怕累死。。。
特点
命名不那么乱七八糟;
隐藏开发者不需要关注的细节;
方法使用更优雅,不必再去研究那些奇怪的的方法名或者类名是做啥用的;
自定义缓存方式;
符合 PSR 标准,你可以各种方便的与你的框架集成;
高度抽象的消息类,免去各种拼json与xml的痛苦;
详细 Debug 日志,一切交互都一目了然;
安装
环境要求:PHP >= 5.5.9
使用 composer
composer require "overtrue/wechat:~3.0" -vvv
使用
基本使用(以服务端为例):
<?php
use EasyWeChat\Foundation\Application;
$options = [
'debug' => true,
'app_id' => 'wx3cf0f39249eb0e60',
'secret' => 'f1c242f4f28f735d4687abb469072a29',
'token' => 'easywechat',
'log' => [
'level' => 'debug',
'file' => '/tmp/easywechat.log',
],
// ...
];
$app = new Application($options);
$server = $app->server;
$user = $app->user;
$server->setMessageHandler(function($message) use ($user) {
$fromUser = $user->get($message->FromUserName);
return "{$fromUser->nickname} 您好!欢迎关注 overtrue!";
});
$server->serve()->send();更多请参考 http://easywechat.org/ 。
文档
强烈建议看懂微信文档后再来使用本 SDK。
贡献代码
License
MIT
Sass and Compass in Action
Wynn Netherland、Nathan Weizenbaum、Chris Eppstein、Brandon Mathis / Manning Publications / 2013-8-2 / USD 44.99
Written by Sass and Compass creators * Complete Sass language reference * Covers prominent Compass community plug-ins * Innovative approach to creating stylesheets Cascading Style Sheets paint the we......一起来看看 《Sass and Compass in Action》 这本书的介绍吧!
CSS 压缩/解压工具
在线压缩/解压 CSS 代码
HEX CMYK 转换工具
HEX CMYK 互转工具
