Skip to content

Commit

Permalink
增加方法
Browse files Browse the repository at this point in the history
  • Loading branch information
wangwenling committed Aug 15, 2019
1 parent ff3f6ad commit 7f57e7d
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
42 changes: 42 additions & 0 deletions src/OpenPlatform/OpenPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,46 @@ public function getConfig(): OpenPlatformConfig
{
return $this->config;
}

/**
* accessToken
*
* @return AccessToken
*/
public function accessToken(): AccessToken
{
if (!isset($this->accessToken)) {
$this->accessToken = new AccessToken($this);
}

return $this->accessToken;
}

/**
* VerifyTicket
*
* @return VerifyTicket
*/
public function verifyTicket(): VerifyTicket
{
if (!isset($this->verifyTicket)) {
$this->verifyTicket = new VerifyTicket($this);
}

return $this->verifyTicket;
}

/**
* encryptor
*
* @return Encryptor
*/
public function encryptor(): Encryptor
{
if (!isset($this->encryptor)) {
$this->encryptor = new Encryptor($this);
}

return $this->encryptor;
}
}
40 changes: 40 additions & 0 deletions src/OpenPlatform/OpenPlatformConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,44 @@ public function setTempDir($tempDir): OpenPlatformConfig
$this->tempDir = $tempDir;
return $this;
}

/**
* 获取第三方平台appid
* @return mixed
*/
public function getComponentAppId()
{
return $this->componentAppId;
}

/**
* 设置第三方平台appid
* @param mixed
* @return OpenPlatformConfig
*/
public function setComponentAppId($componentAppId): OpenPlatformConfig
{
$this->componentAppId = $componentAppId;
return $this;
}

/**
* 获取第三方平台appsecret
* @return mixed
*/
public function getComponentAppSecret()
{
return $this->componentAppSecret;
}

/**
* 设置第三方平台appsecret
* @param mixed
* @return OpenPlatformConfig
*/
public function setComponentAppSecret($componentAppSecret): OpenPlatformConfig
{
$this->componentAppSecret = $componentAppSecret;
return $this;
}
}

0 comments on commit 7f57e7d

Please sign in to comment.