1. Go to this page and download the library: Download tao2581/ucclient library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
shell
namespace App;
use MyController\UCClient\Contracts\UCenterSSOContract;
class MyUCenterSSO implements UCenterSSOContract
{
public function synLogin($uid, $username = '')
{
/** 同步登录代码 **/
}
public function synLogout()
{
/** 同步注销代码 **/
}
}
shell
namespace App;
use MyController\UCClient\Contracts\UCenterAPIExecuteFilterContract;
class MyUCenterAPIExecuteFilter implements UCenterAPIExecuteFilterContract
{
public function beforeRun()
{
//
}
public function afterRun()
{
//
\Debugbar::disable(); //Runtime 关闭 debugbar
}
}