system/library/social.php
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* social.php
*
* @copyright 2020 damicms.com - All Rights Reserved
* @link https://www.guangdawangluo.com
* @author stiffer.chen <chenlin@damicms.com>
* @created 2020-06-2020/6/29 13:52
* @modified 2020-06-2020/6/29 13:52
*/
class Social
{
private $providerCode;
private $provider;
private static $socialProviders = ['facebook', 'twitter', 'instagram', 'google', 'paypal'];
private static $chSocialProviders = ['wechatofficial', 'qq', 'weibo', 'wechat'];
public function __construct($providerCode)
{
$this->providerCode = $providerCode;
$providerClass = "\\Social\\" . $providerCode;
$this->provider = new $providerClass();
}
public static function getInstance($providerCode)
{
return new self($providerCode);
}
public static function getProviderList()
{
$socialPath = DIR_SYSTEM . 'library/social';
$classPaths = glob($socialPath . '/*');
$classes = [];
foreach ($classPaths as $classPath) {
$start = strripos($classPath, '/') + 1;
$className = strtolower(mb_substr($classPath, $start));
$className = mb_substr($className, 0, stripos($className, '.'));
if ($className == 'base') {
continue;
}
$classes[] = $className;
}
return $classes;
}
public static function getSocialProviders()
{
return self::$socialProviders;
}
public static function getCnSocialProviders()
{
return self::$chSocialProviders;
}
public static function getSocialData()
{
$socials = config('module_omni_auth_items');
后面还有 61 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
