PHPackages                             ucenter/test - 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. ucenter/test

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

ucenter/test
============

SDK

v0.3(6y ago)06.2k1MITPHP

Since Apr 11Pushed 6y ago1 watchersCompare

[ Source](https://github.com/stevegao1986/ucenter)[ Packagist](https://packagist.org/packages/ucenter/test)[ RSS](/packages/ucenter-test/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (1)Versions (4)Used By (1)

\#用户中心文档

```
require './vendor/autoload.php'; //导入自导加载

use Xthk\Ucenter\User\OperateUcenter;

#配置参数
$config = [
    'domain'     => 'http://127.0.0.1', //请求的域名
    'app_id'     => 1, //应用ID
    'app_secret' => '123456', //应用秘钥
    'source'     => 1, //来源
    'app_name'   => 'web' //应用名称
];

#链式操作
$user = new OperateUcenter($config);

$res = $user
    ->setRequestUri( \Xthk\Ucenter\UriConfig::USER_LOGIN_BY_PWD ) //设置请求的URI
    ->setParams( 'mobile', '13308222255' ) //设置额外的参数
    ->setParams( 'password', '123456' )
    ->setParams( 'login_ip', '35.25.25.36' )
    ->setPushId( '111222333' )
    ->setPushType( 1 )
    ->send();

echo $res;

#方法调用模式，下面罗列了常用的参数设置，没有的参数可以使用setParams($name,$value)设置

$user = new OperateUcenter($config);

$user->setMobile('13255552222');

$user->setPassword('123456');

$user->setPasswordConfirmation('123456');

$user->setSmsCode('111111');

$user->setRegisterIp('10.11.12.32');

$user->setUserId(1);

$user->setBirthday('2012-11-11');

$user->setCityId(11011);

$user->setEmergencyMobile('13955558888');

$user->setGender(1);

$user->setOriginalPassword('123456');

$user->setRealName('张三');

$user->setLoginIp('12.12.12.12');

$user->setOpenId('微信openid');

$user->setWechatType('某一个公众号的自定义类型');

$user->setPushId('三方推送与设备绑定的id，比如极光');

$user->setPushType('ios or android');

$user->setStudentId(1);

$user->setStatus(1);
```

##### Xthk\\Ucenter\\UriConfig中的常量是请求的uri

[](#xthkucenteruriconfig中的常量是请求的uri)

\##发送请求事件

```
$user->send(UriConfig::USER_REGISTER);
```

\##打印调试的参数

var\_dump($user-&gt;getParams());

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

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

Total

3

Last Release

2226d ago

### Community

Maintainers

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

### Embed Badge

![Health badge](/badges/ucenter-test/health.svg)

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

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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