💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
` ~~~ <?php // +---------------------------------------------------------------------- // | Created by PHPstorm: JRKAdmin框架 [ JRKAdmin ] // +---------------------------------------------------------------------- // | Copyright (c) 2019~2022 [LuckyHHY] All rights reserved. // +---------------------------------------------------------------------- // | SiteUrl: http://www.luckyhhy.cn // +---------------------------------------------------------------------- // | Author: LuckyHhy <jackhhy520@qq.com> // +---------------------------------------------------------------------- // | Date: 2020/1/3-16:13 // +---------------------------------------------------------------------- // | Description: // +---------------------------------------------------------------------- namespace Jrk; /** * Class Pinyin * @package Jrk */ class Pinyin { /** * @var * @author: LuckyHhy <jackhhy520@qq.com> * @date: 2020/3/23-15:37 */ static protected $instance; /** * @var string * @author: LuckyHhy <jackhhy520@qq.com> * @date: 2020/3/23-15:37 */ static protected $trust = ""; /** * @param int $type * @return \Overtrue\Pinyin\Pinyin * @author: LuckyHhy <jackhhy520@qq.com> * @date: 2020/3/23 * @name: instance * @describe: */ public static function instance($type = 1) { // 小内存型 if ($type == 1) { self::$trust = ""; } else { if ($type == 2) { // 内存型 self::$trust = "Overtrue\Pinyin\MemoryFileDictLoader"; } else { if ($type == 3) { // I/O型 self::$trust = "Overtrue\Pinyin\GeneratorFileDictLoader"; } } } return new \Overtrue\Pinyin\Pinyin(self::$trust); } } ~~~ `