Files
kiri-wchat/wx/Wx.php
T

95 lines
1.3 KiB
PHP
Raw Normal View History

2019-07-17 17:17:37 +08:00
<?php
namespace wchat;
class Wx
{
/** @var static $instance */
private static $instance = null;
/** @var Config $config */
private $config = null;
/**
* @return static
*/
public static function getMiniProGaRamPage()
{
if (static::$instance === null) {
static::$instance = new Wx();
}
return static::$instance;
}
/**
* @return Config
*/
public function getConfig()
{
return $this->config;
}
/**
* @param Config $config
* @return $this
*/
public function setConfig(Config $config)
{
$this->config = $config;
return $this;
}
/**
* @return Template
*/
public function getTemplate()
{
return Template::getInstance($this->config);
}
2019-08-21 11:54:20 +08:00
/**
2019-08-21 11:55:42 +08:00
* @return PublicTemplate
2019-08-21 11:54:20 +08:00
*/
public function getPublicTemplate()
{
return PublicTemplate::getInstance($this->config);
}
2019-07-17 17:17:37 +08:00
/**
* @return Account
*/
public function getAccount()
{
return Account::getInstance($this->config);
}
/**
* @return Message
*/
public function getMessage()
{
return Message::getInstance($this->config);
}
/**
* @return Recharge
*/
public function getRecharge()
{
return Recharge::getInstance($this->config);
}
2019-08-29 11:32:58 +08:00
/**
2019-08-29 14:48:09 +08:00
* @return Notify
2019-08-29 11:32:58 +08:00
*/
public function getNotify()
{
return Notify::getInstance($this->config);
}
2019-07-17 17:17:37 +08:00
}