Files
kiri-wchat/qq/QqFactory.php
T

28 lines
440 B
PHP
Raw Permalink Normal View History

2022-09-09 16:42:55 +08:00
<?php
namespace wchat\wx;
use Kiri\Di\Container;
2023-11-14 09:20:29 +08:00
use wchat\common\AppConfig;
2022-09-09 16:42:55 +08:00
class QqFactory
{
2023-07-11 21:04:33 +08:00
/**
* @param $class
2023-11-14 09:20:29 +08:00
* @param AppConfig $config
2023-07-11 21:04:33 +08:00
* @return mixed
2023-12-12 15:35:37 +08:00
* @throws
2023-07-11 21:04:33 +08:00
*/
2023-12-12 15:35:37 +08:00
public static function get($class, AppConfig $config): mixed
{
$container = Container::instance();
$object = $container->get($class);
$object->setPayConfig($config);
return $object;
}
2022-09-09 16:42:55 +08:00
}