You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
107 lines
1.9 KiB
107 lines
1.9 KiB
<?php
|
|
|
|
//百度token管理
|
|
class ApiToken
|
|
{
|
|
|
|
private $id;
|
|
private $refresh_token;
|
|
private $expires_in;
|
|
private $end_time;
|
|
private $scope;
|
|
private $session_key;
|
|
private $access_token;
|
|
private $session_secret;
|
|
|
|
/**
|
|
* ApiToken constructor.
|
|
* @param $id
|
|
* @param $refresh_token
|
|
* @param $expires_in
|
|
* @param $end_time
|
|
* @param $scope
|
|
* @param $session_key
|
|
* @param $access_token
|
|
* @param $session_secret
|
|
*/
|
|
public function __construct($id, $refresh_token, $expires_in, $end_time, $scope, $session_key, $access_token, $session_secret)
|
|
{
|
|
$this->id = $id;
|
|
$this->refresh_token = $refresh_token;
|
|
$this->expires_in = $expires_in;
|
|
$this->end_time = $end_time;
|
|
$this->scope = $scope;
|
|
$this->session_key = $session_key;
|
|
$this->access_token = $access_token;
|
|
$this->session_secret = $session_secret;
|
|
}
|
|
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function getId()
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function getRefreshToken()
|
|
{
|
|
return $this->refresh_token;
|
|
}
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function getExpiresIn()
|
|
{
|
|
return $this->expires_in;
|
|
}
|
|
|
|
/**
|
|
* @return false|string
|
|
*/
|
|
public function getEndTime()
|
|
{
|
|
return $this->end_time;
|
|
}
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function getScope()
|
|
{
|
|
return $this->scope;
|
|
}
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function getSessionKey()
|
|
{
|
|
return $this->session_key;
|
|
}
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function getAccessToken()
|
|
{
|
|
return $this->access_token;
|
|
}
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function getSessionSecret()
|
|
{
|
|
return $this->session_secret;
|
|
}
|
|
|
|
|
|
} |