src/Biz/CloudPlatform/Client/AbstractCloudAPI.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace Biz\CloudPlatform\Client;
use Biz\System\Service\SettingService;
use Psr\Log\LoggerInterface;
use Topxia\Service\Common\ServiceKernel;
class AbstractCloudAPI
{
const DEFAULT_API_VERSION = 'v1';
protected $apiVersion = self::DEFAULT_API_VERSION;
protected $userAgent = 'EduSoho Cloud API Client 1.0';
protected $connectTimeout = 15;
protected $timeout = 15;
protected $apiUrl = 'http://api.edusoho.net';
protected $debug = false;
/**
* @var LoggerInterface|null
*/
protected $logger = null;
/**
* @var string
*/
protected $accessKey;
/**
* @var string
*/
protected $secretKey;
public function __construct(array $options)
{
$this->setKey($options['accessKey'], $options['secretKey']);
if (!empty($options['apiUrl'])) {
$this->setApiUrl($options['apiUrl']);
}
if (!empty($options['apiVersion'])) {
$this->setApiVersion($options['apiVersion']);
}
$this->debug = empty($options['debug']) ? false : true;
}
public function setApiUrl($url)
{
$this->apiUrl = rtrim($url, '/');
return $this;
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。